0 Replies Latest reply on Jul 9, 2004 6:33 AM by benoit

    Castor - JBoss integration

    benoit Newbie

      Hi All !

      I've been trying to integrate Castor into JBoss for 4 days now. After Reading tons of docs I wondered if someone could help me a bit... I'm trying to acces Castor JDO through JNDI.
      Sorry for the length of this post, I tried to make it short whithout overlooking too many details.

      Tools versions :
      - JBoss-3.2.5
      - Castor-
      - JVM : jrockit81sp2_141_05
      - OS : Windows XP - Home edition

      1 - I checked out JBoss from CVS this way :

      cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jboss login
      cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/jboss co -r JBoss_3_2_5 jboss-3.2

      2 - Then build JBoss using build.bat, everything worked fine.

      3 - I've created this directory :

      which has the following structure :

      These two last files come from the varia\output\classes\org\jboss\jdo\castor directory after jboss build has completed.

      4 - I put castor- in the jboss/server/default/lib directory

      castor-jdo-plugin.sar/META-INF/jboss-service.xml contains the following xml :
       <mbean code="org.jboss.jdo.CastorJDOImpl" name="DefaultDomain:service=castorJDO,name=castorJdo">
       <attribute name="Configuration">file:../conf/default/database.xml</attribute>
       <attribute name="JndiName">jdo/castorJdo</attribute>
       <attribute name="LockTimeout">0</attribute>
       <attribute name="LoggingEnabled">false</attribute>
       <attribute name="CommonClassPath">false</attribute>
       <attribute name="AutoStore">true</attribute>
       <attribute name="DatabasePooling">true</attribute>

      database.xml contains the following xml :
      <database name="dietavenuedb" engine="mysql" >
       <jndi name="java:/DietAvenueDS"/>
       <mapping href="mapping-byhand.xml" />

      5 - When I start JBoss I get the following exception :
      11:15:15,296 WARN [NestedThrowable] Duplicate throwable nesting of same base type:
      class org.jboss.deployment.DeploymentException is assignable from:
      class org.jboss.deployment.DeploymentException
      11:15:15,296 ERROR [MainDeployer] could not create deployment:
      create operation failed for package file:/<path-to-server-dir>/default/deploy/castor-jdo-plugin.sar/;
      - nested throwable: (org.jboss.deployment.DeploymentException:
      No ClassLoaders found for: org.jboss.jdo.CastorJDOImpl;
      - nested throwable: (java.lang.ClassNotFoundException:
      No ClassLoaders found for: org.jboss.jdo.CastorJDOImpl))
      [... stack trace ...]
      Caused by: org.jboss.deployment.DeploymentException:
      No ClassLoaders found for: org.jboss.jdo.CastorJDOImpl;
      - nested throwable: (java.lang.ClassNotFoundException:
      No ClassLoaders found for: org.jboss.jdo.CastorJDOImpl)
      at org.jboss.system.ServiceConfigurator.install
      [... stack trace ...]
      Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jdo.CastorJDOImpl
       at org.jboss.mx.loading.LoadMgr3.beginLoadTask(Lorg.jboss.mx.loading.ClassLoadingTask;
      [... stack trace ...]

      It seems that I have a ClassLoader problem which I happen to be unable to solve. I'd greatly appreciate your help but hope not to waste your time in the case I would not have read all that I should have read to solve my problem.

      Does anybody has an idea on how to access Castor JDO through JNDI ?

      Thanks for your time and reading and sorry for my spelling mistakes.