zy625080069
sky1211212121212
采纳率100%
2015-08-20 02:27 阅读 3.1k
已采纳

webservice启动问题,请指教

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
.....
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 26 more
2015-8-20 10:09:48 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2015-8-20 10:09:48 org.apache.catalina.core.StandardContext start
严重: Context [/cxfdemo] startup failed due to previous errors
2015-8-20 10:09:48 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2015-8-20 10:09:48 org.apache.catalina.core.StandardContext listenerStop
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.web.context.ContextCleanupListener.(ContextCleanupListener.java:43)
at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:80)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3866)
.....
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 27 more
2015-8-20 10:09:48 org.apache.catalina.loader.WebappClassLoader validateJarFile
信息: validateJarFile(F:\lianxi.metadata.me_tcat\webapps\cxf_demo_noSpring_1\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2015-8-20 10:09:48 org.apache.catalina.core.ApplicationContext log
严重: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/neethi/builders/AssertionBuilder
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:872)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1325)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.cxf.bus.extension.Extension.getClassObject(Extension.java:129)

....
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBus(CXFNonSpringServlet.java:83)
at com.test.server.WebServlet.loadBus(WebServlet.java:15)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:54)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
。。。。。
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: org.apache.neethi.builders.AssertionBuilder
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 55 more
2015-8-20 10:09:48 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /cxf_demo_noSpring_1 threw load() exception
java.lang.ClassNotFoundException: org.apache.neethi.builders.AssertionBuilder
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
..
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1817)
..
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.cxf.bus.extension.Extension.getClassObject(Extension.java:129)
.....
at com.test.server.WebServlet.loadBus(WebServlet.java:15)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:54)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1161)
......
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2015-8-20 10:09:48 org.apache.coyote.http11.Http11Protocol start

  • URL url = new URL("http://localhost:8081/Gz_hbjService?wsdl");
  • //Qnameqname是qualified name 的简写
  • //2.构成:由名字空间(namespace)前缀(prefix)以及冒号(:),还有一个元素名称构成
  • //由发布的wsdl可知namespace为http://server.ws.platform.whaty.com/,
  • QName qname=new QName("http://ws.gz_hbj.wasoft.com/","Gz_hbjService");
  • Service service=Service.create(url, qname);
  • IMyservice ms=service.getPort(IMyservice.class);
  • Gz_Hbj_Jjhz qc = new Gz_Hbj_Jjhz();
  • qc.setA075("0102");
  • qc.setP015(" ");
  • qc.setKsrq("2015-08-01");
  • qc.setJsrq("2015-08-20");
  • qc.setJkfs((short) 0);
  • Gz_Hbj_Jjhz[] gzHbjJjhzArray = new Gz_Hbj_Jjhz[20];
  • gzHbjJjhzArray = ms.gz_Hbj_Jjhz(qc , 0, 0);
    xsd:schema /xsd:schema xsd:schema /xsd:schema 服务器确实是起来了但是客户端访问出现问题不知道wei什么
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • 已采纳
    licuifeng 雪狸 2015-08-20 02:34

    根据打印的报错语句,应该是缺少相应的jar包,
    1.首先找到org/apache/commons/logging/LogFactory这个应该是在commons-logging.jar中,查看项目是否有这个jar包,或者是否版本冲突
    2. Error listenerStart 应该是端口号冲突
    3. java.lang.NoClassDefFoundError: org/apache/neethi/builders/AssertionBuilder应该是缺少jar包,查看是否缺少opensaml.jar,或者是否版本冲突

    点赞 1 评论 复制链接分享
  • yuke198907 yuke198907 2015-08-24 06:10

    java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

    应该是缺少jar报,common-logging之类的jar

    点赞 评论 复制链接分享

相关推荐