0

我使用 Eclipse 创建了一个 Web 服务 (Axis2) 并部署到 Glassfish 服务器。

Axis2-web 运行良好,但是当我请求我的服务的 WSDL 时,我只是得到一个 expcetion:

Caused by: java.lang.NoClassDefFoundError: javax/lang/model/element/Element
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceWrapperGenerator.<init>(WebServiceWrapperGenerator.java:130)
    at com.sun.tools.ws.processor.modeler.annotation.WebServiceAp.process(WebServiceAp.java:181)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:793)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:722)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1700(JavacProcessingEnvironment.java:97)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1029)
    at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1163)
    at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1108)
    at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824)
    at com.sun.tools.javac.main.Main.compile(Main.java:439)
    ... 42 more
Caused by: java.lang.ClassNotFoundException: javax.lang.model.element.Element not found by com.sun.xml.bind [150]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1460)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
    ... 52 more

通常aNoClassDefFoundError意味着缺少依赖项,但'javax.lang.model.element.Element'来自JRE('rt.jar'),所以我不知道这里有什么问题。

更多详细信息: Eclipse Juno、Glassfish 3.1.2、Axis2-1.6.2、动态 Web 项目

4

0 回答 0