java.lang.NoClassDefFoundError: javax/jws/WebService

Apache's JIRA Issue Tracker | Henri Gomez | 9 years ago
  1. 0

    I can build jar projects using the jaxws wsgen mojo (1.9) under maven 2.0.x but it failed under m2eclipse (0.9.3) when using maven 2.1 embedded (it works if I switch m2eclipse to use the maven 2.0.9 on my system). I tried with various JVM (Sun and IBM 5 and 6) but still got the problem with maven 2.1 embedded (maven 2.1-620417 and 2.1-655675): error is : From file: C:\workspace\xxx-er-go\pom.xml Reason: Failed to execute wsgen java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass( at at at$100( at$ at Method) at at java.lang.ClassLoader.loadClass( at java.lang.ClassLoader.loadClass( at org.codehaus.plexus.classworlds.realm.ClassRealm.loadRealmClass( at org.codehaus.plexus.classworlds.strategy.DefaultStrategy.loadClass( at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass( at java.lang.ClassLoader.loadClassInternal( at at org.codehaus.mojo.jaxws.AbstractWsGenMojo.execute( at org.codehaus.mojo.jaxws.MainWsGenMojo.execute( at org.apache.maven.plugin.DefaultPluginManager.executeMojo( at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures( at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmentForProject( at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments( at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( at org.apache.maven.DefaultMaven.execute_aroundBody0( at org.apache.maven.DefaultMaven.execute_aroundBody1$advice( at org.apache.maven.DefaultMaven.execute( at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody2( at org.apache.maven.embedder.MavenEmbedder.execute_aroundBody3$advice( at org.apache.maven.embedder.MavenEmbedder.execute( at org.apache.maven.cli.MavenCli.doMain( at org.apache.maven.cli.MavenCli.main( at org.apache.maven.cli.MavenCli.main( Any idea or fixes ? my pom.xml wsgen is standard : <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> <executions> <execution> <id>compile</id> <goals> <goal>compile</goal> </goals> <phase>initialize</phase> </execution> </executions> </plugin> <!-- We need JAX-WS support for Annotation processing --> <!-- NB: wsgen can handle only one SEI at a time so we define an execution by SEI --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxws-maven-plugin</artifactId> <executions> <execution> <id>go-wsgen</id> <goals> <goal>wsgen</goal> </goals> <phase>generate-sources</phase> <configuration> <resourceDestDir>${}/classes/com/mycorp/service/resources/wsdl</resourceDestDir> <sei>com.mycorp.service.MyService</sei> <genWsdl>true</genWsdl> <keep>false</keep> </configuration> </execution> </executions> </plugin> </plugins> </build> I attached a simple project so you could try it. From others reports, it seems the tools.jar is missing in embedded mode.

    Apache's JIRA Issue Tracker | 9 years ago | Henri Gomez
    java.lang.NoClassDefFoundError: javax/jws/WebService
  2. 0

    Can't run Axis2 1.5.1 under Tomcat 5.5 using JDK 1.5?

    Coderanch | 6 years ago | Kelly Powell
    java.lang.NoClassDefFoundError: javax/jws/WebService
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError


    2. JAX-WS RI Tools Bundle
      1 frame