Spring错误:Error creating bean with name 'userTransaction' defined in class path resource
spring启动失败org.springframework.beans.factory.access.BootstrapException:Unabletoinitial...
spring启动失败
org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition.
Group resource name [classpath*:beanRefFactory.xml], factory key [default]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'default'
defined in URL [file:/F:/work/fee/fee/WebContent/WEB-INF/classes/beanRefFactory.xml]: Instantiation of
bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate
class [org.springframework.context.support.ClassPathXmlApplicationContext]; constructor threw
exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userTransaction' defined in class path resource [applicationContext.xml]:
Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name UserTransaction is not bound in this Context
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'default'
defined in URL [file:/F:/work/fee/fee/WebContent/WEB-INF/classes/beanRefFactory.xml]: Instantiation of
bean failed;
nested exception is org.springframework.beans.FatalBeanException: Could not instantiate
class [org.springframework.context.support.ClassPathXmlApplicationContext]; constructor threw
exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error
错误说 Name UserTransaction is not bound in this Context,可是我在tomcat的xml文件中配置了UserTransaction。
第一张图是properties文件,
第二张图是tomcat的xml,
第三张是application.xml的UserTransaction配置 展开
org.springframework.beans.factory.access.BootstrapException: Unable to initialize group definition.
Group resource name [classpath*:beanRefFactory.xml], factory key [default]; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'default'
defined in URL [file:/F:/work/fee/fee/WebContent/WEB-INF/classes/beanRefFactory.xml]: Instantiation of
bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate
class [org.springframework.context.support.ClassPathXmlApplicationContext]; constructor threw
exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userTransaction' defined in class path resource [applicationContext.xml]:
Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name UserTransaction is not bound in this Context
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'default'
defined in URL [file:/F:/work/fee/fee/WebContent/WEB-INF/classes/beanRefFactory.xml]: Instantiation of
bean failed;
nested exception is org.springframework.beans.FatalBeanException: Could not instantiate
class [org.springframework.context.support.ClassPathXmlApplicationContext]; constructor threw
exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error
错误说 Name UserTransaction is not bound in this Context,可是我在tomcat的xml文件中配置了UserTransaction。
第一张图是properties文件,
第二张图是tomcat的xml,
第三张是application.xml的UserTransaction配置 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询