This discussion is archived
0 Replies Latest reply: Jun 20, 2013 3:07 PM by f3fd33f9-9a11-459b-8ff4-8deb8e625816 RSS

AppContext is null from rmi thread with Java 7 Update 25

f3fd33f9-9a11-459b-8ff4-8deb8e625816 Newbie
Currently Being Moderated

We recently updated to Java 7 Update 25 from Update 21 and are now experiencing a null pointer exception when SwingUtilities.isEventDispatchThread() is called from an rmi thread becuase AppContext.getAppContext() is returning null.

java.lang.NullPointerException

at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)

at sun.awt.SunToolkit.getSystemEventQueueImplPP(Unknown Source)

at sun.awt.SunToolkit.getSystemEventQueueImpl(Unknown Source)

at java.awt.Toolkit.getEventQueue(Unknown Source)

at java.awt.EventQueue.isDispatchThread(Unknown Source)

at javax.swing.SwingUtilities.isEventDispatchThread(Unknown Source)

at ... ...

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)

at sun.rmi.transport.Transport$1.run(Unknown Source)

at sun.rmi.transport.Transport$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Unknown Source)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

This error is only present from web start, when we run our application through an IDE, it is fine.

Has anyone else ran into this? Any idea of what was changed in the latest update regarding AppContext?

It seems others are having somewhat related issues with AppContext after the update:https://forums.oracle.com/message/11077767#11077767