j2sdk 1.4.1_02
JBoss w/ Tomcat 3.2.1
Red Hat 8

I tried poking around around the archives, but there's no search feature (at 
least that I could find) so please excuse me if this has been covered 
somewhere else.

I'm trying to create a simple CMR to see if I can get it working but I've hit 
sort of a road block. The two beans work just fine by themselves but if I try 
a one-to-one relationship it dies a horrible exception death. All I'm trying 
to do is do a get on the CMR object that is contained by the main bean. The 
exception that is on the top of the stack is:

ERROR [STDERR] javax.ejb.EJBException: null; CausedByException is: null

The only thing I am doing is Country newCountry = getCountry(); 
As in all my problems getting things to work, I believe it is with my 
deployment descriptors. I've looked in the O'Reilly book as well as Mastering 
EJB's and the JBoss Documentation but I'm not seeing what I'm doing wrong. 

Thanks in advance,

Andy

Here's a snippet from ejb-jar.xml



<ejb-jar>
...
   <relationships>

      <ejb-relation>
         <ejb-relation-name>Invoice-Country</ejb-relation-name>

         <ejb-relationship-role>            
<ejb-relationship-role-name>invoice-has-country</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source>
               <ejb-name>InvoiceEJB</ejb-name>
            </relationship-role-source>
            <cmr-field>
               <cmr-field-name>Country</cmr-field-name>
            </cmr-field>
         </ejb-relationship-role>

         <ejb-relationship-role> 
<ejb-relationship-role-name>country-belongs-to-an-invoice</ejb-relationship-role-name>
            <multiplicity>One</multiplicity>
            <relationship-role-source>
               <ejb-name>CountryEJB</ejb-name>
            </relationship-role-source>
         </ejb-relationship-role>
      </ejb-relation>
   </relationships>
...
</ejb-jar>

And the cooresponding info in jbosscmp-jdbc.xml:

<jbosscmp-jdbc>
...
   <relationships>
      <ejb-relation>
         <ejb-relation-name>Invoice-Country</ejb-relation-name>
         <read-only>false</read-only>
         <foreign-key-mapping/>

         <ejb-relationship-role>
<ejb-relationship-role-name>invoice-has-country</ejb-relationship-role-name>
            <key-fields/>
         </ejb-relationship-role>

         <ejb-relationship-role> 
<ejb-relationship-role-name>country-belongs-to-an-invoice</ejb-relationship-role-name>
            <key-fields>
               <key-field>
                  <field-name>ID</field-name>
                  <column-name>country_id</column-name>
               </key-field>
            </key-fields>
         </ejb-relationship-role>
      </ejb-relation>
   </relationships>
</jbosscmp-jdbc>



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to