Hi,
When I try to run the servlet demo in Tomcat it runs fine. But when I try to run it in Orion, I have the following error:
500 Internal Server Error
java.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:130) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62) at java.awt.Font.initializeFont(Font.java:310) at java.awt.Font.<init>(Font.java:346) at com.jrefinery.chart.PiePlot.<clinit>(Unknown Source) at com.jrefinery.chart.ChartFactory.createPieChart(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:195) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind[Orion/1.5.4 (build 10585)]._deb._lnc(.:514) at com.evermind[Orion/1.5.4 (build 10585)]._deb._wmb(.:170) at com.evermind[Orion/1.5.4 (build 10585)]._deb.forward(.:141) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:970) at org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:404) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450) at javax.servlet.http.HttpServlet.service(HttpServlet.java:195) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind[Orion/1.5.4 (build 10585)]._deb._lnc(.:514) at com.evermind[Orion/1.5.4 (build 10585)]._deb._wmb(.:170) at com.evermind[Orion/1.5.4 (build 10585)]._co._wbb(.:581) at com.evermind[Orion/1.5.4 (build 10585)]._co._fs(.:189) at com.evermind[Orion/1.5.4 (build 10585)]._bt.run(.:62)
Do I have to do something special with certain webservers to get it working ?
Thanx in advance,
Slimane
Error running a servlet
Re: Error running a servlet
Slimane
I got a similar error on tomcat under linux when starting during boot from the rc scripts. However if I logged in under Gnome and started manually everything was fine. Basically tomcat needed the windowing system to be up before starting. There where a couple of workarounds but none that I found to be nice.
So are you
a. running under unix/linux ?
b. starting as a service during boot?
Bryan
I got a similar error on tomcat under linux when starting during boot from the rc scripts. However if I logged in under Gnome and started manually everything was fine. Basically tomcat needed the windowing system to be up before starting. There where a couple of workarounds but none that I found to be nice.
So are you
a. running under unix/linux ?
b. starting as a service during boot?
Bryan
Re: Error running a servlet
If you are running in a non-Windows System:
The reason is that you propably may not run X-Windows (startup daemon service) or there is no X-Windows.
There are two solutions to this problem.
1) Use Xvfb to create a virual frame buffer. "man Xvfb" will guide you.
2) Use Pure Java AWT envirnonment (PJA) from http://www.eteks.com.
All the best!
Hari.
The reason is that you propably may not run X-Windows (startup daemon service) or there is no X-Windows.
There are two solutions to this problem.
1) Use Xvfb to create a virual frame buffer. "man Xvfb" will guide you.
2) Use Pure Java AWT envirnonment (PJA) from http://www.eteks.com.
All the best!
Hari.
Re: Error running a servlet
Also, if you aren't using any heavy weight graphics components (that is, if you are just using a buffered image to create a graphics file) and you are using j2sdk1.4, then you can pass "-Djava.awt.headless=true" to the jvm to run without X.
hth,
jim
hth,
jim