2 Replies Latest reply on Jul 14, 2010 11:30 PM by rohit.mathur

    JBoss AS 5.1 and JCE providers

    rohit.mathur

      Hi,

       

      I am trying to use a JCE provider in a EJB application and on first call get the following SecurityException

       

      15:56:14,975 ERROR [LogInterceptor] EJBException in method: public abstract com.xxx.test.container.ejb.EJBTest com.xxx.test.container.ejb.EJBTestHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException, causedBy:
      java.lang.reflect.UndeclaredThrowableException
          at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:199)
          at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:94)
          at org.jboss.ejb.plugins.CallValidationInterceptor.invokeHome(CallValidationInterceptor.java:56)
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:125)
          at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:161)
          at org.jboss.ejb.plugins.SecurityInterceptor.process(SecurityInterceptor.java:230)
          at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:205)
          at org.jboss.ejb.plugins.security.PreSecurityInterceptor.process(PreSecurityInterceptor.java:99)
          at org.jboss.ejb.plugins.security.PreSecurityInterceptor.invokeHome(PreSecurityInterceptor.java:88)
          at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:132)
          at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:107)
          at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:639)
          at org.jboss.ejb.Container.invoke(Container.java:1046)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
          at org.jboss.invocation.unified.server.UnifiedInvoker.invoke(UnifiedInvoker.java:232)
          at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
          at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
          at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
          at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:524)
          at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
      Caused by: java.lang.ExceptionInInitializerError
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at java.lang.Class.newInstance0(Class.java:355)
          at java.lang.Class.newInstance(Class.java:308)
          at org.jboss.ejb.Container.createBeanClassInstance(Container.java:711)
          at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:178)
          ... 28 more
      Caused by: java.lang.SecurityException: The provider self-integrity check failed.
          at com.rsa.cryptoj.c.wQ.b(Unknown Source)
          at com.rsa.cryptoj.c.O.a(Unknown Source)
          at com.rsa.cryptoj.c.pc.d(Unknown Source)
          at com.rsa.jsafe.provider.JsafeJCE.<init>(Unknown Source)
          at com.xxx.test.container.ejb.EJBTestBean.<clinit>(Unknown Source)
          ... 36 more

       

      The EAR is being deployed by being copied into the servers/default/deploy directory. This error looks like the signed JCE provider jar is being exploded while deploying.  As mentioned in thread http://community.jboss.org/message/339239#339239, I am also not seeing this issue with the JBoss AS 4.2.3.

       

      Is AOP trying to instrument the JCE Provider? I have tried excluding the  jce provider classes by package in the server/default/conf/bootstrap/jmx.xml file but this too has not helped.

       

      Any suggestions on how to fix this?