Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Error in Accessing Reports Using Servlet(Http 404 error is displayed while trying to access reports using servlet .)
Error in Accessing Reports Using Servlet [message #1016958] Fri, 08 March 2013 11:03 Go to next message
Brij Kumar is currently offline Brij KumarFriend
Messages: 11
Registered: February 2013
Junior Member
I am trying to access my report(MainReport.rptdesign) using the servlet.
For that i have followed the sample servlet that is provided here : http://wiki.eclipse.org/Servlet_Example_(BIRT)_2.1
( I have changed - report's name to MainReport.rptdesign in WebReport.java & setEngineHome in BirtEngine.java )
I have added WebViewerExample(renamed it as birt) in the "webapps" directory of "Tomcat". I have also added commonloggin jars in tomcats lib.

It is working fine(i am able to access & see the reports on URL like : h

ttp://localhost:8080/birt/run?__report=Report\MainReport.rptdesign ) when i start the "Tomcat" by clicking "startup.bat" available in bin of tomcat.

But the problem arises when I try to access these reports from the eclipse using the servlets in the DynamicWebProject.

I am getting the error http 404 - requested resource is not available.

Please let me know if I am missing some step or doing something wrong

Your help is much appreciated.
Re: Error in Accessing Reports Using Servlet [message #1017064 is a reply to message #1016958] Fri, 08 March 2013 19:24 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What version of BIRT are you using? If you are using 3.7 or greater make sure you remove the birt home in BirtEngine.java. Make sure you have the birt jars from the runtime download/reportengine/lib in your web-inf/lib of your project.

Jason
Re: Error in Accessing Reports Using Servlet [message #1017114 is a reply to message #1017064] Sat, 09 March 2013 13:26 Go to previous messageGo to next message
Brij Kumar is currently offline Brij KumarFriend
Messages: 11
Registered: February 2013
Junior Member
I am using birt 4.2.2 , & also removed the setEngineHome() in Birt.java .
But I am still not able to access my reports using the servlet .(But able to access them if I start tomcat using startup.bat and then directly opening the Url h ttp://localhost:8080/birt/frameset?__report=MainReport.rptdesign )

Also copied the jars from ReportEngine\lib to birt\Web-Inf lib (though it already had those jars but i rechecked that by replacing those jars) . Now I am struck. Please help me out.

I am now getting the error ...



... 7 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.birt.core.exception.BirtException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
... 21 more

Mar 09, 2013 6:36:17 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:675)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:785)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more

Mar 09, 2013 6:36:17 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.startup.Catalina.start(Catalina.java:675)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
Re: Error in Accessing Reports Using Servlet [message #1017359 is a reply to message #1017114] Mon, 11 March 2013 16:56 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Any chance you can post your project?

Jason
Re: Error in Accessing Reports Using Servlet [message #1017597 is a reply to message #1017359] Tue, 12 March 2013 07:06 Go to previous messageGo to next message
Brij Kumar is currently offline Brij KumarFriend
Messages: 11
Registered: February 2013
Junior Member
Hello Jason , I have attached the sample project. I am using apache-tomcat-7.0.37 tomcat , MicrosoftAccess Database ( with DSN name as MyDSN3). Please let me know if any further information is required.

Thanks in advance!!
Re: Error in Accessing Reports Using Servlet [message #1017628 is a reply to message #1017597] Tue, 12 March 2013 08:33 Go to previous messageGo to next message
Brij Kumar is currently offline Brij KumarFriend
Messages: 11
Registered: February 2013
Junior Member
sorry , DSN name is MyDSN1 not MyDSN3
Re: Error in Accessing Reports Using Servlet [message #1018272 is a reply to message #1017628] Wed, 13 March 2013 14:40 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Brij,

Sorry for the late reply. I just tested this on my system using a dynamic web project and it worked for me. Look at the attached image of my project structure. I put a red box around the lib folder where you need to import the BIRT runtime libs. These libs are located in the runtime download /ReportEngine/lib folder. I also had to add the servlet-api.jar to the build path.

Jason
  • Attachment: Untitled.png
    (Size: 182.41KB, Downloaded 416 times)
Re: Error in Accessing Reports Using Servlet [message #1018620 is a reply to message #1018272] Thu, 14 March 2013 07:55 Go to previous messageGo to next message
Brij Kumar is currently offline Brij KumarFriend
Messages: 11
Registered: February 2013
Junior Member
Thanks Jason,

Now the WebReport Servlet is running fine without any error.(I guess the reason for the error was -that I didn't make Report folder underneath WebContent of my workspace , thinking that it will take the myReports.rptdesign from the Report folder of birt inside the tomcat javascript: insertTag(document.post_form.msg_body, '', ' Razz '); )

But the issue that I am facing right now is that Report is not getting displayed properly... a blank report is getting displayed when I run the report from the servlet. (but the example report available as SalesInvoice.rptdesign is working fine as expected even from servlets)

But if I directly double-click on the MainReport.rptdesign and preview it ,then it is displayed properly without any issue.

Your help is much appreciated !!
Re: Error in Accessing Reports Using Servlet [message #1018840 is a reply to message #1018620] Thu, 14 March 2013 15:00 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What report were you trying to display when you took the BlankReportDisplayed.jpg image? Can you post it?

Jason
Re: Error in Accessing Reports Using Servlet [message #1018970 is a reply to message #1018840] Thu, 14 March 2013 20:07 Go to previous messageGo to next message
Brij Kumar is currently offline Brij KumarFriend
Messages: 11
Registered: February 2013
Junior Member
Hello Jason, I tried to display MainReport.rptdesign from the servlet WebReport
( Actually MainReport is displaying a piechart of Sample SoapDistribution and there is another Drill through report , SubReport.rptdesign which will show UserDistribution for a particular Soap when a particular section of MainReports Piechart is clicked )
  • Attachment: Reports.zip
    (Size: 10.06KB, Downloaded 175 times)
Re: Error in Accessing Reports Using Servlet [message #1021119 is a reply to message #1018970] Tue, 19 March 2013 14:57 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Brij

Sorry for the late reply. Any chance you could try the attached report that uses the sample db? I am trying to determine if this is an image issue or a data source.

icon5.gif  Re: Error in Accessing Reports Using Servlet [message #1021456 is a reply to message #1021119] Wed, 20 March 2013 06:07 Go to previous messageGo to next message
Brij Kumar is currently offline Brij KumarFriend
Messages: 11
Registered: February 2013
Junior Member
Hello Jason,
Thanks for replying, The reports that uses sampleDB are working fine. But I don't know why the reports with other datasources are not working ( now even in the preview option of eclipse are not working , while results are shown in the Dataset Preview Results option ... this means db connection is well established )
Re: Error in Accessing Reports Using Servlet [message #1022381 is a reply to message #1021456] Thu, 21 March 2013 19:20 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

When it fails in the preview, switch to the xml view in the report editor and look to see if any red dots are in the margin. If so hover over them and see if there is a stack trace. Are these reports using Access DB? What driver are you using?

Previous Topic:Using system fonts on linux
Next Topic:Include report variable in Data set SQL query in detail table
Goto Forum:
  


Current Time: Thu Mar 28 12:11:58 GMT 2024

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

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

Back to the top