axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Created: (AXIS-1315) java2wsdl task ignores its <classpath> tag
Date Wed, 14 Apr 2004 22:21:43 GMT
Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1315

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1315
    Summary: java2wsdl task ignores its <classpath> tag
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             current (nightly)

   Assignee: 
   Reporter: Rob Jellinghaus

    Created: Wed, 14 Apr 2004 3:20 PM
    Updated: Wed, 14 Apr 2004 3:20 PM

Description:
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



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message