The only way this works is when the beans that participate in the CMR relationship are in the same jar ( to do with the EJB specs).
Manoj
Casteels Jan <[EMAIL PROTECTED]> wrote:
Hi All,
I have the following situation
There are 2 beans where I am trying to create a relationship between them.
The beans are in 2 different jars. It works if it is in one jar but in 2
different jars I get the following exception.
[echo] [example - instruments] Doing XDoclet...
[ejbdoclet] 0 [main] ERROR TemplateEngine.invokeMethod - Invoking method
failed:
xdoclet.modules.bea.wls.ejb.WeblogicRelationTagsHandler.ifHasKeyColumn, line
=6 of template file:
jar:file:D:\home9\framework\servicefw\src\example_bo\lib\xdoclet\xdoclet-bea
-module-1.2b3-dev.jar!/xdoclet/modules/bea/wls/ejb/resources/
weblogic-cmp-rdbms-jar-xml.xdt
[ejbdoclet] java.lang.reflect.InvocationTargetException:
[ejbdoclet] java.lang.NullPointerException
[ejbdoclet] at
xdoclet.modules.bea.wls.ejb.WeblogicRelationTagsHandler.keyColumn(WeblogicRe
lationTagsHandler.java:244)
[ejbdoclet] at
xdoclet.modules.bea.wls.ejb.WeblogicRelationTagsHandler.ifHasKeyColumn(Weblo
gicRelationTagsHandler.java:225)
[ejbdoclet] at java.lang.reflect.Method.invoke(Native Method)
[ejbdoclet] at
xdoclet.template.TemplateEngine.invoke(TemplateEngine.java:584)
[ejbdoclet] at
xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:483)
[ejbdoclet] at
xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java:908)
[ejbdoclet] at
xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java:875)
[ejbdoclet] at
xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:425)
[ejbdoclet] at
xdoclet.template.TemplateEngine.generate(TemplateEngine.java:324)
[ejbdoclet] at
xdoclet.XDocletTagSupport.generate(XDocletTagSupport.java:744)
[ejbdoclet] at
xdoclet.modules.bea.wls.ejb.WeblogicRelationTagsHandler.forAllColumnMaps(Web
logicRelationTagsHandler.java:88)
[ejbdoclet] at
xdoclet.modules.bea.wls.ejb.WeblogicRelationTagsHandler.forAllLeftColumnMaps
(WeblogicRelationTagsHandler.java:94)
[ejbdoclet] at java.lang.reflect.Method.invoke(Native Method)
Bean 1
/**
* Concrete entity bean that implements the Fund interface.
*
*
* @ejb.bean generate="true"
* name="Fund"
* type="CMP"
* view-type="local"
* local-jndi-name="com.capco.example.instruments.server.Fund"
* schema="Funds"
*
* @ejb.home local-extends="javax.ejb.EJBLocalHome"
*
* @ejb.interface local-extends="Instrument,
com.capco.lifecycle.LifecycledObject"
*
* @ejb.transaction type="Mandatory"
*
* @ejb.pk class="com.capco.ejb.EntityPK"
*
* @ejb.persistence table-name="INSTRUMENTS"
*
* @ejb.ejb-external-ref link="OrganizationBean"
* view-type="local"
* type="Entity"
*
ref-name="ejb/com.capco.example.organizations.server.Organization"
*
home="com.capco.example.organizations.server.OrganizationHome"
*
business="com.capco.example.organizations.server.Organization"
*
* @weblogic.ejb-local-reference-description
ejb-ref-name="ejb/com.capco.example.organizations.server.Organization"
*
jndi-name="com.capco.example.organizations.server.Organization"
*
*
* @ejb.resource-ref res-ref-name="jdbc/COBASSds"
* res-type="javax.sql.DataSource"
* res-auth="Container"
*
* @weblogic.resource-description res-ref-name="jdbc/COBASSds"
* jndi-name="ExampleTxDataSource"
*
* @weblogic.data-source-name ExampleTxDataSource
*
*
*/
public abstract class FundBean extends InstrumentBean {
/**
*
* @ejb.interface-method view-type="local"
* @ejb.relation
* name="instrument-organization"
* role-name="instrument-belongs_to-organization"
* target-ejb="Organization"
* target-role-name="organization-has-instruments"
* target=multiple="yes"
*
* @weblogic.column-map
* foreign-key-column="ISSUER_ORG_UID"
*/
public abstract Organization getIssuer() ;
/**
*
* @ejb.interface-method view-type="local"
*/
public abstract void setIssuer(Organization organization);
Bean 2 met
**
* Implementation of the Organization interface.
* @author sbln
*
* @ejb.bean name="Organization"
* type="CMP"
* view-type="local"
*
local-jndi-name="com.capco.example.organizations.server.Organization"
* schema="Organizations"
* generate="true"
*
* @ejb.home local-extends="javax.ejb.EJBLocalHome"
*
* @ejb.transaction type="Mandatory"
*
* @ejb.pk class="com.capco.ejb.EntityPK"
* @ejb.persistence table-name="ORGANIZATIONS"
*
*/
public abstract class OrganizationBean extends BusinessEntityBean {
/**
* Unique indentifier as pk of object
* @ejb.interface-method view-type="local"
* @ejb.persistence column-name="ORG_UID"
* @ejb.pk-field
*/
public abstract String getUniqueIdentifier();
/**
* Unique indentifier as pk of object
*
* @ejb.interface-method view-type="local"
*/
public abstract void setUniqueIdentifier(String s);
But I get the following exception.
Jan Casteels
Tel : +32497518897
www.capco.com
************************************************************************
The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, please notify the sender of this email
immediately. You should not copy, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.
http://www.capco.com
***********************************************************************
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
