I found this message shortly after sending out the message and made the change. It appears to work with jboss-3.0.4 now.
Ben Litchfield On Sun, 17 Nov 2002, Brian Cochran wrote: > This should help you out. I made it work with 3.0.3. Also, to the folks > reporting problems with 3.0.(>0) and not 3.0.0. I seem to recall that 3.0.0 > does not report a lot of real errors to be errors. So you may actually have > a problem, yet JBoss is not complaining. There were a lot of updates to the > CMP manager between 3.0.0 and 3.0.3 so best bet is to get it working on > 3.0.3. At least it has worked for us. > > > http://www.mail-archive.com/middlegen-user@lists.sourceforge.net/msg00319.ht > ml > > Take care, > Brian > > > > -----Original Message----- > From: Ben Litchfield > To: [EMAIL PROTECTED] > Sent: 11/17/2002 4:00 PM > Subject: [Middlegen-user] Many to many deploy problem on jboss-3.0.4 > > > Any help would be great. I am not sure if this is a > middlegen/xdoclet/jboss problem. > > I am trying to get a very simple many-to-many relationship working. I > am > getting the following error when I deploy > > 12:54:09,685 WARN [ServiceController] Problem starting service > jboss.j2ee:jndiName=users.UserinfoLocal,service=EJB > org.jboss.deployment.DeploymentException: CMP field for key not found: > field name=roleId > at > org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData. > loadKeyFields(JDBCRelationshipRoleMetaData.java:374) > > > Here is my table create script > > CREATE TABLE userinfo > ( > userinfo_id INT PRIMARY KEY, > name VARCHAR(4000) NOT NULL > ); > > CREATE TABLE role > ( > role_id INT PRIMARY KEY, > rolename VARCHAR(4000) NOT NULL > ); > > CREATE TABLE userinfo_role > ( > role_id INT REFERENCES role(role_id), > userinfo_id INT REFERENCES userinfo(userinfo_id) > ); > > Here is my middlegen/ejbdoclet tasks > > > <middlegen > appname="${project.name}" > prefsdir="${config.dir}" > gui="false" > databaseurl="${database.url}" > initialContextFactory="${java.naming.factory.initial}" > providerURL="${java.naming.provider.url}" > datasourceJNDIName="${jboss.datasource.name}" > driver="${database.driver}" > username="${database.userid}" > password="${database.password}" > schema="${database.schema}" > > > > <many2many> > <tablea generate="true" name="userinfo"/> > <jointable generate="false" name="userinfo_role"/> > <tableb generate="true" name="role"/> > </many2many> > > <cmp20 > destination="${gen.src.dir}" > package="${ejb.package.name}" > interfacepackage="${ejb-client.package.name}" > jndiprefix="${project.name}" > pkclass="false" > dataobject="true" > viewtype="local" > readonly="false" > fkcmp="false" > guid="true" > localsuffix="Local" > localhomesuffix="Local" > > > <sequenceblock > blocksize="5" > retrycount="2" > table="SEQ_BLOCK" > /> > <jboss/> > </cmp20> > </middlegen> > > <ejbdoclet destdir="${gen.src.dir}" excludedtags="@version,@author" > ejbspec="2.0"> > <packageSubstitution packages="entity.ejb" substituteWith="entity"/> > > <fileset dir="${gen.src.dir}"> > <include name="**/ejb/**/*Bean.java" /> > </fileset> > <fileset dir="${src.dir}"> > <include name="**/**/*Bean.java" /> > </fileset> > > <utilobject kind="physical"/> > <!--<localinterface pattern="{0}"/> > <localhomeinterface pattern="{0}Home" />--> > <homeinterface/> > <remoteinterface/> > <localinterface/> > <localhomeinterface/> > <dataobject/> > <session/> > <entitypk/> > <entitycmp/> > <deploymentdescriptor > xmlencoding="ISO-8859-1" > destdir="${config.dir}" > validatexml="true" > /> > > <jboss > version="3.0" > xmlencoding="ISO-8859-1" > destdir="${config.dir}" > validatexml="true" > datasource="${jboss.datasource.name}" > datasourcemapping="${jboss.datasource.mapping}" > /> > </ejbdoclet> > > > > ------------------------------------------------------- > This sf.net email is sponsored by: To learn the basics of securing > your web site with SSL, click here to get a FREE TRIAL of a Thawte > Server Certificate: http://www.gothawte.com/rd524.html > _______________________________________________ > middlegen-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/middlegen-user > -- ------------------------------------------------------- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html _______________________________________________ middlegen-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/middlegen-user