1. Error description
Serious: Context initialization failed org.springframework.beans.factory.CannotLoadBeanClassException:Cannot Find class [ Org.springframework.orm.hibernate4.HibernateTemplate] for Bean and name ' hibernatetemplate ' defined in ServletContext resource [/web-inf/applicationcontext.xml]; Nested exception is java.lang.ClassNotFoundException:org.springframework.orm.hibernate4.HibernateTemplate at
Org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass (abstractbeanfactory.java:1317) At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType ( abstractautowirecapablebeanfactory.java:594) at Org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (abstractbeanfactory.java:1386) at Org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (abstractbeanfactory.java:949) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (
defaultlistablebeanfactory.java:645)At Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:760) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:482) at
Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (contextloader.java:389) At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:294) at Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:106) at Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4973) at Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5467) at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150) at Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:901) at Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:877) at Org.apache.catalina.Core. Standardhost.addchild (standardhost.java:632) at Org.apache.catalina.startup.HostConfig.deployDirectory ( hostconfig.java:1229) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (HostConfig.java:1875) at Java.util.concurrent.executors$runnableadapter.call (executors.java:441) 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:org.springframework.orm.hibernate4.HibernateTemplate 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) ... More 2014-7-12 21:55:44 org.apache.catalina.core.StandardContext Listenerstart Serious: Exception Sending context
Initialized event to listener instance of class Org.springframework.web.context.ContextLoaderListener Org.springframework.beans.factory.CannotLoadBeanClassException:Cannot Find class [ Org.springframework.orm.hibernate4.HibernateTemplate] for Bean and name ' hibernatetemplate ' defined in ServletContext resource [/web-inf/applicationcontext.xml]; Nested exception is java.lang.ClassNotFoundException:org.springframework.orm.hibernate4.HibernateTemplate at Org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass (ABSTRACTBEANFACtory.java:1317) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType ( abstractautowirecapablebeanfactory.java:594) at Org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (abstractbeanfactory.java:1386) at Org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean (abstractbeanfactory.java:949) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:645) at Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:760) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:482) at
Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (contextloader.java:389) At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:294) at Org.springframework. web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:106) at Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4973) at Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5467) at Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150) at Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:901) at Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:877) at Org.apache.catalina.core.StandardHost.addChild (standardhost.java:632) at Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:1229) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (hostconfig.java:1875) at Java.util.concurrent.executors$runnableadapter.call (executors.java:441) 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: Org.springframework.orm.hibernate4.HibernateTemplate 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) ... More 2014-7-12 21:55:44 com.sun.faces.config.ConfigureListener contextinitialized information: Initializing context '/firstssh ' Mojarra 2.0 .3 (FCS b03) 2014-7-12 21:55:Com.sun.faces.spi.InjectionProviderFactory CreateInstance Information: JSF1048: There are Postconstruct/predestroy annotations.
The Managedbeans method marked with these annotations will indicate that the annotation has been processed. 2014-7-12 21:55:45 org.apache.catalina.core.StandardContext startinternal serious: Error listenerstart 2014-7-12 21:55:45 Org.apache.catalina.core.StandardContext startinternal Serious: Context [/FIRSTSSH] startup failed due to previous errors 2014 -7-12 21:55:45 org.apache.catalina.core.ApplicationContext Log information: Closing Spring root Webapplicationcontext 2014-7-12 21:55:45 Org.apache.catalina.loader.WebappClassLoader CLEARREFERENCESJDBC Severe: The Web application [/FIRSTSSH] Registered the JDBC driver [Com.mysql.jdbc.Driver] but failed to unregister it's the Web application was stopped.
To prevent a memory leak, the JDBC Driver has been, forcibly. 2014-7-12 21:55:45 org.apache.catalina.loader.WebappClassLoader clearreferencesthreads severity: The Web application [/ FIRSTSSH] appears to have started a thread named [Abandoned connection cleanup thread] but haS failed to stop it.
This is very likely to create a memory leak. 2014-7-12 21:55:45 org.apache.catalina.loader.WebappClassLoader checkthreadlocalmapforleaks severity: The Web application [/ FIRSTSSH] created a ThreadLocal with key of type [com.sun.faces.util.util$1] (value [com.sun.faces.util.util$1@944d4a]) nd a value of type [JAVA.UTIL.HASHMAP] (value [{com.sun.faces.patterncache={=}}]) but failed to remove it when the Web a Pplication was stopped.
Threads are going to is renewed over time to try and avoid a probable memory leak. 2014-7-12 21:55:45 Org.apache.catalina.startup.HostConfig deploydirectory
2. Error reason
The Hibernatetemplate tool class has been discarded in hibernate4, causing an error
3. Solutions
comment out the following paragraph configuration:
<bean id= "Hibernatetemplate" class= "Org.springframework.orm.hibernate4.HibernateTemplate"
Singleton ">
<property name=" sessionfactory "ref=" sessionfactory "/>
</bean>