Topic
  • 1 reply
  • Latest Post - ‏2013-07-04T20:38:09Z by rsanchezh
PaulGlezen
PaulGlezen
1 Post

Pinned topic Trouble generating JAX-WS Top-down Java Bean Skeleton

‏2013-07-04T19:50:19Z |

I receive a NoClassDefFoundError for com/sun/tools/ws/wscompile/WsimportTool when I try to generate a JAX-WS Top-down Java bean skeleton using the wizard.  I don't have this issue running wsimport from the command line.

 

My environment is:

OS: OS X 10.7

Eclipse: 4.2.2

Liberty Profile Tools:

WebSphere Server Liberty Profile
Version: 1.0.200.v20130522_2131
Tools for developing for and administering WebSphere Application Server.

Java:

$ java -version
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)
 

My steps are:

  1. Right-click WSDL file in simple project and select Web Services - Generate Java Bean Skeleton
  2. Choose "Develop service"
  3. Choose WAS v8.5 Liberty Profile for server runtime
  4. Choose IBM WebSphere JAX-WS for the service runtime
  5. On the next panel, I enable Wrapper style, pick a package name, and choose 2.2 for the JAX-WS code
  6. Click Next.

The result is the following stack trace in an error dialog:

Errors occurred during wsimport.
    java.lang.NoClassDefFoundError: com/sun/tools/ws/wscompile/WsimportTool
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at com.ibm.ast.ws.jaxws.emitter.tools.command.AbstractEmitterCommand.loadClass(AbstractEmitterCommand.java:150)
    at com.ibm.ast.ws.jaxws.emitter.tools.command.WsImportCommand.execute(WsImportCommand.java:116)
    at com.ibm.ast.ws.jaxws.emitter.command.WsImportCommand.execute(WsImportCommand.java:86)
    at com.ibm.ast.ws.jaxws.creation.command.WsimportNonUIThreadCommand$RunCmdInNonUIThread.run(WsimportNonUIThreadCommand.java:285)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    Caused by: java.lang.ClassNotFoundException: com.sun.tools.ws.wscompile.WsimportTool
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 16 more


 

  • rsanchezh
    rsanchezh
    26 Posts

    Re: Trouble generating JAX-WS Top-down Java Bean Skeleton

    ‏2013-07-04T20:38:09Z  

    Hello,

    Although the stack is a little different than the one in the following technote, I'd suggest trying Java 7, as suggested in the technote, to see if that helps.

    http://www-01.ibm.com/support/docview.wss?uid=swg21639356