Hello Andy, provide the following info please: - JBoss branch (3.0/3.2) - exception stack trace - are there foreign key fields and CMP fields that share the same column(s)?
alex Friday, June 20, 2003, 7:13:22 PM, Andy Pavlo wrote: AP> j2sdk 1.4.1_02 AP> JBoss w/ Tomcat 3.2.1 AP> Red Hat 8 AP> I tried poking around around the archives, but there's no search feature (at AP> least that I could find) so please excuse me if this has been covered AP> somewhere else. AP> I'm trying to create a simple CMR to see if I can get it working but I've hit AP> sort of a road block. The two beans work just fine by themselves but if I try AP> a one-to-one relationship it dies a horrible exception death. All I'm trying AP> to do is do a get on the CMR object that is contained by the main bean. The AP> exception that is on the top of the stack is: AP> ERROR [STDERR] javax.ejb.EJBException: null; CausedByException is: null AP> The only thing I am doing is Country newCountry = getCountry(); AP> As in all my problems getting things to work, I believe it is with my AP> deployment descriptors. I've looked in the O'Reilly book as well as Mastering AP> EJB's and the JBoss Documentation but I'm not seeing what I'm doing wrong. AP> Thanks in advance, AP> Andy AP> Here's a snippet from ejb-jar.xml AP> <ejb-jar> AP> ... AP> <relationships> AP> <ejb-relation> AP> <ejb-relation-name>Invoice-Country</ejb-relation-name> AP> <ejb-relationship-role> AP> <ejb-relationship-role-name>invoice-has-country</ejb-relationship-role-name> AP> <multiplicity>One</multiplicity> AP> <relationship-role-source> AP> <ejb-name>InvoiceEJB</ejb-name> AP> </relationship-role-source> AP> <cmr-field> AP> <cmr-field-name>Country</cmr-field-name> AP> </cmr-field> AP> </ejb-relationship-role> AP> <ejb-relationship-role> AP> <ejb-relationship-role-name>country-belongs-to-an-invoice</ejb-relationship-role-name> AP> <multiplicity>One</multiplicity> AP> <relationship-role-source> AP> <ejb-name>CountryEJB</ejb-name> AP> </relationship-role-source> AP> </ejb-relationship-role> AP> </ejb-relation> AP> </relationships> AP> ... AP> </ejb-jar> AP> And the cooresponding info in jbosscmp-jdbc.xml: AP> <jbosscmp-jdbc> AP> ... AP> <relationships> AP> <ejb-relation> AP> <ejb-relation-name>Invoice-Country</ejb-relation-name> AP> <read-only>false</read-only> AP> <foreign-key-mapping/> AP> <ejb-relationship-role> AP> <ejb-relationship-role-name>invoice-has-country</ejb-relationship-role-name> AP> <key-fields/> AP> </ejb-relationship-role> AP> <ejb-relationship-role> AP> <ejb-relationship-role-name>country-belongs-to-an-invoice</ejb-relationship-role-name> AP> <key-fields> AP> <key-field> AP> <field-name>ID</field-name> AP> <column-name>country_id</column-name> AP> </key-field> AP> </key-fields> AP> </ejb-relationship-role> AP> </ejb-relation> AP> </relationships> AP> </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
