spring启动失败,java配置时报错 哪位兄弟帮忙看看 什么问题 非常感谢 40
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:/D:/web/web/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 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'default' defined in URL [file:/D:/web/web/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 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
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 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context 展开
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:/D:/web/web/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 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'default' defined in URL [file:/D:/web/web/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 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
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 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context 展开
6个回答
展开全部
先检查配置有没有问题,把xml文件里面配置的代码注释下,一行行测试下,文件的路径也留意下。。
更多追问追答
追问
都没问题 我是从别的项目拷过来的 在别的环境上没有问题。。 只是拷的我的环境上就有问题了 是不是tomcat的问题 还是 jdk的问题?
追答
jar包删了,重新导入下,把tomcat里面的项目清理掉。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这里说的就是你的数据源没有找到嘛,检查下tomcat的数据源是怎么配置的,根据报错,很明显看出是需要配置Jndi方式读取的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
classpath*:beanRefFactory.xml
*号应该写在冒号后面,classpath:*beanRefFactory.xml,这找的是所有classpath中,已beanRefFactory.xml结尾的配置文件
先把这个改了吧,后面我看还有读不到datasource,你前面连配置文件都没读正确,后面的更不用说
*号应该写在冒号后面,classpath:*beanRefFactory.xml,这找的是所有classpath中,已beanRefFactory.xml结尾的配置文件
先把这个改了吧,后面我看还有读不到datasource,你前面连配置文件都没读正确,后面的更不用说
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
在spring配置文件中引用jdbc/oracleds时,应该前面加上java:comp/env/,全名为java:comp/env/jdbc/oracleds,否则也会报同样的错误
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你的weblogic服务器要配个名为jdbc的数据源,并且数据库要启动,就行了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询