|
Hello
Can anybody tell me the one what I should do on
that below?
thanks
Erro in the execution of the
program with JDK 1.3.1 Author: Breno_Perucchi |
Oct 14, 2003 1:27 AM
|
| |
Hello guys I installed the port JDK 1.3.1 in the
system operation Freebsd . But I am having a problem of execution in my
Java program. My program try to create bank ticket with bar code but it
doesn't get to create the bar code
I already researched in the
internet the followings error but up to now I didn't have any answer to
solve my problem. I need the help. Below this the log of the java
Below the are log of the JDK 1.3.1 003-10-08 17:50:56
StandardWrapperValve[barbecue]: Servlet.service() for servlet barbecue
threw exception javax.servlet.ServletException: Servlet execution threw
an exception at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
-----
Root Cause ----- 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.<clinit>(X11GraphicsEnvironment.java:54)
-----
Root Cause ----- java.lang.NoClassDefFoundError:
sun/awt/motif/MToolkit at java.lang.Class.forName0(Native Method) at
java.lang.Class.forName(Class.java:115) |
|
|
You either have no X server running or not the
permissions to connect to the server. The message appears whenever
at least one servlet uses direct or indirect SWING ( AWT) classes.
The second root may be followup error of the fact that it's
not possible to connect to the X server. There occured an error
during initialzation of the MToolkit which the Classloder may report
as a ClassNotFoundError.
Ensure that there exists a X Server
and you have the permissions to connect to the X server. Set the
DISPLAY environment variable.
| |
|
|
I don't have X11 server installed
Do I
have to install X11? Even if my program is executed in the Apache
webserver ? This error with awt/motif/MToolkit can be originated
by mistake above ?
Thanks for your help
| |
|
|
try passing the following switch with the
JRE:
-Djava.awt.headless=true
as in
java
-Djava.awt.headless=true
package.MyMainProgram
| |
|
|
If there is an X-server some where
nearby, you can point your DISPLAY variable at it. Since I presume
you aren't actually displaying anything the humnan sitting at that
X-Server wont notice anything. You may need to do an 'xhost
+<...>' on the X-Server in order to get access.
Since
you're running 1.3 the -Djava.awt.headless=true option isn't
available.
You might also look at Xvfb which is a headless
X-Server for just such emergencies
| |
|