You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Breno Cardoso Perucchi <br...@omegatec.net> on 2003/10/16 00:29:37 UTC
Erro in the execution of the program with JDK 1.3.1
Hello
Can anybody tell me the one what I should do on that below?
Those are the message of forum http://forum.java.sun.com - Java Programming - Java Virtual Machine
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)
Re: Erro in the execution of the program with JDK 1.3.1
Author: andih
In Reply To: Erro in the execution of the program with JDK 1.3.1 Oct 14, 2003 2:33 AM
Reply 1 of 3
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.
Re: Erro in the execution of the program with JDK 1.3.1
Author: Breno_Perucchi
In Reply To: Re: Erro in the execution of the program with JDK 1.3.1 Oct 14, 2003 11:28 AM
Reply 2 of 3
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
Re: Erro in the execution of the program with JDK 1.3.1
Author: SebastianM
In Reply To: Re: Erro in the execution of the program with JDK 1.3.1 Oct 14, 2003 12:39 PM
Reply 3 of 3
try passing the following switch with the JRE:
-Djava.awt.headless=true
as in
java -Djava.awt.headless=true package.MyMainProgram
Re: Erro in the execution of the program with JDK 1.3.1
Author: dpz
In Reply To: Re: Erro in the execution of the program with JDK 1.3.1 Oct 15, 2003 11:02 AM
Reply 4 of 4
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