编程语言您现在的位置是:首页 > 博客日志 > 编程语言

Caused by: java.lang.ClassNotFoundException: org.hibernate.Session

<a href='mailto:'>微wx笑</a>的头像微wx笑2020-04-08 11:57:43编程语言人已围观关键字: java  

Caused by: java.lang.ClassNotFoundException: org.hibernate.Session缺少hibernate 主要的 Jar包:完整的错误信息:一月 06, 2018 4:19:09 下午 org.apache.catalina.core.Ap

Caused by: java.lang.ClassNotFoundException: org.hibernate.SessionCAU编程技术_踩坑日志_进阶指南_无知人生

缺少hibernate 主要的 Jar包:CAU编程技术_踩坑日志_进阶指南_无知人生


CAU编程技术_踩坑日志_进阶指南_无知人生

完整的错误信息:CAU编程技术_踩坑日志_进阶指南_无知人生


CAU编程技术_踩坑日志_进阶指南_无知人生

一月 06, 2018 4:19:09 下午 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: ……
一月 06, 2018 4:19:09 下午 org.apache.tomcat.util.digester.SetPropertiesRule beginWARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:NoteServices-Test' did not find a matching property.
一月 06, 2018 4:19:10 下午 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
一月 06, 2018 4:19:10 下午 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
一月 06, 2018 4:19:10 下午 org.apache.catalina.startup.Catalina loadINFO: Initialization processed in 1280 ms
一月 06, 2018 4:19:10 下午 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
一月 06, 2018 4:19:10 下午 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.35一月 06, 2018 4:19:12 下午 org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/LearnResourceService]]at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)at java.util.concurrent.FutureTask.get(Unknown Source)at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)at java.util.concurrent.FutureTask.run(Unknown Source)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/LearnResourceService]]at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	... 7 more
Caused by: java.lang.NoClassDefFoundError: Lorg/hibernate/Session;
	at java.lang.Class.getDeclaredFields0(Native Method)
	at java.lang.Class.privateGetDeclaredFields(Unknown Source)
	at java.lang.Class.getDeclaredFields(Unknown Source)
	at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:106)
	at org.apache.catalina.startup.WebAnnotationSet.loadFieldsAnnotation(WebAnnotationSet.java:261)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationServletAnnotations(WebAnnotationSet.java:140)
	at org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:67)
	at org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:405)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.Session
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
	... 21 more

一月 06, 2018 4:19:12 下午 org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during startjava.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)at java.util.concurrent.FutureTask.get(Unknown Source)at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)at org.apache.catalina.startup.Catalina.start(Catalina.java:684)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)at java.util.concurrent.FutureTask.run(Unknown Source)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during startat org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more

一月 06, 2018 4:19:12 下午 org.apache.catalina.startup.Catalina startSEVERE: Catalina.start: 
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)at org.apache.catalina.startup.Catalina.start(Catalina.java:684)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during startat org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 11 more

一月 06, 2018 4:19:12 下午 org.apache.catalina.startup.Catalina startINFO: Server startup in 2922 ms

这个问题很多人会认为问题的根本原因是:A child container failed during start,然而并非如此。

CAU编程技术_踩坑日志_进阶指南_无知人生

本文由 微wx笑 创作,采用 CC BY-NC 4.0 许可协议。 非商业性使用可自由转载、引用、甚至修改,但需署名作者且注明出处。

很赞哦! () 有话说 ()