| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1534 人关注过本帖
标题:Name jdbc is not bound in this Context 怎么解决?
只看楼主 加入收藏
tangkou
Rank: 1
等 级:新手上路
帖 子:55
专家分:7
注 册:2010-7-28
结帖率:57.14%
收藏
 问题点数:0 回复次数:0 
Name jdbc is not bound in this Context 怎么解决?
报错 如下:::
程序代码:
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
    at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
    at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
    at com.ziwu.(Common.java:83)
    at com.ziwu.(Common.java:50)
    at com.ziwu.(Common.java:37)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1099)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1061)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1024)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346)
    at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
    at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:308)
    at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:252)
    at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:221)
    at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:115)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    at org.apache.catalina.core.StandardService.start(StandardService.java:450)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
查了都说是 配置问题 ,这个项目以前是运行过的,配置是对的,不知道什么问题?
顺带一个问题:
程序代码:
[log4j]2010-10-21 11:58:52,453 ERROR [org.springframework.web.servlet.DispatcherServlet]-Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'common' defined in ServletContext resource [/WEB-INF/model-con
fig.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: dataSource is required
Caused by:
java.lang.IllegalArgumentException: dataSource is required
dataSource is required????可能是什么原因导致这个问题呢? 代码 没错

请高手 赐教啊  谢谢啦...
搜索更多相关主题的帖子: bound Context jdbc Name not 
2010-10-21 12:04
快速回复:Name jdbc is not bound in this Context 怎么解决?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020190 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved