check to make sure an older castor jar file is not in lib/ext

m

-----Original Message-----
From: Paul McLachlan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 13, 2001 12:21 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] JBoss 2.4 and Castor 0.9.3 - ]
javax.naming.NameNotFoundException: myJDOimpl not bound


Hi,

I was successful in getting a project to run inside JBoss 2.2/Castor
0.9.3 however I have had to move to JBoss 2.4 for another reason and now
my castor development does not work.
I have placed the follwoing jars in $JBOSS/lib/ext; castor0.9.3.jar,
jboss-castorjdo.jar, xerces.jar (and also ejxjboss.jar?? It had a
reference to castor in one of it's classes).

I have based my project on the Rooms example hence I am using Objects
such as CastorHelper.

When JBoss starts I get the following reference to  Castor but none to
say my jdo object castorworkorder is bound?

[CastorJDOImpl] Initializing
[CastorJDOImpl] Initialized

I must have missed out on some piece of configuration because I am
getting a NameNotFoundException when in CastorHelper trying to lookup my
WorkOrderJDO object as follows:

    public CastorHelper() {
      try{
        InitialContext ic = new InitialContext();
        _jdo = (DataObjects)
ic.lookup("java:comp/env/jdo/WorkOrderJDO"); <---- EXCEPTION GENERATED
HERE
        } catch(Exception e){
          System.out.println(e.getMessage());
          e.printStackTrace();
      }

Stack trace:

[Default] castorworkorder not bound
[Default] javax.naming.NameNotFoundException: castorworkorder not bound
[Default]       at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRem
oteCall.java:245)

The jboss.jmcl definition of my MBean is as follows:

  <mbean code="org.jboss.jdo.castor.CastorJDOImpl"
name="DefaultDomain:service=JDO,name=castorworkorder">
    <attribute
name="Configuration">file:../conf/default/database.xml</attribute>
    <attribute name="JndiName">castorworkorder</attribute>
    <attribute name="LockTimeout">10000</attribute>
    <attribute name="LoggingEnabled">true</attribute>
    <attribute name="CommonClassPath">false</attribute>
  </mbean>


The jboss.xml file is as follows:

<?xml version="1.0" encoding="Cp1252"?>

<jboss>
     <secure>false</secure>
     <resource-managers>

   <resource-manager
res-class="org.jboss.ejb.deployment.CastorJDOResource">
    <res-name>CastorWorkOrderJDO</res-name>
    <res-jndi-name>castorworkorder</res-jndi-name>
   </resource-manager>

     </resource-managers>

     <enterprise-beans>

  <session>
   <ejb-name>WorkOrderService</ejb-name>
   <jndi-name>WorkOrderService</jndi-name>
   <resource-ref>
     <res-ref-name>jdo/WorkOrderJDO</res-ref-name>
     <resource-name>CastorWorkOrderJDO</resource-name>
   </resource-ref>
  </session>

     </enterprise-beans>
</jboss>

The ejb-jar.xml is as follows:

<?xml version="1.0" encoding="Cp1252"?>

<ejb-jar>

    <description>EJBs for WorkOrderService</description>

    <enterprise-beans>

       <session>
   <ejb-name>WorkOrderService</ejb-name>
   <home>mflim.ejb.WorkOrderServiceHome</home>
   <remote>mflim.ejb.WorkOrderService</remote>
   <ejb-class>mflim.ejb.WorkOrderServiceBean</ejb-class>
   <session-type>Stateless</session-type>
   <transaction-type>Container</transaction-type>
   <resource-ref>
     <description>Castor DataObjects factory</description>
     <res-ref-name>jdo/WorkOrderJDO</res-ref-name>
     <res-type>org.exolab.castor.jdo.DataObjects</res-type>
     <res-auth>Container</res-auth>
   </resource-ref>
       </session>

     </enterprise-beans>


     <assembly-descriptor>
       <container-transaction>
   <method>
      <ejb-name>WorkOrderService</ejb-name>
      <method-name>*</method-name>
   </method>
   <trans-attribute>Required</trans-attribute>
       </container-transaction>
     </assembly-descriptor>

</ejb-jar>

Thanks a lot,
Paul.

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to