Author Topic: joptionpane causes jvm crash on linux  (Read 4666 times)

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
joptionpane causes jvm crash on linux
« on: September 17, 2009, 04:17:33 AM »
Hi,

I tried running our webapp on my notebook. It works fine, though when I click on search, the results get loaded and the app wants to pop up a message dialog with the information that more results are available but not shown.

First the JVM seems to crash because of some X11 error and then there occurs a RMI exception in ajaxswing.log as a result of this. See attached logs.

Tested both with AjaxSwing 2.5.0 Beta2 and 3.0.0 Beta2, both always reproducible. I've created a sample that leads to the assumption that the font is the problem.

I am running Ubuntu 9.04 X64.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: joptionpane causes jvm crash on linux
« Reply #1 on: September 18, 2009, 05:36:44 PM »
Can you try setting agent.usePlatformGraphicsEnvironment property in AjaxSwing/conf/default.properties to true?

We'll double check your example as well.

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: joptionpane causes jvm crash on linux
« Reply #2 on: September 21, 2009, 02:42:44 AM »
The following Exception occurs when trying agent.usePlatformGraphicsEnvironment=true on Ubuntu:

Code: [Select]
2009/09/21 08:19:10:524 : http-8040-Processor25 : [com.creamtec.ajaxswing.gui.AjaxSwingToolkit15] constructor
2009/09/21 08:19:10:524 : http-8040-Processor25 : [com.creamtec.ajaxswing.gui.AjaxSwingToolkit15] Changing user.home before font loading to /home/subes/Desktop/AjaxSwing3.0.0
2009/09/21 08:19:10:525 : http-8040-Processor25 : [com.creamtec.ajaxswing.ServletHelper] Failed to process a request for session = org.apache.catalina.session.StandardSessionFacade@315b0333 (Exception java.lang.Error, Could not instantiate Graphics Environment: sun.awt.X11GraphicsEnvironment)
java.lang.Error: Could not instantiate Graphics Environment: sun.awt.X11GraphicsEnvironment
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:78)
at com.creamtec.ajaxswing.gui.AjaxSwingToolkit.<init>(AjaxSwingToolkit.java:154)
at com.creamtec.ajaxswing.gui.AjaxSwingToolkit130.<init>(AjaxSwingToolkit130.java:29)
at com.creamtec.ajaxswing.gui.AjaxSwingToolkit142.<init>(AjaxSwingToolkit142.java:21)
at com.creamtec.ajaxswing.gui.AjaxSwingToolkit15.<init>(AjaxSwingToolkit15.java:18)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at java.awt.Toolkit$2.run(Toolkit.java:833)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
at com.creamtec.ajaxswing.core.ClientAgent.installToolkit(ClientAgent.java:1019)
at com.creamtec.ajaxswing.core.ClientAgent.<init>(ClientAgent.java:138)
at com.creamtec.ajaxswing.rendering.html.HTMLClientAgent.<init>(HTMLClientAgent.java:42)
at com.creamtec.ajaxswing.ServletHelper$InProcessClientAgent.<init>(ServletHelper.java:833)
at com.creamtec.ajaxswing.ServletHelper.createClientAgent(ServletHelper.java:783)
at com.creamtec.ajaxswing.ServletHelper.getClientAgent(ServletHelper.java:752)
at com.creamtec.ajaxswing.ServletHelper.processHttpRequest(ServletHelper.java:228)
at com.creamtec.ajaxswing.AjaxSwingRouter.doPost(AjaxSwingRouter.java:140)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at com.creamtec.ajaxswing.AjaxSwingRouter.service(AjaxSwingRouter.java:106)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
2009/09/21 08:19:10:529 : http-8040-Processor25 : [com.creamtec.ajaxswing.ServletHelper] Redirecting via browser to http://localhost:8040/ajaxswing/Blue_docs/error.jsp?ajaxswing.submitURL=http://localhost:8040/ajaxswing/apps/SwingSet2&ajaxswing.themeDocsURL=http://localhost:8040/ajaxswing/Blue_docs

I couldn't find any reliable information about why this exception occurs. I tried both Java 1.5.0 and 1.6.0 from sun.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: joptionpane causes jvm crash on linux
« Reply #3 on: September 22, 2009, 12:30:05 AM »
Do you have X11 available to the Java process?

If you are running from X terminal, Java should be able to instantiate it.
If you are running AjaxSwing Tomcat as a service, you need to run xvfb and set display variable to point to it.

For example, if xfvb is running virtual display 1, you need to put this in AjaxSwing/bin/setEnv.sh

DISPLAY=:1
export DISPLAY

If this doesn't help, please attach complete log file for the server and your setEnv.sh

You should definitely be able to run AjaxSwing on Ubuntu because our demo server is running on Ubuntu 8.


subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: joptionpane causes jvm crash on linux
« Reply #4 on: September 22, 2009, 04:08:25 AM »
Well, running ajaxswing on Ubuntu is possible. The problem only occurs when using agent.usePlatformGraphicsEnvironment=true.

I'm inside X11 with a gnome session and run ajaxswing from a gnome-terminal.

See attachments.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: joptionpane causes jvm crash on linux
« Reply #5 on: September 23, 2009, 11:15:48 PM »
I've tested your sample on Ubuntu. It ran fine on AjaxSwing 2.4. There was an ArrayIndexOutOfBounds exception on Beta1, but no crash. The bug is not present in the trunk (Beta2) so probably when you get next version of AjaxSwing you wouldn't have this issue.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: joptionpane causes jvm crash on linux
« Reply #6 on: December 26, 2009, 10:16:05 AM »
Can you explain in more detail what you are talking about?

What game?

Can you attach a log file?