springmvc+mybatis异常

严重: 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:270)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
	at org.apache.catalina.core.StandardService.start(StandardService.java:525)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
	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:289)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
	... 26 more

   1.见上异常,所以springmvc+mybatis需要Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory   commons-logging-1.1.1.jar

 

 

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor threw exception; nested exception is org.apache.cxf.bus.extension.ExtensionException: Could not load extension class org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl.

   

Caused by: java.lang.NoClassDefFoundError: org/apache/neethi/AssertionBuilderFactory

 

    2.上面说明了cxf会依赖apache的jar包 neethi-3.0.2.jar

 

 

  

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/http/HttpRequestInterceptor

    3.说明cxf也会以来org/apache/http/HttpRequestInterceptor

 

 

 

   

Error creating bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/http/nio/NHttpClientEventHandler

 

    4.说明cxf依赖 org/apache/http/nio/NHttpClientEventHandler

 

   

Error creating bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager

   

   5.说明cxf依赖org/apache/http/impl/nio/conn/PoolingClientAsyncConnectionManager 

    httpasyncclient-4.0-beta3.jar

 

  

 Error creating bean with name 'cxf' defined in class path resource [META-INF/cxf/cxf.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/http/client/RedirectStrategy

   6.cxf依赖 Caused by: java.lang.NoClassDefFoundError: org/apache/http/client/RedirectStrategy

 

   

 Error creating bean with name 'ticketDispatchWebService': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.jaxws.spring.NamespaceHandler$SpringServerFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/ws/commons/schema/resolver/URIResolver

 

    7.这里的前提是spring与cxf集成  错误原因是在创建webservice(wsdl)时 依赖了org/apache/ws/commons/schema/resolver/URIResolver

 

   

 Error creating bean with name 'ticketDispatchWebService': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.cxf.jaxws.spring.NamespaceHandler$SpringServerFactoryBean]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: javax/wsdl/WSDLException

   8.cxf依赖wsdl4j-1.6.2.jar

 

 

   

org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/spring-servlet.xml]

    解决:

http://www.blogjava.net/pengo/archive/2010/11/28/339229.html

 

 

 

   

Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.

 

 

 

   

org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Io 异常: The Network Adapter could not establish the connection
	at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:381)
	at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:455)
	at com.szcares.tempus.basic.BaseDAO.queryB2C(BaseDAO.java:360)

 

 

你可能感兴趣的:(springMVC)