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 psamathos <ma...@snusk.com> on 2004/09/01 15:53:18 UTC

Unable to use xdoclet-ojb-module.

Hi,

When I try to use Xdoclet to generate my repository-file it fails with

"The <ojbdoclet> type doesn't support the nested "ojbrepository" element."

Does anyone know why? I've tried everything I could think of, but it 
never works.

<target name="repository-files">
     <ojbdoclet destdir="./dist" verbose="true">
         <fileset dir="src">
             <include name="com/snusk/bo/*.java"/>
         </fileset>

         <ojbrepository destinationFile="repository_user.xml"/>
     </ojbdoclet>
</target>

regards
/Magnus

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


Re: Unable to use xdoclet-ojb-module.

Posted by Magnus <ma...@snusk.com>.
David Durham wrote:

> Magnus wrote:
>
>> I just tried my file with suns JDK-1.5-rc on debian-amd64 and works
>> fine, thus it must have been a bug in IBM's JVM ( since all the other
>> components are the same ).
>
>
> So, are you going to be able to use the JDK or are you stuck using 
> IBM's JVM?
>
>
> - Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
I've switched environment to JDK-1.5-rc now, besides my Mac just stopped 
working for an unknown reason ( just won't start anymore ).

Thanks for all your support :)

regards,
/Magnus Sjöstrand

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


Re: Unable to use xdoclet-ojb-module.

Posted by David Durham <da...@scott.af.mil>.
Magnus wrote:

> I just tried my file with suns JDK-1.5-rc on debian-amd64 and works
> fine, thus it must have been a bug in IBM's JVM ( since all the other
> components are the same ).

So, are you going to be able to use the JDK or are you stuck using IBM's 
JVM?


- Dave

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


Re: Unable to use xdoclet-ojb-module.

Posted by Magnus <ma...@snusk.com>.
David Durham wrote:

> psamathos wrote:
>
>> <snip>
>>
>> "The <ojbdoclet> type doesn't support the nested "ojbrepository" 
>> element."
>>
>> Does anyone know why? I've tried everything I could think of, but it
>> never works.
>>
>> <target name="repository-files">
>> <ojbdoclet destdir="./dist" verbose="true">
>> <fileset dir="src">
>> <include name="com/snusk/bo/*.java"/>
>> </fileset>
>>
>> <ojbrepository destinationFile="repository_user.xml"/>
>> </ojbdoclet>
>> </target>
>
>
> I'm using ojbdoclet and I might be able to help you out.  What does 
> your taskdef look like?  As I recall, there's a problem wherein you 
> have to put the taskdef in each target that uses it.
>
>
>
> - Dave
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
I just tried my file with suns JDK-1.5-rc on debian-amd64 and works 
fine, thus it must have been a bug in IBM's JVM ( since all the other 
components are the same ).

regards
/Magnus Sjöstrand

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


Re: Unable to use xdoclet-ojb-module.

Posted by psamathos <ma...@snusk.com>.
Christian Pesch wrote:
> psamathos wrote:
> 
>> Any other ideas?
> 
> 
> 
> Are you using ant >= 1.6?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 

Yes, I'm using Ant 1.6.2

/Magnus

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


Re: Unable to use xdoclet-ojb-module.

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

> Any other ideas?


Are you using ant >= 1.6?


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


Re: Unable to use xdoclet-ojb-module.

Posted by psamathos <ma...@snusk.com>.
David Durham wrote:
> psamathos wrote:
> 
>> <snip>   which makes me think there's a bug in my JVM or
>> somewhere related.
> 
> 
> Have you tested your Ant targets in a different environment?
> 
> 
> - Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 

No, but I have a x86 tomorrow ( friday ) hopefully, and I will test my 
project there with Sun's JVM.

regards
/Magnus

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


Re: Unable to use xdoclet-ojb-module.

Posted by David Durham <da...@scott.af.mil>.
psamathos wrote:

> <snip>   which makes me think there's a bug in my JVM or
> somewhere related.

Have you tested your Ant targets in a different environment?


- Dave

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


Re: Unable to use xdoclet-ojb-module.

Posted by psamathos <ma...@snusk.com>.
David Durham wrote:
> psamathos wrote:
> 
>> Yes, and I couldn't find anything. This mailinglist is my only hope.
> 
> 
> I'm willing to help on this point, but did you download the module's 
> source code to see where that message could be thrown from?
> 
> Maybe the clue lies in Ant's source code?  I've got time to look around 
> if you'd like.
> 
> 
> - Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 

I didn't look around in ant's source, but I have downloaded the 
xdoclet-ojb-module source and looked around. I unpacked the .jar and it 
doesn't seem to miss anything ( I'm not a xdoclet expert in any way ), 
but it did contain a META-INF/xdoclet.xml with a

<subtask
     name="ojbrepository"
     implementation-class="xdoclet.modules.ojb.OjbSubTask"
     parent-task-class="xdoclet.modules.ojb.OjbDocletTask"/>

I tried to recompile xdoclet from source as well, but it fails in pretty 
and that's the reason I think my java environment is broken somewhere.

[pretty] ParserFactory Version 0.1:  Encountered errors during parse: 
/home/psamathos/download/xdoclet-1.2.1/core/src/xdoclet/ConfigParamIntrospector.java
[pretty] org.acm.seguin.parser.ParseException: Encountered "void 
fillConfi <EOF>" at line 138, column 20.
[pretty] Was expecting one of:

I opened ConfigParamIntrospector.java in vim, and the file is much 
longer then 138 lines, which makes me think there's a bug in my JVM or 
somewhere related.

regards
/Magnus

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


Re: Unable to use xdoclet-ojb-module.

Posted by David Durham <da...@scott.af.mil>.
psamathos wrote:

> Yes, and I couldn't find anything. This mailinglist is my only hope.

I'm willing to help on this point, but did you download the module's 
source code to see where that message could be thrown from?

Maybe the clue lies in Ant's source code?  I've got time to look around 
if you'd like.


- Dave

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


Re: Unable to use xdoclet-ojb-module.

Posted by psamathos <ma...@snusk.com>.
David Durham wrote:
> psamathos wrote:
> 
>> Ok, I've added the classpathref, but I still the get the same error. 
>> These are my new settings.
>>
>> <path id="classpath">
>>     <fileset dir="/usr/share/ant/lib" includes="*.jar"/>
>>     <fileset dir="dist/WEB-INF/lib" includes="*.jar"/>
>> </path>
>>     
>> <property name="classpath" refid="classpath"/>
>>
>> <target name="repository-files">
>>     <taskdef name="ojbdoclet"
>>         classname="xdoclet.modules.ojb.OjbDocletTask"
>>         classpathref="classpath"/>
>>
>>     <ojbdoclet destdir="./dist" verbose="true">
>>         <fileset dir="src">
>>             <include name="com/snusk/bo/*.java"/>
>>         </fileset>
>>            
>>         <ojbrepository destinationFile="repository_user.xml"/>
>>     </ojbdoclet>
>> </target>
>>
>> /usr/share/ant/lib contains xdoclet.jar and 
>> xdoclet-ojb-module-1.2.1.jar ( amongst other ).
>>
>> Any other ideas?
>>  
>>
> 
> Sorry I didn't get back to you; I had to go home early.  Did you try 
> searching groups.google.com for your error message?
> 
> 
> - Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 

Yes, and I couldn't find anything. This mailinglist is my only hope.

I've started to think that maybe this is a linux-ppc/IBM-JVM/Debian 
thing. Hopefully I'll get a new x86 tomorrow and I will try the same 
thing with that, using Sun's JVM.

I'm using Ant 1.6.2

/Magnus

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


Re: Unable to use xdoclet-ojb-module.

Posted by David Durham <da...@scott.af.mil>.
psamathos wrote:

>Ok, I've added the classpathref, but I still the get the same error. 
>These are my new settings.
>
><path id="classpath">
>     <fileset dir="/usr/share/ant/lib" includes="*.jar"/>
>     <fileset dir="dist/WEB-INF/lib" includes="*.jar"/>
></path>
>	
><property name="classpath" refid="classpath"/>
>
><target name="repository-files">
>     <taskdef name="ojbdoclet"
>         classname="xdoclet.modules.ojb.OjbDocletTask"
>         classpathref="classpath"/>
>
>     <ojbdoclet destdir="./dist" verbose="true">
>         <fileset dir="src">
>             <include name="com/snusk/bo/*.java"/>
>         </fileset>
>			
>         <ojbrepository destinationFile="repository_user.xml"/>
>     </ojbdoclet>
></target>
>
>/usr/share/ant/lib contains xdoclet.jar and xdoclet-ojb-module-1.2.1.jar 
>( amongst other ).
>
>Any other ideas?
>  
>

Sorry I didn't get back to you; I had to go home early.  Did you try 
searching groups.google.com for your error message?


- Dave

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


Re: Unable to use xdoclet-ojb-module.

Posted by psamathos <ma...@snusk.com>.
David Durham wrote:
> psamathos wrote:
> 
>> This is what my current target looks like:
>>
>> <target name="repository-files">
>> <taskdef name="ojbdoclet"
>> classname="xdoclet.modules.ojb.OjbDocletTask"/>
>> <ojbdoclet destdir="./dist" verbose="true">
>> <fileset dir="src">
>> <include name="com/snusk/bo/*.java"/>
>> </fileset>
>>
>> <ojbrepository destinationFile="repository_user.xml"/>
>> </ojbdoclet>
>> </target>
>>
>> in the docs it also has a classpathref, do I need that as well? 
> 
> 
> I think that needs to point to "module jar along with the xdoclet and 
> xjavadc jars"
> 
>> I have
>> tried with and without but perhaps I made a misstake somewhere with it?
> 
> 
> My task doesn't work without it.  I think you could probably get rid of 
> it if you put those jars in Ant's classpath.  I don't recommend doing 
> that, though.
> 
> Here's what I have:
> 
>        <path id="classpath">
>            <fileset dir="${common.lib}" includes="*.jar"/>
>            <fileset dir="${application.src.lib}" includes="*.jar"/>
>        </path>
>        <property name="classpath" refid="classpath"/>
> 
>        <target name="ojb.repository.xml" depends="prepare">
>            <taskdef name="ojbdoclet"
>                     classname="xdoclet.modules.ojb.OjbDocletTask"
>                     classpathref="classpath"/>
>            <ojbdoclet destdir="${application.dest.classes}">
>                <fileset dir="${application.src.classes}">
>                     <exclude name="**/*repository*"/>
>                </fileset>
>                <ojbrepository destinationFile="repository_user.xml"/>
>                <torqueschema databaseName="ucm"
>    destinationFile="project-schema.xml"/>
>            </ojbdoclet>
>        </target>
> 
> ${application.src.lib} points to a lib folder with the required jars.
> 
> 
> - Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 

Ok, I've added the classpathref, but I still the get the same error. 
These are my new settings.

<path id="classpath">
     <fileset dir="/usr/share/ant/lib" includes="*.jar"/>
     <fileset dir="dist/WEB-INF/lib" includes="*.jar"/>
</path>
	
<property name="classpath" refid="classpath"/>

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

     <ojbdoclet destdir="./dist" verbose="true">
         <fileset dir="src">
             <include name="com/snusk/bo/*.java"/>
         </fileset>
			
         <ojbrepository destinationFile="repository_user.xml"/>
     </ojbdoclet>
</target>

/usr/share/ant/lib contains xdoclet.jar and xdoclet-ojb-module-1.2.1.jar 
( amongst other ).

Any other ideas?
Thanks for the patience :)

regards
/Magnus

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


Re: Unable to use xdoclet-ojb-module.

Posted by David Durham <da...@scott.af.mil>.
psamathos wrote:

> This is what my current target looks like:
>
> <target name="repository-files">
> <taskdef name="ojbdoclet"
> classname="xdoclet.modules.ojb.OjbDocletTask"/>
> <ojbdoclet destdir="./dist" verbose="true">
> <fileset dir="src">
> <include name="com/snusk/bo/*.java"/>
> </fileset>
>
> <ojbrepository destinationFile="repository_user.xml"/>
> </ojbdoclet>
> </target>
>
> in the docs it also has a classpathref, do I need that as well? 

I think that needs to point to "module jar along with the xdoclet and 
xjavadc jars"

> I have
> tried with and without but perhaps I made a misstake somewhere with it?

My task doesn't work without it.  I think you could probably get rid of 
it if you put those jars in Ant's classpath.  I don't recommend doing 
that, though.

Here's what I have:

        <path id="classpath">
            <fileset dir="${common.lib}" includes="*.jar"/>
            <fileset dir="${application.src.lib}" includes="*.jar"/>
        </path>
        <property name="classpath" refid="classpath"/>

        <target name="ojb.repository.xml" depends="prepare">
            <taskdef name="ojbdoclet"
                     classname="xdoclet.modules.ojb.OjbDocletTask"
                     classpathref="classpath"/>
            <ojbdoclet destdir="${application.dest.classes}">
                <fileset dir="${application.src.classes}">
                     <exclude name="**/*repository*"/>
                </fileset>
                <ojbrepository destinationFile="repository_user.xml"/>
                <torqueschema databaseName="ucm"
    destinationFile="project-schema.xml"/>
            </ojbdoclet>
        </target>

${application.src.lib} points to a lib folder with the required jars.


- Dave

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


Re: Unable to use xdoclet-ojb-module.

Posted by psamathos <ma...@snusk.com>.
David Durham wrote:
> David Durham wrote:
> 
>> I'm using ojbdoclet and I might be able to help you out. What does your
>> taskdef look like? As I recall, there's a problem wherein you have to
>> put the taskdef in each target that uses it.
> 
> 
> Actually, each ojbdoclet task needs it's own taskdef.
> 
>    http://db.apache.org/ojb/docu/guides/xdoclet-module.html#Usage
> 
> 
> - Dave
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 

This is what my current target looks like:

<target name="repository-files">
     <taskdef name="ojbdoclet"
              classname="xdoclet.modules.ojb.OjbDocletTask"/>
     <ojbdoclet destdir="./dist" verbose="true">
         <fileset dir="src">
             <include name="com/snusk/bo/*.java"/>
         </fileset>

         <ojbrepository destinationFile="repository_user.xml"/>
      </ojbdoclet>
</target>

in the docs it also has a classpathref, do I need that as well? I have 
tried with and without but perhaps I made a misstake somewhere with it?

regards
/Magnus

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


Re: Unable to use xdoclet-ojb-module.

Posted by David Durham <da...@scott.af.mil>.
David Durham wrote:

> I'm using ojbdoclet and I might be able to help you out. What does your
> taskdef look like? As I recall, there's a problem wherein you have to
> put the taskdef in each target that uses it.

Actually, each ojbdoclet task needs it's own taskdef.

    http://db.apache.org/ojb/docu/guides/xdoclet-module.html#Usage


- Dave

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


Re: Unable to use xdoclet-ojb-module.

Posted by David Durham <da...@scott.af.mil>.
psamathos wrote:

> <snip>
>
> "The <ojbdoclet> type doesn't support the nested "ojbrepository" element."
>
> Does anyone know why? I've tried everything I could think of, but it
> never works.
>
> <target name="repository-files">
> <ojbdoclet destdir="./dist" verbose="true">
> <fileset dir="src">
> <include name="com/snusk/bo/*.java"/>
> </fileset>
>
> <ojbrepository destinationFile="repository_user.xml"/>
> </ojbdoclet>
> </target>

I'm using ojbdoclet and I might be able to help you out.  What does your 
taskdef look like?  As I recall, there's a problem wherein you have to 
put the taskdef in each target that uses it.



- Dave

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


Re: Unable to use xdoclet-ojb-module.

Posted by Armin Waibel <ar...@apache.org>.
Hi Magnus,

the developer of the xdoclet module (Thomas D.) is on vacation and I 
never worked on that stuff. Never heard about such problems.
You can try latest ojb-xdoclet.jar from CVS, but I think it's not much 
different from OJB 1.0 version.

regards,
Armin

psamathos wrote:

> Hi,
> 
> When I try to use Xdoclet to generate my repository-file it fails with
> 
> "The <ojbdoclet> type doesn't support the nested "ojbrepository" element."
> 
> Does anyone know why? I've tried everything I could think of, but it 
> never works.
> 
> <target name="repository-files">
>     <ojbdoclet destdir="./dist" verbose="true">
>         <fileset dir="src">
>             <include name="com/snusk/bo/*.java"/>
>         </fileset>
> 
>         <ojbrepository destinationFile="repository_user.xml"/>
>     </ojbdoclet>
> </target>
> 
> regards
> /Magnus
> 
> ---------------------------------------------------------------------
> 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