当我在Glassfish 4.1服务器上运行我的休息api点时,即使我以NoClassDefFoundError
作为依赖性发送耳朵,我也会面对commons-logging
,即使该库已在WEB-INF\lib
下解压缩
看起来我不会使用Glassfish 4.0来解决问题
任何想法如何解决这个问题?
首先LogFactory
未找到
javax.xml.ws.WebServiceException: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processRequest(SecurityClientTube.java:252)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
at com.sun.xml.ws.client.Stub.process(Stub.java:463)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:191)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:92)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:161)
然后WSSElementFactory
也不是
javax.xml.ws.WebServiceException: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.ws.security.opt.impl.util.WSSElementFactory
at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processRequest(SecurityClientTube.java:252)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
at com.sun.xml.ws.client.Stub.process(Stub.java:463)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:191)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:92)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:161)
答案 0 :(得分:1)
也许我的回答是小,但是我在Glassfish 4.1.1中遇到了同样的问题,并设法通过更新Metro库解决了该问题
这是一条指令:
对我有用,两个错误都消失了
希望它会帮助某人