Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10904

AccessControlException invoking an EJB3 Bean

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.3.0.GA
    • EAP 5.0.0, EAP_EWP 5.2.0
    • EJB
    • None
    • Release Notes
    • Hide
      In previous versions of JBoss EAP 5, an issue was identified that caused an AccessControlException to be thrown when invoking and EJB from an EJB client with the following command parameters:

      <screen>-Djava.security.manager -Djava.security.policy=$JBOSS_HOME/server/default/conf/java.policy</screen>

      This issue has been resolved in this release.
      Show
      In previous versions of JBoss EAP 5, an issue was identified that caused an AccessControlException to be thrown when invoking and EJB from an EJB client with the following command parameters: <screen>-Djava.security.manager -Djava.security.policy=$JBOSS_HOME/server/default/conf/java.policy</screen> This issue has been resolved in this release.
    • Documented as Resolved Issue
    • NEW

    Description

      Calling EJB from an EJB client when the server is started with

      "-Djava.security.manager -Djava.security.policy=$JBOSS_HOME/server/default/conf/java.policy"
      

      gives the following issue in the EJB client:-

      [hokuda@localhost dist]$ ./run-client.sh
      Exception in thread "main" java.security.AccessControlException: access denied ("java.lang.RuntimePermission
      " "getClassLoader")
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
      at java.security.AccessController.checkPermission(AccessController.java:559)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
      at java.lang.ClassLoader.checkClassLoaderPermission(ClassLoader.java:1553)
      at java.lang.Thread.getContextClassLoader(Thread.java:1452)
      at org.jboss.system.JBossRMIClassLoader.loadClass(JBossRMIClassLoader.java:91)
      at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
      at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:222)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at java.util.Calendar$1.run(Calendar.java:2791)
      at java.util.Calendar$1.run(Calendar.java:2789)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.util.Calendar.readObject(Calendar.java:2788)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1891)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1989)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1913)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at java.rmi.MarshalledObject.get(MarshalledObject.java:159)
      at org.jboss.aop.joinpoint.MethodInvocation.getArguments(MethodInvocation.java:309)
      at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:355)
      at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
      at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
      at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)
      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
      at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:218)
      at org.jboss.remoting.Client.invoke(Client.java:2084)
      at org.jboss.remoting.Client.invoke(Client.java:879)
      at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
      at com.sun.proxy.$Proxy4.invoke(Unknown Source)
      at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)
      at com.sun.proxy.$Proxy3.add(Unknown Source)
      at com.test.calendar.client.TestClient.main(TestClient.java:29)
      at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
      at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
      at com.sun.proxy.$Proxy4.invoke(Unknown Source)
      at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)
      at com.sun.proxy.$Proxy3.add(Unknown Source)
      at com.test.calendar.client.TestClient.main(TestClient.java:29)
      [hokuda@localhost dist]$

      Attachments

        Activity

          People

            ehugonne1@redhat.com Emmanuel Hugonnet
            rhn-support-hokuda Hisanobu Okuda
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: