我正在尝试使用 WAS V7.0 开发工具从 WSDL 生成“自上而下的 EJB Web 服务”实现。(服务器运行时 WAS 7.0,Web 服务运行时 IBM WebSphere JAX-WS。)选择我的 EJB 和 EAR 项目并指定更多选项后,无论我的选项如何,我总是收到以下错误:
Errors occurred during wsimport.
java.lang.NoClassDefFoundError: com/sun/tools/internal/ws/wscompile/WsimportTool
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.ibm.ast.ws.jaxws.emitter.jdk6.command.AbstractEmitterCommand.loadClass(AbstractEmitterCommand.java:166)
at com.ibm.ast.ws.jaxws.emitter.jdk6.command.WsImportCommand.execute(WsImportCommand.java:113)
at com.ibm.ast.ws.jaxws.emitter.command.WsImportCommand.execute(WsImportCommand.java:81)
at com.ibm.ast.ws.jaxws.creation.command.WsimportNonUIThreadCommand$RunCmdInNonUIThread.run(WsimportNonUIThreadCommand.java:284)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.internal.ws.wscompile.WsimportTool
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 16 more
通过在 Rational Application Developer 7.5.1 中执行完全相同的步骤,我可以成功地为我的 WSDL 生成一个带有 HTTP 路由器模块的 EJB Web 服务实现。所以我认为这个问题可能与 WAS 开发者工具有关。
你们知道为什么我会收到这个错误吗?任何帮助将非常感激。
谢谢你,乔巴