You're probably just as far a long as I am at this point. I don't know the answer to your question as yet.
With regard to documentation for value-objects, I'd recommend the following: 1. Have a look at http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/xdoclet/xdoclet/core/docs/valueobject.html?rev=HEAD&content-type=text/html. It's a little terse. 2. Download the 1.2 beta. It's got more value-object documentation compared to previous versions. Also, study the use of value-objects in the 1.2 sample project. Make sure you build it, so you can see all of the generated files. 3. Search the mailing lists. 4. Finally, like me, post pathetic pleas for help, at the risk of revealing your stupidity. ;-) Chuck -----Original Message----- From: mread [mailto:mread@;spotd.co.uk] Sent: Sunday, October 20, 2002 7:33 AM To: xdoclet-user Subject: RE: [Xdoclet-user] value-object / cmp / cmr (2 days lost - please help) Feel good! I'm trying to do something almost identical and I was confused about the syntax of @ejb.value-object and you've really helped me out with the aggregate parameters which seem to be undocumented. However I've now got another problem which maybe you can help me with... Although the CMP class produced by <entitycmp/> is correctly the implementing a getMyClassVO() method, the local interface for it isn't showing the method. Am I misunderstanding how it should work? Could you let me know whether this is working for you? Thanks, Matt. -----Original Message----- From: [EMAIL PROTECTED] [mailto:xdoclet-user-admin@;lists.sourceforge.net]On Behalf Of [EMAIL PROTECTED] Sent: Sunday, October 20, 2002 00:51 To: [EMAIL PROTECTED] Subject: RE: [Xdoclet-user] value-object / cmp / cmr (2 days lost - please help) I don't know whether to feel bad for being an idiot or to feel good because I finally figured out what the problem was. I think I'm too tired to feel good - maybe tomorrow. I was missing a STUPID DOUBLE QUOTE after my aggregate value "com.sprint.fmsD.ejb.vo.PossessionValue". I would certainly vote at this point enhanced syntax checking or exception messages, if possible. Sorry to take up the bandwidth. Chuck -----Original Message----- From: Chuck.R.Irvine [mailto:Chuck.R.Irvine@;mail.sprint.com] Sent: Saturday, October 19, 2002 5:37 PM To: xdoclet-user Subject: [Xdoclet-user] value-object / cmp / cmr (2 days lost - please help) During value object generation I'm getting the exception: xdoclet.template.TemplateException: Invoking method in class xdoclet.modules.ejb.entity.PersistentTagsHandler failed: forAllPersistentFields, line=19 of template file: jar:file:C:\programs\xdoclet-1.2-beta\lib\xdoclet-ejb-module.jar!/xdocle t/modules/ejb/entity/resources/valueobject.xdt, exception: null The complete exception output, build.xml file, and the offending entity bean are attached below (the bean will not actually deploy since I've stripped away stuff to keep my test case simple). The problem has something to do with: * @ejb.value-object * aggregate="com.sprint.fmsD.ejb.vo.PossessionValue * aggregate-name="OwnerPossessionValue" * match="*" When I comment this out, the problem goes away (with the intended functionality, unfortunately). My version info is: XDoclet: 1.2 beta 1 ANT: 1.5 JDK: 1.4.1 I am really stuck here and I've lost a lot of time (including my Saturday now). Could someone please offer some help? Thanks Chuck ******* The class that is generating the error is: ************* package com.sprint.fmsD.ejb.entity; import javax.ejb.*; import com.sprint.fmsD.ejb.interfaces.Owner; import com.sprint.fmsD.ejb.pk.OwnerPK; import com.sprint.fmsD.ejb.vo.OwnerValue; import com.sprint.fmsD.ejb.interfaces.Possession; /** * This is a port bean. * * @ejb.bean * cmp-version="2.x" * type="CMP" * name="Owner" * jndi-name="ejb/fms/Owner" * * @ejb.persistence * table-name="NW2FM.TFM_OWNER" * * @ejb.value-object * match="*" * name="Owner" */ public abstract class OwnerBean implements EntityBean { /** * Returns related Possession * * @ejb.interface-method * * @ejb.relation * name="Owner-Possession" * role-name="Owner-has-Possession" * * @ejb.value-object * aggregate="com.sprint.fmsD.ejb.vo.PossessionValue * aggregate-name="OwnerPossessionValue" * match="*" */ public abstract Possession getPossession(); /** * Id of this port. * * @ejb.pk-field * @ejb.persistent-field * @ejb.interface-method * @ejb.persistence column-name="RSRC_ID" * @ejb.transaction type="Supports" */ abstract public Integer getPortID(); abstract public void setPortID(Integer val); /** * Sets related Possession * * @param related com.sprint.fmsD.genequip.ejb.interfaces.Possession * @ejb.interface-method * view-type="local" * @param Possession the new CMR value */ public abstract void setPossession(Possession possession); /** * @ejb.create-method */ public OwnerPK ejbCreate(OwnerValue data) throws CreateException { try { //setOwnerValue(data); return null; } catch (Exception e) { throw new EJBException(e); } } public void ejbPostCreate(OwnerValue data) throws CreateException { } } ************************ XDoclet Exception **************************************************** [ejbdoclet] Generating Value Object class: 'com.sprint.fmsD.ejb.entity.PossessionBean--> com.sprint.fmsD.ejb.vo.PossessionValue'. [ejbdoclet] (TemplateEngine.invokeMethod 490 ) Invoking method failed: xdoclet.modules.ejb.entity.PersistentTagsHandler.forAllPersistentFields, line=19 of template file: jar:file:C:\programs\xdoclet-1.2-beta\lib\xdoclet-ejb-module.jar!/xdocle t/modules/ejb/entity/resources/valueobject.xdt [ejbdoclet] java.lang.reflect.InvocationTargetException [ejbdoclet] at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source) [ejbdoclet] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) [ejbdoclet] at java.lang.reflect.Method.invoke(Method.java:324) [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:90 4) [ejbdoclet] at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java:871) [ejbdoclet] at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:425) [ejbdoclet] at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:324) [ejbdoclet] at xdoclet.template.TemplateEngine.start(TemplateEngine.java:373) [ejbdoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:560) [ejbdoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:766) [ejbdoclet] at xdoclet.modules.ejb.entity.ValueObjectSubTask.generateForClass(ValueObje ctSubTask.java:203) [ejbdoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:666) [ejbdoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:593) [ejbdoclet] at xdoclet.TemplateSubTask.execute(TemplateSubTask.java:485) [ejbdoclet] at xdoclet.XDocletMain.start(XDocletMain.java:46) [ejbdoclet] at xdoclet.DocletTask.start(DocletTask.java:460) [ejbdoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:68) [ejbdoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166) [ejbdoclet] at org.apache.tools.ant.Task.perform(Task.java:317) [ejbdoclet] at org.apache.tools.ant.Target.execute(Target.java:309) [ejbdoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334) [ejbdoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306) [ejbdoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1250) [ejbdoclet] at org.apache.tools.ant.Main.runBuild(Main.java:610) [ejbdoclet] at org.apache.tools.ant.Main.start(Main.java:196) [ejbdoclet] at org.apache.tools.ant.Main.main(Main.java:235) [ejbdoclet] Caused by: java.lang.NullPointerException [ejbdoclet] at xdoclet.modules.ejb.entity.PersistentTagsHandler.isValueObjectField(Pers istentTagsHandler.java:84) [ejbdoclet] at xdoclet.modules.ejb.entity.PersistentTagsHandler.forAllPersistentMatched Fields(PersistentTagsHandler.java:430) [ejbdoclet] at xdoclet.modules.ejb.entity.PersistentTagsHandler.forAllPersistentFields( PersistentTagsHandler.java:311) [ejbdoclet] ... 28 more [ejbdoclet] (XDocletMain.start 51 ) Running XDoclet failed. [ejbdoclet] (XDocletMain.start 52 ) <<Running XDoclet failed.>> [ejbdoclet] xdoclet.template.TemplateException: Invoking method in class xdoclet.modules.ejb.entity.PersistentTagsHandler failed: forAllPersistentFields, line=19 of template file: jar:file:C:\programs\xdoclet-1.2-beta\lib\xdoclet-ejb-module.jar!/xdocle t/modules/ejb/entity/resources/valueobject.xdt, exception: null [ejbdoclet] at xdoclet.template.TemplateEngine.invokeMethod(TemplateEngine.java:491) [ejbdoclet] at xdoclet.template.TemplateEngine.invokeBlockMethod(TemplateEngine.java:90 4) [ejbdoclet] at xdoclet.template.TemplateEngine.handleBlockTag(TemplateEngine.java:871) [ejbdoclet] at xdoclet.template.TemplateEngine.handleTag(TemplateEngine.java:425) [ejbdoclet] at xdoclet.template.TemplateEngine.generate(TemplateEngine.java:324) [ejbdoclet] at xdoclet.template.TemplateEngine.start(TemplateEngine.java:373) [ejbdoclet] at xdoclet.TemplateSubTask.startEngine(TemplateSubTask.java:560) [ejbdoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:766) [ejbdoclet] at xdoclet.modules.ejb.entity.ValueObjectSubTask.generateForClass(ValueObje ctSubTask.java:203) [ejbdoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:666) [ejbdoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:593) [ejbdoclet] at xdoclet.TemplateSubTask.execute(TemplateSubTask.java:485) [ejbdoclet] at xdoclet.XDocletMain.start(XDocletMain.java:46) [ejbdoclet] at xdoclet.DocletTask.start(DocletTask.java:460) [ejbdoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:68) [ejbdoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166) [ejbdoclet] at org.apache.tools.ant.Task.perform(Task.java:317) [ejbdoclet] at org.apache.tools.ant.Target.execute(Target.java:309) [ejbdoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334) [ejbdoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306) [ejbdoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1250) [ejbdoclet] at org.apache.tools.ant.Main.runBuild(Main.java:610) [ejbdoclet] at org.apache.tools.ant.Main.start(Main.java:196) [ejbdoclet] at org.apache.tools.ant.Main.main(Main.java:235) [ejbdoclet] file:c:/chuck/cvshome/fmsD/build.xml:77: XDoclet failed [ejbdoclet] at xdoclet.DocletTask.start(DocletTask.java:463) [ejbdoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:68) [ejbdoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166) [ejbdoclet] at org.apache.tools.ant.Task.perform(Task.java:317) [ejbdoclet] at org.apache.tools.ant.Target.execute(Target.java:309) [ejbdoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334) [ejbdoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306) [ejbdoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1250) [ejbdoclet] at org.apache.tools.ant.Main.runBuild(Main.java:610) [ejbdoclet] at org.apache.tools.ant.Main.start(Main.java:196) [ejbdoclet] at org.apache.tools.ant.Main.main(Main.java:235) [ejbdoclet] --- Nested Exception --- [ejbdoclet] xdoclet.XDocletException: Running XDoclet failed. [ejbdoclet] at xdoclet.TemplateSubTask.generateForClass(TemplateSubTask.java:774) [ejbdoclet] at xdoclet.modules.ejb.entity.ValueObjectSubTask.generateForClass(ValueObje ctSubTask.java:203) [ejbdoclet] at xdoclet.TemplateSubTask.startProcessPerClass(TemplateSubTask.java:666) [ejbdoclet] at xdoclet.TemplateSubTask.startProcess(TemplateSubTask.java:593) [ejbdoclet] at xdoclet.TemplateSubTask.execute(TemplateSubTask.java:485) [ejbdoclet] at xdoclet.XDocletMain.start(XDocletMain.java:46) [ejbdoclet] at xdoclet.DocletTask.start(DocletTask.java:460) [ejbdoclet] at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:68) [ejbdoclet] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:166) [ejbdoclet] at org.apache.tools.ant.Task.perform(Task.java:317) [ejbdoclet] at org.apache.tools.ant.Target.execute(Target.java:309) [ejbdoclet] at org.apache.tools.ant.Target.performTasks(Target.java:334) [ejbdoclet] at org.apache.tools.ant.Project.executeTarget(Project.java:1306) [ejbdoclet] at org.apache.tools.ant.Project.executeTargets(Project.java:1250) [ejbdoclet] at org.apache.tools.ant.Main.runBuild(Main.java:610) [ejbdoclet] at org.apache.tools.ant.Main.start(Main.java:196) [ejbdoclet] at org.apache.tools.ant.Main.main(Main.java:235) ********************************** build.xml file ************************************************************ <?xml version="1.0"?> <project name="FMS Distributed" default="main" basedir="."> <!-- This is where user specific build.properties will be. --> <property file="build.properties"/> <property name="classes.dir" value="build/classes"/> <property name="server.src.dir" value="src/server"/> <property name="build.output.dir" value="build/output"/> <property name="docs.dir" value="${build.output.dir}/docs"/> <property name="dist.dir" value="build/dist"/> <property name="src.server" value="src/server"/> <property name="src.test" value="src/test"/> <property name="build.output.java.gen-src.dir" value="${build.output.dir}/gen-src"/> <property name="server.classes.dir" value="${build.output.dir}/server-classes"/> <property name="test.classes.dir" value="${build.output.dir}/test-classes"/> <property name="build.output.metainf.dir" value="${server.classes.dir}/META-INF"/> <!-- =========================================================== --> <!-- Define class path --> <!-- =========================================================== --> <path id="class.path"> <fileset dir="lib"> <include name="*.jar"/> </fileset> <fileset dir="${xdoclet.lib.dir}"> <include name="*.jar"/> </fileset> </path> <!-- ============================================================ --> <!-- Initialise --> <!-- ============================================================ --> <target name="init"> <taskdef name="xdoclet" classname="xdoclet.DocletTask" classpathref="class.path" /> <taskdef name="ejbdoclet" classname="xdoclet.modules.ejb.EjbDocletTask" classpathref="class.path" /> <tstamp> <format property="TODAY" pattern="d-MM-yy" /> </tstamp> </target> <!-- ============================================================ --> <!-- Prepares the source code --> <!-- ============================================================ --> <target name="prepare" depends="init"> <mkdir dir="${dist.dir}"/> <mkdir dir="${dist.dir}/ejbc"/> <mkdir dir="${docs.dir}"/> <mkdir dir="${docs.dir}/api"/> <mkdir dir="${build.output.java.gen-src.dir}"/> <mkdir dir="${server.classes.dir}"/> <mkdir dir="${test.classes.dir}"/> <mkdir dir="${build.output.metainf.dir}"/> </target> <!-- ============================================================ --> <!-- Invoke XDoclet's ejbdoclet --> <!-- ============================================================ --> <target name="ejbdoclet" depends="prepare"> <ejbdoclet destdir="${build.output.java.gen-src.dir}" ejbspec="2.0" verbose="true"> <fileset dir="${src.server}"> <include name="**/ejb/**/*Bean.java" /> <exclude name="**/ejb/**/Base*" /> </fileset> <packageSubstitution packages="session,entity" substituteWith="interfaces"/> <remoteinterface/> <localinterface/> <homeinterface /> <localhomeinterface/> <valueobject> <packageSubstitution packages="session,entity" substituteWith="vo"/> </valueobject> <entitypk> <packageSubstitution packages="session,entity" substituteWith="pk"/> </entitypk> <entitycmp/> <session/> <deploymentdescriptor destdir="${build.output.metainf.dir}" validatexml="true" MergeDir="fake-to-debug" /> <weblogic version="6.1" xmlencoding="UTF-8" destdir="${build.output.metainf.dir}" validatexml="true" datasource="xdoclet.default" persistence="weblogic" /> </ejbdoclet> </target> <!-- ========================================================== --> <!-- Builds Javadoc files --> <!-- ========================================================== --> <target name="build_javadoc"> <javadoc destdir="${docs.dir}/api" author="true" version="true" use="true" windowtitle="FMS Distributed API"> <packageset dir="src/server" defaultexcludes="yes"> <include name="com/**" /> </packageset> <classpath> <pathelement path="${class.path}"/> <pathelement path="${server.classes.dir}"/> <pathelement location="lib/ejb.jar"/> <pathelement location="lib/log4j-1.2.6.jar"/> </classpath> <doctitle><![CDATA[<h1>FMS Distributed</h1>]]></doctitle> <bottom><![CDATA[<i>Copyright © 2002 Sprint Corp. All Rights Reserved.</i>]]></bottom> <tag name="todo" scope="all" description="To do:" /> </javadoc> </target> <!-- ========================================================== --> <!-- Compiles all server classes --> <!-- ========================================================== --> <target name="compile" description="Compiles all server code."> <javac destdir="${server.classes.dir}" classpathref="class.path" debug="on" deprecation="on" optimize="off"> <src path="${src.server}"/> <src path="${build.output.java.gen-src.dir}"/> </javac> </target> <!-- ========================================================== --> <!-- Compiles all test classes --> <!-- ========================================================== --> <target name="compile_test" description="Compiles all test code."> <javac destdir="${test.classes.dir}" classpathref="class.path" debug="on" deprecation="on" optimize="off"> <src path="${src.test}"/> <classpath> <pathelement path="${server.classes.dir}"/> </classpath> </javac> <copy todir="${test.classes.dir}"> <fileset dir="${src.test}" includes="**/*.properties,**/*.xml" excludes="**/*-sample.properties"/> </copy> </target> <!-- ============================================================ --> <!-- Create EJB Jar File --> <!-- ============================================================ --> <target name="jar_ejb_db2" depends="compile"> <copy todir="${server.classes.dir}"> <fileset dir="${src.server}" includes="**/*.properties,**/*.xml" excludes="**/*-sample.properties"/> <filterset> <filter token="data-source" value="DB2DataSource"/> </filterset> </copy> <jar jarfile="${dist.dir}/fmsD.jar" manifest="conf/manifest.mf"> <fileset dir="${server.classes.dir}"/> </jar> </target> <!-- ============================================================ --> <!-- Create WebLogic EAR file and deploy to local deployment dir --> <!-- ============================================================ --> <target name="deploy_db2" depends="jar_ejb_db2"> <java classname="weblogic.ejbc" fork="yes"> <sysproperty key="weblogic.home" value="${weblogic.home}"/> <arg line="-compiler javac ${dist.dir}/fmsD.jar ${dist.dir}/ejbc/fmsD.jar"/> <classpath> <pathelement location="lib/log4j-1.2.6.jar"/> <pathelement path="${weblogic.home}/lib/weblogic_sp.jar; ${weblogic.home}/lib/weblogic.jar"/> </classpath> </java> <ear destfile="${dist.dir}/fmsD.ear" appxml="conf/application.xml"> <fileset dir="${dist.dir}/ejbc" includes="fmsD.jar"/> <fileset dir="lib" includes="log4j-1.2.6.jar"/> </ear> <copy file="${dist.dir}/fmsD.ear" tofile="${DEPLOY}/fmsD.ear"/> </target> <!-- ============================================================ --> <!-- Create property files from sample property files --> <!-- ============================================================ --> <target name="build_config_files"> <copy todir="." verbose="yes"> <fileset dir="."><include name="**/*-sample.*"/></fileset> <mapper type="glob" from="*-sample.properties" to="*.properties"/> </copy> </target> <!-- ============================================================ --> <!-- Copy (ftp) weblogic EAR file to Linux test server. --> <!-- ============================================================ --> <target name="deploy_linux"> <ftp server="dkdl0106.corp.sprint.com" userid="weblogic" password="wls123" binary="yes" remotedir="/opt/bea/wlserver6.1/config/mydomain/applications"> <fileset dir="${dist.dir}"> <include name="fmsD.ear"/> </fileset> </ftp> </target> <!-- ============================================================ --> <!-- Main --> <!-- ============================================================ --> <target name="main" depends="ejbdoclet,compile"> </target> <!-- ============================================================ --> <!-- Clean --> <!-- ============================================================ --> <target name="clean"> <delete dir="build"/> </target> </project> ------------------------------------------------------- This sf.net email is sponsored by: Access Your PC Securely with GoToMyPC. Try Free Now https://www.gotomypc.com/s/OSND/DD _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user ------------------------------------------------------- This sf.net email is sponsored by: Access Your PC Securely with GoToMyPC. Try Free Now https://www.gotomypc.com/s/OSND/DD _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user ------------------------------------------------------- This sf.net email is sponsored by: Access Your PC Securely with GoToMyPC. Try Free Now https://www.gotomypc.com/s/OSND/DD _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user ------------------------------------------------------- This sf.net email is sponsored by: Access Your PC Securely with GoToMyPC. Try Free Now https://www.gotomypc.com/s/OSND/DD _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user