Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to resolve "java.lang.reflect.InvocationTargetException"

Status
Not open for further replies.

rach18

Programmer
Feb 6, 2009
9
US

I'm using Java Plug-in 1.6.0_20.

When I run my application, i'm getting the following error: What might be the issue? What needs to be taken care in this case?

java.lang.reflect.InvocationTargetException
at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at sun.awt.windows.WEmbeddedFrame.synthesizeWindowActivation(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.setDefaultFocus(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.access$1600(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable$3.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception: java.lang.reflect.InvocationTargetException

 
With that info, I find very difficult to say what's going on. When are you getting this error? Do you have access to the source code? Do you use any IDE to develop it?

Cheers,
Dian
 
I was able to get the cause of the exception thrown.

In one scenario, the application was trying to dispose the Frame before it was initialized. That caused the above exception.

Thanks anyhow Dian for your reply.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top