1. ホーム
  2. ハイバーネート

原因:java.lang.ClassNotFoundException: com.mchange.v2.c3p0.ComboPooledDataSource

2022-02-26 11:01:35

1. エラーの説明

usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [ -nonaming ] { -help | start | stop }
2014-7-12 0:51:11 org.apache.catalina.core.AprLifecycleListener init
Info: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.4.8.
2014-7-12 0:51:11 org.apache.catalina.core.AprLifecycleListener init
Info: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2014-7-12 0:51:11 org.apache.catalina.core.AprLifecycleListener initializeSSL
Message: OpenSSL successfully initialized (OpenSSL 1.0.1e 11 Feb 2013)
2014-7-12 0:51:12 org.apache.coyote.AbstractProtocol init
Info: Initializing ProtocolHandler ["http-apr-8686"]
2014-7-12 0:51:12 org.apache.coyote.AbstractProtocol init
Info: Initializing ProtocolHandler ["ajp-apr-8009"]
2014-7-12 0:51:12 org.apache.catalina.startup.Catalina load
Message: Initialization processed in 1764 ms
2014-7-12 0:51:12 org.apache.catalina.core.StandardService startInternal
Info: Starting service Catalina
2014-7-12 0:51:12 org.apache.catalina.core.StandardEngine startInternal
Message: Starting Servlet Engine: Apache Tomcat/7.0.53
2014-7-12 0:51:13 org.apache.tomcat.websocket.server.WsSci onStartup
Message: JSR 356 WebSocket (Java WebSocket 1.0) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocketJARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE /conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. 
2014-7-12 0:51:15 org.apache.catalina.startup.HostConfig deployWAR
Info: Deploying web application archive D:\MyEclipse\apache-tomcat-7.0.53\webapps\blazeds.war
2014-7-12 0:51:16 org.apache.catalina.startup.HostConfig deployDirectory
Info: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\docs
2014-7-12 0:51:16 org.apache.catalina.startup.HostConfig deployDirectory
Info: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\examples
2014-7-12 0:51:17 org.apache.catalina.core.ApplicationContext log
Info: ContextListener: contextInitialized()
2014-7-12 0:51:17 org.apache.catalina.core.ApplicationContext log
Info: SessionListener: contextInitialized()
2014-7-12 0:51:17 org.apache.catalina.core.ApplicationContext log
Info: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler. d38976')
2014-7-12 0:51:17 org.apache.catalina.startup.HostConfig deployDirectory
Info: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\FirstSSH
2014-7-12 0:51:22 org.apache.catalina.core.ApplicationContext log
Message: No Spring WebApplicationInitializer types detected on classpath
2014-7-12 0:51:22 org.apache.catalina.core.ApplicationContext log
Info: Initializing Spring root WebApplicationContext
2014-7-12 0:51:22 org.springframework.web.context.ContextLoader initWebApplicationContext
Info: Root WebApplicationContext: initialization started
2014-7-12 0:51:22 org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
Info: Refreshing Root WebApplicationContext: startup date [Sat Jul 12 00:51:22 CST 2014]; root of context hierarchy
2014-7-12 0:51:23 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
Info: Loading XML bean definitions from 
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: com.mchange.v2.c3p0.ComboPooledDataSource
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
	at org.springframework.util.ClassUtils.forName(ClassUtils.java:241)
	at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:392)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1338)
	at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1309)
	... 23 more
2014-7-12 0:51:23 com.sun.faces.config.ConfigureListener contextInitialized
Info: Initializing context '/FirstSSH' for Mojarra 2.0.3 (FCS b03)
2014-7-12 0:51:24 com.sun.faces.spi.InjectionProviderFactory createInstance
Info: JSF1048: has PostConstruct/PreDestroy annotations. ManagedBeans methods marked with these annotations will indicate that the annotations have been processed.
2014-7-12 0:51:24 org.apache.catalina.core.StandardContext startInternal
Serious: Error listenerStart
2014-7-12 0:51:24 org.apache.catalina.core.StandardContext startInternal
Serious: Context [/FirstSSH] startup failed due to previous errors
2014-7-12 0:51:24 org.apache.catalina.core.ApplicationContext log
Info: Closing Spring root WebApplicationContext
2014-7-12 0:51:24 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
Serious: The web application [/FirstSSH] created a ThreadLocal with key of type [com.sun.faces.util.Util$1] (value [com.sun.faces.util.Util$1@4b7b1]) and a value of type [java.util.HashMap] (value [{com.sun.faces.patternCache={ = }}]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
2014-7-12 0:51:24 org.apache.catalina.startup.HostConfig deployDirectory
Info: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\host-manager
2014-7-12 0:51:24 org.apache.catalina.startup.HostConfig deployDirectory
Info: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\manager
2014-7-12 0:51:24 org.apache.catalina.startup.HostConfig deployDirectory
Info: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\ROOT
2014-7-12 0:51:24 org.apache.catalina.startup.HostConfig deployDirectory
Info: Deploying web application directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\StudentSystem
2014-7-12 0:51:27 com.sun.faces.config.ConfigureListener contextInitialized
Info: Initializing context '/StudentSystem' for Mojarra 2.0.3 (FCS b03)
2014-7-12 0:51:27 com.sun.faces.spi.InjectionProviderFactory createInstance
Info: JSF1048: has PostConstruct/PreDestroy annotations. ManagedBeans methods marked with these annotations will indicate that the annotations have been processed.
2014-7-12 0:51:28 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
Info: Parsing configuration file [struts-default.xml]
2014-7-12 0:51:28 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
Info: Unable to locate configuration files of the name struts-plugin.xml, skipping
2014-7-12 0:51:28 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
Info: Parsing configuration file [struts-plugin.xml]
2014-7-12 0:51:28 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
Message: Unable to locate configuration files 





<スパン 2. エラーの理由

     この文章を通して、 "Caused by: java.lang.ClassNotFoundException: com.mchange.v2.c3p0.ComboPooledDataSource" は、 "c3p0" についてのjarが見つからない、検索の後、私はhibernateでこのjarを見つけたことができる。


3. ソリューション

<スパン      lib ディレクトリに "c3p0-0.9.2.1.jar" をコピーし、サービスを再起動します。