Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » java.lang.IllegalArgumentException when generate MS word
java.lang.IllegalArgumentException when generate MS word [message #538309] Mon, 07 June 2010 10:01 Go to next message
Alex Chen is currently offline Alex ChenFriend
Messages: 11
Registered: July 2009
Junior Member
Hi BIRT Guru,

I got exception below when I try to generate MS word using BIRT engine API, could somebody give me a light on how to fix it? I guess it's an issue of my report template?

Jun 7, 2010 5:54:09 PM org.eclipse.birt.report.engine.api.impl.RenderTask render
SEVERE: An error happened while running the report. Cause:
Throwable occurred: java.lang.IllegalArgumentException: "fromUnits"must be one of the absolute units(CM, IN, MM, PT).
at org.eclipse.birt.report.model.api.util.DimensionUtil.convert To(DimensionUtil.java:89)
at org.eclipse.birt.report.engine.ir.DimensionType.convertTo(Di mensionType.java:111)
at org.eclipse.birt.report.engine.emitter.wpml.WordUtil.convert To(WordUtil.java:100)
at org.eclipse.birt.report.engine.emitter.wpml.WordUtil.convert To(WordUtil.java:72)
at org.eclipse.birt.report.engine.emitter.wpml.AbstractEmitterI mpl.startTable(AbstractEmitterImpl.java:529)
at org.eclipse.birt.report.engine.emitter.wpml.DocEmitter.start Table(DocEmitter.java:362)
at org.eclipse.birt.report.engine.presentation.ContentEmitterVi sitor.visitTable(ContentEmitterVisitor.java:81)
at org.eclipse.birt.report.engine.content.impl.TableContent.acc ept(TableContent.java:104)
at org.eclipse.birt.report.engine.presentation.ContentEmitterVi sitor.visit(ContentEmitterVisitor.java:51)
at org.eclipse.birt.report.engine.presentation.ContentEmitterVi sitor.visitChildren(ContentEmitterVisitor.java:171)
at org.eclipse.birt.report.engine.presentation.ContentEmitterVi sitor.visitContainer(ContentEmitterVisitor.java:73)
at org.eclipse.birt.report.engine.content.impl.ContainerContent .accept(ContainerContent.java:42)
at org.eclipse.birt.report.engine.presentation.ContentEmitterVi sitor.visit(ContentEmitterVisitor.java:51)
at org.eclipse.birt.report.engine.presentation.ContentEmitterVi sitor.visitChildren(ContentEmitterVisitor.java:171)
at org.eclipse.birt.report.engine.emitter.wpml.DocEmitterImpl.s tartForeign(DocEmitterImpl.java:169)
at org.eclipse.birt.report.engine.emitter.wpml.DocEmitter.start Foreign(DocEmitter.java:282)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st artContent(ContentEmitterUtil.java:77)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEm itter.startContent(HTMLTableLayoutEmitter.java:146)
at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter .startForeign(ContentEmitterAdapter.java:168)
at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st artContent(ContentEmitterUtil.java:77)
at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageB uffer.startContent(DummyPageBuffer.java:125)
at org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.st art(HTMLLeafItemLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:139)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.resumeLayout(HTMLInlineStackingLM.java:111)
at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.layoutNodes(HTMLInlineStackingLM.java:160)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.l ayoutChildren(HTMLTableBandLM.java:67)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:26)
at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou tChildren(HTMLTableLM.java:132)
at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:140)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:70)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout (HTMLPageLM.java:90)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE ngine.layout(HTMLReportLayoutEngine.java:99)
at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRange Render.render(RenderTask.java:577)
at org.eclipse.birt.report.engine.api.impl.RenderTask.render(Re nderTask.java:221)
at com.ibm.rmc.publishing.doc.service.DocumentGenerator$2.run(D ocumentGenerator.java:162)
at java.lang.Thread.run(Thread.java:735)
Re: java.lang.IllegalArgumentException when generate MS word [message #538461 is a reply to message #538309] Mon, 07 June 2010 16:45 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you post the report?

On 6/7/2010 6:01 AM, Alex Chen wrote:
> Hi BIRT Guru,
>
> I got exception below when I try to generate MS word using BIRT engine
> API, could somebody give me a light on how to fix it? I guess it's an
> issue of my report template?
>
> Jun 7, 2010 5:54:09 PM
> org.eclipse.birt.report.engine.api.impl.RenderTask render
> SEVERE: An error happened while running the report. Cause:
> Throwable occurred: java.lang.IllegalArgumentException: "fromUnits"must
> be one of the absolute units(CM, IN, MM, PT).
> at org.eclipse.birt.report.model.api.util.DimensionUtil.convert
> To(DimensionUtil.java:89)
> at org.eclipse.birt.report.engine.ir.DimensionType.convertTo(Di
> mensionType.java:111)
> at org.eclipse.birt.report.engine.emitter.wpml.WordUtil.convert
> To(WordUtil.java:100)
> at org.eclipse.birt.report.engine.emitter.wpml.WordUtil.convert
> To(WordUtil.java:72)
> at org.eclipse.birt.report.engine.emitter.wpml.AbstractEmitterI
> mpl.startTable(AbstractEmitterImpl.java:529)
> at org.eclipse.birt.report.engine.emitter.wpml.DocEmitter.start
> Table(DocEmitter.java:362)
> at org.eclipse.birt.report.engine.presentation.ContentEmitterVi
> sitor.visitTable(ContentEmitterVisitor.java:81)
> at org.eclipse.birt.report.engine.content.impl.TableContent.acc
> ept(TableContent.java:104)
> at org.eclipse.birt.report.engine.presentation.ContentEmitterVi
> sitor.visit(ContentEmitterVisitor.java:51)
> at org.eclipse.birt.report.engine.presentation.ContentEmitterVi
> sitor.visitChildren(ContentEmitterVisitor.java:171)
> at org.eclipse.birt.report.engine.presentation.ContentEmitterVi
> sitor.visitContainer(ContentEmitterVisitor.java:73)
> at org.eclipse.birt.report.engine.content.impl.ContainerContent
> .accept(ContainerContent.java:42)
> at org.eclipse.birt.report.engine.presentation.ContentEmitterVi
> sitor.visit(ContentEmitterVisitor.java:51)
> at org.eclipse.birt.report.engine.presentation.ContentEmitterVi
> sitor.visitChildren(ContentEmitterVisitor.java:171)
> at org.eclipse.birt.report.engine.emitter.wpml.DocEmitterImpl.s
> tartForeign(DocEmitterImpl.java:169)
> at org.eclipse.birt.report.engine.emitter.wpml.DocEmitter.start
> Foreign(DocEmitter.java:282)
> at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st
> artContent(ContentEmitterUtil.java:77)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableLayoutEm
> itter.startContent(HTMLTableLayoutEmitter.java:146)
> at org.eclipse.birt.report.engine.emitter.ContentEmitterAdapter
> .startForeign(ContentEmitterAdapter.java:168)
> at org.eclipse.birt.report.engine.emitter.ContentEmitterUtil.st
> artContent(ContentEmitterUtil.java:77)
> at org.eclipse.birt.report.engine.layout.html.buffer.DummyPageB
> uffer.startContent(DummyPageBuffer.java:125)
> at org.eclipse.birt.report.engine.layout.html.HTMLLeafItemLM.st
> art(HTMLLeafItemLM.java:67)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:139)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
> gLM.resumeLayout(HTMLInlineStackingLM.java:111)
> at org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin
> gLM.layoutNodes(HTMLInlineStackingLM.java:160)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableBandLM.l
> ayoutChildren(HTMLTableBandLM.java:67)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la
> youtChildren(HTMLStackingLM.java:26)
> at org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou
> tChildren(HTMLTableLM.java:132)
> at org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la
> yout(HTMLAbstractLM.java:140)
> at org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking
> LM.layoutNodes(HTMLBlockStackingLM.java:70)
> at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout
> (HTMLPageLM.java:90)
> at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE
> ngine.layout(HTMLReportLayoutEngine.java:99)
> at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRange
> Render.render(RenderTask.java:577)
> at org.eclipse.birt.report.engine.api.impl.RenderTask.render(Re
> nderTask.java:221)
> at com.ibm.rmc.publishing.doc.service.DocumentGenerator$2.run(D
> ocumentGenerator.java:162)
> at java.lang.Thread.run(Thread.java:735)
>
Re: java.lang.IllegalArgumentException when generate MS word [message #538916 is a reply to message #538461] Wed, 09 June 2010 05:48 Go to previous message
Alex Chen is currently offline Alex ChenFriend
Messages: 11
Registered: July 2009
Junior Member
Hi Jason,

We have HTML content in our report, and I find the work around is that don't use absolute pixel value for table width.

***************
<br />
<table border="0" width="589" align="center">
<tbody>
<tr>
<td width="96">
<div align="center">
<a href=" ./../../../publish.openup.base/customcategories/getting_star ted_5684BDA6.html "
***************

to

***************
<br />
<table border="0" width="100%" align="center">
<tbody>
<tr>
<td width="96">
<div align="center">
<a href=" ./../../../publish.openup.base/customcategories/getting_star ted_5684BDA6.html "
***************

A bugzilla has been created: https://bugs.eclipse.org/bugs/show_bug.cgi?id=316240

Thanks much,
--Alex
Previous Topic:ERROR: adaptDataSet
Next Topic:NPE when generate MS word using BIRT
Goto Forum:
  


Current Time: Fri Apr 26 00:43:10 GMT 2024

Powered by FUDForum. Page generated in 0.02772 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top