Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Problems with ant xdoclet tasks
Problems with ant xdoclet tasks [message #102190] Wed, 08 October 2003 09:49 Go to next message
Eclipse UserFriend
Hi,
I've come up against a strange problem with ant and I need help
proceeding. I'm using xdoclet for hibernate and when I run ant inside
eclipse, I get the following message:

[hibernatedoclet] BUILD FAILED: file:C:/Documents and
Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
create a hibernate element under hibernatedoclet. Make sure the jar file
containing the corresponding subtask class is on the classpath specified
in the <taskdef> that defined {2}.

This is very strange, since the <hibernate> subtask is defined in the
same JAR as the <hibernatedoclet> task. What's stranger is that the
script builds fine from the command line. I've checked bugzilla for this
and the entries under "xdoclet" all have to do with ClassNotFound
exceptions, which is not what I'm getting. I know at least one other
person had the same issue in July, but I haven't received a response
back from him. My ant runtime settings include the JARs for xdoclet, as
does my build script in the <taskdef> section. The only other thing I
can think of is that I have the JBoss-IDE plugin installed and it is
bundled with an earlier version of xdoclet than I have installed. Is it
possible that ant could be using those JARs instead of the ones I
explicitly set in the runtime prefs?

Thanks,

Derek
Re: Problems with ant xdoclet tasks [message #102237 is a reply to message #102190] Wed, 08 October 2003 12:32 Go to previous messageGo to next message
Eclipse UserFriend
We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070 which is
currently deferred.

My experience has been that you need to include all of the xdoclet jars on
the classpath for any xdoclet taskdef.
I am sure this is overstating the case but has lead me to success without
trying to figure out the exact jars I require.

As well as you can see the Apache Ant error message has a bug in it so that
it does not state the task you need to fix up.
I believe the error reporting is better in the current Ant 1.6 beta (FYI)

HTH
Darins

"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
news:bm14nc$s2e$1@eclipse.org...
> Hi,
> I've come up against a strange problem with ant and I need help
> proceeding. I'm using xdoclet for hibernate and when I run ant inside
> eclipse, I get the following message:
>
> [hibernatedoclet] BUILD FAILED: file:C:/Documents and
> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
> create a hibernate element under hibernatedoclet. Make sure the jar file
> containing the corresponding subtask class is on the classpath specified
> in the <taskdef> that defined {2}.
>
> This is very strange, since the <hibernate> subtask is defined in the
> same JAR as the <hibernatedoclet> task. What's stranger is that the
> script builds fine from the command line. I've checked bugzilla for this
> and the entries under "xdoclet" all have to do with ClassNotFound
> exceptions, which is not what I'm getting. I know at least one other
> person had the same issue in July, but I haven't received a response
> back from him. My ant runtime settings include the JARs for xdoclet, as
> does my build script in the <taskdef> section. The only other thing I
> can think of is that I have the JBoss-IDE plugin installed and it is
> bundled with an earlier version of xdoclet than I have installed. Is it
> possible that ant could be using those JARs instead of the ones I
> explicitly set in the runtime prefs?
>
> Thanks,
>
> Derek
>
Re: Problems with ant xdoclet tasks [message #102311 is a reply to message #102237] Wed, 08 October 2003 14:41 Go to previous messageGo to next message
Eclipse UserFriend
OK, the bug looks similar, but I am definitely including all of the
JARs. I've included them both in the ANT runtime prefs, as well as in a
classpathref in my build.xml. Could this duplication of classpaths be
causing problems?

Derek

Darin Swanson wrote:
> We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070 which is
> currently deferred.
>
> My experience has been that you need to include all of the xdoclet jars on
> the classpath for any xdoclet taskdef.
> I am sure this is overstating the case but has lead me to success without
> trying to figure out the exact jars I require.
>
> As well as you can see the Apache Ant error message has a bug in it so that
> it does not state the task you need to fix up.
> I believe the error reporting is better in the current Ant 1.6 beta (FYI)
>
> HTH
> Darins
>
> "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> news:bm14nc$s2e$1@eclipse.org...
>
>>Hi,
>> I've come up against a strange problem with ant and I need help
>>proceeding. I'm using xdoclet for hibernate and when I run ant inside
>>eclipse, I get the following message:
>>
>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
>>create a hibernate element under hibernatedoclet. Make sure the jar file
>>containing the corresponding subtask class is on the classpath specified
>>in the <taskdef> that defined {2}.
>>
>>This is very strange, since the <hibernate> subtask is defined in the
>>same JAR as the <hibernatedoclet> task. What's stranger is that the
>>script builds fine from the command line. I've checked bugzilla for this
>>and the entries under "xdoclet" all have to do with ClassNotFound
>>exceptions, which is not what I'm getting. I know at least one other
>>person had the same issue in July, but I haven't received a response
>>back from him. My ant runtime settings include the JARs for xdoclet, as
>>does my build script in the <taskdef> section. The only other thing I
>>can think of is that I have the JBoss-IDE plugin installed and it is
>>bundled with an earlier version of xdoclet than I have installed. Is it
>>possible that ant could be using those JARs instead of the ones I
>>explicitly set in the runtime prefs?
>>
>>Thanks,
>>
>>Derek
>>
>
>
>
Re: Problems with ant xdoclet tasks [message #102336 is a reply to message #102311] Wed, 08 October 2003 15:12 Go to previous messageGo to next message
Eclipse UserFriend
I doubt it if there are the exact same JARs...I would remove from the Ant
runtime classpath and try though.
You are doing something like:

<path id="compile.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>

<taskdef
name="ejbdoclet"
classname="xdoclet.modules.ejb.EjbDocletTask"
classpathref="compile.classpath"
/>

Where "lib" points to a directory containing all of the doclet JARs?

If all looks good you can send me your buildfile (and or to the list) and I
will attempt to have a look (or you could log a bug report and then we will
have a permanent record on how to succeed here).

Darins


"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
news:bm1lq0$f4n$1@eclipse.org...
> OK, the bug looks similar, but I am definitely including all of the
> JARs. I've included them both in the ANT runtime prefs, as well as in a
> classpathref in my build.xml. Could this duplication of classpaths be
> causing problems?
>
> Derek
>
> Darin Swanson wrote:
> > We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070 which is
> > currently deferred.
> >
> > My experience has been that you need to include all of the xdoclet jars
on
> > the classpath for any xdoclet taskdef.
> > I am sure this is overstating the case but has lead me to success
without
> > trying to figure out the exact jars I require.
> >
> > As well as you can see the Apache Ant error message has a bug in it so
that
> > it does not state the task you need to fix up.
> > I believe the error reporting is better in the current Ant 1.6 beta
(FYI)
> >
> > HTH
> > Darins
> >
> > "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> > news:bm14nc$s2e$1@eclipse.org...
> >
> >>Hi,
> >> I've come up against a strange problem with ant and I need help
> >>proceeding. I'm using xdoclet for hibernate and when I run ant inside
> >>eclipse, I get the following message:
> >>
> >>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
> >> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
> >>create a hibernate element under hibernatedoclet. Make sure the jar file
> >>containing the corresponding subtask class is on the classpath specified
> >>in the <taskdef> that defined {2}.
> >>
> >>This is very strange, since the <hibernate> subtask is defined in the
> >>same JAR as the <hibernatedoclet> task. What's stranger is that the
> >>script builds fine from the command line. I've checked bugzilla for this
> >>and the entries under "xdoclet" all have to do with ClassNotFound
> >>exceptions, which is not what I'm getting. I know at least one other
> >>person had the same issue in July, but I haven't received a response
> >>back from him. My ant runtime settings include the JARs for xdoclet, as
> >>does my build script in the <taskdef> section. The only other thing I
> >>can think of is that I have the JBoss-IDE plugin installed and it is
> >>bundled with an earlier version of xdoclet than I have installed. Is it
> >>possible that ant could be using those JARs instead of the ones I
> >>explicitly set in the runtime prefs?
> >>
> >>Thanks,
> >>
> >>Derek
> >>
> >
> >
> >
>
Re: Problems with ant xdoclet tasks [message #102349 is a reply to message #102336] Wed, 08 October 2003 15:18 Go to previous messageGo to next message
Eclipse UserFriend
OK, the pseudo-build file you put below is exactly what I did. For
giggles, I removed the JARs from the Ant runtime prefs and it built
fine. They were the exact same JARs, so this is a little strange. I
thought the classloader would just go for the first one it found and not
worry about duplicate JAR entries. Just to be sure I re-added the JARs
in the Ant runtime classpath and it failed again. Should I log this in
the bug?

Derek

Darin Swanson wrote:
> I doubt it if there are the exact same JARs...I would remove from the Ant
> runtime classpath and try though.
> You are doing something like:
>
> <path id="compile.classpath">
> <fileset dir="lib">
> <include name="**/*.jar"/>
> <include name="**/*.zip"/>
> </fileset>
> </path>
>
> <taskdef
> name="ejbdoclet"
> classname="xdoclet.modules.ejb.EjbDocletTask"
> classpathref="compile.classpath"
> />
>
> Where "lib" points to a directory containing all of the doclet JARs?
>
> If all looks good you can send me your buildfile (and or to the list) and I
> will attempt to have a look (or you could log a bug report and then we will
> have a permanent record on how to succeed here).
>
> Darins
>
>
> "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> news:bm1lq0$f4n$1@eclipse.org...
>
>>OK, the bug looks similar, but I am definitely including all of the
>>JARs. I've included them both in the ANT runtime prefs, as well as in a
>>classpathref in my build.xml. Could this duplication of classpaths be
>>causing problems?
>>
>>Derek
>>
>>Darin Swanson wrote:
>>
>>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070 which is
>>>currently deferred.
>>>
>>>My experience has been that you need to include all of the xdoclet jars
>
> on
>
>>>the classpath for any xdoclet taskdef.
>>>I am sure this is overstating the case but has lead me to success
>
> without
>
>>>trying to figure out the exact jars I require.
>>>
>>>As well as you can see the Apache Ant error message has a bug in it so
>
> that
>
>>>it does not state the task you need to fix up.
>>>I believe the error reporting is better in the current Ant 1.6 beta
>
> (FYI)
>
>>>HTH
>>>Darins
>>>
>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>news:bm14nc$s2e$1@eclipse.org...
>>>
>>>
>>>>Hi,
>>>> I've come up against a strange problem with ant and I need help
>>>>proceeding. I'm using xdoclet for hibernate and when I run ant inside
>>>>eclipse, I get the following message:
>>>>
>>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
>>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
>>>>create a hibernate element under hibernatedoclet. Make sure the jar file
>>>>containing the corresponding subtask class is on the classpath specified
>>>>in the <taskdef> that defined {2}.
>>>>
>>>>This is very strange, since the <hibernate> subtask is defined in the
>>>>same JAR as the <hibernatedoclet> task. What's stranger is that the
>>>>script builds fine from the command line. I've checked bugzilla for this
>>>>and the entries under "xdoclet" all have to do with ClassNotFound
>>>>exceptions, which is not what I'm getting. I know at least one other
>>>>person had the same issue in July, but I haven't received a response
>>>>back from him. My ant runtime settings include the JARs for xdoclet, as
>>>>does my build script in the <taskdef> section. The only other thing I
>>>>can think of is that I have the JBoss-IDE plugin installed and it is
>>>>bundled with an earlier version of xdoclet than I have installed. Is it
>>>>possible that ant could be using those JARs instead of the ones I
>>>>explicitly set in the runtime prefs?
>>>>
>>>>Thanks,
>>>>
>>>>Derek
>>>>
>>>
>>>
>>>
>
>
Re: Problems with ant xdoclet tasks [message #102363 is a reply to message #102349] Wed, 08 October 2003 15:28 Go to previous messageGo to next message
Eclipse UserFriend
Yes you have tweaked my interest. There is more than one classloader
involved here though...so it is not as simple as you indicated.
Each taskdef can get its own classloader depending on how it is defined.

If nothing else then we can have it as a known issue.

Thanks for helping out
Darins

"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
news:3F8462EA.2040802@cpicorp.com...
> OK, the pseudo-build file you put below is exactly what I did. For
> giggles, I removed the JARs from the Ant runtime prefs and it built
> fine. They were the exact same JARs, so this is a little strange. I
> thought the classloader would just go for the first one it found and not
> worry about duplicate JAR entries. Just to be sure I re-added the JARs
> in the Ant runtime classpath and it failed again. Should I log this in
> the bug?
>
> Derek
>
> Darin Swanson wrote:
> > I doubt it if there are the exact same JARs...I would remove from the
Ant
> > runtime classpath and try though.
> > You are doing something like:
> >
> > <path id="compile.classpath">
> > <fileset dir="lib">
> > <include name="**/*.jar"/>
> > <include name="**/*.zip"/>
> > </fileset>
> > </path>
> >
> > <taskdef
> > name="ejbdoclet"
> > classname="xdoclet.modules.ejb.EjbDocletTask"
> > classpathref="compile.classpath"
> > />
> >
> > Where "lib" points to a directory containing all of the doclet JARs?
> >
> > If all looks good you can send me your buildfile (and or to the list)
and I
> > will attempt to have a look (or you could log a bug report and then we
will
> > have a permanent record on how to succeed here).
> >
> > Darins
> >
> >
> > "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> > news:bm1lq0$f4n$1@eclipse.org...
> >
> >>OK, the bug looks similar, but I am definitely including all of the
> >>JARs. I've included them both in the ANT runtime prefs, as well as in a
> >>classpathref in my build.xml. Could this duplication of classpaths be
> >>causing problems?
> >>
> >>Derek
> >>
> >>Darin Swanson wrote:
> >>
> >>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070 which
is
> >>>currently deferred.
> >>>
> >>>My experience has been that you need to include all of the xdoclet jars
> >
> > on
> >
> >>>the classpath for any xdoclet taskdef.
> >>>I am sure this is overstating the case but has lead me to success
> >
> > without
> >
> >>>trying to figure out the exact jars I require.
> >>>
> >>>As well as you can see the Apache Ant error message has a bug in it so
> >
> > that
> >
> >>>it does not state the task you need to fix up.
> >>>I believe the error reporting is better in the current Ant 1.6 beta
> >
> > (FYI)
> >
> >>>HTH
> >>>Darins
> >>>
> >>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>news:bm14nc$s2e$1@eclipse.org...
> >>>
> >>>
> >>>>Hi,
> >>>> I've come up against a strange problem with ant and I need help
> >>>>proceeding. I'm using xdoclet for hibernate and when I run ant inside
> >>>>eclipse, I get the following message:
> >>>>
> >>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
> >>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
> >>>>create a hibernate element under hibernatedoclet. Make sure the jar
file
> >>>>containing the corresponding subtask class is on the classpath
specified
> >>>>in the <taskdef> that defined {2}.
> >>>>
> >>>>This is very strange, since the <hibernate> subtask is defined in the
> >>>>same JAR as the <hibernatedoclet> task. What's stranger is that the
> >>>>script builds fine from the command line. I've checked bugzilla for
this
> >>>>and the entries under "xdoclet" all have to do with ClassNotFound
> >>>>exceptions, which is not what I'm getting. I know at least one other
> >>>>person had the same issue in July, but I haven't received a response
> >>>>back from him. My ant runtime settings include the JARs for xdoclet,
as
> >>>>does my build script in the <taskdef> section. The only other thing I
> >>>>can think of is that I have the JBoss-IDE plugin installed and it is
> >>>>bundled with an earlier version of xdoclet than I have installed. Is
it
> >>>>possible that ant could be using those JARs instead of the ones I
> >>>>explicitly set in the runtime prefs?
> >>>>
> >>>>Thanks,
> >>>>
> >>>>Derek
> >>>>
> >>>
> >>>
> >>>
> >
> >
>
Re: Problems with ant xdoclet tasks [message #102374 is a reply to message #102363] Wed, 08 October 2003 16:00 Go to previous messageGo to next message
Eclipse UserFriend
I didn't realize that Ant used multiple classloaders, but I guess it
makes sense. I'd like to help if I can.

Derek

Darin Swanson wrote:
> Yes you have tweaked my interest. There is more than one classloader
> involved here though...so it is not as simple as you indicated.
> Each taskdef can get its own classloader depending on how it is defined.
>
> If nothing else then we can have it as a known issue.
>
> Thanks for helping out
> Darins
>
> "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> news:3F8462EA.2040802@cpicorp.com...
>
>>OK, the pseudo-build file you put below is exactly what I did. For
>>giggles, I removed the JARs from the Ant runtime prefs and it built
>>fine. They were the exact same JARs, so this is a little strange. I
>>thought the classloader would just go for the first one it found and not
>>worry about duplicate JAR entries. Just to be sure I re-added the JARs
>>in the Ant runtime classpath and it failed again. Should I log this in
>>the bug?
>>
>>Derek
>>
>>Darin Swanson wrote:
>>
>>>I doubt it if there are the exact same JARs...I would remove from the
>
> Ant
>
>>>runtime classpath and try though.
>>>You are doing something like:
>>>
>>><path id="compile.classpath">
>>> <fileset dir="lib">
>>> <include name="**/*.jar"/>
>>> <include name="**/*.zip"/>
>>> </fileset>
>>> </path>
>>>
>>><taskdef
>>> name="ejbdoclet"
>>> classname="xdoclet.modules.ejb.EjbDocletTask"
>>> classpathref="compile.classpath"
>>> />
>>>
>>>Where "lib" points to a directory containing all of the doclet JARs?
>>>
>>>If all looks good you can send me your buildfile (and or to the list)
>
> and I
>
>>>will attempt to have a look (or you could log a bug report and then we
>
> will
>
>>>have a permanent record on how to succeed here).
>>>
>>>Darins
>>>
>>>
>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>news:bm1lq0$f4n$1@eclipse.org...
>>>
>>>
>>>>OK, the bug looks similar, but I am definitely including all of the
>>>>JARs. I've included them both in the ANT runtime prefs, as well as in a
>>>>classpathref in my build.xml. Could this duplication of classpaths be
>>>>causing problems?
>>>>
>>>>Derek
>>>>
>>>>Darin Swanson wrote:
>>>>
>>>>
>>>>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070 which
>
> is
>
>>>>>currently deferred.
>>>>>
>>>>>My experience has been that you need to include all of the xdoclet jars
>>>
>>>on
>>>
>>>
>>>>>the classpath for any xdoclet taskdef.
>>>>>I am sure this is overstating the case but has lead me to success
>>>
>>>without
>>>
>>>
>>>>>trying to figure out the exact jars I require.
>>>>>
>>>>>As well as you can see the Apache Ant error message has a bug in it so
>>>
>>>that
>>>
>>>
>>>>>it does not state the task you need to fix up.
>>>>>I believe the error reporting is better in the current Ant 1.6 beta
>>>
>>>(FYI)
>>>
>>>
>>>>>HTH
>>>>>Darins
>>>>>
>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>news:bm14nc$s2e$1@eclipse.org...
>>>>>
>>>>>
>>>>>
>>>>>>Hi,
>>>>>> I've come up against a strange problem with ant and I need help
>>>>>>proceeding. I'm using xdoclet for hibernate and when I run ant inside
>>>>>>eclipse, I get the following message:
>>>>>>
>>>>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
>>>>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
>>>>>>create a hibernate element under hibernatedoclet. Make sure the jar
>
> file
>
>>>>>>containing the corresponding subtask class is on the classpath
>
> specified
>
>>>>>>in the <taskdef> that defined {2}.
>>>>>>
>>>>>>This is very strange, since the <hibernate> subtask is defined in the
>>>>>>same JAR as the <hibernatedoclet> task. What's stranger is that the
>>>>>>script builds fine from the command line. I've checked bugzilla for
>
> this
>
>>>>>>and the entries under "xdoclet" all have to do with ClassNotFound
>>>>>>exceptions, which is not what I'm getting. I know at least one other
>>>>>>person had the same issue in July, but I haven't received a response
>>>>>>back from him. My ant runtime settings include the JARs for xdoclet,
>
> as
>
>>>>>>does my build script in the <taskdef> section. The only other thing I
>>>>>>can think of is that I have the JBoss-IDE plugin installed and it is
>>>>>>bundled with an earlier version of xdoclet than I have installed. Is
>
> it
>
>>>>>>possible that ant could be using those JARs instead of the ones I
>>>>>>explicitly set in the runtime prefs?
>>>>>>
>>>>>>Thanks,
>>>>>>
>>>>>>Derek
>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>
>
Re: Problems with ant xdoclet tasks [message #102408 is a reply to message #102374] Wed, 08 October 2003 16:13 Go to previous messageGo to next message
Eclipse UserFriend
Well I can tell you how I would tackle this problem if I had the time today
(we are in the middle of getting ready to release M4 :-) )


I would start a runtime-workbench in debug mode from a workspace where I had
the following plugins as source (and the rest as binary plugins):
org.apache.ant
org.eclipse.ant.core

I would set a breakpoint in
org.eclipse.ant.internal.core.ant.InternalAntRunner
I would run the build causing the problems in the target workspace and
attempt to narrow down where the classloading is failing and why...
Continuing the discussion in the bug report would be great.

Darins

"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
news:bm1qed$kfb$1@eclipse.org...
> I didn't realize that Ant used multiple classloaders, but I guess it
> makes sense. I'd like to help if I can.
>
> Derek
>
> Darin Swanson wrote:
> > Yes you have tweaked my interest. There is more than one classloader
> > involved here though...so it is not as simple as you indicated.
> > Each taskdef can get its own classloader depending on how it is defined.
> >
> > If nothing else then we can have it as a known issue.
> >
> > Thanks for helping out
> > Darins
> >
> > "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> > news:3F8462EA.2040802@cpicorp.com...
> >
> >>OK, the pseudo-build file you put below is exactly what I did. For
> >>giggles, I removed the JARs from the Ant runtime prefs and it built
> >>fine. They were the exact same JARs, so this is a little strange. I
> >>thought the classloader would just go for the first one it found and not
> >>worry about duplicate JAR entries. Just to be sure I re-added the JARs
> >>in the Ant runtime classpath and it failed again. Should I log this in
> >>the bug?
> >>
> >>Derek
> >>
> >>Darin Swanson wrote:
> >>
> >>>I doubt it if there are the exact same JARs...I would remove from the
> >
> > Ant
> >
> >>>runtime classpath and try though.
> >>>You are doing something like:
> >>>
> >>><path id="compile.classpath">
> >>> <fileset dir="lib">
> >>> <include name="**/*.jar"/>
> >>> <include name="**/*.zip"/>
> >>> </fileset>
> >>> </path>
> >>>
> >>><taskdef
> >>> name="ejbdoclet"
> >>> classname="xdoclet.modules.ejb.EjbDocletTask"
> >>> classpathref="compile.classpath"
> >>> />
> >>>
> >>>Where "lib" points to a directory containing all of the doclet JARs?
> >>>
> >>>If all looks good you can send me your buildfile (and or to the list)
> >
> > and I
> >
> >>>will attempt to have a look (or you could log a bug report and then we
> >
> > will
> >
> >>>have a permanent record on how to succeed here).
> >>>
> >>>Darins
> >>>
> >>>
> >>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>news:bm1lq0$f4n$1@eclipse.org...
> >>>
> >>>
> >>>>OK, the bug looks similar, but I am definitely including all of the
> >>>>JARs. I've included them both in the ANT runtime prefs, as well as in
a
> >>>>classpathref in my build.xml. Could this duplication of classpaths be
> >>>>causing problems?
> >>>>
> >>>>Derek
> >>>>
> >>>>Darin Swanson wrote:
> >>>>
> >>>>
> >>>>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070 which
> >
> > is
> >
> >>>>>currently deferred.
> >>>>>
> >>>>>My experience has been that you need to include all of the xdoclet
jars
> >>>
> >>>on
> >>>
> >>>
> >>>>>the classpath for any xdoclet taskdef.
> >>>>>I am sure this is overstating the case but has lead me to success
> >>>
> >>>without
> >>>
> >>>
> >>>>>trying to figure out the exact jars I require.
> >>>>>
> >>>>>As well as you can see the Apache Ant error message has a bug in it
so
> >>>
> >>>that
> >>>
> >>>
> >>>>>it does not state the task you need to fix up.
> >>>>>I believe the error reporting is better in the current Ant 1.6 beta
> >>>
> >>>(FYI)
> >>>
> >>>
> >>>>>HTH
> >>>>>Darins
> >>>>>
> >>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>news:bm14nc$s2e$1@eclipse.org...
> >>>>>
> >>>>>
> >>>>>
> >>>>>>Hi,
> >>>>>> I've come up against a strange problem with ant and I need help
> >>>>>>proceeding. I'm using xdoclet for hibernate and when I run ant
inside
> >>>>>>eclipse, I get the following message:
> >>>>>>
> >>>>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
> >>>>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
> >>>>>>create a hibernate element under hibernatedoclet. Make sure the jar
> >
> > file
> >
> >>>>>>containing the corresponding subtask class is on the classpath
> >
> > specified
> >
> >>>>>>in the <taskdef> that defined {2}.
> >>>>>>
> >>>>>>This is very strange, since the <hibernate> subtask is defined in
the
> >>>>>>same JAR as the <hibernatedoclet> task. What's stranger is that the
> >>>>>>script builds fine from the command line. I've checked bugzilla for
> >
> > this
> >
> >>>>>>and the entries under "xdoclet" all have to do with ClassNotFound
> >>>>>>exceptions, which is not what I'm getting. I know at least one other
> >>>>>>person had the same issue in July, but I haven't received a response
> >>>>>>back from him. My ant runtime settings include the JARs for xdoclet,
> >
> > as
> >
> >>>>>>does my build script in the <taskdef> section. The only other thing
I
> >>>>>>can think of is that I have the JBoss-IDE plugin installed and it is
> >>>>>>bundled with an earlier version of xdoclet than I have installed. Is
> >
> > it
> >
> >>>>>>possible that ant could be using those JARs instead of the ones I
> >>>>>>explicitly set in the runtime prefs?
> >>>>>>
> >>>>>>Thanks,
> >>>>>>
> >>>>>>Derek
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >
> >
>
Re: Problems with ant xdoclet tasks [message #102433 is a reply to message #102408] Wed, 08 October 2003 16:30 Go to previous messageGo to next message
Eclipse UserFriend
OK, I can do that, although I just started using Eclipse last week, so
this is going to be a learning experience :). Is there a way that I can
download just the source for those two plugins?

Thanks,

Derek

Darin Swanson wrote:
> Well I can tell you how I would tackle this problem if I had the time today
> (we are in the middle of getting ready to release M4 :-) )
>
>
> I would start a runtime-workbench in debug mode from a workspace where I had
> the following plugins as source (and the rest as binary plugins):
> org.apache.ant
> org.eclipse.ant.core
>
> I would set a breakpoint in
> org.eclipse.ant.internal.core.ant.InternalAntRunner
> I would run the build causing the problems in the target workspace and
> attempt to narrow down where the classloading is failing and why...
> Continuing the discussion in the bug report would be great.
>
> Darins
>
> "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> news:bm1qed$kfb$1@eclipse.org...
>
>>I didn't realize that Ant used multiple classloaders, but I guess it
>>makes sense. I'd like to help if I can.
>>
>>Derek
>>
>>Darin Swanson wrote:
>>
>>>Yes you have tweaked my interest. There is more than one classloader
>>>involved here though...so it is not as simple as you indicated.
>>>Each taskdef can get its own classloader depending on how it is defined.
>>>
>>>If nothing else then we can have it as a known issue.
>>>
>>>Thanks for helping out
>>>Darins
>>>
>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>news:3F8462EA.2040802@cpicorp.com...
>>>
>>>
>>>>OK, the pseudo-build file you put below is exactly what I did. For
>>>>giggles, I removed the JARs from the Ant runtime prefs and it built
>>>>fine. They were the exact same JARs, so this is a little strange. I
>>>>thought the classloader would just go for the first one it found and not
>>>>worry about duplicate JAR entries. Just to be sure I re-added the JARs
>>>>in the Ant runtime classpath and it failed again. Should I log this in
>>>>the bug?
>>>>
>>>>Derek
>>>>
>>>>Darin Swanson wrote:
>>>>
>>>>
>>>>>I doubt it if there are the exact same JARs...I would remove from the
>>>
>>>Ant
>>>
>>>
>>>>>runtime classpath and try though.
>>>>>You are doing something like:
>>>>>
>>>>><path id="compile.classpath">
>>>>> <fileset dir="lib">
>>>>> <include name="**/*.jar"/>
>>>>> <include name="**/*.zip"/>
>>>>> </fileset>
>>>>> </path>
>>>>>
>>>>><taskdef
>>>>> name="ejbdoclet"
>>>>> classname="xdoclet.modules.ejb.EjbDocletTask"
>>>>> classpathref="compile.classpath"
>>>>> />
>>>>>
>>>>>Where "lib" points to a directory containing all of the doclet JARs?
>>>>>
>>>>>If all looks good you can send me your buildfile (and or to the list)
>>>
>>>and I
>>>
>>>
>>>>>will attempt to have a look (or you could log a bug report and then we
>>>
>>>will
>>>
>>>
>>>>>have a permanent record on how to succeed here).
>>>>>
>>>>>Darins
>>>>>
>>>>>
>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>news:bm1lq0$f4n$1@eclipse.org...
>>>>>
>>>>>
>>>>>
>>>>>>OK, the bug looks similar, but I am definitely including all of the
>>>>>>JARs. I've included them both in the ANT runtime prefs, as well as in
>
> a
>
>>>>>>classpathref in my build.xml. Could this duplication of classpaths be
>>>>>>causing problems?
>>>>>>
>>>>>>Derek
>>>>>>
>>>>>>Darin Swanson wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070 which
>>>
>>>is
>>>
>>>
>>>>>>>currently deferred.
>>>>>>>
>>>>>>>My experience has been that you need to include all of the xdoclet
>
> jars
>
>>>>>on
>>>>>
>>>>>
>>>>>
>>>>>>>the classpath for any xdoclet taskdef.
>>>>>>>I am sure this is overstating the case but has lead me to success
>>>>>
>>>>>without
>>>>>
>>>>>
>>>>>
>>>>>>>trying to figure out the exact jars I require.
>>>>>>>
>>>>>>>As well as you can see the Apache Ant error message has a bug in it
>
> so
>
>>>>>that
>>>>>
>>>>>
>>>>>
>>>>>>>it does not state the task you need to fix up.
>>>>>>>I believe the error reporting is better in the current Ant 1.6 beta
>>>>>
>>>>>(FYI)
>>>>>
>>>>>
>>>>>
>>>>>>>HTH
>>>>>>>Darins
>>>>>>>
>>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>>>news:bm14nc$s2e$1@eclipse.org...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>Hi,
>>>>>>>> I've come up against a strange problem with ant and I need help
>>>>>>>>proceeding. I'm using xdoclet for hibernate and when I run ant
>
> inside
>
>>>>>>>>eclipse, I get the following message:
>>>>>>>>
>>>>>>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
>>>>>>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
>>>>>>>>create a hibernate element under hibernatedoclet. Make sure the jar
>>>
>>>file
>>>
>>>
>>>>>>>>containing the corresponding subtask class is on the classpath
>>>
>>>specified
>>>
>>>
>>>>>>>>in the <taskdef> that defined {2}.
>>>>>>>>
>>>>>>>>This is very strange, since the <hibernate> subtask is defined in
>
> the
>
>>>>>>>>same JAR as the <hibernatedoclet> task. What's stranger is that the
>>>>>>>>script builds fine from the command line. I've checked bugzilla for
>>>
>>>this
>>>
>>>
>>>>>>>>and the entries under "xdoclet" all have to do with ClassNotFound
>>>>>>>>exceptions, which is not what I'm getting. I know at least one other
>>>>>>>>person had the same issue in July, but I haven't received a response
>>>>>>>>back from him. My ant runtime settings include the JARs for xdoclet,
>>>
>>>as
>>>
>>>
>>>>>>>>does my build script in the <taskdef> section. The only other thing
>
> I
>
>>>>>>>>can think of is that I have the JBoss-IDE plugin installed and it is
>>>>>>>>bundled with an earlier version of xdoclet than I have installed. Is
>>>
>>>it
>>>
>>>
>>>>>>>>possible that ant could be using those JARs instead of the ones I
>>>>>>>>explicitly set in the runtime prefs?
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>
>>>>>>>>Derek
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>
>
>
Re: Problems with ant xdoclet tasks [message #102443 is a reply to message #102433] Wed, 08 October 2003 17:10 Go to previous messageGo to next message
Eclipse UserFriend
You can import the plugins as Project with source folders using the SDK
Eclipse download.
File>Import>External Plug-ins and Fragments>Next
Set Import As to Projects with source folders (the source code locations
should be set correctly by default)
Next
Set the plug-ins you wish to import

OR
you can set up an anonymous cvs repository location to get the absolute
latest code directly from the repository
Connection type: pserver
User: anonymous
Host: dev.eclipse.org
Repository path: /home/eclipse

The check out the desired projects

HTH
Darins

"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
news:bm1s7a$m6k$1@eclipse.org...
> OK, I can do that, although I just started using Eclipse last week, so
> this is going to be a learning experience :). Is there a way that I can
> download just the source for those two plugins?
>
> Thanks,
>
> Derek
>
> Darin Swanson wrote:
> > Well I can tell you how I would tackle this problem if I had the time
today
> > (we are in the middle of getting ready to release M4 :-) )
> >
> >
> > I would start a runtime-workbench in debug mode from a workspace where I
had
> > the following plugins as source (and the rest as binary plugins):
> > org.apache.ant
> > org.eclipse.ant.core
> >
> > I would set a breakpoint in
> > org.eclipse.ant.internal.core.ant.InternalAntRunner
> > I would run the build causing the problems in the target workspace and
> > attempt to narrow down where the classloading is failing and why...
> > Continuing the discussion in the bug report would be great.
> >
> > Darins
> >
> > "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> > news:bm1qed$kfb$1@eclipse.org...
> >
> >>I didn't realize that Ant used multiple classloaders, but I guess it
> >>makes sense. I'd like to help if I can.
> >>
> >>Derek
> >>
> >>Darin Swanson wrote:
> >>
> >>>Yes you have tweaked my interest. There is more than one classloader
> >>>involved here though...so it is not as simple as you indicated.
> >>>Each taskdef can get its own classloader depending on how it is
defined.
> >>>
> >>>If nothing else then we can have it as a known issue.
> >>>
> >>>Thanks for helping out
> >>>Darins
> >>>
> >>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>news:3F8462EA.2040802@cpicorp.com...
> >>>
> >>>
> >>>>OK, the pseudo-build file you put below is exactly what I did. For
> >>>>giggles, I removed the JARs from the Ant runtime prefs and it built
> >>>>fine. They were the exact same JARs, so this is a little strange. I
> >>>>thought the classloader would just go for the first one it found and
not
> >>>>worry about duplicate JAR entries. Just to be sure I re-added the JARs
> >>>>in the Ant runtime classpath and it failed again. Should I log this in
> >>>>the bug?
> >>>>
> >>>>Derek
> >>>>
> >>>>Darin Swanson wrote:
> >>>>
> >>>>
> >>>>>I doubt it if there are the exact same JARs...I would remove from the
> >>>
> >>>Ant
> >>>
> >>>
> >>>>>runtime classpath and try though.
> >>>>>You are doing something like:
> >>>>>
> >>>>><path id="compile.classpath">
> >>>>> <fileset dir="lib">
> >>>>> <include name="**/*.jar"/>
> >>>>> <include name="**/*.zip"/>
> >>>>> </fileset>
> >>>>> </path>
> >>>>>
> >>>>><taskdef
> >>>>> name="ejbdoclet"
> >>>>> classname="xdoclet.modules.ejb.EjbDocletTask"
> >>>>> classpathref="compile.classpath"
> >>>>> />
> >>>>>
> >>>>>Where "lib" points to a directory containing all of the doclet JARs?
> >>>>>
> >>>>>If all looks good you can send me your buildfile (and or to the list)
> >>>
> >>>and I
> >>>
> >>>
> >>>>>will attempt to have a look (or you could log a bug report and then
we
> >>>
> >>>will
> >>>
> >>>
> >>>>>have a permanent record on how to succeed here).
> >>>>>
> >>>>>Darins
> >>>>>
> >>>>>
> >>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>news:bm1lq0$f4n$1@eclipse.org...
> >>>>>
> >>>>>
> >>>>>
> >>>>>>OK, the bug looks similar, but I am definitely including all of the
> >>>>>>JARs. I've included them both in the ANT runtime prefs, as well as
in
> >
> > a
> >
> >>>>>>classpathref in my build.xml. Could this duplication of classpaths
be
> >>>>>>causing problems?
> >>>>>>
> >>>>>>Derek
> >>>>>>
> >>>>>>Darin Swanson wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070
which
> >>>
> >>>is
> >>>
> >>>
> >>>>>>>currently deferred.
> >>>>>>>
> >>>>>>>My experience has been that you need to include all of the xdoclet
> >
> > jars
> >
> >>>>>on
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>the classpath for any xdoclet taskdef.
> >>>>>>>I am sure this is overstating the case but has lead me to success
> >>>>>
> >>>>>without
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>trying to figure out the exact jars I require.
> >>>>>>>
> >>>>>>>As well as you can see the Apache Ant error message has a bug in it
> >
> > so
> >
> >>>>>that
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>it does not state the task you need to fix up.
> >>>>>>>I believe the error reporting is better in the current Ant 1.6 beta
> >>>>>
> >>>>>(FYI)
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>HTH
> >>>>>>>Darins
> >>>>>>>
> >>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>>>news:bm14nc$s2e$1@eclipse.org...
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>Hi,
> >>>>>>>> I've come up against a strange problem with ant and I need help
> >>>>>>>>proceeding. I'm using xdoclet for hibernate and when I run ant
> >
> > inside
> >
> >>>>>>>>eclipse, I get the following message:
> >>>>>>>>
> >>>>>>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
> >>>>>>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4:
Can't
> >>>>>>>>create a hibernate element under hibernatedoclet. Make sure the
jar
> >>>
> >>>file
> >>>
> >>>
> >>>>>>>>containing the corresponding subtask class is on the classpath
> >>>
> >>>specified
> >>>
> >>>
> >>>>>>>>in the <taskdef> that defined {2}.
> >>>>>>>>
> >>>>>>>>This is very strange, since the <hibernate> subtask is defined in
> >
> > the
> >
> >>>>>>>>same JAR as the <hibernatedoclet> task. What's stranger is that
the
> >>>>>>>>script builds fine from the command line. I've checked bugzilla
for
> >>>
> >>>this
> >>>
> >>>
> >>>>>>>>and the entries under "xdoclet" all have to do with ClassNotFound
> >>>>>>>>exceptions, which is not what I'm getting. I know at least one
other
> >>>>>>>>person had the same issue in July, but I haven't received a
response
> >>>>>>>>back from him. My ant runtime settings include the JARs for
xdoclet,
> >>>
> >>>as
> >>>
> >>>
> >>>>>>>>does my build script in the <taskdef> section. The only other
thing
> >
> > I
> >
> >>>>>>>>can think of is that I have the JBoss-IDE plugin installed and it
is
> >>>>>>>>bundled with an earlier version of xdoclet than I have installed.
Is
> >>>
> >>>it
> >>>
> >>>
> >>>>>>>>possible that ant could be using those JARs instead of the ones I
> >>>>>>>>explicitly set in the runtime prefs?
> >>>>>>>>
> >>>>>>>>Thanks,
> >>>>>>>>
> >>>>>>>>Derek
> >>>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>
> >
> >
>
Re: Problems with ant xdoclet tasks [message #102474 is a reply to message #102443] Wed, 08 October 2003 18:18 Go to previous messageGo to next message
Eclipse UserFriend
OK, I have everything set up, but when I import the org.eclipse.ant.core
plugin it doesn't include the source for the classes in
lib/antsupportlib.jar, which is where InternalAntRunner.class is. Do you
know where I get the source for this?

Derek

Darin Swanson wrote:
> You can import the plugins as Project with source folders using the SDK
> Eclipse download.
> File>Import>External Plug-ins and Fragments>Next
> Set Import As to Projects with source folders (the source code locations
> should be set correctly by default)
> Next
> Set the plug-ins you wish to import
>
> OR
> you can set up an anonymous cvs repository location to get the absolute
> latest code directly from the repository
> Connection type: pserver
> User: anonymous
> Host: dev.eclipse.org
> Repository path: /home/eclipse
>
> The check out the desired projects
>
> HTH
> Darins
>
> "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> news:bm1s7a$m6k$1@eclipse.org...
>
>>OK, I can do that, although I just started using Eclipse last week, so
>>this is going to be a learning experience :). Is there a way that I can
>>download just the source for those two plugins?
>>
>>Thanks,
>>
>>Derek
>>
>>Darin Swanson wrote:
>>
>>>Well I can tell you how I would tackle this problem if I had the time
>
> today
>
>>>(we are in the middle of getting ready to release M4 :-) )
>>>
>>>
>>>I would start a runtime-workbench in debug mode from a workspace where I
>
> had
>
>>>the following plugins as source (and the rest as binary plugins):
>>>org.apache.ant
>>>org.eclipse.ant.core
>>>
>>>I would set a breakpoint in
>>>org.eclipse.ant.internal.core.ant.InternalAntRunner
>>>I would run the build causing the problems in the target workspace and
>>>attempt to narrow down where the classloading is failing and why...
>>>Continuing the discussion in the bug report would be great.
>>>
>>>Darins
>>>
>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>news:bm1qed$kfb$1@eclipse.org...
>>>
>>>
>>>>I didn't realize that Ant used multiple classloaders, but I guess it
>>>>makes sense. I'd like to help if I can.
>>>>
>>>>Derek
>>>>
>>>>Darin Swanson wrote:
>>>>
>>>>
>>>>>Yes you have tweaked my interest. There is more than one classloader
>>>>>involved here though...so it is not as simple as you indicated.
>>>>>Each taskdef can get its own classloader depending on how it is
>
> defined.
>
>>>>>If nothing else then we can have it as a known issue.
>>>>>
>>>>>Thanks for helping out
>>>>>Darins
>>>>>
>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>news:3F8462EA.2040802@cpicorp.com...
>>>>>
>>>>>
>>>>>
>>>>>>OK, the pseudo-build file you put below is exactly what I did. For
>>>>>>giggles, I removed the JARs from the Ant runtime prefs and it built
>>>>>>fine. They were the exact same JARs, so this is a little strange. I
>>>>>>thought the classloader would just go for the first one it found and
>
> not
>
>>>>>>worry about duplicate JAR entries. Just to be sure I re-added the JARs
>>>>>>in the Ant runtime classpath and it failed again. Should I log this in
>>>>>>the bug?
>>>>>>
>>>>>>Derek
>>>>>>
>>>>>>Darin Swanson wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>I doubt it if there are the exact same JARs...I would remove from the
>>>>>
>>>>>Ant
>>>>>
>>>>>
>>>>>
>>>>>>>runtime classpath and try though.
>>>>>>>You are doing something like:
>>>>>>>
>>>>>>><path id="compile.classpath">
>>>>>>> <fileset dir="lib">
>>>>>>> <include name="**/*.jar"/>
>>>>>>> <include name="**/*.zip"/>
>>>>>>> </fileset>
>>>>>>> </path>
>>>>>>>
>>>>>>><taskdef
>>>>>>> name="ejbdoclet"
>>>>>>> classname="xdoclet.modules.ejb.EjbDocletTask"
>>>>>>> classpathref="compile.classpath"
>>>>>>> />
>>>>>>>
>>>>>>>Where "lib" points to a directory containing all of the doclet JARs?
>>>>>>>
>>>>>>>If all looks good you can send me your buildfile (and or to the list)
>>>>>
>>>>>and I
>>>>>
>>>>>
>>>>>
>>>>>>>will attempt to have a look (or you could log a bug report and then
>
> we
>
>>>>>will
>>>>>
>>>>>
>>>>>
>>>>>>>have a permanent record on how to succeed here).
>>>>>>>
>>>>>>>Darins
>>>>>>>
>>>>>>>
>>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>>>news:bm1lq0$f4n$1@eclipse.org...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>OK, the bug looks similar, but I am definitely including all of the
>>>>>>>>JARs. I've included them both in the ANT runtime prefs, as well as
>
> in
>
>>>a
>>>
>>>
>>>>>>>>classpathref in my build.xml. Could this duplication of classpaths
>
> be
>
>>>>>>>>causing problems?
>>>>>>>>
>>>>>>>>Derek
>>>>>>>>
>>>>>>>>Darin Swanson wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070
>
> which
>
>>>>>is
>>>>>
>>>>>
>>>>>
>>>>>>>>>currently deferred.
>>>>>>>>>
>>>>>>>>>My experience has been that you need to include all of the xdoclet
>>>
>>>jars
>>>
>>>
>>>>>>>on
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>the classpath for any xdoclet taskdef.
>>>>>>>>>I am sure this is overstating the case but has lead me to success
>>>>>>>
>>>>>>>without
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>trying to figure out the exact jars I require.
>>>>>>>>>
>>>>>>>>>As well as you can see the Apache Ant error message has a bug in it
>>>
>>>so
>>>
>>>
>>>>>>>that
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>it does not state the task you need to fix up.
>>>>>>>>>I believe the error reporting is better in the current Ant 1.6 beta
>>>>>>>
>>>>>>>(FYI)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>HTH
>>>>>>>>>Darins
>>>>>>>>>
>>>>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>>>>>news:bm14nc$s2e$1@eclipse.org...
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>Hi,
>>>>>>>>>> I've come up against a strange problem with ant and I need help
>>>>>>>>>>proceeding. I'm using xdoclet for hibernate and when I run ant
>>>
>>>inside
>>>
>>>
>>>>>>>>>>eclipse, I get the following message:
>>>>>>>>>>
>>>>>>>>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
>>>>>>>>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4:
>
> Can't
>
>>>>>>>>>>create a hibernate element under hibernatedoclet. Make sure the
>
> jar
>
>>>>>file
>>>>>
>>>>>
>>>>>
>>>>>>>>>>containing the corresponding subtask class is on the classpath
>>>>>
>>>>>specified
>>>>>
>>>>>
>>>>>
>>>>>>>>>>in the <taskdef> that defined {2}.
>>>>>>>>>>
>>>>>>>>>>This is very strange, since the <hibernate> subtask is defined in
>>>
>>>the
>>>
>>>
>>>>>>>>>>same JAR as the <hibernatedoclet> task. What's stranger is that
>
> the
>
>>>>>>>>>>script builds fine from the command line. I've checked bugzilla
>
> for
>
>>>>>this
>>>>>
>>>>>
>>>>>
>>>>>>>>>>and the entries under "xdoclet" all have to do with ClassNotFound
>>>>>>>>>>exceptions, which is not what I'm getting. I know at least one
>
> other
>
>>>>>>>>>>person had the same issue in July, but I haven't received a
>
> response
>
>>>>>>>>>>back from him. My ant runtime settings include the JARs for
>
> xdoclet,
>
>>>>>as
>>>>>
>>>>>
>>>>>
>>>>>>>>>>does my build script in the <taskdef> section. The only other
>
> thing
>
>>>I
>>>
>>>
>>>>>>>>>>can think of is that I have the JBoss-IDE plugin installed and it
>
> is
>
>>>>>>>>>>bundled with an earlier version of xdoclet than I have installed.
>
> Is
>
>>>>>it
>>>>>
>>>>>
>>>>>
>>>>>>>>>>possible that ant could be using those JARs instead of the ones I
>>>>>>>>>>explicitly set in the runtime prefs?
>>>>>>>>>>
>>>>>>>>>>Thanks,
>>>>>>>>>>
>>>>>>>>>>Derek
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>
>
>
Re: Problems with ant xdoclet tasks [message #102490 is a reply to message #102190] Wed, 08 October 2003 18:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ja.it-practice.dk-nospam

Hi Derek,

I looking forward to hear what you find out because I have the same
problem :-\

Regards,

J. Andersen

Derek Chen-Becker wrote:

> Hi,
> I've come up against a strange problem with ant and I need help
> proceeding. I'm using xdoclet for hibernate and when I run ant inside
> eclipse, I get the following message:
>
> [hibernatedoclet] BUILD FAILED: file:C:/Documents and
> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4: Can't
> create a hibernate element under hibernatedoclet. Make sure the jar file
> containing the corresponding subtask class is on the classpath specified
> in the <taskdef> that defined {2}.
>
> This is very strange, since the <hibernate> subtask is defined in the
> same JAR as the <hibernatedoclet> task. What's stranger is that the
> script builds fine from the command line. I've checked bugzilla for this
> and the entries under "xdoclet" all have to do with ClassNotFound
> exceptions, which is not what I'm getting. I know at least one other
> person had the same issue in July, but I haven't received a response
> back from him. My ant runtime settings include the JARs for xdoclet, as
> does my build script in the <taskdef> section. The only other thing I
> can think of is that I have the JBoss-IDE plugin installed and it is
> bundled with an earlier version of xdoclet than I have installed. Is it
> possible that ant could be using those JARs instead of the ones I
> explicitly set in the runtime prefs?
>
> Thanks,
>
> Derek
>
Re: Problems with ant xdoclet tasks [message #102517 is a reply to message #102474] Wed, 08 October 2003 20:27 Go to previous messageGo to next message
Eclipse UserFriend
Sounds like another bug for PDE support (or maybe Platform Releng or it
could be that I have not configured something correctly in the ant core
plugin :-) )
I have logged at as https://bugs.eclipse.org/bugs/show_bug.cgi?id=44511

The source can be found in
org.eclipse.platform.source_3.0.0\src\org.eclipse.ant.core_3 .0.0\lib\antsupp
ortlibsrc.zip
Now the more complicated part:
Create a new src folder (we call ours src_ant) and set it to have a separate
output location. Put the "lib" source in this folder.

Ensure to remove the "src_ant" output location from the Classpath Entries
(-dev) on the Arguments tab of your Run-time workbench launch configuration.
This ensures that the classes compiled from the src folder do not end up on
the dev classpath and then get loaded by the wrong classloader. Note that
this pearl of wisdom can now be found in the Eclipse help in the latest
builds under Platform Plug-in Developer Guide>Programmer's Guide>Platform
Ant support>developing Ant tasks and types within Eclipse.

Soon you will know all the tricks of using Eclipse :-)

HTH and please keep me (us) posted on how it goes
Darins

"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
news:bm22gt$skq$1@eclipse.org...
> OK, I have everything set up, but when I import the org.eclipse.ant.core
> plugin it doesn't include the source for the classes in
> lib/antsupportlib.jar, which is where InternalAntRunner.class is. Do you
> know where I get the source for this?
>
> Derek
>
> Darin Swanson wrote:
> > You can import the plugins as Project with source folders using the SDK
> > Eclipse download.
> > File>Import>External Plug-ins and Fragments>Next
> > Set Import As to Projects with source folders (the source code locations
> > should be set correctly by default)
> > Next
> > Set the plug-ins you wish to import
> >
> > OR
> > you can set up an anonymous cvs repository location to get the absolute
> > latest code directly from the repository
> > Connection type: pserver
> > User: anonymous
> > Host: dev.eclipse.org
> > Repository path: /home/eclipse
> >
> > The check out the desired projects
> >
> > HTH
> > Darins
> >
> > "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> > news:bm1s7a$m6k$1@eclipse.org...
> >
> >>OK, I can do that, although I just started using Eclipse last week, so
> >>this is going to be a learning experience :). Is there a way that I can
> >>download just the source for those two plugins?
> >>
> >>Thanks,
> >>
> >>Derek
> >>
> >>Darin Swanson wrote:
> >>
> >>>Well I can tell you how I would tackle this problem if I had the time
> >
> > today
> >
> >>>(we are in the middle of getting ready to release M4 :-) )
> >>>
> >>>
> >>>I would start a runtime-workbench in debug mode from a workspace where
I
> >
> > had
> >
> >>>the following plugins as source (and the rest as binary plugins):
> >>>org.apache.ant
> >>>org.eclipse.ant.core
> >>>
> >>>I would set a breakpoint in
> >>>org.eclipse.ant.internal.core.ant.InternalAntRunner
> >>>I would run the build causing the problems in the target workspace and
> >>>attempt to narrow down where the classloading is failing and why...
> >>>Continuing the discussion in the bug report would be great.
> >>>
> >>>Darins
> >>>
> >>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>news:bm1qed$kfb$1@eclipse.org...
> >>>
> >>>
> >>>>I didn't realize that Ant used multiple classloaders, but I guess it
> >>>>makes sense. I'd like to help if I can.
> >>>>
> >>>>Derek
> >>>>
> >>>>Darin Swanson wrote:
> >>>>
> >>>>
> >>>>>Yes you have tweaked my interest. There is more than one classloader
> >>>>>involved here though...so it is not as simple as you indicated.
> >>>>>Each taskdef can get its own classloader depending on how it is
> >
> > defined.
> >
> >>>>>If nothing else then we can have it as a known issue.
> >>>>>
> >>>>>Thanks for helping out
> >>>>>Darins
> >>>>>
> >>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>news:3F8462EA.2040802@cpicorp.com...
> >>>>>
> >>>>>
> >>>>>
> >>>>>>OK, the pseudo-build file you put below is exactly what I did. For
> >>>>>>giggles, I removed the JARs from the Ant runtime prefs and it built
> >>>>>>fine. They were the exact same JARs, so this is a little strange. I
> >>>>>>thought the classloader would just go for the first one it found and
> >
> > not
> >
> >>>>>>worry about duplicate JAR entries. Just to be sure I re-added the
JARs
> >>>>>>in the Ant runtime classpath and it failed again. Should I log this
in
> >>>>>>the bug?
> >>>>>>
> >>>>>>Derek
> >>>>>>
> >>>>>>Darin Swanson wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>I doubt it if there are the exact same JARs...I would remove from
the
> >>>>>
> >>>>>Ant
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>runtime classpath and try though.
> >>>>>>>You are doing something like:
> >>>>>>>
> >>>>>>><path id="compile.classpath">
> >>>>>>> <fileset dir="lib">
> >>>>>>> <include name="**/*.jar"/>
> >>>>>>> <include name="**/*.zip"/>
> >>>>>>> </fileset>
> >>>>>>> </path>
> >>>>>>>
> >>>>>>><taskdef
> >>>>>>> name="ejbdoclet"
> >>>>>>> classname="xdoclet.modules.ejb.EjbDocletTask"
> >>>>>>> classpathref="compile.classpath"
> >>>>>>> />
> >>>>>>>
> >>>>>>>Where "lib" points to a directory containing all of the doclet
JARs?
> >>>>>>>
> >>>>>>>If all looks good you can send me your buildfile (and or to the
list)
> >>>>>
> >>>>>and I
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>will attempt to have a look (or you could log a bug report and then
> >
> > we
> >
> >>>>>will
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>have a permanent record on how to succeed here).
> >>>>>>>
> >>>>>>>Darins
> >>>>>>>
> >>>>>>>
> >>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>>>news:bm1lq0$f4n$1@eclipse.org...
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>OK, the bug looks similar, but I am definitely including all of
the
> >>>>>>>>JARs. I've included them both in the ANT runtime prefs, as well as
> >
> > in
> >
> >>>a
> >>>
> >>>
> >>>>>>>>classpathref in my build.xml. Could this duplication of classpaths
> >
> > be
> >
> >>>>>>>>causing problems?
> >>>>>>>>
> >>>>>>>>Derek
> >>>>>>>>
> >>>>>>>>Darin Swanson wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070
> >
> > which
> >
> >>>>>is
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>currently deferred.
> >>>>>>>>>
> >>>>>>>>>My experience has been that you need to include all of the
xdoclet
> >>>
> >>>jars
> >>>
> >>>
> >>>>>>>on
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>the classpath for any xdoclet taskdef.
> >>>>>>>>>I am sure this is overstating the case but has lead me to success
> >>>>>>>
> >>>>>>>without
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>trying to figure out the exact jars I require.
> >>>>>>>>>
> >>>>>>>>>As well as you can see the Apache Ant error message has a bug in
it
> >>>
> >>>so
> >>>
> >>>
> >>>>>>>that
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>it does not state the task you need to fix up.
> >>>>>>>>>I believe the error reporting is better in the current Ant 1.6
beta
> >>>>>>>
> >>>>>>>(FYI)
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>HTH
> >>>>>>>>>Darins
> >>>>>>>>>
> >>>>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>>>>>news:bm14nc$s2e$1@eclipse.org...
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>Hi,
> >>>>>>>>>> I've come up against a strange problem with ant and I need help
> >>>>>>>>>>proceeding. I'm using xdoclet for hibernate and when I run ant
> >>>
> >>>inside
> >>>
> >>>
> >>>>>>>>>>eclipse, I get the following message:
> >>>>>>>>>>
> >>>>>>>>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
> >>>>>>>>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4:
> >
> > Can't
> >
> >>>>>>>>>>create a hibernate element under hibernatedoclet. Make sure the
> >
> > jar
> >
> >>>>>file
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>>containing the corresponding subtask class is on the classpath
> >>>>>
> >>>>>specified
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>>in the <taskdef> that defined {2}.
> >>>>>>>>>>
> >>>>>>>>>>This is very strange, since the <hibernate> subtask is defined
in
> >>>
> >>>the
> >>>
> >>>
> >>>>>>>>>>same JAR as the <hibernatedoclet> task. What's stranger is that
> >
> > the
> >
> >>>>>>>>>>script builds fine from the command line. I've checked bugzilla
> >
> > for
> >
> >>>>>this
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>>and the entries under "xdoclet" all have to do with
ClassNotFound
> >>>>>>>>>>exceptions, which is not what I'm getting. I know at least one
> >
> > other
> >
> >>>>>>>>>>person had the same issue in July, but I haven't received a
> >
> > response
> >
> >>>>>>>>>>back from him. My ant runtime settings include the JARs for
> >
> > xdoclet,
> >
> >>>>>as
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>>does my build script in the <taskdef> section. The only other
> >
> > thing
> >
> >>>I
> >>>
> >>>
> >>>>>>>>>>can think of is that I have the JBoss-IDE plugin installed and
it
> >
> > is
> >
> >>>>>>>>>>bundled with an earlier version of xdoclet than I have
installed.
> >
> > Is
> >
> >>>>>it
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>>possible that ant could be using those JARs instead of the ones
I
> >>>>>>>>>>explicitly set in the runtime prefs?
> >>>>>>>>>>
> >>>>>>>>>>Thanks,
> >>>>>>>>>>
> >>>>>>>>>>Derek
> >>>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>
> >
> >
>
Re: Problems with ant xdoclet tasks [message #102695 is a reply to message #102517] Thu, 09 October 2003 10:31 Go to previous messageGo to next message
Eclipse UserFriend
OK, I've run into another hitch. I have the ant core plugin as well as
the ant plugin as imported projects, but the org.eclipse.ant.core
sources are complaining about being unable to import
org.apache.tools.ant.*. Is there an extra step I need to do so that one
project sees the source from another project? Is that what you were
talking about with creating the new src folder below? I thought you
meant for the antsupportlib src...

Derek

Darin Swanson wrote:
> Sounds like another bug for PDE support (or maybe Platform Releng or it
> could be that I have not configured something correctly in the ant core
> plugin :-) )
> I have logged at as https://bugs.eclipse.org/bugs/show_bug.cgi?id=44511
>
> The source can be found in
> org.eclipse.platform.source_3.0.0\src\org.eclipse.ant.core_3 .0.0\lib\antsupp
> ortlibsrc.zip
> Now the more complicated part:
> Create a new src folder (we call ours src_ant) and set it to have a separate
> output location. Put the "lib" source in this folder.
>
> Ensure to remove the "src_ant" output location from the Classpath Entries
> (-dev) on the Arguments tab of your Run-time workbench launch configuration.
> This ensures that the classes compiled from the src folder do not end up on
> the dev classpath and then get loaded by the wrong classloader. Note that
> this pearl of wisdom can now be found in the Eclipse help in the latest
> builds under Platform Plug-in Developer Guide>Programmer's Guide>Platform
> Ant support>developing Ant tasks and types within Eclipse.
>
> Soon you will know all the tricks of using Eclipse :-)
>
> HTH and please keep me (us) posted on how it goes
> Darins
>
> "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> news:bm22gt$skq$1@eclipse.org...
>
>>OK, I have everything set up, but when I import the org.eclipse.ant.core
>>plugin it doesn't include the source for the classes in
>>lib/antsupportlib.jar, which is where InternalAntRunner.class is. Do you
>>know where I get the source for this?
>>
>>Derek
>>
>>Darin Swanson wrote:
>>
>>>You can import the plugins as Project with source folders using the SDK
>>>Eclipse download.
>>>File>Import>External Plug-ins and Fragments>Next
>>>Set Import As to Projects with source folders (the source code locations
>>>should be set correctly by default)
>>>Next
>>>Set the plug-ins you wish to import
>>>
>>>OR
>>>you can set up an anonymous cvs repository location to get the absolute
>>>latest code directly from the repository
>>>Connection type: pserver
>>>User: anonymous
>>>Host: dev.eclipse.org
>>>Repository path: /home/eclipse
>>>
>>>The check out the desired projects
>>>
>>>HTH
>>>Darins
>>>
>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>news:bm1s7a$m6k$1@eclipse.org...
>>>
>>>
>>>>OK, I can do that, although I just started using Eclipse last week, so
>>>>this is going to be a learning experience :). Is there a way that I can
>>>>download just the source for those two plugins?
>>>>
>>>>Thanks,
>>>>
>>>>Derek
>>>>
>>>>Darin Swanson wrote:
>>>>
>>>>
>>>>>Well I can tell you how I would tackle this problem if I had the time
>>>
>>>today
>>>
>>>
>>>>>(we are in the middle of getting ready to release M4 :-) )
>>>>>
>>>>>
>>>>>I would start a runtime-workbench in debug mode from a workspace where
>
> I
>
>>>had
>>>
>>>
>>>>>the following plugins as source (and the rest as binary plugins):
>>>>>org.apache.ant
>>>>>org.eclipse.ant.core
>>>>>
>>>>>I would set a breakpoint in
>>>>>org.eclipse.ant.internal.core.ant.InternalAntRunner
>>>>>I would run the build causing the problems in the target workspace and
>>>>>attempt to narrow down where the classloading is failing and why...
>>>>>Continuing the discussion in the bug report would be great.
>>>>>
>>>>>Darins
>>>>>
>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>news:bm1qed$kfb$1@eclipse.org...
>>>>>
>>>>>
>>>>>
>>>>>>I didn't realize that Ant used multiple classloaders, but I guess it
>>>>>>makes sense. I'd like to help if I can.
>>>>>>
>>>>>>Derek
>>>>>>
>>>>>>Darin Swanson wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Yes you have tweaked my interest. There is more than one classloader
>>>>>>>involved here though...so it is not as simple as you indicated.
>>>>>>>Each taskdef can get its own classloader depending on how it is
>>>
>>>defined.
>>>
>>>
>>>>>>>If nothing else then we can have it as a known issue.
>>>>>>>
>>>>>>>Thanks for helping out
>>>>>>>Darins
>>>>>>>
>>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>>>news:3F8462EA.2040802@cpicorp.com...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>OK, the pseudo-build file you put below is exactly what I did. For
>>>>>>>>giggles, I removed the JARs from the Ant runtime prefs and it built
>>>>>>>>fine. They were the exact same JARs, so this is a little strange. I
>>>>>>>>thought the classloader would just go for the first one it found and
>>>
>>>not
>>>
>>>
>>>>>>>>worry about duplicate JAR entries. Just to be sure I re-added the
>
> JARs
>
>>>>>>>>in the Ant runtime classpath and it failed again. Should I log this
>
> in
>
>>>>>>>>the bug?
>>>>>>>>
>>>>>>>>Derek
>>>>>>>>
>>>>>>>>Darin Swanson wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>>I doubt it if there are the exact same JARs...I would remove from
>
> the
>
>>>>>>>Ant
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>runtime classpath and try though.
>>>>>>>>>You are doing something like:
>>>>>>>>>
>>>>>>>>><path id="compile.classpath">
>>>>>>>>> <fileset dir="lib">
>>>>>>>>> <include name="**/*.jar"/>
>>>>>>>>> <include name="**/*.zip"/>
>>>>>>>>> </fileset>
>>>>>>>>> </path>
>>>>>>>>>
>>>>>>>>><taskdef
>>>>>>>>> name="ejbdoclet"
>>>>>>>>> classname="xdoclet.modules.ejb.EjbDocletTask"
>>>>>>>>> classpathref="compile.classpath"
>>>>>>>>> />
>>>>>>>>>
>>>>>>>>>Where "lib" points to a directory containing all of the doclet
>
> JARs?
>
>>>>>>>>>If all looks good you can send me your buildfile (and or to the
>
> list)
>
>>>>>>>and I
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>will attempt to have a look (or you could log a bug report and then
>>>
>>>we
>>>
>>>
>>>>>>>will
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>have a permanent record on how to succeed here).
>>>>>>>>>
>>>>>>>>>Darins
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>>>>>news:bm1lq0$f4n$1@eclipse.org...
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>OK, the bug looks similar, but I am definitely including all of
>
> the
>
>>>>>>>>>>JARs. I've included them both in the ANT runtime prefs, as well as
>>>
>>>in
>>>
>>>
>>>>>a
>>>>>
>>>>>
>>>>>
>>>>>>>>>>classpathref in my build.xml. Could this duplication of classpaths
>>>
>>>be
>>>
>>>
>>>>>>>>>>causing problems?
>>>>>>>>>>
>>>>>>>>>>Derek
>>>>>>>>>>
>>>>>>>>>>Darin Swanson wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070
>>>
>>>which
>>>
>>>
>>>>>>>is
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>>>currently deferred.
>>>>>>>>>>>
>>>>>>>>>>>My experience has been that you need to include all of the
>
> xdoclet
>
>>>>>jars
>>>>>
>>>>>
>>>>>
>>>>>>>>>on
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>the classpath for any xdoclet taskdef.
>>>>>>>>>>>I am sure this is overstating the case but has lead me to success
>>>>>>>>>
>>>>>>>>>without
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>trying to figure out the exact jars I require.
>>>>>>>>>>>
>>>>>>>>>>>As well as you can see the Apache Ant error message has a bug in
>
> it
>
>>>>>so
>>>>>
>>>>>
>>>>>
>>>>>>>>>that
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>it does not state the task you need to fix up.
>>>>>>>>>>>I believe the error reporting is better in the current Ant 1.6
>
> beta
>
>>>>>>>>>(FYI)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>>>HTH
>>>>>>>>>>>Darins
>>>>>>>>>>>
>>>>>>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
>>>>>>>>>>>news:bm14nc$s2e$1@eclipse.org...
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>>Hi,
>>>>>>>>>>>>I've come up against a strange problem with ant and I need help
>>>>>>>>>>>>proceeding. I'm using xdoclet for hibernate and when I run ant
>>>>>
>>>>>inside
>>>>>
>>>>>
>>>>>
>>>>>>>>>>>>eclipse, I get the following message:
>>>>>>>>>>>>
>>>>>>>>>>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
>>>>>>>>>>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4:
>>>
>>>Can't
>>>
>>>
>>>>>>>>>>>>create a hibernate element under hibernatedoclet. Make sure the
>>>
>>>jar
>>>
>>>
>>>>>>>file
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>>>>containing the corresponding subtask class is on the classpath
>>>>>>>
>>>>>>>specified
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>>>>in the <taskdef> that defined {2}.
>>>>>>>>>>>>
>>>>>>>>>>>>This is very strange, since the <hibernate> subtask is defined
>
> in
>
>>>>>the
>>>>>
>>>>>
>>>>>
>>>>>>>>>>>>same JAR as the <hibernatedoclet> task. What's stranger is that
>>>
>>>the
>>>
>>>
>>>>>>>>>>>>script builds fine from the command line. I've checked bugzilla
>>>
>>>for
>>>
>>>
>>>>>>>this
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>>>>and the entries under "xdoclet" all have to do with
>
> ClassNotFound
>
>>>>>>>>>>>>exceptions, which is not what I'm getting. I know at least one
>>>
>>>other
>>>
>>>
>>>>>>>>>>>>person had the same issue in July, but I haven't received a
>>>
>>>response
>>>
>>>
>>>>>>>>>>>>back from him. My ant runtime settings include the JARs for
>>>
>>>xdoclet,
>>>
>>>
>>>>>>>as
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>>>>does my build script in the <taskdef> section. The only other
>>>
>>>thing
>>>
>>>
>>>>>I
>>>>>
>>>>>
>>>>>
>>>>>>>>>>>>can think of is that I have the JBoss-IDE plugin installed and
>
> it
>
>>>is
>>>
>>>
>>>>>>>>>>>>bundled with an earlier version of xdoclet than I have
>
> installed.
>
>>>Is
>>>
>>>
>>>>>>>it
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>>>>possible that ant could be using those JARs instead of the ones
>
> I
>
>>>>>>>>>>>>explicitly set in the runtime prefs?
>>>>>>>>>>>>
>>>>>>>>>>>>Thanks,
>>>>>>>>>>>>
>>>>>>>>>>>>Derek
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>
>
>
Re: Problems with ant xdoclet tasks [message #102741 is a reply to message #102695] Thu, 09 October 2003 10:41 Go to previous messageGo to next message
Eclipse UserFriend
To set the buildpath for a project, right click on the project, Properties,
Java build path, select org.apache.ant.
If you had brought the project down from CVS, this would have been
configured for you (FYI for next time :-) )

HTH
Darins

"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
news:bm3rhr$gvk$1@eclipse.org...
> OK, I've run into another hitch. I have the ant core plugin as well as
> the ant plugin as imported projects, but the org.eclipse.ant.core
> sources are complaining about being unable to import
> org.apache.tools.ant.*. Is there an extra step I need to do so that one
> project sees the source from another project? Is that what you were
> talking about with creating the new src folder below? I thought you
> meant for the antsupportlib src...
>
> Derek
>
> Darin Swanson wrote:
> > Sounds like another bug for PDE support (or maybe Platform Releng or it
> > could be that I have not configured something correctly in the ant core
> > plugin :-) )
> > I have logged at as https://bugs.eclipse.org/bugs/show_bug.cgi?id=44511
> >
> > The source can be found in
> >
org.eclipse.platform.source_3.0.0\src\org.eclipse.ant.core_3 .0.0\lib\antsupp
> > ortlibsrc.zip
> > Now the more complicated part:
> > Create a new src folder (we call ours src_ant) and set it to have a
separate
> > output location. Put the "lib" source in this folder.
> >
> > Ensure to remove the "src_ant" output location from the Classpath
Entries
> > (-dev) on the Arguments tab of your Run-time workbench launch
configuration.
> > This ensures that the classes compiled from the src folder do not end up
on
> > the dev classpath and then get loaded by the wrong classloader. Note
that
> > this pearl of wisdom can now be found in the Eclipse help in the latest
> > builds under Platform Plug-in Developer Guide>Programmer's
Guide>Platform
> > Ant support>developing Ant tasks and types within Eclipse.
> >
> > Soon you will know all the tricks of using Eclipse :-)
> >
> > HTH and please keep me (us) posted on how it goes
> > Darins
> >
> > "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> > news:bm22gt$skq$1@eclipse.org...
> >
> >>OK, I have everything set up, but when I import the org.eclipse.ant.core
> >>plugin it doesn't include the source for the classes in
> >>lib/antsupportlib.jar, which is where InternalAntRunner.class is. Do you
> >>know where I get the source for this?
> >>
> >>Derek
> >>
> >>Darin Swanson wrote:
> >>
> >>>You can import the plugins as Project with source folders using the SDK
> >>>Eclipse download.
> >>>File>Import>External Plug-ins and Fragments>Next
> >>>Set Import As to Projects with source folders (the source code
locations
> >>>should be set correctly by default)
> >>>Next
> >>>Set the plug-ins you wish to import
> >>>
> >>>OR
> >>>you can set up an anonymous cvs repository location to get the absolute
> >>>latest code directly from the repository
> >>>Connection type: pserver
> >>>User: anonymous
> >>>Host: dev.eclipse.org
> >>>Repository path: /home/eclipse
> >>>
> >>>The check out the desired projects
> >>>
> >>>HTH
> >>>Darins
> >>>
> >>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>news:bm1s7a$m6k$1@eclipse.org...
> >>>
> >>>
> >>>>OK, I can do that, although I just started using Eclipse last week, so
> >>>>this is going to be a learning experience :). Is there a way that I
can
> >>>>download just the source for those two plugins?
> >>>>
> >>>>Thanks,
> >>>>
> >>>>Derek
> >>>>
> >>>>Darin Swanson wrote:
> >>>>
> >>>>
> >>>>>Well I can tell you how I would tackle this problem if I had the time
> >>>
> >>>today
> >>>
> >>>
> >>>>>(we are in the middle of getting ready to release M4 :-) )
> >>>>>
> >>>>>
> >>>>>I would start a runtime-workbench in debug mode from a workspace
where
> >
> > I
> >
> >>>had
> >>>
> >>>
> >>>>>the following plugins as source (and the rest as binary plugins):
> >>>>>org.apache.ant
> >>>>>org.eclipse.ant.core
> >>>>>
> >>>>>I would set a breakpoint in
> >>>>>org.eclipse.ant.internal.core.ant.InternalAntRunner
> >>>>>I would run the build causing the problems in the target workspace
and
> >>>>>attempt to narrow down where the classloading is failing and why...
> >>>>>Continuing the discussion in the bug report would be great.
> >>>>>
> >>>>>Darins
> >>>>>
> >>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>news:bm1qed$kfb$1@eclipse.org...
> >>>>>
> >>>>>
> >>>>>
> >>>>>>I didn't realize that Ant used multiple classloaders, but I guess it
> >>>>>>makes sense. I'd like to help if I can.
> >>>>>>
> >>>>>>Derek
> >>>>>>
> >>>>>>Darin Swanson wrote:
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>>Yes you have tweaked my interest. There is more than one
classloader
> >>>>>>>involved here though...so it is not as simple as you indicated.
> >>>>>>>Each taskdef can get its own classloader depending on how it is
> >>>
> >>>defined.
> >>>
> >>>
> >>>>>>>If nothing else then we can have it as a known issue.
> >>>>>>>
> >>>>>>>Thanks for helping out
> >>>>>>>Darins
> >>>>>>>
> >>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>>>news:3F8462EA.2040802@cpicorp.com...
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>OK, the pseudo-build file you put below is exactly what I did. For
> >>>>>>>>giggles, I removed the JARs from the Ant runtime prefs and it
built
> >>>>>>>>fine. They were the exact same JARs, so this is a little strange.
I
> >>>>>>>>thought the classloader would just go for the first one it found
and
> >>>
> >>>not
> >>>
> >>>
> >>>>>>>>worry about duplicate JAR entries. Just to be sure I re-added the
> >
> > JARs
> >
> >>>>>>>>in the Ant runtime classpath and it failed again. Should I log
this
> >
> > in
> >
> >>>>>>>>the bug?
> >>>>>>>>
> >>>>>>>>Derek
> >>>>>>>>
> >>>>>>>>Darin Swanson wrote:
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>I doubt it if there are the exact same JARs...I would remove from
> >
> > the
> >
> >>>>>>>Ant
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>runtime classpath and try though.
> >>>>>>>>>You are doing something like:
> >>>>>>>>>
> >>>>>>>>><path id="compile.classpath">
> >>>>>>>>> <fileset dir="lib">
> >>>>>>>>> <include name="**/*.jar"/>
> >>>>>>>>> <include name="**/*.zip"/>
> >>>>>>>>> </fileset>
> >>>>>>>>> </path>
> >>>>>>>>>
> >>>>>>>>><taskdef
> >>>>>>>>> name="ejbdoclet"
> >>>>>>>>> classname="xdoclet.modules.ejb.EjbDocletTask"
> >>>>>>>>> classpathref="compile.classpath"
> >>>>>>>>> />
> >>>>>>>>>
> >>>>>>>>>Where "lib" points to a directory containing all of the doclet
> >
> > JARs?
> >
> >>>>>>>>>If all looks good you can send me your buildfile (and or to the
> >
> > list)
> >
> >>>>>>>and I
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>will attempt to have a look (or you could log a bug report and
then
> >>>
> >>>we
> >>>
> >>>
> >>>>>>>will
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>have a permanent record on how to succeed here).
> >>>>>>>>>
> >>>>>>>>>Darins
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>>>>>news:bm1lq0$f4n$1@eclipse.org...
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>OK, the bug looks similar, but I am definitely including all of
> >
> > the
> >
> >>>>>>>>>>JARs. I've included them both in the ANT runtime prefs, as well
as
> >>>
> >>>in
> >>>
> >>>
> >>>>>a
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>>classpathref in my build.xml. Could this duplication of
classpaths
> >>>
> >>>be
> >>>
> >>>
> >>>>>>>>>>causing problems?
> >>>>>>>>>>
> >>>>>>>>>>Derek
> >>>>>>>>>>
> >>>>>>>>>>Darin Swanson wrote:
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>>>>>>>>We have bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070
> >>>
> >>>which
> >>>
> >>>
> >>>>>>>is
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>>>currently deferred.
> >>>>>>>>>>>
> >>>>>>>>>>>My experience has been that you need to include all of the
> >
> > xdoclet
> >
> >>>>>jars
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>on
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>>the classpath for any xdoclet taskdef.
> >>>>>>>>>>>I am sure this is overstating the case but has lead me to
success
> >>>>>>>>>
> >>>>>>>>>without
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>>trying to figure out the exact jars I require.
> >>>>>>>>>>>
> >>>>>>>>>>>As well as you can see the Apache Ant error message has a bug
in
> >
> > it
> >
> >>>>>so
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>that
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>>it does not state the task you need to fix up.
> >>>>>>>>>>>I believe the error reporting is better in the current Ant 1.6
> >
> > beta
> >
> >>>>>>>>>(FYI)
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>>>HTH
> >>>>>>>>>>>Darins
> >>>>>>>>>>>
> >>>>>>>>>>>"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> >>>>>>>>>>>news:bm14nc$s2e$1@eclipse.org...
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>>Hi,
> >>>>>>>>>>>>I've come up against a strange problem with ant and I need
help
> >>>>>>>>>>>>proceeding. I'm using xdoclet for hibernate and when I run ant
> >>>>>
> >>>>>inside
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>>>>eclipse, I get the following message:
> >>>>>>>>>>>>
> >>>>>>>>>>>>[hibernatedoclet] BUILD FAILED: file:C:/Documents and
> >>>>>>>>>>>> Settings/dbecker/Desktop/Projects/HibernateIntro/build.xml:2 4:
> >>>
> >>>Can't
> >>>
> >>>
> >>>>>>>>>>>>create a hibernate element under hibernatedoclet. Make sure
the
> >>>
> >>>jar
> >>>
> >>>
> >>>>>>>file
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>>>>containing the corresponding subtask class is on the classpath
> >>>>>>>
> >>>>>>>specified
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>>>>in the <taskdef> that defined {2}.
> >>>>>>>>>>>>
> >>>>>>>>>>>>This is very strange, since the <hibernate> subtask is defined
> >
> > in
> >
> >>>>>the
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>>>>same JAR as the <hibernatedoclet> task. What's stranger is
that
> >>>
> >>>the
> >>>
> >>>
> >>>>>>>>>>>>script builds fine from the command line. I've checked
bugzilla
> >>>
> >>>for
> >>>
> >>>
> >>>>>>>this
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>>>>and the entries under "xdoclet" all have to do with
> >
> > ClassNotFound
> >
> >>>>>>>>>>>>exceptions, which is not what I'm getting. I know at least one
> >>>
> >>>other
> >>>
> >>>
> >>>>>>>>>>>>person had the same issue in July, but I haven't received a
> >>>
> >>>response
> >>>
> >>>
> >>>>>>>>>>>>back from him. My ant runtime settings include the JARs for
> >>>
> >>>xdoclet,
> >>>
> >>>
> >>>>>>>as
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>>>>does my build script in the <taskdef> section. The only other
> >>>
> >>>thing
> >>>
> >>>
> >>>>>I
> >>>>>
> >>>>>
> >>>>>
> >>>>>>>>>>>>can think of is that I have the JBoss-IDE plugin installed and
> >
> > it
> >
> >>>is
> >>>
> >>>
> >>>>>>>>>>>>bundled with an earlier version of xdoclet than I have
> >
> > installed.
> >
> >>>Is
> >>>
> >>>
> >>>>>>>it
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>>>>>>possible that ant could be using those JARs instead of the
ones
> >
> > I
> >
> >>>>>>>>>>>>explicitly set in the runtime prefs?
> >>>>>>>>>>>>
> >>>>>>>>>>>>Thanks,
> >>>>>>>>>>>>
> >>>>>>>>>>>>Derek
> >>>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>>>>>>>>>
> >>>
> >
> >
>
Re: Problems with ant xdoclet tasks [message #102817 is a reply to message #102741] Thu, 09 October 2003 15:35 Go to previous messageGo to next message
Eclipse UserFriend
Thanks. I have some very preliminary results here, but I haven't yet
found the root cause. I see two major differences in behavior:

1. With the XDoclet JARs in the Ant runtime classpath the class loader
for xdoclet.modules.hibernate.HibernateDocletTask is

org.eclipse.ant.internal.core.AntClassLoader

The classpath then gets set to the return value of
System.getProperty("java.class.path") (xdoclet.loader.ModuleFinder, line
98). This classpath (in my case) is simply

"C:\\Program Files\\eclipse\startup.jar"

Which does not hold the xml module documents that XDoclet needs to
define the hibernate subtask, which is what the build error says in not
so much detail.

2. Without the XDoclet JARs in the Ant runtime classpath the class
loader for xdoclet.modules.hibernate.HibernateDocletTask is

org.apache.tools.ant.AntClassLoader

The classpath then gets set to the classpath for that loader (which is
correct, and contains the xml mapping docs).

The immediate problem is that the eclipse AntClassLoader is not actually
a subclass of the real Ant ClassLoader, so the xdoclet code throws a
ClassCastException. As far as I can tell, they both extend
java.lang.ClassLoader somewhere down the line, but I'm not sure what the
specific requirements are for XDoclet specifically asking for an
org.apache.tools.AntClassLoader.

I'm going to submit this as a comment on the bug, too.

Derek
Re: Problems with ant xdoclet tasks [message #102832 is a reply to message #102817] Thu, 09 October 2003 16:11 Go to previous messageGo to next message
Eclipse UserFriend
My comment in the bug:
Thanks for the info Derek.
The XDoclet code does a hard cast to org.apache.tools.AntClassLoader?
Or is it that the ClassCastException is not from the classloaders but from
some
xdoc classes being cast to each other that are loaded by the different
classloaders? Just guessing...

Darins

"Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
news:bm4dav$47n$1@eclipse.org...
> Thanks. I have some very preliminary results here, but I haven't yet
> found the root cause. I see two major differences in behavior:
>
> 1. With the XDoclet JARs in the Ant runtime classpath the class loader
> for xdoclet.modules.hibernate.HibernateDocletTask is
>
> org.eclipse.ant.internal.core.AntClassLoader
>
> The classpath then gets set to the return value of
> System.getProperty("java.class.path") (xdoclet.loader.ModuleFinder, line
> 98). This classpath (in my case) is simply
>
> "C:\\Program Files\\eclipse\startup.jar"
>
> Which does not hold the xml module documents that XDoclet needs to
> define the hibernate subtask, which is what the build error says in not
> so much detail.
>
> 2. Without the XDoclet JARs in the Ant runtime classpath the class
> loader for xdoclet.modules.hibernate.HibernateDocletTask is
>
> org.apache.tools.ant.AntClassLoader
>
> The classpath then gets set to the classpath for that loader (which is
> correct, and contains the xml mapping docs).
>
> The immediate problem is that the eclipse AntClassLoader is not actually
> a subclass of the real Ant ClassLoader, so the xdoclet code throws a
> ClassCastException. As far as I can tell, they both extend
> java.lang.ClassLoader somewhere down the line, but I'm not sure what the
> specific requirements are for XDoclet specifically asking for an
> org.apache.tools.AntClassLoader.
>
> I'm going to submit this as a comment on the bug, too.
>
> Derek
>
Re: Problems with ant xdoclet tasks [message #102856 is a reply to message #102832] Thu, 09 October 2003 16:14 Go to previous messageGo to next message
Eclipse UserFriend
And bug would be:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=37070

for those you are interested.

Darins

"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
news:bm4f97$68g$1@eclipse.org...
> My comment in the bug:
> Thanks for the info Derek.
> The XDoclet code does a hard cast to org.apache.tools.AntClassLoader?
> Or is it that the ClassCastException is not from the classloaders but from
> some
> xdoc classes being cast to each other that are loaded by the different
> classloaders? Just guessing...
>
> Darins
>
> "Derek Chen-Becker" <dbecker@cpicorp.com> wrote in message
> news:bm4dav$47n$1@eclipse.org...
> > Thanks. I have some very preliminary results here, but I haven't yet
> > found the root cause. I see two major differences in behavior:
> >
> > 1. With the XDoclet JARs in the Ant runtime classpath the class loader
> > for xdoclet.modules.hibernate.HibernateDocletTask is
> >
> > org.eclipse.ant.internal.core.AntClassLoader
> >
> > The classpath then gets set to the return value of
> > System.getProperty("java.class.path") (xdoclet.loader.ModuleFinder, line
> > 98). This classpath (in my case) is simply
> >
> > "C:\\Program Files\\eclipse\startup.jar"
> >
> > Which does not hold the xml module documents that XDoclet needs to
> > define the hibernate subtask, which is what the build error says in not
> > so much detail.
> >
> > 2. Without the XDoclet JARs in the Ant runtime classpath the class
> > loader for xdoclet.modules.hibernate.HibernateDocletTask is
> >
> > org.apache.tools.ant.AntClassLoader
> >
> > The classpath then gets set to the classpath for that loader (which is
> > correct, and contains the xml mapping docs).
> >
> > The immediate problem is that the eclipse AntClassLoader is not actually
> > a subclass of the real Ant ClassLoader, so the xdoclet code throws a
> > ClassCastException. As far as I can tell, they both extend
> > java.lang.ClassLoader somewhere down the line, but I'm not sure what the
> > specific requirements are for XDoclet specifically asking for an
> > org.apache.tools.AntClassLoader.
> >
> > I'm going to submit this as a comment on the bug, too.
> >
> > Derek
> >
>
>
Re: Problems with ant xdoclet tasks [message #102921 is a reply to message #102817] Thu, 09 October 2003 18:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ja.it-practice.dk-nospam

Hi Derek and Darin,

I think the problem starts within XDoclet as Derek said - to be very
precise the problem might start in xdoclet.loader.ModuleFinder when it
tries to cast the classpath to an AntClassLoader [classpath =
((AntClassLoader) clazz.getClassLoader()).getClasspath();] but what
Eclipse provides is a
org.eclipse.core.internal.plugins.PluginClassLoader and therefor we get
a ClassCastException.

/jens


Derek Chen-Becker wrote:

> Thanks. I have some very preliminary results here, but I haven't yet
> found the root cause. I see two major differences in behavior:
>
> 1. With the XDoclet JARs in the Ant runtime classpath the class loader
> for xdoclet.modules.hibernate.HibernateDocletTask is
>
> org.eclipse.ant.internal.core.AntClassLoader
>
> The classpath then gets set to the return value of
> System.getProperty("java.class.path") (xdoclet.loader.ModuleFinder, line
> 98). This classpath (in my case) is simply
>
> "C:\\Program Files\\eclipse\startup.jar"
>
> Which does not hold the xml module documents that XDoclet needs to
> define the hibernate subtask, which is what the build error says in not
> so much detail.
>
> 2. Without the XDoclet JARs in the Ant runtime classpath the class
> loader for xdoclet.modules.hibernate.HibernateDocletTask is
>
> org.apache.tools.ant.AntClassLoader
>
> The classpath then gets set to the classpath for that loader (which is
> correct, and contains the xml mapping docs).
>
> The immediate problem is that the eclipse AntClassLoader is not actually
> a subclass of the real Ant ClassLoader, so the xdoclet code throws a
> ClassCastException. As far as I can tell, they both extend
> java.lang.ClassLoader somewhere down the line, but I'm not sure what the
> specific requirements are for XDoclet specifically asking for an
> org.apache.tools.AntClassLoader.
>
> I'm going to submit this as a comment on the bug, too.
>
> Derek
>
Re: Problems with ant xdoclet tasks [message #102933 is a reply to message #102921] Thu, 09 October 2003 18:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ja.it-practice.dk-nospam

Ups - sorry I forgot to tell both of you that I have a bit different
approach to the problem than Derek, because I'm trying to make a XDoclet
plug-in which in structure looks like the Ant plug-in. And therefore
Derek might get another ClassLoad than I.

/jens

Jens Andersen wrote:

> Hi Derek and Darin,
>
> I think the problem starts within XDoclet as Derek said - to be very
> precise the problem might start in xdoclet.loader.ModuleFinder when it
> tries to cast the classpath to an AntClassLoader [classpath =
> ((AntClassLoader) clazz.getClassLoader()).getClasspath();] but what
> Eclipse provides is a
> org.eclipse.core.internal.plugins.PluginClassLoader and therefor we get
> a ClassCastException.
>
> /jens
>
>
> Derek Chen-Becker wrote:
>
>> Thanks. I have some very preliminary results here, but I haven't yet
>> found the root cause. I see two major differences in behavior:
>>
>> 1. With the XDoclet JARs in the Ant runtime classpath the class loader
>> for xdoclet.modules.hibernate.HibernateDocletTask is
>>
>> org.eclipse.ant.internal.core.AntClassLoader
>>
>> The classpath then gets set to the return value of
>> System.getProperty("java.class.path") (xdoclet.loader.ModuleFinder,
>> line 98). This classpath (in my case) is simply
>>
>> "C:\\Program Files\\eclipse\startup.jar"
>>
>> Which does not hold the xml module documents that XDoclet needs to
>> define the hibernate subtask, which is what the build error says in
>> not so much detail.
>>
>> 2. Without the XDoclet JARs in the Ant runtime classpath the class
>> loader for xdoclet.modules.hibernate.HibernateDocletTask is
>>
>> org.apache.tools.ant.AntClassLoader
>>
>> The classpath then gets set to the classpath for that loader (which is
>> correct, and contains the xml mapping docs).
>>
>> The immediate problem is that the eclipse AntClassLoader is not
>> actually a subclass of the real Ant ClassLoader, so the xdoclet code
>> throws a ClassCastException. As far as I can tell, they both extend
>> java.lang.ClassLoader somewhere down the line, but I'm not sure what
>> the specific requirements are for XDoclet specifically asking for an
>> org.apache.tools.AntClassLoader.
>>
>> I'm going to submit this as a comment on the bug, too.
>>
>> Derek
>>
>
Re: Problems with ant xdoclet tasks [message #102945 is a reply to message #102933] Thu, 09 October 2003 19:10 Go to previous messageGo to next message
Eclipse UserFriend
Right but I thought that the ClassCastException is handled and then you
default to using java.class.path (which will not be what XDoclet expects
when running Ant from Eclipse). As noted in the bug report you can get
around this be setting the xdoclet.class.path property.

Darins

"Jens Andersen" <ja@it-practice.dk-nospam> wrote in message
news:bm4mt1$e61$1@eclipse.org...
> Ups - sorry I forgot to tell both of you that I have a bit different
> approach to the problem than Derek, because I'm trying to make a XDoclet
> plug-in which in structure looks like the Ant plug-in. And therefore
> Derek might get another ClassLoad than I.
>
> /jens
>
> Jens Andersen wrote:
>
> > Hi Derek and Darin,
> >
> > I think the problem starts within XDoclet as Derek said - to be very
> > precise the problem might start in xdoclet.loader.ModuleFinder when it
> > tries to cast the classpath to an AntClassLoader [classpath =
> > ((AntClassLoader) clazz.getClassLoader()).getClasspath();] but what
> > Eclipse provides is a
> > org.eclipse.core.internal.plugins.PluginClassLoader and therefor we get
> > a ClassCastException.
> >
> > /jens
> >
> >
> > Derek Chen-Becker wrote:
> >
> >> Thanks. I have some very preliminary results here, but I haven't yet
> >> found the root cause. I see two major differences in behavior:
> >>
> >> 1. With the XDoclet JARs in the Ant runtime classpath the class loader
> >> for xdoclet.modules.hibernate.HibernateDocletTask is
> >>
> >> org.eclipse.ant.internal.core.AntClassLoader
> >>
> >> The classpath then gets set to the return value of
> >> System.getProperty("java.class.path") (xdoclet.loader.ModuleFinder,
> >> line 98). This classpath (in my case) is simply
> >>
> >> "C:\\Program Files\\eclipse\startup.jar"
> >>
> >> Which does not hold the xml module documents that XDoclet needs to
> >> define the hibernate subtask, which is what the build error says in
> >> not so much detail.
> >>
> >> 2. Without the XDoclet JARs in the Ant runtime classpath the class
> >> loader for xdoclet.modules.hibernate.HibernateDocletTask is
> >>
> >> org.apache.tools.ant.AntClassLoader
> >>
> >> The classpath then gets set to the classpath for that loader (which is
> >> correct, and contains the xml mapping docs).
> >>
> >> The immediate problem is that the eclipse AntClassLoader is not
> >> actually a subclass of the real Ant ClassLoader, so the xdoclet code
> >> throws a ClassCastException. As far as I can tell, they both extend
> >> java.lang.ClassLoader somewhere down the line, but I'm not sure what
> >> the specific requirements are for XDoclet specifically asking for an
> >> org.apache.tools.AntClassLoader.
> >>
> >> I'm going to submit this as a comment on the bug, too.
> >>
> >> Derek
> >>
> >
>
Re: Problems with ant xdoclet tasks [message #103424 is a reply to message #102945] Sun, 12 October 2003 13:49 Go to previous message
Eclipse UserFriend
Originally posted by: ja.it-practice.dk-nospam

Hi Darin,

I think there is more to the problem than that. I have modified the
xdoclet.loader.ModuleFinder to check for instanceof URLClassLoader
(which PluginClassLoader is an instance of) if it's not then it should
work as before. The xdoclet.loader.ModuleFinder class now gets the right
classpath (including all jar files) but I still get the same error. I
think it starts way before reaching ModuleFinder - it might start in the
Eclipse implementation of AntClassLoader - but let me get some more into
it :-\ and I'll return with my findings.

Regards

Jens

Darin Swanson wrote:
> Right but I thought that the ClassCastException is handled and then you
> default to using java.class.path (which will not be what XDoclet expects
> when running Ant from Eclipse). As noted in the bug report you can get
> around this be setting the xdoclet.class.path property.
>
> Darins
>
> "Jens Andersen" <ja@it-practice.dk-nospam> wrote in message
> news:bm4mt1$e61$1@eclipse.org...
>
>>Ups - sorry I forgot to tell both of you that I have a bit different
>>approach to the problem than Derek, because I'm trying to make a XDoclet
>>plug-in which in structure looks like the Ant plug-in. And therefore
>>Derek might get another ClassLoad than I.
>>
>>/jens
>>
>>Jens Andersen wrote:
>>
>>
>>>Hi Derek and Darin,
>>>
>>>I think the problem starts within XDoclet as Derek said - to be very
>>>precise the problem might start in xdoclet.loader.ModuleFinder when it
>>>tries to cast the classpath to an AntClassLoader [classpath =
>>>((AntClassLoader) clazz.getClassLoader()).getClasspath();] but what
>>>Eclipse provides is a
>>>org.eclipse.core.internal.plugins.PluginClassLoader and therefor we get
>>>a ClassCastException.
>>>
>>>/jens
>>>
>>>
>>>Derek Chen-Becker wrote:
>>>
>>>
>>>>Thanks. I have some very preliminary results here, but I haven't yet
>>>>found the root cause. I see two major differences in behavior:
>>>>
>>>>1. With the XDoclet JARs in the Ant runtime classpath the class loader
>>>>for xdoclet.modules.hibernate.HibernateDocletTask is
>>>>
>>>>org.eclipse.ant.internal.core.AntClassLoader
>>>>
>>>>The classpath then gets set to the return value of
>>>>System.getProperty("java.class.path") (xdoclet.loader.ModuleFinder,
>>>>line 98). This classpath (in my case) is simply
>>>>
>>>>"C:\\Program Files\\eclipse\startup.jar"
>>>>
>>>>Which does not hold the xml module documents that XDoclet needs to
>>>>define the hibernate subtask, which is what the build error says in
>>>>not so much detail.
>>>>
>>>>2. Without the XDoclet JARs in the Ant runtime classpath the class
>>>>loader for xdoclet.modules.hibernate.HibernateDocletTask is
>>>>
>>>>org.apache.tools.ant.AntClassLoader
>>>>
>>>>The classpath then gets set to the classpath for that loader (which is
>>>>correct, and contains the xml mapping docs).
>>>>
>>>>The immediate problem is that the eclipse AntClassLoader is not
>>>>actually a subclass of the real Ant ClassLoader, so the xdoclet code
>>>>throws a ClassCastException. As far as I can tell, they both extend
>>>>java.lang.ClassLoader somewhere down the line, but I'm not sure what
>>>>the specific requirements are for XDoclet specifically asking for an
>>>>org.apache.tools.AntClassLoader.
>>>>
>>>>I'm going to submit this as a comment on the bug, too.
>>>>
>>>>Derek
>>>>
>>>
>
>
Previous Topic:how to enable assertions
Next Topic:Add Button to Toolbar
Goto Forum:
  


Current Time: Sat May 10 00:35:13 EDT 2025

Powered by FUDForum. Page generated in 0.05576 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top