Hi,
I'm having a bear of a time getting WadlGeneratorTask to work. Here's
my ant and the error I'm receiving. It finds my root resource, but
cannot seem to load it. I've tried several different ways to affect my
classpath, but none seem to fix this problem. Is there something I'm
overlooking and does anyone have a working example I could look at?
Thanks in advance for any help,
Dave
<taskdef name="WADLGenerate"
classname="com.sun.ws.rest.api.wadl.WadlGeneratorTask">
<classpath>
<fileset dir="${basedir}/../lib/jaxrs">
<include name="*.jar"/>
</fileset>
<fileset dir="${basedir}/../lib">
<include name="asm*.jar"/>
</fileset>
</classpath>
</taskdef>
<target name="generate.WADL" depends="deploy.rs">
<jar basedir="${classes.dir}/${package.dir}"
destfile="${service.dir}/stage/rs.jar" />
<WADLGenerate baseUri="
https://localhost/rs/devices/2008-04-25"
destfile="${service.dir}/stage/PanGo-REST.WADL">
<classpath>
<fileset dir="${service.dir}/stage">
<include name="rs.jar" />
</fileset>
</classpath>
</WADLGenerate>
</target>
generate.WADL:
[WADLGenerate] May 2, 2008 11:05:01 AM
com.sun.ws.rest.api.core.ClasspathResourceConfig init
[WADLGenerate] INFO: Scanning for root resource and provider classes in
the paths:
[WADLGenerate] C:\PanGo\dev\java\build\services\rs\stage\rs.jar
[WADLGenerate] May 2, 2008 11:05:01 AM
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner
getClassForName
[WADLGenerate] SEVERE: A (root resource) class file of the class name,
com.pangonetworks.service.rs._2008_04_25.DeviceDomainResourcesis
identified but the class could not be loaded
[WADLGenerate] May 2, 2008 11:05:01 AM
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner indexJar
[WADLGenerate] SEVERE: Exception while processing file,
C:\PanGo\dev\java\build\services\rs\stage\rs.jar
[WADLGenerate] java.lang.RuntimeException: A (root resource) class file
of the class name,
com.pangonetworks.service.rs._2008_04_25.DeviceDomainResourcesis
identified but the class could not be loaded
[WADLGenerate] at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.getClassForN
ame(AnnotatedClassScanner.java:340)
[WADLGenerate] at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.access$200(A
nnotatedClassScanner.java:56)
[WADLGenerate] at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner$AnnotatedCla
ssVisitor.visitEnd(AnnotatedClassScanner.java:392)
[WADLGenerate] at org.objectweb.asm.ClassReader.accept(Unknown
Source)
[WADLGenerate] at org.objectweb.asm.ClassReader.accept(Unknown
Source)
[WADLGenerate] at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.analyzeClass
File(AnnotatedClassScanner.java:279)
[WADLGenerate] at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.indexJar(Ann
otatedClassScanner.java:241)
[WADLGenerate] at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.indexJar(Ann
otatedClassScanner.java:230)
[WADLGenerate] at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.index(Annota
tedClassScanner.java:184)
[WADLGenerate] at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.scan(Annotat
edClassScanner.java:91)
[WADLGenerate] at
com.sun.ws.rest.api.core.ClasspathResourceConfig.init(ClasspathResourceC
onfig.java:120)
[WADLGenerate] at
com.sun.ws.rest.api.core.ClasspathResourceConfig.<init>(ClasspathResourc
eConfig.java:91)
[WADLGenerate] at
com.sun.ws.rest.api.wadl.WadlGeneratorTask.createApplication(WadlGenerat
orTask.java:140)
[WADLGenerate] at
com.sun.ws.rest.api.wadl.WadlGeneratorTask.execute(WadlGeneratorTask.jav
a:122)
[WADLGenerate] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[WADLGenerate] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown
Source)
[WADLGenerate] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
[WADLGenerate] at java.lang.reflect.Method.invoke(Method.java:597)
[WADLGenerate] at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:1
05)
[WADLGenerate] at org.apache.tools.ant.Task.perform(Task.java:348)
[WADLGenerate] at
org.apache.tools.ant.Target.execute(Target.java:357)
[WADLGenerate] at
org.apache.tools.ant.Target.performTasks(Target.java:385)
[WADLGenerate] at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
[WADLGenerate] at
org.apache.tools.ant.Project.executeTarget(Project.java:1298)
[WADLGenerate] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:41)
[WADLGenerate] at
org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTar
gets(EclipseDefaultExecutor.java:32)
[WADLGenerate] at
org.apache.tools.ant.Project.executeTargets(Project.java:1181)
[WADLGenerate] at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAnt
Runner.java:423)
[WADLGenerate] at
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAn
tRunner.java:137)
[WADLGenerate] Caused by: java.lang.ClassNotFoundException:
com.pangonetworks.service.rs._2008_04_25.DeviceDomainResources
[WADLGenerate] at
java.net.URLClassLoader$1.run(URLClassLoader.java:200)
[WADLGenerate] at java.security.AccessController.doPrivileged(Native
Method)
[WADLGenerate] at
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[WADLGenerate] at
com.sun.ws.rest.api.wadl.WadlGeneratorTask$Loader.findClass(WadlGenerato
rTask.java:164)
[WADLGenerate] at
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[WADLGenerate] at
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[WADLGenerate] at
com.sun.ws.rest.impl.container.config.AnnotatedClassScanner.getClassForN
ame(AnnotatedClassScanner.java:334)
[WADLGenerate] ... 28 more
Confidentiality Notice: This email message is covered by the Electronic Communications Privacy Act, 18 U.S.C. ?2510-2521 and is legally privileged. Unauthorized review, use, disclosure or distribution is strictly prohibited. If you are not the intended recipient, please contact Dave.Tkaczyk_at_innerwireless.com and destroy all copies of the original message. Thank you.