当前位置: 代码迷 >> Java Web开发 >> result=service.nciicCheck(licensecode,condition);报错,请
  详细解决方案

result=service.nciicCheck(licensecode,condition);报错,请

热度:540   发布时间:2016-04-12 22:58:18.0
result=service.nciicCheck(licensecode,condition);报错,请高手指点
今天看了全国公民信息系统web服务调用规范,我按照那个上面写:服务接口类,调用类,代码一模一样,在运行时报错,运行到:result=service.nciicCheck(licensecode,condition);这句报错。错误如下:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/codec/DecoderException
at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:217)
at org.apache.commons.httpclient.methods.ExpectContinueMethod.<init>(ExpectContinueMethod.java:92)
at org.apache.commons.httpclient.methods.EntityEnclosingMethod.<init>(EntityEnclosingMethod.java:118)
at org.apache.commons.httpclient.methods.PostMethod.<init>(PostMethod.java:105)
at org.codehaus.xfire.transport.http.CommonsHttpMessageSender.open(CommonsHttpMessageSender.java:135)
at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:121)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy0.nciicCheck(Unknown Source)
at com.nciic.webservice.client.NciicClient.executeClient(NciicClient.java:82)
at com.nciic.webservice.client.NciicClient.main(NciicClient.java:93)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.codec.DecoderException
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 17 more


如果有遇到同样的问题,或知道这个问题的请指点,并指点一下经验,谢谢
xfire webservice javaweb

------解决方案--------------------
 java.lang.NoClassDefFoundErrororg/apache/commons/codec/DecoderException
  相关解决方案