my dog learned polymorphism
The moose likes Applets and the fly likes Applet Exception Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet Exception Error" Watch "Applet Exception Error" New topic

Applet Exception Error

Maikeru Barudosu

Joined: Feb 13, 2012
Posts: 2
Good day.

I am currently fixing an issue with applets.
Whenever i refresh the page, there are times
that a null exception happens.

I am using 1.6.14, problem is when I downgraded
the java to 1.6.11, the exception no longer displays in the
browser. But using higher versions, applet freezes and null exception occurs.

I tried checking possible cause based on the exception
but I was not able to get an answer.

I am hoping you guys can help me.
Here is the exception that I was talking about
Exception in thread "AWT-EventQueue-8" java.lang.NullPointerException
at java.awt.LightweightDispatcher.eventDispatched(Unknown Source)
at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Unknown Source)
at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Unknown Source)
at java.awt.Toolkit.notifyAWTEventListeners(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(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 Source)

Darryl Burke

Joined: May 03, 2008
Posts: 5115

Hello Maikeru, and welcome to the Ranch!

Maikeru Barudosu wrote:Whenever i refresh the page, there are times that a null exception happens.

Intermittent errors (most commonly, NullPointerException and ArrayIndexOutOfBoundsException) are largely caused by not respecting Swing's single threaded rule. Read more about that here and go through the tutorial on Concurrency in Swing.

If you still aren't able to sort out the issue, you will need to post a SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem. Note: short. We don't want to see all your code.

luck, db
There are no new questions, but there may be new answers.
Maikeru Barudosu

Joined: Feb 13, 2012
Posts: 2
Thanks Darryl for the quick response.

I will try to check the links that you provided.

subject: Applet Exception Error
jQuery in Action, 3rd edition