I am getting the following exception while trying to access EJB deployed on JBoss 4.0.3SP1 from an Applet:
java.lang.ExceptionInitializerError at org.jboss.proxy.SecurityInterceptor$3.run(SecurityInterceptor.java:87) ...... ...... Caused by:java.security.AccessControlException:access denied (java.util.PropoertyPermission org.jboss.security.SecurityAssociation.ThreadLocal read) .....
/**
*
* @return a InBoxBean object
* @throws java.lang.Exception
*/
public InBox getInBoxBean() throws Exception
{
InBox inBox = null;
try
{
Object ref = null;
try
{
//look up jndi name
ref = _context.lookup("InBoxBean");
}
catch (Exception ex)
{
System.out.println("_context.lookup('InBoxBean') failed with: "+ ex);
//look up jndi name again
ref = _context.lookup("InBoxBean");
System.out.println("_context.lookup('InBoxBean') succeeded:");
}
//then cast to Home interface
InBoxHome inBoxHome = (InBoxHome)PortableRemoteObject.narrow(ref, InBoxHome.class);
// use Home interface to create remote interface
inBox = inBoxHome.create();
}
catch (Exception e)
{
throw e;
}
return inBox;
}
grant {
permission java.util.PropertyPermission "org.jboss.security.SecurityAssociation.ThreadLocal", "read";
permission java.lang.RuntimePermission "org.jboss.security.SecurityAssociation.getPrincipalInfo";
permission java.io.SerializablePermission "enableSubstitution";
};