Wow nice catch!  I didn't even notice, I guess I was looking quick.  I
wonder if it was Wallace's copy paste problem.

R


On 11/16/04 2:19 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> I haven't successfully used xdoclet, but if it is like javadoc, you need to
> start the comments with double asterisk: /** not just /*.
> 
> my 2 cents
> CQ
> 
> Original Message:
> -----------------
> From: Gelhar, Wallace Joseph [EMAIL PROTECTED]
> Date: Tue, 16 Nov 2004 10:56:09 -0600
> To: [EMAIL PROTECTED]
> Subject: RE: How to markup for xdoclet inheritance structure?
> 
> 
> Actually this is the logger output as well.  Where do I start to debug
> this?  
> 
> repository-files:
> java.util.logging.ErrorManager: 2
> java.lang.NullPointerException
>         at org.apache.tools.ant.Project.getThreadTask(Project.java:1985)
>         at org.apache.tools.ant.Project.demuxOutput(Project.java:1086)
>         at
> org.apache.tools.ant.DemuxOutputStream.processBuffer(DemuxOutputStream.j
> ava:172)
>         at
> org.apache.tools.ant.DemuxOutputStream.write(DemuxOutputStream.java:147)
>         at
> org.apache.tools.ant.DemuxOutputStream.write(DemuxOutputStream.java:241)
>         at java.io.PrintStream.write(PrintStream.java:258)
>         at
> sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
>         at
> sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:40
> 4)
>         at
> sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:408)
>         at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:152)
>         at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
>         at java.util.logging.StreamHandler.flush(StreamHandler.java:224)
>         at
> java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
>         at java.util.logging.Logger.log(Logger.java:424)
>         at java.util.logging.Logger.doLog(Logger.java:446)
>         at java.util.logging.Logger.logp(Logger.java:562)
>         at
> org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:91)
>         at
> org.apache.commons.logging.impl.Jdk14Logger.info(Jdk14Logger.java:162)
>         at xdoclet.XDocletMain.start(XDocletMain.java:47)
>         at xdoclet.DocletTask.start(DocletTask.java:462)
>         at xjavadoc.ant.XJavadocTask.execute(XJavadocTask.java:110)
>         at
> org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
>         at org.apache.tools.ant.Task.perform(Task.java:364)
>         at org.apache.tools.ant.Target.execute(Target.java:301)
>         at org.apache.tools.ant.Target.performTasks(Target.java:328)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1215)
>         at
> org.apache.tools.ant.Project.executeTargets(Project.java:1063)
>         at
> org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:1
> 78)
>         at
> org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:2
> 52)
>         at
> org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)
> Generating ojb repository descriptor (repository_user.xml)
> Type uwec.fpm.persistence.report.Report
> Type uwec.fpm.persistence.report.ReportParameterValueImpl
> Type uwec.fpm.persistence.report.ReportParameterValue
> Type uwec.fpm.persistence.report.ReportField
> Type uwec.fpm.persistence.report.ReportParameterImpl
> Type uwec.fpm.persistence.PersistentObjectImpl
> Type uwec.fpm.persistence.report.ReportFieldType
> Type uwec.fpm.persistence.report.ReportParameter
> Type uwec.fpm.persistence.PersistentObject
> Processed 9 types
> Warning: The class uwec.fpm.persistence.PersistentObject has no primary
> key
> Warning: The class uwec.fpm.persistence.PersistentObjectImpl has no
> primary key
> Warning: The class uwec.fpm.persistence.report.ReportParameterImpl has
> no primary key
> Warning: The class uwec.fpm.persistence.report.ReportParameterValue has
> no primary key
> Warning: The class uwec.fpm.persistence.report.ReportParameterValueImpl
> has no primary key
> Processed 9 types
>  
> 
> -----Original Message-----
> From: Gelhar, Wallace Joseph
> Sent: Tuesday, November 16, 2004 10:24 AM
> To: OJB Users List
> 
> Subject: RE: How to markup for xdoclet inheritance structure?
> 
> What is wrong with this markup.  I've followed your advice and allowed
> xdoclet to generate a table for the persistent base class (even though
> the fields are in each concrete classes table), but this fails to
> produce *any* fields in the repository.  Do I really have to duplicate
> each @ojb.field tag FIVE times for each property?
>  
> BTW, I am using xdoclet-1.2.1, xdoclet-ojb-module-1.2.1, and
> xjavadoc-1.0.3 from CVS.
> 
> Any other suggestions?
> 
> /**
>  * @ojb.class
>  */
> public interface PersistentObject {
> 
>     /*
>      * @ojb.field column="ID"
>      *            jdbc-type="INTEGER"
>      *            primarykey="true"
>      */          
>     public Integer getId();
>     /*
>      * @ojb.field column="ID"
>      *            jdbc-type="INTEGER"
>      *            primarykey="true"
>      */          
>     public void setId(Integer id);
> ...
> }
> 
> /**
>  * @ojb.class
>  */
> public abstract class PersistentObjectImpl implements PersistentObject {
>     
>     /*
>      * @ojb.field column="ID"
>      *            jdbc-type="INTEGER"
>      *            primarykey="true"
>      */        
>     protected Integer id;
>     /*
>      * @ojb.field column="ID"
>      *            jdbc-type="INTEGER"
>      *            primarykey="true"
>      */          
>     public Integer getId() { return id; }
>     /*
>      * @ojb.field column="ID"
>      *            jdbc-type="INTEGER"
>      *            primarykey="true"
>      */          
>     public void setId(Integer id) { this.id = id; } ...
> }
> 
> /**
>  * @ojb.class
>  */
> public interface ReportParameterValue extends PersistentObject {
>     /*
>      * @ojb.field column="ParameterValue"
>      */
>     public String getValue();
>     /*
>      * @ojb.field column="ParameterValue"
>      */    
>     public void setValue(String value);
> }
> 
> /**
>  * @ojb.class table="tblRptReportParameterValue"
>  * @ojb.field name="reportParameterID"
>  *            column="ReportParameterID"
>  *            jdbc-type="INTEGER"
>  */
> public class ReportParameterValueImpl extends PersistentObjectImpl
> implements ReportParameterValue {
>     /*
>      * @ojb.field column="ParameterValue"
>      */
>     protected String value;
> ...
>     /*
>      * @ojb.field column="ParameterValue"
>      */    
>     public String getValue() { return value; }
>     /*
>      * @ojb.field column="ParameterValue"
>      */    
>     public void setValue(String value) { this.value = value; } }
> 
> This is the repository it produces:
> 
> <!-- file containing the repository descriptions for user-defined types
> -->
> <!-- Generated by the xdoclet-ojb module -->
> 
> <class-descriptor
>     class="uwec.fpm.persistence.PersistentObject"
>     table="PersistentObject"
>> 
>     <extent-class
> class-ref="uwec.fpm.persistence.PersistentObjectImpl"/>
>     <extent-class
> class-ref="uwec.fpm.persistence.report.ReportParameterValue"/>
> </class-descriptor>
> <class-descriptor
>     class="uwec.fpm.persistence.PersistentObjectImpl"
>     table="PersistentObjectImpl"
>> 
>     <extent-class
> class-ref="uwec.fpm.persistence.report.ReportParameterValueImpl"/>
> </class-descriptor>
> <class-descriptor
>     class="uwec.fpm.persistence.report.ReportParameterValue"
>     table="ReportParameterValue"
>> 
>     <extent-class
> class-ref="uwec.fpm.persistence.report.ReportParameterValueImpl"/>
> </class-descriptor>
> <class-descriptor
>     class="uwec.fpm.persistence.report.ReportParameterValueImpl"
>     table="tblRptReportParameterValue"
>> 
>     <field-descriptor
>         name="reportParameterID"
>         column="ReportParameterID"
>         jdbc-type="INTEGER"
>         access="anonymous"
>> 
>     </field-descriptor>
> </class-descriptor>
> 
> 
> -----Original Message-----
> From: Thomas Dudziak [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 15, 2004 6:09 PM
> To: OJB Users List
> Subject: Re: How to markup for xdoclet inheritance structure?
> 
> Gelhar, Wallace Joseph wrote:
> 
>> I am trying to use xdoclet to map an inheritance hierarchy as follows,
> 
>> but it fails to include any inherited fields.  Any ideas?
> 
> The generate-table-info="false" setting disables generation of
> field/reference/collection entries. See here for details:
> 
> http://db.apache.org/ojb/docu/guides/xdoclet-module.html#ojb.class
> 
> You should also put the ojb.field tags at the getter or setter methods
> in the interfaces because this will cause their definition to be
> inherited in all implementing classes.
> 
> Tom
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to