Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path reso
2015-04-03 14:24
911 查看
org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed;
nested exception is java.io.FileNotFoundException: class path resource [user.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1488)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
spring 配置文件 ,配置了一个 映射映射文件,有点不是很明白。这不是hibernate配置文件吗?spring中怎么又也要用到hibernate?
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql" >true</prop>
<prop key="hibernate.format_sql" >true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>user.xml</value>
</list>
</property>
</bean>
Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed;
nested exception is java.io.FileNotFoundException: class path resource [user.xml] cannot be opened because it does not exist
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1488)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFacto
spring 配置文件 ,配置了一个 映射映射文件,有点不是很明白。这不是hibernate配置文件吗?spring中怎么又也要用到hibernate?
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.show_sql" >true</prop>
<prop key="hibernate.format_sql" >true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>user.xml</value>
</list>
</property>
</bean>
相关文章推荐
- Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a mana
- Invocation of init method failed; nested exception is java.lang.IllegalStateException:
- Invocation of init method failed; nested exception is java.lang.NoSuchMethodError
- class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: cla
- Invocation of init method failed; nested exception is java.lang.NoSuchMethod
- Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFa
- Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:问题解决
- java cxf nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf-ex
- Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:
- MyBatis与Spring MVC结合时,使用DAO注入出现:Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlSessionFactory' or 'sqlSessionTemplate' are required
- Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sqlMapClient' is required的解决办法及详细介绍
- nested exception is java.io.FileNotFoundException: class path resource [spring/spring-datasource-mog
- nested exception is java.io.FileNotFoundException: class path resource [spring/spring-datasource-mog
- Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:问题解决
- nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cann
- Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:
- Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/
- CXF2.7.0 Error creating bean with name '***': Invocation of init method failed; nested exception is
- Invocation of init method failed; nested exception is javax.naming.CommunicationException [Root exce
- ssh框架: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: