File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes unable to display charts in tomcat6.x Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "unable to display charts in tomcat6.x" Watch "unable to display charts in tomcat6.x" New topic
Author

unable to display charts in tomcat6.x

kiran nyala
Ranch Hand

Joined: Sep 21, 2009
Posts: 47

hi

on my local machine i am using tomcat6.0 with windows xp, charts(pie / bar ) in one of my application are displayed fine.
but when i push it to production server (tomcat 6.0) which is on linux , the charts are not displayed.

For generating charts i used chartDirectroy.jar classes, the error report by server is


type Exception report

message

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

exception


org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:156)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:620)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.ClassNotFoundException: org.apache.jsp.reports.getchart_jsp
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:618)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:144)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

The immediate cause of failure is that the class "org.apache.jsp.reports.getchart_jsp" could not be found. However, that's a rather odd classname. It doesn't conform to Java standards. I'm guessing it might be a jsp that failed to compile, although the package name confuses me.

What I suspect is the REAL cause of the problem is the fact that the GUI isn't welded into the OS in Linux like it is in Windows. And, in fact, I don't have a GUI installed on any of my production servers. That's fine in most cases, but when you're generating charts and other graphics, the graphics routines borrow functions from the GUI, which in turn borrows functions from the Graphics Processor Units of a videocard.

You can still have your graphics, however, even without the GUI. You just need to configure Tomcat for headless operation.


Customer surveys are for companies who didn't pay proper attention to begin with.
kiran nyala
Ranch Hand

Joined: Sep 21, 2009
Posts: 47

ok thank you buddy..
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: unable to display charts in tomcat6.x
 
Similar Threads
Problem installing Axis
Unable to load tag handler class "com.opensymphony.webwork.views.jsp.PropertyTag
Error message
Can't get index.jsp to refer to hello.jsp
The value for the useBean class attribute *class* is invalid.