You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Markus <ma...@gmx.com> on 2003/08/12 11:16:40 UTC

Problems with xdoclet-ojb-module

Hi,

I always get this errormessabe from ant:

repository-files:

BUILD FAILED
file:D:/JAVA_E~1/cvs_home/testojb/build.xml:165: taskdef class
xdoclet.modules.ojb.OjbDocletTask cannot be found

I use the following ant targets

...
<!-- Where xdoclet and xdoclet-ojb-module are in -->
<property name="dir.repo" value="d:/Java_Entwicklung/Repo"/>
...
<path id="cp">
    <pathelement path="${classpath}"/>
    <pathelement location="${dir.class}"/>
    <pathelement location="${dir.dep}"/>
    <fileset dir="${dir.repo}">
      <include name="**/*.jar"/>
    </fileset>
    <fileset dir="${dir.tomcat}">
      <include name="**/*.jar"/>
    </fileset>
  </path>
...
 <target name="repository-files">
        <mkdir dir="./build"/>
        
        <taskdef name="ojbdoclet"
classname="xdoclet.modules.ojb.OjbDocletTask"  classpathref="cp"/>
        <ojbdoclet destdir="./build">
            <fileset dir="./src"/>
            <ojbrepository destinationFile="repository_user.xml"/>
            <torqueschema databaseName="testojb"
destinationFile="project_schema.xml"/>
        </ojbdoclet>
    </target>
...

There are no files in ant\lib or in my project-lib folder

Kind Regards,

Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Christian Pesch <ch...@coremedia.com>.
Markus wrote:

>Hi,
>
>I always get this errormessabe from ant:
>
>repository-files:
>
>BUILD FAILED
>file:D:/JAVA_E~1/cvs_home/testojb/build.xml:165: taskdef class
>xdoclet.modules.ojb.OjbDocletTask cannot be found
>
>  
>
Did you use the xdoclet-1.2b3-dev.jar?

-- 

Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Markus <ma...@gmx.com>.
Hi,
now it works!
Only another mistake in my build.xml (forgot to change the classpathref
again).
Thank you for your help.

Kind reagards,

Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Markus <ma...@gmx.com>.
Hi,

OK I've added xjavadoc.jar but still getting this errormessage:
BUILD FAILED
file:D:/JAVA_E~1/cvs_home/testojb/build.xml:171: taskdef class
xdoclet.modules.ojb.OjbDocletTask cannot be found
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:236)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:162)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
Caused by: java.lang.ClassNotFoundException:
xdoclet.modules.ojb.OjbDocletTask
        at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1075)
        at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:230)
        ... 9 more
--- Nested Exception ---
java.lang.ClassNotFoundException: xdoclet.modules.ojb.OjbDocletTask
        at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1075)
        at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:230)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:162)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
Should I as it in the xdoclet userlist or is it more some problem with the
ojb-module?

Regards,

Markus


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Markus <ma...@gmx.com>.
Hi,
this is my errormessage with ant -v
BUILD FAILED
file:D:/JAVA_E~1/cvs_home/testojb/build.xml:165: taskdef class
xdoclet.modules.ojb.OjbDocletTask cannot be found
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:240)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:162)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
Caused by: java.lang.NoClassDefFoundError: xjavadoc/ant/XJavadocTask
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1002)
        at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1064)
        at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1002)
        at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1064)
        at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:230)
        ... 9 more
--- Nested Exception ---
java.lang.NoClassDefFoundError: xjavadoc/ant/XJavadocTask
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1002)
        at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1064)
        at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1002)
        at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1064)
        at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:230)
        at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:162)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Does it mean it misses xjavadoc?

Regards,

Markus

> No, it seems I misunderstood you. Here is the relevant part from one of my
> build files (which doesn't look too different from yours):
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <project basedir="." default="build" name="KMPortal-OJB">
>     <property environment="env"/>
> 
>     <!-- Properties are defined in external files -->
>     <!-- First user supplied properties - this allows the user to override
> default properties (ANT does not override already-set properties) -->
>     <property file="${env.USER_PROPERTIES}"/>
>     <!-- Now read common properties (before profile to allow
> overriding)-->
>     <property file="build.properties"/>
> 
>     <!-- The libraries in the library directory that shall be used for
> compiling -->
>     <path id="compile-libs">
>         <fileset dir="${lib.dir}">
>             <include name="**/*.jar"/>
>             <include name="**/*.zip"/>
>         </fileset>
>     </path>
> 
>     ...
> 
>     <target name="repository-files">
>         <taskdef
> name="ojbdoclet" classname="xdoclet.modules.ojb.OjbDocletTask"
> classpathref="compile-libs"/>
> 
>         <ojbdoclet destdir="${build.dir}/db">
>             <fileset dir="${src.dir}/java"/>
>             <ojbrepository destinationFile="${repository.file}"/>
>             <torqueschema
> databaseName="${project}" destinationFile="${schema.file}"/>
>         </ojbdoclet>
>     </target>
> 
>     ...
> </project>
> 
> Again, as I said, try the -v option as it could be that not the
> OjbDocletTask class itself is missing but one of the required libraries,
> and Ant/xdoclet will only tell you which one when you use the -v option
> (as only then you see the NoClassDefFoundErrors).
> 
> Tom
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Thomas Dudziak <to...@first.gmd.de>.
No, it seems I misunderstood you. Here is the relevant part from one of my
build files (which doesn't look too different from yours):

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="KMPortal-OJB">
    <property environment="env"/>

    <!-- Properties are defined in external files -->
    <!-- First user supplied properties - this allows the user to override
default properties (ANT does not override already-set properties) -->
    <property file="${env.USER_PROPERTIES}"/>
    <!-- Now read common properties (before profile to allow
overriding)-->
    <property file="build.properties"/>

    <!-- The libraries in the library directory that shall be used for
compiling -->
    <path id="compile-libs">
        <fileset dir="${lib.dir}">
            <include name="**/*.jar"/>
            <include name="**/*.zip"/>
        </fileset>
    </path>

    ...

    <target name="repository-files">
        <taskdef
name="ojbdoclet" classname="xdoclet.modules.ojb.OjbDocletTask" classpathref="compile-libs"/>

        <ojbdoclet destdir="${build.dir}/db">
            <fileset dir="${src.dir}/java"/>
            <ojbrepository destinationFile="${repository.file}"/>
            <torqueschema
databaseName="${project}" destinationFile="${schema.file}"/>
        </ojbdoclet>
    </target>

    ...
</project>

Again, as I said, try the -v option as it could be that not the
OjbDocletTask class itself is missing but one of the required libraries,
and Ant/xdoclet will only tell you which one when you use the -v option
(as only then you see the NoClassDefFoundErrors).

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Markus <ma...@gmx.com>.
Hi,
maybe I misunderstood you but if I use:

...
<property name="myclasspath" refid="cp"/>
  
<target name="repository-files">

  <echo message="${myclasspath}"/>

        <mkdir dir="./build"/>
        <taskdef name="ojbdoclet"
classname="xdoclet.modules.ojb.OjbDocletTask"  classpathref="cp"/>
        <mkdir dir="./build"/>
        <ojbdoclet destdir="./build">
            <fileset dir="./src"/>
            <ojbrepository destinationFile="repository_user.xml"/>
            <torqueschema databaseName="testojb"
destinationFile="project_schema.xml"/>
        </ojbdoclet>
    </target>
..
It echoes me that the jars are in the path

Regards,

Markus

> I don't mean the CLASSPATH on the shell but the cp variable you use in the
> ant build file. In the <taskdef> you have an attribute classpathref which
> basically states the id of the path construct in the build file which
> defines the classpath to search in for libraries (this includes the
> xdoclet ojb module). So for the taskdef to find the module it must be in
> this path. Since Ant does not automatically use the CLASSPATH environment
> variable you will have to add it manually to the path construct in the way
> I showed in my previous e-mail (using an environment property and the 
> "env." construct).
> Have you tried Ant's -v option? It will show you which classes Ant cannot
> find.
> 
> Tom
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Thomas Dudziak <to...@first.gmd.de>.
I don't mean the CLASSPATH on the shell but the cp variable you use in the
ant build file. In the <taskdef> you have an attribute classpathref which
basically states the id of the path construct in the build file which
defines the classpath to search in for libraries (this includes the
xdoclet ojb module). So for the taskdef to find the module it must be in
this path. Since Ant does not automatically use the CLASSPATH environment
variable you will have to add it manually to the path construct in the way
I showed in my previous e-mail (using an environment property and the 
"env." construct).
Have you tried Ant's -v option? It will show you which classes Ant cannot
find.

Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Markus <ma...@gmx.com>.
Hi,

if I echo the classpath I get the following
output:

...D:\Java_Entwicklung\Repo\xdoclet-1.2b3-dev.jar;D:\Java_Entwicklung\Repo\xdoclet-ojb-module-1.2b3-dev.jar;...

IMO it is right.
I use xdoclet1.2b3.

Regards,

Markus

> The exception states that you do not have the xdoclet ojb module in the
> classpath which is cp (as referenced in the taskdef).
> The first pathelement in the path definition probably does not work. I
> think you want to add the CLASSPATH variable to the path. This can be
> accomplished by adding the environment like this:
> 
>     <property environment="env"/>
>     ...
>     <path id="cp">
>         <pathelement path="${env.CLASSPATH}"/>
>         ....
>     </path>
> 
> Tom
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Christian Pesch <ch...@coremedia.com>.
Thomas Dudziak wrote:

>[..]
>
> All I could perhaps do is to add a warning that
>the module has been called but there are no classes to process.
>
How about a short output, how many classes were processed?

-- 
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Thomas Dudziak <to...@first.gmd.de>.

On Tue, 12 Aug 2003, Christian Pesch wrote:

> There was no output indicating, that the fileset
> for the java source in my ant target was wrong:

This is something that xdoclet handles for the modules so in the module I
have no control about the source (or some indication whether the source
code path was correct). All I could perhaps do is to add a warning that
the module has been called but there are no classes to process. I will
probably add this to the next version as I plan to enhance the error
checking and reporting anyway.

Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Christian Pesch <ch...@coremedia.com>.
Thomas Dudziak wrote:

>This is usually the case when xdoclet finds no source code.#
>
That's is. Thanks.

> Try running
>ant with the -v option to see some more output. 
>
There was no output indicating, that the fileset
for the java source in my ant target was wrong:

[cpesch@mochatini project]$ bin/build.sh -v repository-files
Apache Ant version 1.5.3 compiled on April 16 2003
Buildfile: build.xml
Detected Java version: 1.4 in: /usr/java/j2sdk1.4.1_03/jre
Detected OS: Linux
parsing buildfile build.xml with URI = 
file:/home/cpesch/metamusic/test/project/build.xml
Project base dir set to: /home/cpesch/metamusic/test/project
 [property] Loading /home/cpesch/build.properties
 [property] Unable to find property file: /home/cpesch/build.properties
 [property] Loading /home/cpesch/metamusic/test/project/build.properties
 [property] Loading 
/home/cpesch/metamusic/test/project/profile/mysql.profile
Override ignored for property project
Override ignored for property SQLControlTemplate
Override ignored for property schemaDirectory
Property ${lib.repo} has not been set
Override ignored for property outputDirectory
Build sequence for target `repository-files' is [repository-files]
Complete build sequence is [repository-files, set-archive-name, 
set-archive-name-date, detect-jdk, check-jdk12proxy-classes, 
check-jndi-classes, use-jdk12, use-jdk13, use-jdk14, init, prepare, 
javadoc, checkP6Spy, check-j2ee-classes, preprocess, resources, main, 
declare, api, reverse-db, main-optimized, spec, doc, check-jdo-classes, 
useP6Spy, dontUseP6Spy, prepare-repository, prepare-db, 
junit-no-compile-no-prepare, junit-no-compile, reverse-db2, verify, jar, 
war, clean, all, useDate, source, docs, tarball, release, snapshot, 
check-jdori-classes, browse-db, copy-db, junit-quick, initJNETSQLServer, 
getJSQLDriver, jar-debug, junit, run-test, dump-db]

repository-files:
dropping /home/cpesch/metamusic/test/project/j2ee.jar from path as it 
doesn't exist
dropping /home/cpesch/metamusic/test/project/jdo.jar from path as it 
doesn't exist
dropping /home/cpesch/metamusic/test/project/jdori.jar from path as it 
doesn't exist
[ojbdoclet] (XDocletMain.start                   47  ) Running 
<ojbrepository/>
[ojbdoclet] Generating repository_user.xml.
[ojbdoclet] (XDocletMain.start                   47  ) Running 
<torqueschema/>
[ojbdoclet] Generating metamusic_schema.xml.

-- 

Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Thomas Dudziak <to...@first.gmd.de>.
This is usually the case when xdoclet finds no source code. Try running
ant with the -v option to see some more output. As you seem to be running
Linux or something similar you should also check the rights of the source
code files (xdoclet won't process them if it cannot read them).

Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Christian Pesch <ch...@coremedia.com>.
Thomas Dudziak wrote:

>The exception states that you do not have the xdoclet ojb module in the
>classpath which is cp (as referenced in the taskdef).
>  
>

Do you have a hint, why the files here stay empty?

?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?>
<!DOCTYPE database SYSTEM 
"http://jakarta.apache.org/turbine/dtd/database.dtd">
<!-- Generated by the xdoclet-ojb module -->

<database name="TEST">

</database>


<!-- file containing the repository descriptions for user-defined types -->
<!-- Generated by the xdoclet-ojb module -->


class:

/*
* @ojb.class table="SITE"
* @ojb.index name="NAME_UNIQUE"
*            unique="true"
*            fields="name"
*/
 public class Site implements Serializable
 {
   /**
    * @ojb.field column="ID" required="true" primary-key="true" 
jdbc-type="INTEGER"
    */
   private int id = 0;

   /**
    * @ojb.field column="NAME"
    *            length="100"
    */
   private String name;
 }


ant-task:

  <target name="repository-files">
      <taskdef name="ojbdoclet" 
classname="xdoclet.modules.ojb.OjbDocletTask"  
classpathref="compilation-classpath"/>
      <ojbdoclet destdir="./target">
          <fileset dir="./src/java"/>
          <ojbrepository destinationFile="repository_user.xml"/>
          <torqueschema databaseName="TEST" 
destinationFile="project_schema.xml"/>
      </ojbdoclet>
  </target>

lib:

ls -l lib/xdoclet-*
-rw-r--r--    1 cpesch   x 150927 Jul 27 14:27 lib/xdoclet-1.2b3-dev.jar
-rw-r--r--    1 cpesch   x  44977 Jul 27 14:27 
lib/xdoclet-ojb-module-1.2b3-dev.jar

-- 
Christian 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Problems with xdoclet-ojb-module

Posted by Thomas Dudziak <to...@first.gmd.de>.
The exception states that you do not have the xdoclet ojb module in the
classpath which is cp (as referenced in the taskdef).
The first pathelement in the path definition probably does not work. I
think you want to add the CLASSPATH variable to the path. This can be
accomplished by adding the environment like this:

    <property environment="env"/>
    ...
    <path id="cp">
        <pathelement path="${env.CLASSPATH}"/>
        ....
    </path>

Tom



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org