只要运行tomcat项目,就报错,以前的项目是对的,但是现在运行所有的都报错!问题如果帮我解决 ,可加分!
Exceptionsendingcontextinitializedeventtolistenerinstanceofclassorg.springframework.w...
Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
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 org.hibernate.HibernateException: Could not find datasource
Caused by: org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:366)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
....................................
Caused by: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
愿意在线登,求解决,跪求,跪求,愿意远程控制!可加分! 展开
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 org.hibernate.HibernateException: Could not find datasource
Caused by: org.hibernate.HibernateException: Could not find datasource
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:366)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
....................................
Caused by: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
愿意在线登,求解决,跪求,跪求,愿意远程控制!可加分! 展开
展开全部
这是因为在你的applicationContext.xml的这个文件里面的配置文件没有配置好,比如id为sessionFactory,和dataSource,你肯定没有配置好!
如果你没有applicationContext.xml这个文件,而是用的事beans.xml或者其他的xml文件的话,就要在web.xml文件上加上:<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:beans.xml</param-value>
</context-param>
自己试试看吧!
如果你没有applicationContext.xml这个文件,而是用的事beans.xml或者其他的xml文件的话,就要在web.xml文件上加上:<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:beans.xml</param-value>
</context-param>
自己试试看吧!
更多追问追答
追问
可否QQ远程
追答
公司的网络好卡,远程不行!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
肯定是spring的applicationContext.xml修改配置后出现问题了。好好把新增加的修改部分核实一下吧。
追问
加QQ,远程控制,我QQ625506370
追答
把你的配置文件发过来看看吧,180842679@qq.com
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
建议远程QQ操作,可能是配置文件需要修改或者jdbc驱动包没重加载进来
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
管理项看看TCP/IP启用了没,还有端口号有没有设置对
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
请贴spring配置文件。datasource配置错了
追问
加QQ,远程控制,我QQ625506370
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询