Home » Eclipse Projects » BIRT » Charting problems w/ViewerServlet in Spring DM(Can't get charting to work w/ViewerServlet in Spring DM web bundle)
| Charting problems w/ViewerServlet in Spring DM [message #519023] |
Fri, 05 March 2010 13:08  |
John Sipher Messages: 8 Registered: March 2010 |
Junior Member |
|
|
I'm trying to convert an existing BIRT application that uses the viewer servlet hosted in JBoss or WebSphere to run as a web bundle in Spring DM.
I've added an OSGi manifest with Spring DM's Web-ContextPath header to birt.war (this is just the plain vanilla viewer with example reports and none of our code). The container starts up ok and I can run test.rptdesign without problems.
But, when i try to run test1.rptdesign I get this exception
Mar 5, 2010 1:00:53 PM org.eclipse.birt.chart.reportitem.ChartReportItemImpl deserialize
WARNING: Exception
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with uri 'http://www.birt.eclipse.org/ChartModel' not found. (file:///C:/InforStudio31/workspace-wmbirt/com.infor.wm.reports.birt.target/test.chart, 1, 367)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:191)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:180)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1494)
at org.eclipse.birt.chart.model.impl.SerializerImpl.fromXml(SerializerImpl.java:443)
at org.eclipse.birt.chart.reportitem.ChartReportItemImpl.deserialize(ChartReportItemImpl.java:281)
at org.eclipse.birt.report.model.extension.PeerExtensibilityProvider.initializeReportItem(PeerExtensibilityProvider.java:582)
at org.eclipse.birt.report.model.elements.ExtendedItem.initializeReportItem(ExtendedItem.java:305)
at org.eclipse.birt.report.model.elements.ExtendedItem.doCheck(ExtendedItem.java:642)
at org.eclipse.birt.report.model.elements.ExtendedItem.checkCompatibility(ExtendedItem.java:604)
at org.eclipse.birt.report.model.parser.ModuleParserHandler.handleExtendedItemCompatibility(ModuleParserHandler.java:431)
at org.eclipse.birt.report.model.parser.ModuleParserHandler.endDocument(ModuleParserHandler.java:393)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.java:737)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:515)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.eclipse.birt.report.model.parser.ModuleReader.readModule(ModuleReader.java:94)
at org.eclipse.birt.report.model.parser.DesignReader.read(DesignReader.java:88)
at org.eclipse.birt.report.model.core.DesignSessionImpl.openDesign(DesignSessionImpl.java:315)
at org.eclipse.birt.report.model.api.SessionHandleImpl.openDesign(SessionHandleImpl.java:294)
at org.eclipse.birt.report.engine.parser.ReportParser.getDesignHandle(ReportParser.java:158)
at org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.openReportDesign(ReportEngineHelper.java:255)
at org.eclipse.birt.report.engine.api.impl.ReportEngine.openReportDesign(ReportEngine.java:589)
at org.eclipse.birt.report.service.ReportEngineService.openReportDesign(ReportEngineService.java:383)
at org.eclipse.birt.report.utility.BirtUtility.getRunnableFromDesignFile(BirtUtility.java:594)
at org.eclipse.birt.report.context.ViewerAttributeBean.getDesignHandle(ViewerAttributeBean.java:654)
at org.eclipse.birt.report.context.ViewerAttributeBean.__init(ViewerAttributeBean.java:231)
at org.eclipse.birt.report.context.BaseAttributeBean.init(BaseAttributeBean.java:233)
at org.eclipse.birt.report.context.ViewerAttributeBean.<init>(ViewerAttributeBean.java:116)
at org.eclipse.birt.report.context.BirtContext.__init(BirtContext.java:44)
at org.eclipse.birt.report.context.BaseContext.<init>(BaseContext.java:69)
at org.eclipse.birt.report.context.BirtContext.<init>(BirtContext.java:30)
at org.eclipse.birt.report.servlet.ViewerServlet.__getContext(ViewerServlet.java:150)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:243)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://www.birt.eclipse.org/ChartModel' not found. (file:///C:/InforStudio31/workspace-wmbirt/com.infor.wm.reports.birt.target/test.chart, 1, 367)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2590)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2421)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1299)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1468)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1019)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1001)
at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:712)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:767)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1359)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl.java:1316)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3095)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:181)
... 55 more
I'm sure it's some classloading problem, but I don't have a clue how to diagnose or fix it.
Any/all suggestions are appreciated.
|
|
| | | |
| Re: Charting problems w/ViewerServlet in Spring DM [message #519388 is a reply to message #519378] |
Mon, 08 March 2010 12:10   |
John Sipher Messages: 8 Registered: March 2010 |
Junior Member |
|
|
Hi Jason,
No, I did not.
It looks to me as if the ViewerServlet starts up another Equinox instance that's local to the bundle containing the ViewerServlet. So, it seemed like I shouldn't need to add any of the runtime plugins to the DM Server. Leaving them out of DM Server seems to work ok until charting comes into the picture, at which point I get the exception about the unregistered EMF package for the charting model.
I poked around a bit and found that I can get rid of the exception by removing org.eclipse.birt.chart.engine_2.5.1.v20090902.jar from WEB-INF/platform/plugins in the web bundle. I believe doing that, coupled with the org.eclipse.birt.api bundle, makes the platform instance started by the servlet use classes from the servlet's classpath (WEB-INF/lib/chartengineapi.jar and./or chartitemapi.jar), i.e., it works around that child-first classloader in OSGiLauncher.
But, although that gets rid of the exception, the charts still don't display and I don't see anything in the logs to point me to the cause. So, I'm probably all wet on that approach and only succeeded in disabling charting.
Thanks,
John
|
|
|
| Re: Charting problems w/ViewerServlet in Spring DM [message #519398 is a reply to message #519388] |
Mon, 08 March 2010 12:42   |
Jason Weathersby Messages: 9167 Registered: July 2009 |
Senior Member |

|
|
John,
Can you verify the WEB-INF/Platform/Configuration directory does not
contain a log with any issues?
The WEB-INF/Platform/plugins should contain all the plugins from the
BIRT runtime ReportEngine/plugins directory and the WEB-INF/lib
directory should contain all of the libs from the BIRT runtime
ReportEngine/lib directory.
Jason
John Sipher wrote:
> Hi Jason,
>
> No, I did not.
>
> It looks to me as if the ViewerServlet starts up another Equinox
> instance that's local to the bundle containing the ViewerServlet. So, it
> seemed like I shouldn't need to add any of the runtime plugins to the DM
> Server. Leaving them out of DM Server seems to work ok until charting
> comes into the picture, at which point I get the exception about the
> unregistered EMF package for the charting model.
>
> I poked around a bit and found that I can get rid of the exception by
> removing org.eclipse.birt.chart.engine_2.5.1.v20090902.jar from
> WEB-INF/platform/plugins in the web bundle. I believe doing that,
> coupled with the org.eclipse.birt.api bundle, makes the platform
> instance started by the servlet use classes from the servlet's classpath
> (WEB-INF/lib/chartengineapi.jar and./or chartitemapi.jar), i.e., it
> works around that child-first classloader in OSGiLauncher.
> But, although that gets rid of the exception, the charts still don't
> display and I don't see anything in the logs to point me to the cause.
> So, I'm probably all wet on that approach and only succeeded in
> disabling charting.
>
> Thanks,
> John
>
>
Jason Weathersby
BIRT Exchange
|
|
|
| Re: Charting problems w/ViewerServlet in Spring DM [message #519425 is a reply to message #519398] |
Mon, 08 March 2010 13:46   |
John Sipher Messages: 8 Registered: March 2010 |
Junior Member |
|
|
WEB-INF/platform/configuration does not contain any log files.
WEB-INF/lib and WEB-INF/platform/plugins contain all the files from WebViewerExample/WEB-INF/lib and WEB-INF/platform/plugins folders. Those include everything from ReportEnging/lib and ReportEngine/plugins, plus a few things. Addtional files are:
WEB-INF/lib/axis-ant.jar
WEB-INF/lib/axis.jar
WEB-INF/lib/com.springsource.org.apache.commons.logging-1.1.1.jar
WEB-INF/lib/commons-discovery-0.2.jar
WEB-INF/lib/javax.wsdl_1.5.1.v200806030408.jar
WEB-INF/lib/jaxrpc.jar
WEB-INF/lib/saaj.jar
WEB-INF/lib/viewservlets.jar
WEB-INF/platform/plugins/org.junit_3.8.2.v20090203-1005
Those extras all seem to be required by the ViewerServlet.
I also added META-INF/MANIFEST.MF. Its contents are:
Manifest-Version: 1.0
Bundle-SymbolicName: birt.example
Web-ContextPath: wmbirt
Export-Package: org.eclipse.birt.report.filter,
org.eclipse.birt.report.listener,
org.eclipse.birt.report.servlet,
org.eclipse.birt.report.session,
org.eclipse.birt.core.framework.osgi
Bundle-ClassPath: .,
WEB-INF/classes,
WEB-INF/lib/axis-ant.jar,
WEB-INF/lib/axis.jar,
WEB-INF/chartengineapi.jar,
WEB-INF/chartitemapi.jar,
WEB-INF/lib/com.ibm.icu_4.0.1.v20090822.jar,
WEB-INF/lib/com.springsource.org.apache.commons.logging-1.1.1.jar,
WEB-INF/lib/commons-cli-1.0.jar,
WEB-INF/lib/commons-discovery-0.2.jar,
WEB-INF/lib/coreapi.jar,
WEB-INF/lib/crosstabcoreapi.jar,
WEB-INF/lib/dataadapterapi.jar,
WEB-INF/lib/dataaggregationapi.jar,
WEB-INF/lib/dataextraction.jar,
WEB-INF/lib/dteapi.jar,
WEB-INF/lib/emitterconfig.jar,
WEB-INF/lib/engineapi.jar,
WEB-INF/lib/flute.jar,
WEB-INF/lib/javax.wsdl_1.5.1.v200806030408.jar,
WEB-INF/lib/jaxrpc.jar,
WEB-INF/lib/js.jar,
WEB-INF/lib/modelapi.jar,
WEB-INF/lib/modelodaapi.jar,
WEB-INF/lib/odadesignapi.jar,
WEB-INF/lib/org.apache.commons.codec_1.3.0.v20080530-1600.jar,
WEB-INF/lib/org.eclipse.emf.common_2.5.0.v200906151043.jar,
WEB-INF/lib/org.eclipse.emf.ecore.xmi_2.5.0.v200906151043.jar,
WEB-INF/lib/org.eclipse.emf.ecore_2.5.0.v200906151043.jar,
WEB-INF/lib/org.w3c.css.sac_1.3.0.v200805290154.jar,
WEB-INF/lib/saaj.jar,
WEB-INF/lib/scriptapi.jar,
WEB-INF/lib/viewservlets.jar
Bundle-Name: Birt
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: Infor Global Solutions, Inc.
Infor-BundleType: library
Bundle-Version: 1.0.0
Spring-Context: *;publish-context:=false
Bundle-ManifestVersion: 2
Bundle-Description: Infor WM BIRT Reports
Import-Package: javax.activation;version="0.0.0",
javax.mail.internet;version="0.0.0",
javax.servlet;version="0.0.0",
javax.servlet.http;version="0.0.0",
javax.servlet.jsp;version="0.0.0",
javax.servlet.jsp.el;version="0.0.0",
javax.servlet.jsp.jstl.core;version="0.0.0",
javax.servlet.jsp.jstl.fmt;version="0.0.0",
javax.servlet.jsp.jstl.sql;version="0.0.0",
javax.servlet.jsp.jstl.tlv;version="0.0.0",
javax.servlet.jsp.resources;version="0.0.0",
javax.servlet.jsp.tagext;version="0.0.0",
javax.servlet.resources;version="0.0.0",
javax.xml.rpc;version="0.0.0",
javax.xml.rpc.encoding;version="0.0.0"
Bundle-DocURL: http://www.infor.com
|
|
|
| Re: Charting problems w/ViewerServlet in Spring DM [message #519466 is a reply to message #519425] |
Mon, 08 March 2010 12:26   |
Jason Weathersby Messages: 9167 Registered: July 2009 |
Senior Member |

|
|
John,
This looks correct. Any chance you could try BIRT 2.5.2?
Jason
John Sipher wrote:
> WEB-INF/platform/configuration does not contain any log files.
>
> WEB-INF/lib and WEB-INF/platform/plugins contain all the files from
> WebViewerExample/WEB-INF/lib and WEB-INF/platform/plugins folders. Those
> include everything from ReportEnging/lib and ReportEngine/plugins, plus
> a few things. Addtional files are:
> WEB-INF/lib/axis-ant.jar
> WEB-INF/lib/axis.jar
> WEB-INF/lib/com.springsource.org.apache.commons.logging-1.1. 1.jar
> WEB-INF/lib/commons-discovery-0.2.jar
> WEB-INF/lib/javax.wsdl_1.5.1.v200806030408.jar
> WEB-INF/lib/jaxrpc.jar
> WEB-INF/lib/saaj.jar
> WEB-INF/lib/viewservlets.jar
> WEB-INF/platform/plugins/org.junit_3.8.2.v20090203-1005
>
> Those extras all seem to be required by the ViewerServlet.
>
> I also added META-INF/MANIFEST.MF. Its contents are:
> Manifest-Version: 1.0
> Bundle-SymbolicName: birt.example
> Web-ContextPath: wmbirt
> Export-Package: org.eclipse.birt.report.filter,
> org.eclipse.birt.report.listener,
> org.eclipse.birt.report.servlet,
> org.eclipse.birt.report.session,
> org.eclipse.birt.core.framework.osgi
> Bundle-ClassPath: .,
> WEB-INF/classes,
> WEB-INF/lib/axis-ant.jar,
> WEB-INF/lib/axis.jar,
> WEB-INF/chartengineapi.jar,
> WEB-INF/chartitemapi.jar,
> WEB-INF/lib/com.ibm.icu_4.0.1.v20090822.jar,
> WEB-INF/lib/com.springsource.org.apache.commons.logging-1.1. 1.jar,
> WEB-INF/lib/commons-cli-1.0.jar,
> WEB-INF/lib/commons-discovery-0.2.jar,
> WEB-INF/lib/coreapi.jar,
> WEB-INF/lib/crosstabcoreapi.jar,
> WEB-INF/lib/dataadapterapi.jar,
> WEB-INF/lib/dataaggregationapi.jar,
> WEB-INF/lib/dataextraction.jar,
> WEB-INF/lib/dteapi.jar,
> WEB-INF/lib/emitterconfig.jar,
> WEB-INF/lib/engineapi.jar,
> WEB-INF/lib/flute.jar,
> WEB-INF/lib/javax.wsdl_1.5.1.v200806030408.jar,
> WEB-INF/lib/jaxrpc.jar,
> WEB-INF/lib/js.jar,
> WEB-INF/lib/modelapi.jar,
> WEB-INF/lib/modelodaapi.jar,
> WEB-INF/lib/odadesignapi.jar,
> WEB-INF/lib/org.apache.commons.codec_1.3.0.v20080530-1600.ja r,
> WEB-INF/lib/org.eclipse.emf.common_2.5.0.v200906151043.jar,
> WEB-INF/lib/org.eclipse.emf.ecore.xmi_2.5.0.v200906151043.ja r,
> WEB-INF/lib/org.eclipse.emf.ecore_2.5.0.v200906151043.jar,
> WEB-INF/lib/org.w3c.css.sac_1.3.0.v200805290154.jar,
> WEB-INF/lib/saaj.jar,
> WEB-INF/lib/scriptapi.jar,
> WEB-INF/lib/viewservlets.jar
> Bundle-Name: Birt
> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
> Bundle-Vendor: Infor Global Solutions, Inc.
> Infor-BundleType: library
> Bundle-Version: 1.0.0
> Spring-Context: *;publish-context:=false
> Bundle-ManifestVersion: 2
> Bundle-Description: Infor WM BIRT Reports
> Import-Package: javax.activation;version="0.0.0",
> javax.mail.internet;version="0.0.0",
> javax.servlet;version="0.0.0",
> javax.servlet.http;version="0.0.0",
> javax.servlet.jsp;version="0.0.0",
> javax.servlet.jsp.el;version="0.0.0",
> javax.servlet.jsp.jstl.core;version="0.0.0",
> javax.servlet.jsp.jstl.fmt;version="0.0.0",
> javax.servlet.jsp.jstl.sql;version="0.0.0",
> javax.servlet.jsp.jstl.tlv;version="0.0.0",
> javax.servlet.jsp.resources;version="0.0.0",
> javax.servlet.jsp.tagext;version="0.0.0",
> javax.servlet.resources;version="0.0.0",
> javax.xml.rpc;version="0.0.0",
> javax.xml.rpc.encoding;version="0.0.0"
> Bundle-DocURL: http://www.infor.com
>
>
>
Jason Weathersby
BIRT Exchange
|
|
| | | |
Goto Forum:
Current Time: Sat May 25 13:54:21 EDT 2013
Powered by FUDForum. Page generated in 0.01943 seconds
|