首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

javax.naming.NameNotFoundException: 名称jdbc在上下文中没绑定

2014-01-26 
javax.naming.NameNotFoundException: 名称jdbc在上下文中没绑定 at org.apache.naming.NamingContext.look

javax.naming.NameNotFoundException: 名称jdbc在上下文中没绑定
at org.apache.naming.NamingContext.lookup(NamingContext.java:769)
at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
at isb.db.TransactionContext.getDBConnection(TransactionContext.java:204)
at isb.db.TransactionContext.beginTran(TransactionContext.java:87)
at isb.manage.CAccountUC.queryPassPage(CAccountUC.java:40)
at isb.manage.SpmManageFilter.doFilter(SpmManageFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.ecside.filter.ECSideFilter.doFilter(ECSideFilter.java:187)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at filter.EncodingFilter.doFilter(EncodingFilter.java:23)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
at java.lang.Thread.run(Thread.java:595)
2007-10-13 10:31:28 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servletjsp的Servlet.service()发生意外(exception)
java.lang.NullPointerException
at isb.db.TransactionContext.rollBackTran(TransactionContext.java:130)
at isb.manage.CAccountUC.queryPassPage(CAccountUC.java:48)
at isb.manage.SpmManageFilter.doFilter(SpmManageFilter.java:38)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.ecside.filter.ECSideFilter.doFilter(ECSideFilter.java:187)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at filter.EncodingFilter.doFilter(EncodingFilter.java:23)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:833)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1285)
at java.lang.Thread.run(Thread.java:595)

/*====================================================*/
TransactionContext.java
是数据库连接类

------解决方法--------------------------------------------------------
没有找到数据源,估计是数据源设置有问题
------解决方法--------------------------------------------------------
比如说如果报的错误为:
javax.naming.NameNotFoundException: 名称DB1DataSource在上下文中没绑定
那么你检查一下数据源配置里面有没有叫 DB1DataSourcede ,如果没有,就会报这个错
我也是新手,不对请后面的达人指正

        

热点排行