2 Replies Latest reply on Jan 24, 2002 8:10 AM by adrian.brock

    JBoss 3.0 and JCE

    mklose

      Hallo

      I worte a SessionBean that uses Suns JCE. So I copied the JCE jar fiels to lib/ext directory.
      When I use JBoss 2.4 everything runs fine but with JBoss 3.0 there is following error message:

      [09:51:09,184,LogInterceptor] TransactionRolledbackException, causedBy:
      java.lang.NoClassDefFoundError: javax/crypto/KeyGenerator
      at IXArtikel.BlowfishSessionEJB.StrVerschluesseln(BlowfishSessionEJB.java:72)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:569)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:67)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:98)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:156)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:65)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:131)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:280)
      at org.jboss.ejb.Container.invoke(Container.java:528)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:411)
      at java.lang.reflect.Method.invoke(Native Method)
      at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
      at sun.rmi.transport.Transport$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.rmi.transport.Transport.serviceCall(Unknown Source)
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)

      So it seems he could not find the jce1_2_1.jar file but the file is there.
      When I start a method form one of the other JCE jars everthing runs fine.

      Thanks
      Michael

        • 1. Re: JBoss 3.0 and JCE
          shayman

          Hi,

          I think the problem is that you ejb-jar has it's own class loader context, and the security scheme doesn't allow you classes to get to the classes in lib/ext.
          I simply adds my jars either to the ejb-jar or to the classpath of the JVM.

          just my 2 cents..
          Shay.

          • 2. Re: JBoss 3.0 and JCE

            The problem is in conf/????/jboss-service.xml

            At the top of this file is a list of jars to load into
            the server.

            Later versions of 3.0 just use



            Regards,
            Adrian