0 Replies Latest reply on Sep 23, 2004 2:40 PM by Christopher Rued

    Am I confused???

    Christopher Rued Newbie

      I'm using JBoss 4.0.0...

      Isn't every jar file in server/default/lib added to the classpath of all beans in server/default/deploy???

      I have a jar file in server/default/lib that contains a class I am intereted in.

      It's in this structure because I was getting ClassCastExceptions while trying to usean interface from this EJB (deployed in an ear), and elsewhere on the Wiki (http://www.jboss.org/wiki/Wiki.jsp?page=GetquotWARNPrepareCalledOnALocalTx.quotWhenUsingJMSWithJDBC) it said that if this happens shared classes/interfaces should be pulled out into a shared jar.

      This is the exception I get:

      java.lang.NoClassDefFoundError: org/obe/server/j2ee/repository/ProcessInstanceLocal
       at java.lang.Class.getDeclaredMethods0(Native Method)
       at java.lang.Class.privateGetDeclaredMethods(Class.java:1647)
       at java.lang.Class.getDeclaredMethod(Class.java:1254)
       at org.jboss.verifier.strategy.AbstractVerifier.hasFinalizer(AbstractVerifier.java:591)
       at org.jboss.verifier.strategy.EJBVerifier20.verifyCMPEntityBean(EJBVerifier20.java:1883)
       at org.jboss.verifier.strategy.EJBVerifier20.checkBmpOrCmp2Entity(EJBVerifier20.java:167)
       at org.jboss.verifier.strategy.EJBVerifier20.checkEntity(EJBVerifier20.java:137)
       at org.jboss.verifier.BeanVerifier.verify(BeanVerifier.java:157)
       at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:537)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:889)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:881)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:745)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
       at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
       ...
      


      Before I re-arranged everything, I was getting this exception:
       ...
       at java.util.TimerThread.run(Timer.java:382)
      Caused by: java.lang.ClassCastException
       at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
       at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
       at com.xsb.xtractica.client.ejb.J2eeObeClientEJB.setupServerRemote(J2eeObeClientEJB.java:128)
       ...
      


      Am I mistaken? Is it not the case that all jar files in the lib directory are added to the classpath of all ejbs (and applications, etc) contained in deploy???

      Any hints, tips, etc. greatly appreciated.

      --Chris