100分相送,求高手解决
org.springframework.beans.factory.BeanCreationException我的程序在tomacat5。0和JDK1。50下可以运行
但换到tomacat6。0和JDK1。60下就出现异常
我的application.xml是
<bean id= "sessionFactory "
class= "org.springframework.orm.hibernate3.LocalSessionFactoryBean ">
<property name= "configLocation ">
<value> hibernate.cfg.xml </value>
</property>
</bean>
<!--配置hibernate transactonmanager -->
<bean id= "transactionManager " class= "org.springframework.orm.hibernate3.HibernateTransactionManager ">
<property name= "sessionFactory ">
<ref local= "sessionFactory " />
</property>
</bean>
<!--对象dao配置 -->
<bean id= "userDAO " class= "com.xingkong.hibernate.dao.impl.UserDAOImpl ">
<property name= "sessionFactory ">
<ref local= "sessionFactory " />
</property>
</bean>
<bean id= "booktypeDAO " class= "com.xingkong.hibernate.dao.impl.BookTypeDAOImpl ">
<property name= "sessionFactory ">
<ref local= "sessionFactory "/>
</property>
</bean>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory ' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is
java.lang.NoClassDefFoundError: org/hibernate/cfg/HbmBinder$SecondPass
java.lang.
NoClassDefFoundError: org/hibernate/cfg/HbmBinder$SecondPass
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1814)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:868)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1321)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1200)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Config