PDA

View Full Version : Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError



Dheeraj_More
26th February 2010, 04:21 PM
While opening BIPLUS, we encountered the following error and BIPLUS was not able to start.


Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
Hide load message
at com.smd.admin.AdminApplet.initApplet(AdminApplet.j ava:59)
at com.smd.ui.SMDApplet$1.run(SMDApplet.java:68)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierar chy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission http.keepAlive write)
at java.security.AccessControlContext.checkPermission (Unknown Source)
at java.security.AccessController.checkPermission(Unk nown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.System.setProperty(Unknown Source)
at com.smd.data.AbstractDataManager.<clinit>(AbstractDataManager.java:75)
... 9 more

Solution and cause -:

Cause-:This error will occur if security is violated as the user does not have the necessary permissions to load the applet.

See the line -:
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission http.keepAlive write)


Solution-:

Edit and append the snippet below, to the end of the policy file (The typical location of your policy file is C:\Program Files\Java\jre1.5.0_16\lib\security\java.policy). If you are running a different JRE (i.e. 1.6), then the folder name 'jre1.5.0_16' will obviously reflect your version of the java runtime environment.

grant codeBase "http://localhost/-" {
permission java.security.AllPermission;
permission java.io.FilePermission "<<ALL FILES>>", "read";
permission java.io.FilePermission "<<ALL FILES>>", "write";

};