程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程綜合問答 >> 服務器-webservice啟動問題,請指教

服務器-webservice啟動問題,請指教

編輯:編程綜合問答
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什麼

最佳回答:


根據打印的報錯語句,應該是缺少相應的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. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved