The issue is that you are trying to retrieve the classloader while running
in a non-privileged block.
| 2576 ERROR [AbstractKernelController] Error installing to Configured: name=PropHolder
state=Instantiated
| java.security.AccessControlException: access denied (java.lang.RuntimePermission
getClassLoader)
| at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
| at java.security.AccessController.checkPermission(AccessController.java:427)
| at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
| at
org.jboss.kernel.plugins.dependency.AbstractKernelControllerContext.getClassLoader(AbstractKernelControllerContext.java:244)
| at
org.jboss.kernel.plugins.dispatch.InvokeDispatchHelper.invoke(InvokeDispatchHelper.java:76)
| at
org.jboss.beans.metadata.plugins.AbstractValueFactoryMetaData.getValue(AbstractValueFactoryMetaData.java:323)
| at
org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper.execute(PropertyDispatchWrapper.java:82)
| at
org.jboss.kernel.plugins.dependency.PropertyDispatchWrapper$1.run(PropertyDispatchWrapper.java:96)
| at java.security.AccessController.doPrivileged(Native Method)
| at
org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:52)
|
The ExecutionWrapper has switched back to the access control context
of the person that registered the bean, i.e. the test.
Which doesn't have the rights to get the classloader.
The InvokeDispatchHelper needs to get the classloader from the context
in a privileged block.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117687#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...