Issue Details (XML | Word | Printable)

Key: AXIS2-3069
Type: Bug Bug
Status: Resolved Resolved
Resolution: Invalid
Priority: Blocker Blocker
Assignee: Unassigned
Reporter: Chris Oloff
Votes: 0
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
Axis 2.0 (Axis2)

ClassNotFoundException at java2wsdl when using maven2

Created: 03/Aug/07 07:13 PM   Updated: 15/Dec/07 05:27 PM
Return to search
Component/s: codegen
Affects Version/s: 1.2
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Zip Archive Licensed for inclusion in ASF works chris-test-works.zip 2007-08-05 06:50 PM Davanum Srinivas 3 kB
File chris-test.tgz 2007-08-03 07:15 PM Chris Oloff 1 kB
Environment:
Linux gw4 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode, sharing)

mvn -version
Maven version: 2.0.7
Java version: 1.6.0_02
OS name: "linux" version: "2.6.20-16-generic" arch: "i386"

Resolution Date: 05/Aug/07 06:49 PM


 Description  « Hide
when running 'mvn compile' in the attached artifact, the following is the output, which shows that a ClassNotFoundException is thrown. It is remarkable that after 'mvn compile' a directory 'home' with sub folders is created in the local directory (which doesn't make any sense, I believe). Here the output:

[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - chris-test:java2wsdl-fails:jar:0.0.1-SNAPSHOT
[INFO] task-segment: [compile]
[INFO] ----------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven//woodstox/poms/wstx-asl-3.0.1.pom
Downloading: http://ws.zones.apache.org/repository//woodstox/poms/wstx-asl-3.0.1.pom
Downloading: http://repo1.maven.org/maven2/woodstox/wstx-asl/3.0.1/wstx-asl-3.0.1.pom
Downloading: http://repo1.maven.org/maven2/woodstox/wstx-asl/3.0.1/wstx-asl-3.0.1.pom
Downloading: http://repo1.maven.org/maven//jaxen/poms/jaxen-1.1-beta-10.pom
Downloading: http://ws.zones.apache.org/repository//jaxen/poms/jaxen-1.1-beta-10.pom
Downloading: http://repo1.maven.org/maven2/jaxen/jaxen/1.1-beta-10/jaxen-1.1-beta-10.pom
Downloading: http://repo1.maven.org/maven2/jaxen/jaxen/1.1-beta-10/jaxen-1.1-beta-10.pom
[INFO] [axis2-java2wsdl:java2wsdl {execution: default}]
java.lang.Exception: java.lang.ClassNotFoundException: pojoservice.MyService
at org.apache.ws.java2wsdl.Java2WSDLCodegenEngine.generate(Java2WSDLCodegenEngine.java:58)
at org.apache.axis2.maven2.java2wsdl.Java2WSDLMojo.execute(Java2WSDLMojo.java:146)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
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:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException: pojoservice.MyService
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.ws.java2wsdl.Java2WSDLUtils.namespaceFromClassName(Java2WSDLUtils.java:63)
at org.apache.ws.java2wsdl.Java2WSDLUtils.schemaNamespaceFromClassName(Java2WSDLUtils.java:82)
at org.apache.ws.java2wsdl.Java2WSDLBuilder.getSchemaTargetNamespace(Java2WSDLBuilder.java:56)
at org.apache.ws.java2wsdl.Java2WSDLBuilder.generateWSDL(Java2WSDLBuilder.java:152)
at org.apache.ws.java2wsdl.Java2WSDLCodegenEngine.generate(Java2WSDLCodegenEngine.java:56)
... 19 more
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] java.lang.ClassNotFoundException: pojoservice.MyService

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Fri Aug 03 21:05:48 CEST 2007
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Chris Oloff added a comment - 03/Aug/07 07:15 PM
The maven project to reproduce the issue.

Davanum Srinivas added a comment - 05/Aug/07 06:49 PM
Chris,

Many problems with the pom.xml...I will upload a zip that works.

thanks,
dims

Davanum Srinivas added a comment - 05/Aug/07 06:50 PM
Here's the zip with a pom.xml that works fine with latest nightly of 1.3 branch.

thanks,
dims

Chris Oloff added a comment - 05/Aug/07 09:29 PM
Sounds good that it's working now, but: Now the pom is polluted with lots of dependencies, which are dependencies of the plugin, not my artifact. Shouldn't these dependencies go to the plugin's pom?

Chris

Cris Daniluk added a comment - 14/Sep/07 08:13 PM
This doesn't exactly seem fixed to me. First of all, I can't make this work on an actual RELEASED version of the plugin. Second, I can't even get the most recent snapshot to work at all. The POM includes all sorts of noise that just shouldn't be required, per Chris's point. Can this issue get some attention? I'm fairly certain this plugin just flat out doesn't work in its current state.

Trasca Virgil added a comment - 15/Dec/07 05:27 PM
It seems that it is not solved. Please check my post on axis-dev list about this.