I am in the middle of an upgrade of our product that is using xdoclet
and cmp/cmr.
After much working around minor issues I have gotten the code to compile
(I am not the original author of the code naturally), and now I'm dead
stuck on a weird error. It appears in various beans but is similar.
Complaining about unknown cmr fields
Code compiles fine, but when I deploy into a jboss 3.0.8 I suddenly get
the following error:
org.jboss.deployment.DeploymentException: Error compiling EJB-QL
statement 'select object(o) from APMCSession o where o.UserLight.id=?1
and o.APRun.id=?2'; - nested throwable:
(org.jboss.ejb.plugins.cmp.ejbql.UnknownPathException: Unknown cmr field
in path: at line 1, column 54. Encountered: "UserLight" after: "o.")
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.<init>(JDBCEJBQLQuery.java:46)
I am baffled as the xdoclet code is identical. I've looked into the
ejb-jar.xml file and the jboss files and cannot find the problem. Here
are some snippits:
It seems as if the APMCSession bean has no relation with UserLight.
APMCSession:
The finder that is generating the error
* @ejb.finder signature="java.util.Collection findEndedByUserLight
(java.lang.Long userid)"
* query="select object(o) from APMCSession o where
o.enddate is not null and o.UserLight.id=?1"
* unchecked="true"
But later in the code I got
/**
* @ejb.interface-method view-type="local"
* @ejb.permission unchecked="true"
* @ejb.relation name="APMCSession-UserLight"
* role-name="APMCSession-has-one-UserLight"
* multiple="yes"
* @jboss.relation fk-column="IDUSERLIGHT"
* fk-constraint="true"
* related-pk-field="id"
* @weblogic.column-map foreign-key-column="IDUSERLIGHT"
* key-column="IDUSERLIGHT"
* @ejb.value-object
* match="*"
*
aggregate="com.neupart.backend.entity.awareness.UserLightVO"
* aggregate-name="UserLight"
*/
public abstract com.neupart.backend.entity.awareness.UserLightLocal
getUserLight();
And the relation shows up fine in ejb-jar.xml
<ejb-relation >
<ejb-relation-name>APMCSession-UserLight</ejb-relation-name>
<ejb-relationship-role >
<ejb-relationship-role-name>APMCSession-has-one-UserLight</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<relationship-role-source >
<ejb-name>APMCSession</ejb-name>
</relationship-role-source>
<cmr-field >
<cmr-field-name>userLight</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
And its also in jbosscmp-jdbc.xml file
<ejb-relation>
<ejb-relation-name>APMCSession-UserLight</ejb-relation-name>
<foreign-key-mapping/>
<ejb-relationship-role>
<ejb-relationship-role-name>APMCSession-has-one-UserLight</ejb-relatio
nship-role-name>
<fk-constraint>true</fk-constraint>
<key-fields/>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>UserLight-has-many-APMCSessions</ejb-relat
ionship-role-name>
<key-fields>
<key-field>
<field-name>id</field-name>
<column-name>IDUSERLIGHT</column-name>
</key-field>
</key-fields>
</ejb-relationship-role>
Do anyone have ANY clue on what is wrong? This was working fine in
xdoclet 1.2b3
I have tried looking in Jira and Google naturally, but after spending 5
hours with this I cannot find the problem.
Thanks for helping!
/Thomas
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user