Hello Jon,

you are missing xdoclet tag target-role-name that produces
the missing ejb-relationship-role-name.
Note, it's optional in ejb-jar.xml but required in jbosscmp-jdbc.xml
if ejb-relationship-role is specified.

HTH,
alex

Tuesday, December 17, 2002, 11:14:41 PM, you wrote:

JF> Hi!
JF> I've struggeled against this error(below) for a long time now - too long :-)
JF> Well, I've generated the code automatically from middlegen(xdoclet) based on an 
existing db model.
JF> I'll describe it here:
JF> E.g. I'have a trip table which got a tripstatus (n:1). The tripstatus table does 
not need to have any reference back to its trips
JF> (which gives a unidirection) so i've not attached it.
JF> The xdoclet code for the Trip entity is shown below. Something is missing and I 
don't see it.

JF> Any hints appreciated.

JF> -Jon


JF> ERROR
JF> -------------------------------------------------

JF> 21:25:16,241 WARN  [ServiceController] Problem starting service jboss.j2ee:jndiN
JF> ame=smartpool.TripstatusLocalHome,service=EJB
JF> org.jboss.deployment.DeploymentException: No ejb-relationship-role-name element
JF> found
JF>         at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.getEJBRe
JF> lationshipRoleElement(JDBCRelationMetaData.java:402)
JF>         at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.<init>(J
JF> DBCRelationMetaData.java:305)


JF> CODE
JF> -------------------------------------------------
JF>    /**
JF>     * This is a bi-directional one-to-many relationship CMR method
JF>     *
JF>     * @return the related smartpool.interfaces.TripstatusLocal.
JF>     *
JF>     * @ejb.interface-method view-type="local"
JF>     *
JF>     * @ejb.relation
JF>     *    name="tripstatus-cmp20-trip-cmp20"
JF>     *    role-name="trip-cmp20-has-tripstatus-cmp20"
JF>     *    target-ejb="Tripstatus"
JF>     *
JF>     * @jboss.relation-mapping style="foreign-key"
JF>     *
JF>     * @jboss.relation
JF>     *    fk-constraint="true"
JF>     *    fk-column="tripstatusid"
JF>     *    related-pk-field="tripstatusid"
JF>     *
JF>     */
JF>    public abstract smartpool.interfaces.TripstatusLocal getTripstatus();

-- 
Best regards,
 Alex Loubyansky




-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to