Dear all,<br />
<br />
I'm trying follow <a class='bbc_url' href='
http://eclipse.mirror.triple-it.nl/birt/downloads/examples/integrating/DynamicParameters/'>this tutorial</a> which <blockquote class='ipsBlockquote' ><p>shows a web page that will read a report design file and create HTML controls for you to populate for values used as parameters passed into the report you wish to run.</p></blockquote>
<br />
I have to deploy everything on websphere. The webviewer example is installed on the application server by simply using the provided birt.war from the runtime 3.7. The example shows that it was successfully installed. <br />
<br />
Now when I run my web page everything is fine, until I select the report to load. It says that can not load the report engine and after that gives a nullpointer exception. I tried several locations without success, so I'm not sure where I should link to or whether I can do this with the webviewer example<br />
<br />
This is the method where it goes wrong. I edited it a little to show which locations I've tried<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>//get a handle to the report engine
private ReportEngine getReportEngine(String engineHome) {
EngineConfig config = new EngineConfig();
ReportEngine engine = null;
int counter = 0;
String[] locations = { "C:\\temp\\ba5770\\workspace.birt\\birt-runtime-3_7_2\\WebViewerExample\\",
"C:\\temp\\ba5770\\workspace.birt\\birt-runtime-3_7_2\\WebViewerExample",
"http://localhost:9080/webviewer/",
"http://localhost:9080/webviewer/frameset?",
"C:\\Program Files\\IBM\\SDP\\runtimes\\base_v61\\profiles\\AppSrv01\\birt_webviewer\\birt_webviewer.ear\\birt.war",
"C:\\Program Files\\IBM\\SDP\\runtimes\\base_v61\\profiles\\AppSrv01\\birt_webviewer\\birt_webviewer.ear\\birt.war\\"
};
while(counter < locations.length) {
System.out.println("engineHome: " + locations[counter]);
config.setEngineHome(locations[counter]);
engine = new ReportEngine(config);
counter ++;
}
System.out.println(engine.getVersion());
return engine;
}</pre>
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>[20-4-12 11:18:10:232 CEST] 000002e1 SystemOut O engineHome: C:\temp\ba5770\workspace.birt\birt-runtime-3_7_2\WebViewerExample\
[20-4-12 11:18:10:529 CEST] 000002e1 SystemOut O Can not load the report engine
[20-4-12 11:18:10:529 CEST] 000002e1 SystemOut O engineHome: C:\temp\ba5770\workspace.birt\birt-runtime-3_7_2\WebViewerExample
[20-4-12 11:18:10:717 CEST] 000002e1 SystemOut O Can not load the report engine
[20-4-12 11:18:10:717 CEST] 000002e1 SystemOut O engineHome: http://localhost:9080/webviewer/
[20-4-12 11:18:10:888 CEST] 000002e1 SystemOut O Can not load the report engine
[20-4-12 11:18:10:888 CEST] 000002e1 SystemOut O engineHome: http://localhost:9080/webviewer/frameset?
[20-4-12 11:18:11:060 CEST] 000002e1 SystemOut O Can not load the report engine
[20-4-12 11:18:11:060 CEST] 000002e1 SystemOut O engineHome: C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\AppSrv01\birt_webviewer\birt_webviewer.ear\birt.war
[20-4-12 11:18:11:248 CEST] 000002e1 SystemOut O Can not load the report engine
[20-4-12 11:18:11:248 CEST] 000002e1 SystemOut O engineHome: C:\Program Files\IBM\SDP\runtimes\base_v61\profiles\AppSrv01\birt_webviewer\birt_webviewer.ear\birt.war\
[20-4-12 11:18:11:420 CEST] 000002e1 SystemOut O Can not load the report engine
[20-4-12 11:18:11:420 CEST] 000002e1 ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: /MonitoringTool.jsp. Exception thrown : java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.ReportEngine.getVersion(ReportEngine.java:576)
at org.abn.us.monitoringTool.Parameters.getReportEngine(Parameters.java:41)
at org.abn.us.monitoringTool.Parameters.getParametersDefns(Parameters.java:145)
at org.abn.us.monitoringTool.ParameterServlet.getReportParameters(ParameterServlet.java:54)
at com.ibm._jsp._MonitoringTool._jspService(_MonitoringTool.java:91)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1152)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:593)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:534)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:233)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:295)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:831)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:450)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:508)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:296)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:270)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
[20-4-12 11:18:11:420 CEST] 000002e1 WebApp E [Servlet Error]-[/MonitoringTool.jsp]: java.lang.NullPointerException
at org.eclipse.birt.report.engine.api.ReportEngine.getVersion(ReportEngine.java:576)
at org.abn.us.monitoringTool.Parameters.getReportEngine(Parameters.java:41)
at org.abn.us.monitoringTool.Parameters.getParametersDefns(Parameters.java:145)
at org.abn.us.monitoringTool.ParameterServlet.getReportParameters(ParameterServlet.java:54)
at com.ibm._jsp._MonitoringTool._jspService(_MonitoringTool.java:91)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1152)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:593)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:534)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:233)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.handleRequest(AbstractJSPExtensionProcessor.java:295)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3548)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:269)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:831)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:450)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:508)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:296)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:270)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)
[20-4-12 11:18:11:420 CEST] 000002e1 LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.</pre>
<br />
Should I use <a class='bbc_url' href='
http://wiki.eclipse.org/Servlet_Example_(BIRT)_2.1'>http://wiki.eclipse.org/Servlet_Example_(BIRT)_2.1</a> instead of the webviewer, or might it be cause because there is a difference in version? Please help!<br />
<br />
Thanks in advance