怎么处理啊!!郁闷 调试了半天还是一样啊!! org.springframework.beans.factory.BeanCreationException: Error creating bean with name dataSource defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError:org.springframework.beans.factory.BeanCreationException: Error creating bean with name sessionFactory defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: 多了两个异常 问题差不多 实在不知道哪写错了 不解
改为
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
看看,其他相应地方也改过来
调试了半天还是一样啊!!
org.springframework.beans.factory.BeanCreationException: Error creating bean with name dataSource defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError:org.springframework.beans.factory.BeanCreationException: Error creating bean with name sessionFactory defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError:
多了两个异常 问题差不多 实在不知道哪写错了 不解
路径对吗?
你的Hibernate版本应该是3了,所以你升级你的Spring到能对Hibernate3支持才行!
可能你用的Spring是对Hibernate3支持的,但是你写class="org.springframework.orm.hibernate.LocalSessionFactoryBean"就对Hibernate3不止持。hibernate3的包结构是:org.hibernate.****;以前版本的包结构是:net.sf.hibernate.***; 由于你安装的是hibernate3,所以找不到net.sf.hibernate.***;
还是上面的错 3个异常 不能CREATE BEAN
applicationContext.xml 放在SRC下
配置文件写错了吗? 是HIBERNATE2的的话
请教 如果是HIERNATE3配置文件应该怎么写啊?
郁闷中!!!