Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet Exception Error

 
Maikeru Barudosu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 java.awt.EventDispatchThread.run(Unknown Source)


Thanks
 
Darryl Burke
Bartender
Posts: 5132
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Maikeru Barudosu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Darryl for the quick response.

I will try to check the links that you provided.

Maikeru
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic