• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

JasperReports NoClassDefFound on a WebApp...

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there,
I'm working with JasperReports' api v0.5.0. I've been trying to build a servlet which has to return a report to a client applet. The problem is that the appserver can't resolve a particular class of the jasperreports' api. I tried to deploy the sample webapp that ships with the jasperreports' api but I found the same problem.
My appserver is Oracle's 9iAS v9.0.3 on a Linux SuSE SLES7.2 machine.
I included all the necesary classes in the instance's classpath. When that failed, I included the classes in the WEB-INF/lib directory of the webapp but that doesn't work either.
These are the exceptions I'm receiving... the first one occurs just the first time I invoke the servlet though I thought that the problem was a failed classloading due to the X11 security. I disabled all the xhost's connection restrictions but the problem persisted.
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:54)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:115)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:53)
at dori.jasper.engine.fill.JRBaseFiller.(JRBaseFiller.java:210)
at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:150)
at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:350)
at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:290)
at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:281)
at _jsp._pdf._jspService(_pdf.java:62)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
at java.lang.Thread.run(Thread.java:479)

java.lang.NoClassDefFoundError
at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:150)
at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:350)
at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.java:290)
at dori.jasper.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:281)
at _jsp._pdf._jspService(_pdf.java:62)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:560)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:148)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:72)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
at java.lang.Thread.run(Thread.java:479)
Any thought about these will be appreciated...
Have a nice day!
 
Luis Alfredo Perez
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I found the error and I'm going to post the solution for those out there who are working with a similar environment as I...
As we all know, when you have an api that accesses the AWT api you must have a fully configured X11 environment...
If you're developing a webapp and some of the apis loaded by the servlet accesses the AWT api, the servlet engine must resolve the X11 environment, i.e., the DISPLAY environment value, of course!
In the case of Oracle's 9iAS, you waste your time configuring the display through the jserv.properties file... The way to pass the DISPLAY value to the 9iAS servlet engine is through the opmn/conf/opmn.xml configuration file. In that file, you must add an environment tag to your instance properties. The new tag will include the DISPLAY value and the problem gets resolved!!
For more information, you can query the Oracle's Metalink repository but you have to have a valid login...
Have a nice day!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Luis, will be that you can post the solution for referred him problem.

Thank you.
reply
    Bookmark Topic Watch Topic
  • New Topic