Caused by: java.lang.ClassNotFoundException: com.mchange.v2.ser.Indirector

启动tomcat报如下错误:

Caused by: java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2398)
	at java.lang.Class.getConstructor0(Class.java:2708)
	at java.lang.Class.getDeclaredConstructor(Class.java:1987)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate
	(SimpleInstantiationStrategy.java:78)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.
	instantiateBean(AbstractAutowireCapableBeanFactory.java:990)
	... 41 more
Caused by: java.lang.ClassNotFoundException: com.mchange.v2.ser.Indirector
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
	... 47 more
2015-3-2 10:08:56 org.apache.catalina.core.StandardContext loadOnStartup
严重: Servlet /psys threw load() exception
java.lang.ClassNotFoundException: com.mchange.v2.ser.Indirector
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2398)
	at java.lang.Class.getConstructor0(Class.java:2708)
	at java.lang.Class.getDeclaredConstructor(Class.java:1987)
	at com.farm.web.spring.BeanFactory.getBean(BeanFactory.java:29)
	at com.farm.web.task.SysInit.init(SysInit.java:38)
	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1213)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
	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)

通过这句java.lang.ClassNotFoundException: com.mchange.v2.ser.Indirector 发现缺少jar包


解决办法:

将mchange-commons-java-0.2.3.4.jar复制到lib目录下


作者:itmyhome


你可能感兴趣的:(mchange,异常错误)