[
https://issues.apache.org/jira/browse/AXIS-1315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Veithen updated AXIS-1315:
----------------------------------
Affects Version/s: 1.4
> java2wsdl task ignores its <classpath> tag
> ------------------------------------------
>
> Key: AXIS-1315
> URL: https://issues.apache.org/jira/browse/AXIS-1315
> Project: Axis
> Issue Type: Bug
> Components: WSDL processing
> Affects Versions: 1.4
> Reporter: Rob Jellinghaus
> Assignee: Andreas Veithen
> Fix For: 1.4.1
>
> Attachments: ant-build.xml
>
>
> I am trying to get started with java2wsdl. I am working with the EJB sample
> in the latest Axis nightly CVS (the first 20040414 one).
> As delivered, ws-axis/java/samples/ejb/ant-build.xml cannot actually run the
> java2wsdl targets. The README in that directory says to specify a classpath
> which includes the compiled bean files. I don't understand why the build.xml
> shouldn't just build the bean files and then create a classpath which
> references them. So I have altered it as in the attachment (look for "ROBJ
> ADDITIONS").
> However, this still fails. When I run this (with -debug), it complains as
> follows:
> C:\download\ws-axis\java\samples\ejb>ant -debug -f ant-build.xml
> nicethingsbean
> ...
> [axis-java2wsdl]
> :classpathC:\download\ws-axis\java\build\lib\axis-ant.jar;C:\download\ws-axis\java\build\lib\axis.jar;C:\download\ws-axis\java\build\lib\commons-discovery.jar;C:\download\ws-axis\java\build\lib\commons-logging.jar;C:\download\ws-axis\java\build\lib\jaxrpc.jar;C:\download\ws-axis\java\build\lib\log4j-1.2.8.jar;C:\download\ws-axis\java\build\lib\saaj.jar;C:\download\ws-axis\java\build\lib\wsdl4j.jar;C:\download\ws-axis\java\samples\ejb\build
> [axis-java2wsdl] Java2WSDL samples.ejb.NiceThingsBean
> Finding class samples.ejb.NiceThingsBean
> Loaded from C:\download\ws-axis\java\samples\ejb\build
> samples/ejb/NiceThingsBean.class Class java.lang.Object loaded from parent
> loader (parentFirst) Class javax.ejb.EJBLocalObject loaded from parent loader
> (parentFirst) Class samples.ejb.NiceThingsBean loaded from ant loader
> [axis-java2wsdl] java.lang.ClassNotFoundException: samples.ejb.NiceThings
> [axis-java2wsdl] at
> java.net.URLClassLoader$1.run(URLClassLoader.java:199)
> [axis-java2wsdl] at java.security.AccessController.doPrivileged(Native
> Method)
> [axis-java2wsdl] at
> java.net.URLClassLoader.findClass(URLClassLoader.java:187)
> [axis-java2wsdl] at
> java.lang.ClassLoader.loadClass(ClassLoader.java:289)
> [axis-java2wsdl] at
> java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> [axis-java2wsdl] at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
> [axis-java2wsdl] at java.lang.Class.forName0(Native Method)
> [axis-java2wsdl] at java.lang.Class.forName(Class.java:141)
> [axis-java2wsdl] at
> org.apache.axis.tools.ant.wsdl.ComplexType.register(ComplexType.java:52)
> [axis-java2wsdl] at
> org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.java:206)
> Note that ejb\build *is on* the classpath for the task. But it still throws
> ClassNotFound, despite the immediately preceding debug output saying it has
> loaded it!
> The ONLY WAY to make this actually work is to do the following:
> ------------------------------------------
> C:\download\ws-axis\java\samples\ejb>set CLASSPATH=build
> C:\download\ws-axis\java\samples\ejb>ant -debug -f ant-build.xml
> nicethingsbean
> nicethingsbean:
> ... FAILS EXACTLY AS ABOVE ...
> C:\download\ws-axis\java\samples\ejb>ant -debug -f ant-build.xml
> nicethingsbean
> nicethingsbean:fileset: Setup scanner in dir
> C:\download\ws-axis\java\build\lib with patternSet{ includes: [*jar] e
> xcludes: [] }
> ...
> Finding class samples.ejb.NiceThings_Helper
> BUILD SUCCESSFUL
> Total time: 3 seconds
> ------------------------------------------
> In other words, you have to run the target TWICE, *AFTER* you set the
> environment CLASSPATH to the build directory. The first time it builds into
> the build directory, but then FAILS TO FIND THE CLASSES when it runs the
> java2wsdl task. The SECOND time, once the classes are *already present*, it
> successfully finds the classes in the build directory.
> In all cases, it never finds the classes from the <classpath> tag in the
> build file itself.
> I see no JIRA issue for this specific problem, so I will be posting one
> imminently. Please update me if there is something I am missing.
> Cheers,
> Rob
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]