日期:2014-05-17  浏览次数:20735 次

java.lang.ClassNotFoundException: com.zjrj.trade.dao.HibernateManager
applicationContext.xml中的配置:
Java code
<bean id="hibernateManager" class="com.zjrj.trade.dao.HibernateManager">
        <property name="sessionFactory">
            <ref local="sessionFactory" />
        </property>
    </bean>


报错信息:

Java code

2012-7-17 16:11:32 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Program Files\NVIDIA Corporation\PhysX\Common;E:\app\Bond\product\11.2.0\dbhome_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Microsoft SQL Server\80\Tools\Binn\;D:\apache-ant-1.8.2\apache-ant-1.8.2\bin;C:\Program Files\TortoiseSVN\bin;D:\eclipse\eclipse;;.
2012-7-17 16:11:32 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2012-7-17 16:11:32 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 520 ms
2012-7-17 16:11:32 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2012-7-17 16:11:32 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.18
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
2012-7-17 16:11:33 org.apache.catalina.core.ApplicationContext log
信息: Loading Spring root WebApplicationContext
2012-7-17 16:11:33 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'hibernateManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Bean class [com.zjrj.trade.dao.HibernateManager] not found; nested exception is java.lang.ClassNotFoundException: com.zjrj.trade.dao.HibernateManager
java.lang.ClassNotFoundException: com.zjrj.trade.dao.HibernateManager
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at org.springframework.util.ClassUtils.forName(ClassUtils.java:109)
    at org.springframework.beans.factory.support.BeanDefinitionReaderUtils.createBeanDefinition(BeanDefinitionReaderUtils.java:65)
    at org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitionElement(DefaultXmlBea