This is what I get, any ideas?
500 Internal Server Error
java.lang.NoClassDefFoundError: com.jrefinery.chart.demo.JFreeChartServletDemo
java.lang.Class java.lang.ClassLoader.defineClass0(java.lang.String, byte[], int, int, java.security.ProtectionDomain)
java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int, java.security.ProtectionDomain)
java.lang.Class java.security.SecureClassLoader.defineClass(java.lang.String, byte[], int, int, java.security.CodeSource)
java.lang.Class com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].naming.ContextClassLoader.findClass(java.lang.String)
java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean)
java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String)
java.lang.Class java.lang.ClassLoader.loadClassInternal(java.lang.String)
java.lang.Class java.lang.Class.forName0(java.lang.String, boolean, java.lang.ClassLoader)
java.lang.Class java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader)
com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletInstanceInfo com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.HttpApplication.loadServlet(com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].util.ByteString)
com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.ServletInstanceInfo com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.HttpApplication.findServlet(com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].util.ByteString)
javax.servlet.RequestDispatcher com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.HttpApplication.getRequestDispatcher(com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].util.ByteString, com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse)
boolean com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.HttpRequestHandler.processRequest(com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.ApplicationServerThread, com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindHttpServletRequest, com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].server.http.HttpRequestHandler.run(java.lang.Thread)
void com.evermind[Oracle9iAS (2.0.0.0) Containers for J2EE].util.ThreadPoolThread.run()
Error with servlet, Oracle JDeveloper
Re: Error with servlet, Oracle JDeveloper
I am using JDeveloper 9i RC under win2k, to get JFreeChartServletDemo working I followed the following steps
1. Created a new project
2. Copied JfreeChart 0.8 source in the src directory of the new project
3. Added the src/com directory to project
4. Change line 676 in com\jrefinery\chart\demo\jdbc\servlet\BaseImageServlet.java
from : getServletContext().setAttribute(SHARED_DB_OPENER, getServletContext().getServletContextName());
to : C:\java\JDeveloper\jdev\mywork\Workspace1\Project3\src\com\jrefinery\chart\demo\jdbc\servlet\BaseImageServlet.java
(this is required to get source to compile as JDeveloper 9i RC does not support servlet 2.3 spec).
5. Added Batik jar files to the library of this project
6. opened JFreeChartServletDemo in the editor (by double clicking on it)
7. Hit F11 key to start run. The embeded OC4J server starts, and a new web browser opens with the URL.
8. You can then change the URL get parameters to see the demo in action
Hope this helps you.
Bryan
1. Created a new project
2. Copied JfreeChart 0.8 source in the src directory of the new project
3. Added the src/com directory to project
4. Change line 676 in com\jrefinery\chart\demo\jdbc\servlet\BaseImageServlet.java
from : getServletContext().setAttribute(SHARED_DB_OPENER, getServletContext().getServletContextName());
to : C:\java\JDeveloper\jdev\mywork\Workspace1\Project3\src\com\jrefinery\chart\demo\jdbc\servlet\BaseImageServlet.java
(this is required to get source to compile as JDeveloper 9i RC does not support servlet 2.3 spec).
5. Added Batik jar files to the library of this project
6. opened JFreeChartServletDemo in the editor (by double clicking on it)
7. Hit F11 key to start run. The embeded OC4J server starts, and a new web browser opens with the URL.
8. You can then change the URL get parameters to see the demo in action
Hope this helps you.
Bryan
Re: Error with servlet, Oracle JDeveloper
Thanks Bryan, it's working well. I am now in the process of trying to make it dynamic based on database obtained info.
Re: Error with servlet, Oracle JDeveloper
I am using tomcat under win2k and I get NoClassDefinitionFoundError. These settings are not working for the demo servlet. Does the demo require all batik files or some of them. Can you tell me which ones are needed.
If anybody knows the steps for setting demo-servlet to run on tomcat that will be very useful.
Thanks in advance.
Sang
If anybody knows the steps for setting demo-servlet to run on tomcat that will be very useful.
Thanks in advance.
Sang
Re: Error with servlet, Oracle JDeveloper
Sang
You do not mention what version of tomcat you are utilising, I have not tried under 3.x (only 4.x) however the following should still be true. If not let me know and I will setup a 3.x server and get back to you.
The easiest way to get a demo up and running as a servlet is to utilise the war file. It includes everything you need to get going (though it is a little big at 2Mb).
Steps involved in getting going are.
1. download the latest servlet war file.
2. copy war to $TOMCAT_HOME\webapps
3. restart tomcat.
4. You should now have access to http://127.0.0.1/JFreeServlet/
5. If you then wish to enable the JDBC examples follow the instructions included in the newly installed web.
Bryan
You do not mention what version of tomcat you are utilising, I have not tried under 3.x (only 4.x) however the following should still be true. If not let me know and I will setup a 3.x server and get back to you.
The easiest way to get a demo up and running as a servlet is to utilise the war file. It includes everything you need to get going (though it is a little big at 2Mb).
Steps involved in getting going are.
1. download the latest servlet war file.
2. copy war to $TOMCAT_HOME\webapps
3. restart tomcat.
4. You should now have access to http://127.0.0.1/JFreeServlet/
5. If you then wish to enable the JDBC examples follow the instructions included in the newly installed web.
Bryan
Re: Error with servlet, Oracle JDeveloper
Thanks Bryan, I tried with tomcat 4.0 yesterday and it worked. It seems it does not work with tomcat 3.x. I was trying tomcat 3.x before.
Thanks again
Sang
Thanks again
Sang