Home
Developing Analytics Applications
IRunTask fails for multiple Threads
system_migrated
Hello
When running a report using multiple Threads BIRT writes this message to the log:
WARNUNG: Exceptions occur during xml parsing
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.datatools.enablement.oda.xml.util.SaxParser.parse(SaxParser.java:168)
at org.eclipse.datatools.enablement.oda.xml.util.SaxParser.run(SaxParser.java:119)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
... 7 more
The error can be reproduced by running the sample App in the attachment (use the -Xmx1024m VM-option).
I am using an XML Datasource. The data is provided over the AppContext.
ctxMap.put("org.eclipse.birt.report.data.oda.xml.inputStream", new FileInputStream("data.xml"));
ctxMap.put("org.eclipse.birt.report.data.oda.xml.closeInputStream", new Boolean(true));
task.setAppContext(ctxMap);
The sample will always work, when the line "task.setAppContext(ctxMap);" is set in comments.
I got the error in Birt 2.5.1, 2.5.2 and 2.6.0RC1
Any ideas?
Thank you
Find more posts tagged with
Comments
There are no comments yet