caused By:java.lang.ClassNotFoundException:org.hibernate.annotations.common.reflection.MetadataPro

Source: Internet
Author: User
Tags addchild

1. Description of the error

Info: Mlog Clients using Java 1.4+ standard logging.2014-7-12 19:29:20 com.mchange.v2.c3p0.C3P0Registry banner info: Initializ ing c3p0-0.9.2.1 [built 20-march-2013 10:47:27 +0000; debug? true; trace:10]2014-7-12 19:29:21 ORG.SPRINGFRAMEWORK.WEB.C Ontext. Contextloader Initwebapplicationcontext Serious: Context initialization Failedorg.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' sessionfactory ' defined In ServletContext resource [/web-inf/applicationcontext.xml]: Invocation of Init method failed; Nested exception is Java.lang.noclassdeffounderror:org/hibernate/annotations/common/reflection/metadataproviderat Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( abstractautowirecapablebeanfactory.java:1507) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:539) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.crEatebean (abstractautowirecapablebeanfactory.java:475) at Org.springframework.beans.factory.support.abstractbeanfactory$1.getobject (abstractbeanfactory.java:299) at Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:228) at Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:295) at Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:195) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:646) 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.noclassdeffounderror:org/hibernate/annotations/common/reflection/ Metadataproviderat Org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet ( localsessionfactorybean.java:280) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods ( abstractautowirecapablebeanfactory.java:1566) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( abstractautowirecapablebeanfactory.java:1503) ... Morecaused By:java.lang.ClassNotFoundException:org.hibernate.annotations.common.reflection.MetadataProviderat Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1720) at Org.apache.catalina.loader.WebappClassLoader.loadClass (Webappclassloader.java:1571) at java.lang.ClassLoader.loadClassInternal (classloader.java:320) ... more2014-7-12 19:29:21 org.apache.catalina.core.StandardContext listenerstart severity: Exception Sending context Initialized event to listener instance of class Org.springframework.web.context.ContextLoaderListenerorg.springframework.beans.factory.BeanCreationException: Error creating Bean with Name ' sessionfactory ' defined in ServletContext resource [/web-inf/applicationcontext.xml]: Invo Cation of Init method failed; Nested exception is Java.lang.noclassdeffounderror:org/hibernate/annotations/common/reflection/metadataproviderat Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( abstractautowirecapablebeanfactory.java:1507) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:539) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (abstractautowirecapablebeanfactory.java:475) at Org.springframework.beans.factory.support.abstractbeanfactory$1.getobject ( abstractbeanfactory.java:299) at Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:228) at Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:295) at Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:195) at Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:646) 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.noclassdeffounderror:org/hibernate/annotations/common/reflection/metadataproviderat Org.springframework.orm.hibernate4.LocalSessionFactoryBean.afterPropertiesSet (localsessionfactorybean.java:280 ) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods ( abstractautowirecapablebeanfactory.java:1566) at Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean ( abstractautowirecapablebeanfactory.java:1503) ... Morecaused By:java.lang.ClassNotFoundException:org.hibernate.annotations.common.reflection.MetadataProviderat Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1720) at Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1571) at Java.lang.ClassLoader.loadclassinternal (classloader.java:320) ... more2014-7-12 19:29:21 Com.sun.faces.config.ConfigureListener contextinitialized Info: Initialize the/firstssh of the context ' Mojarra ' 2.0.3 (FCS b03) 2014-7-12 19:29:22 com.sun.faces.spi.InjectionProviderFactory CreateInstance information: JSF1048: Available Postconstruct/predestroy Gaze.

The Managedbeans method labeled with these stares will indicate that the gaze has been processed.

2014-7-12 19:29:22 org.apache.catalina.core.StandardContext startinternal severity: Error listenerstart2014-7-12 19:29:22 Org.apache.catalina.core.StandardContext startinternal Serious: Context [/firstssh] startup failed due to previous errors2014-7-12 19:29:22 org.apache.catalina.core.ApplicationContext Log info: Closing Spring root webapplicationcontext2014-7-12 19:29:22 Org.apache.catalina.loader.WebappClassLoader Checkthreadlocalmapforleaks Critical: The Web application [/FIRSTSSH] created a ThreadLocal with key of type [Com.sun.faces.util. UTIL$1] (value [[email protected]]) 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 is going to being renewed over time to try and avoid a probable memory leak.2014-7-12 19:29:22 ORG.APACHE.CATALINA.S Tartup. Hostconfig deploydirectory Info: Deploying Web application Directory D:\MyEclipse\apache-tomcat-7.0.53\webapps\ host-manager2014-7-12 19:29:22 Org.apache.cataliNa.startup.HostConfig deploydirectory


2. Cause of error

through "caused By:java.lang.ClassNotFoundException:org.hibernate.annotations.common.reflection.MetadataProvider" This sentence. Missing jar associated with "hibernate-commons-annotations" in Hibernate


3, the solution of the method

Copy "Hibernate-commons-annotations-4.0.4.final.jar" to the Lib folder and start the service again

caused By:java.lang.ClassNotFoundException:org.hibernate.annotations.common.reflection.MetadataPro

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.