Has anyone come across an issue in 1.2b3 whereby the ejbdoclet task cannot
be run due to NoSuchMethodError in ModuleFinder?  The source seems to be
passing a DocletTask reference to ModuleFinder, which in turn attempts to
cast it to AntClassLoader.  Ant fails there.

I am running ant 1.5.3-1.

Any help would be so appreciated.  The original thread included the current
antfile and stack trace.

Thanks!
Matt Hanson

-----Original Message-----
From: Hanson, Matthew [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 27, 2003 3:57 PM
To: '[EMAIL PROTECTED]'
Subject: [Xdoclet-user] NoSuchMethodError on AntClassLoader.getClasspath


Hi--

I am trying to build my ejb project using the new xdoclet1.2b3 built from
the source.  Currently, here is a way stripped down .ant properties and
build.xml:

.ant.properties:

# Set the path to the root directory of the XDoclet distribution (see
# http://www.sf.net/projects/xdoclet)
#xdoclet.home=C:\xdoclet1.2b2
xdoclet.home=C:/xdoclet
# Set this to "true" when you want to force the rebuild of the XDoclet
generated
# files (see XDoclet's <ejbdoclet> attribute "force")
xdoclet.force=false

build.xml:
<project name="template" default="xdoclet-generate" basedir=".">
        <property file=".ant.properties" />
        
<target name="xdoclet-generate">
        <!-- <property name="xdoclet.home" location="../xdoclet"/> -->

        <echo message="xdoclet.class.path=${xdoclet.home}"/>
        
        <path id="xdoclet.class.path">
                <fileset dir="${xdoclet.home}/lib">
                        <include name="*.jar"/>
                </fileset>
                <fileset dir="C:\apache-ant-1.5.3-1\lib">
                        <include name="ant.jar"/>
                </fileset>
        </path>
        
        <taskdef
                name="ejbdoclet"
                classpathref="xdoclet.class.path"
                classname="xdoclet.modules.ejb.EjbDocletTask"
        />
        
      <ejbdoclet
         destdir="${build.generate.dir}"
         sourcepath="${src.ejb.dir}"
         classpathref="xdoclet.class.path"
         excludedtags="@version,@author"
         ejbspec="${ejb.version}"
         mergedir="${src.resources.dir}/xdoclet"
         force="${xdoclet.force}"
      />
</target>
</project>

Here is the stack dump:


xdoclet-generate:

BUILD FAILED

F:\Personal\Java\proj\hbrm\build.xml:174: Could not create task of type:
ejbdoclet due to java.lang.
NoSuchMethodError:
org.apache.tools.ant.AntClassLoader.getClasspath()Ljava/lang/String;
        at org.apache.tools.ant.Project.createTask(Project.java:509)
        at
org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:148)
        at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:83)
        at org.apache.tools.ant.Task.perform(Task.java:216)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.sun.launcher.Launcher.main(Launcher.java:208)
--- Nested Exception ---
java.lang.NoSuchMethodError:
org.apache.tools.ant.AntClassLoader.getClasspath()Ljava/lang/String;
        at xdoclet.loader.ModuleFinder.initClasspath(ModuleFinder.java:95)
        at xdoclet.DocletTask.<init>(DocletTask.java:67)
        at xdoclet.modules.ejb.EjbDocletTask.<init>(EjbDocletTask.java:20)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:
39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorIm
pl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        at java.lang.Class.newInstance0(Class.java:306)
        at java.lang.Class.newInstance(Class.java:259)
        at org.apache.tools.ant.Project.createTask(Project.java:486)
        at
org.apache.tools.ant.UnknownElement.makeTask(UnknownElement.java:148)
        at
org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:83)
        at org.apache.tools.ant.Task.perform(Task.java:216)
        at org.apache.tools.ant.Target.execute(Target.java:184)
        at org.apache.tools.ant.Target.performTasks(Target.java:202)
        at org.apache.tools.ant.Project.executeTarget(Project.java:601)
        at org.apache.tools.ant.Project.executeTargets(Project.java:560)
Total time: 1 second

        at org.apache.tools.ant.Main.runBuild(Main.java:454)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.sun.launcher.Launcher.main(Launcher.java:208)

As you can see from the antfile, I have had to kloog a couple things
together in order to bring in the ant packages (see the hardcoded path).
This has helped me to get by a previous error in the taskdef for ejbdoclet.
Can anyone help me figure out what I'm missing or doing wrong with the
actual running of the ejbdoclet task?  I'm at my wits end :)...

Thanks,
Matt Hanson


-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user


-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to