X!! Problem on solaris

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
ranjeet

X!! Problem on solaris

Post by ranjeet » Thu Sep 05, 2002 5:39 am

Hi..
I am trying to use Jfreechart Library with jsp on solaris. But i am getting exception like this. "java.lang.InternalError: Can't connect to X11 window server using ':0.0'
as the value of the DISPLAY variable."

please suggest me some solution. i am stcuk in this from some time so please help me out
ragards

Achilleus Mantzios

Re: X!! Problem on solaris

Post by Achilleus Mantzios » Thu Sep 05, 2002 8:02 am

If your SUN is already running CDE, for start try a
# xhost +
If your not running CDE, following the according threads in these forums, search in google, etc..

ranjeet

Re: X!! Problem on solaris

Post by ranjeet » Sat Sep 07, 2002 8:26 am

Hi..

I am still stuck in the problem of drawing charts on solaris. I am using jfree chart my own jsp and trying to display the output on browser but i am getting following eception tough i have chacked everyting required is in classpath. Please give me any idea to sort this out.
java.lang.NoClassDefFoundError: com/jrefinery/chart/AxisConstants
at com.jrefinery.chart.VerticalNumberAxis.<init>(Unknown Source)
at com.jrefinery.chart.VerticalNumberAxis.<init>(Compiled Code)
at _pargus._PriceVolume.createChart(_PriceVolume.java:88)
at _pargus._PriceVolume._jspService(_PriceVolume.java:331)
at oracle.jsp.runtime.HttpJsp.service(Compiled Code)
at oracle.jsp.app.JspApplication.dispatchRequest(Compiled Code)
at oracle.jsp.JspServlet.doDispatch(Compiled Code)
at oracle.jsp.JspServlet.internalService(Compiled Code)
at oracle.jsp.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at org.apache.jserv.JServConnection.processRequest(Compiled Code)
at org.apache.jserv.JServConnection.run(Compiled Code)
at java.lang.Thread.run(Compiled Code

Achilleus Mantzios

Re: X!! Problem on solaris

Post by Achilleus Mantzios » Mon Sep 09, 2002 8:07 am

Its not a SUN problem :(((
Its a classpath problem.

Olivier C

Re: X!! Problem on solaris

Post by Olivier C » Tue Sep 10, 2002 7:33 am

I had the same problem.

It turned out that my server wasn't running a X server.
I fact the NoClassDefFound exception is throwed because the class
tries to initialize awt related objects statically.
Since these object can't be initialized, the corresponding class can't be loaded.

A nice solution is to use Xvfb, if you don't want to run a X server.
Don't forget to set the DISPLAY environment variable.

Locked