Skip to main content



      Home
Home » Archived » BIRT » Servlet Example Error - with birt runtime 4.2.1 - HTTP Status 500
Servlet Example Error - with birt runtime 4.2.1 - HTTP Status 500 [message #997389] Mon, 07 January 2013 04:30 Go to next message
Eclipse UserFriend
hi,

I'm working on the Servlet Example (2.1) which throws an error:

URL: http://localhost:8080/WebReport/run?ReportName=testWebReport.rptdesign

HTTP Status 500 -

description: The server encountered an internal error that prevented it from fulfilling this request.

exception:
java.lang.NullPointerException
BirtEngine.getBirtEngine(BirtEngine.java:81)
WebReport.doGet(WebReport.java:66)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


I'm using the birt-runtim 4.2.1 and tomcat 6.0.36.

I got an different screen after I've deleted the platform folder which includes two directories (plugin and configuration).

At that time it didn't occure a error but a weird screen:

%PDF-1.5 %âãÏÓ 2 0 obj <>stream xœ'ÍNÃ0„ï~Š=Âeñú?'½`©gHÝ""@"6Ry{ì¤"%¨,ÅÊ(ßx2ëš=x& XmÀ¯XîÙ‚Õ,ã`()À(M`KöÑËÆ©NÈQ>ÿþW¯"óÝ#qðkFÀã"È8JÈ EuRÓÓWì†[ä„‚"ŒØ½Ò·þ½Ï"Ná¨9e~v‚f3ðÙ(yvïJLIÖó¤êZTZw¥ôcGìOR­Ñ¸!&4ÆöæÐ.ê;Z»Ð-"¡-Þ¿X†Wx ÛÏfùá¥ÚNýOف"2944æ›BÑîÃjÖIƹ;}Áé¹-Ân·nËò fMu"™kjöBÅÒÎ þu§®¦ûð"ô‚}Ëà endstream endobj 6 0 obj <> endobj 7 0 obj <>)/ModDate(D:20130107104558+01'00')/CreationDate(D:20130107104558+01'00')>> endobj 5 0 obj <>stream xœMPÑjÃ0 ü?n«j/¬J`I--Æ $† BÛ`~q;N±+¶òUª'òNløfwÿ·d °3‚ëéC--ÄLÑú¤eo© endstream endobj 8 0 obj <<24df8fe204539c15cbb9eab555629144>]/Length 42/Info 7 0 R/Size 9/Filter/FlateDecode>>stream xœÆÁ Ã@§¨oöd2F`»Ðøq2`Ä†\´Þ .ÉþrË÷ endstream endobj startxref 1296 %%EOF



Now I get a different error but i just put the platform folder back so I'm not sure why the error has changed:

HTTP Status 500 - Servlet.init() for servlet WebReport threw exception

type Exception report

message Servlet.init() for servlet WebReport threw exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet WebReport threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:722)

root cause

java.lang.NullPointerException
BirtEngine.getBirtEngine(BirtEngine.java:92)
WebReport.init(WebReport.java:129)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:722)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.36 logs.





Thanks,
Samet

[Updated on: Mon, 07 January 2013 05:04] by Moderator

Re: Servlet Example Error - with birt runtime 4.2.1 - HTTP Status 500 [message #997508 is a reply to message #997389] Mon, 07 January 2013 16:33 Go to previous messageGo to next message
Eclipse UserFriend
try: http://localhost:8080/WhatYouRenamedTheWebViewerExample/run?__report=yourReportName.rptdesign
Re: Servlet Example Error - with birt runtime 4.2.1 - HTTP Status 500 [message #997564 is a reply to message #997508] Tue, 08 January 2013 05:56 Go to previous messageGo to next message
Eclipse UserFriend
HI Michael,

thanks for replying. That works but actually I was trying to run this example http://wiki.eclipse.org/Java_-_Dynamic_Report_Servlet_%28BIRT%29
An there is a note that I have to replace the WebReport class with the DynamicReport.java. So if I do it with the webviewer example I don't know how to use this example?!

Thanks again.

Cheers,
Samet
Re: Servlet Example Error - with birt runtime 4.2.1 - HTTP Status 500 [message #997842 is a reply to message #997564] Tue, 08 January 2013 16:23 Go to previous messageGo to next message
Eclipse UserFriend
Can you zip up and attach your dynamic servlet, minus the BIRT jars, so I can see your setup and test? Thanks.
Re: Servlet Example Error - with birt runtime 4.2.1 - HTTP Status 500 [message #998081 is a reply to message #997842] Wed, 09 January 2013 05:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

here is the required zip file.
Btw that is my folder structure:

webapps
__->DynamicReport
____->Reports
______->DynamicTableExample.rpttemplate
____->WEB-INF
______->lib
______->platform
______->web.xml
____->Dynamic.html

Re: Servlet Example Error - with birt runtime 4.2.1 - HTTP Status 500 [message #998832 is a reply to message #997389] Thu, 10 January 2013 14:36 Go to previous messageGo to next message
Eclipse UserFriend
I made a couple changes, like taking out the setBirtHome and changing the deprecated engine shutdown() to engine.destroy() and it worked for me. Here are the modified java files.
Re: Servlet Example Error - with birt runtime 4.2.1 - HTTP Status 500 [message #1000267 is a reply to message #998832] Mon, 14 January 2013 06:57 Go to previous messageGo to next message
Eclipse UserFriend
Hi Michael,

thank you but unfortunately I still have a problem.
I guess I placed sth. wrong or sth. like that.
So let me describe tha points I did:

1. Created a a DynamicReport/WEB-INF/lib underneath the Tomcat webapps directory
2. Copied all the jars in the birt-runtime-4_2_1/ReportEngine/lib into my DynamicReport/WEB-INF/lib
3. Created a director named platform in my WEB-INF folder
4. Copied from my BIRT All in one Designer Package eclipse-reporting-juno-SR1-win32-x86_64/eclipse/configuration and eclipse-reporting-juno-SR1-win32-x86_64/eclipse/plugin
5. Created a Java Projec which includes the BirtEngine.java , DynamicReport.java and BirtConfig.properties
6. Added all external jars from birt-runtime-4_2_1/ReportEngine/lib to my Java Project + the serlvet-api.jar from the Tomcat libary
7. Exported my Project as an Jar file to DynamicReport/WEB-INF/lib
8. Created the web.xml and placed it in DynamicReport/WEB-INF
9. Created trhe Dynamic.html and placed it in the DynamicReport folder
10. started tomcat 7.0.34
11. Called Dynamic.html

If you want I can add the whole folder if it's neccesary.
I hope you can find sth. I did wrong in this case.

I also debugged my BirtEngine.java and DynamicReport.java but I just could debug till
birtEngine = factory.createReportEngine( config );

That's the line when I get the NullPointerException.


-----------------------------------------

I tried an alternative.
I copied everything in my BIRT WebViewerExample Folder except the platform directory and called the Dynamic.html
At that time I got a different error. It's:

- There is no report design object available.
org.eclipse.birt.report.exception.ViewerException: There is no report design object available.
at org.eclipse.birt.report.context.ViewerAttributeBean.__init(ViewerAttributeBean.java:226)
at org.eclipse.birt.report.context.BaseAttributeBean.init(BaseAttributeBean.java:233)
at org.eclipse.birt.report.context.ViewerAttributeBean.<init>(ViewerAttributeBean.java:118)
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.doGet(BirtSoapMessageDispatcherServlet.java:151)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1822)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Threa
d.java:722)


Thanks and Cheers!

------------------------------------------------------------------------

It's solved now. Here is the solution:

http://www.birt-exchange.org/org/forum/index.php/topic/28609-servlet-example-error-with-birt-runtime-4-2-1-http-status-500/

[Updated on: Mon, 14 January 2013 11:04] by Moderator

Re: Servlet Example Error - with birt runtime 4.2.1 - HTTP Status 500 [message #1000967 is a reply to message #1000267] Tue, 15 January 2013 14:46 Go to previous message
Eclipse UserFriend
Great! I'm glad cbrell was able to help you out! Let us know whenever you have questions!
Previous Topic:Enhancing Birt Outline View
Next Topic:IllegalAccessError using Birt Report Design API
Goto Forum:
  


Current Time: Mon Mar 17 02:05:42 EDT 2025

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

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

Back to the top