tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <lcr...@linagora.com>
Subject Re: java.awt.HeadlessException on tomcat
Date Wed, 14 Nov 2007 22:11:43 GMT
Hi,

Did you look at this explanation : 
http://java.sun.com/j2se/1.5.0/docs/guide/awt/AWTChanges.html#headless


For example, Lambda Probe displays some charts and we have to put the 
headless option on the JVM.

Sorry to ask this, but
did you put it right ?
If yes, do you catch the error ?

Lionel


Yann Mauon wrote:
> Dear all, 
> 
> I have the following problem. I deployed an applicaton on Tomcat and recieve
> the following error when I try to display an image generated on the server : 
> 
> java.awt.HeadlessException
>         at
> java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
>         at java.awt.Window.<init>(Window.java:406)
>         at java.awt.Frame.<init>(Frame.java:402)
>         at java.awt.Frame.<init>(Frame.java:367)
>         at javax.swing.JFrame.<init>(JFrame.java:163)
>         at
> com.genebio.toxico.GWT.advancedInfo.server.CDKsdg.SDG2ImageFile(CDKsdg.java:53)
>         at
> com.genebio.toxico.GWT.advancedInfo.server.CompoundServiceImpl.getImage2D(CompoundServiceImpl.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:528)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:187)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>         at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:619)
> 
> 
> Previously, I had the 
> 
> 
> java.awt.HeadlessException: 
> No X11 DISPLAY variable was set, but this program performed an operation
> which requires it.
>         at
> java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
>         at java.awt.Window.<init>(Window.java:406)
>         at java.awt.Frame.<init>(Frame.java:402)
>         at java.awt.Frame.<init>(Frame.java:367)
>         at javax.swing.JFrame.<init>(JFrame.java:163)
>         at
> com.genebio.toxico.GWT.advancedInfo.server.CDKsdg.SDG2ImageFile(CDKsdg.java:53)
>         at
> com.genebio.toxico.GWT.advancedInfo.server.CompoundServiceImpl.getImage2D(CompoundServiceImpl.java:132)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:528)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:265)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:187)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>         at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>         at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>         at java.lang.Thread.run(Thread.java:619)
> 
> 
> error, but fixed it by adding -Djava.awt.headless=true argument. 
> 
> Does someone have an idea to solve this trouble without remove the use of
> javax.swing.JFrame ?

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message