当前位置: 技术问答>浙ICP备11055608号-3
iis7站长之家
连接数据库失败
来源: 互联网 发布时间:2015-04-23
本文导语: 我用的JSP服务器是resin,要连接sybase数据库,已经下载了Jconnet,但是连接数据库总是失败。出现如下错误信息: 500 Servlet Exception java.lang.NullPointerException at _conn__jsp._jspService(/conn.jsp:29) at com.caucho.jsp.JavaPage.service(Jav...
我用的JSP服务器是resin,要连接sybase数据库,已经下载了Jconnet,但是连接数据库总是失败。出现如下错误信息:
500 Servlet Exception
java.lang.NullPointerException
at _conn__jsp._jspService(/conn.jsp:29)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:179)
at com.caucho.server.http.Invocation.service(Invocation.java:288)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
at com.caucho.server.http.ServletServer.serviceTop(ServletServer.java:937)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:213)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
请高手指点!多谢了!
500 Servlet Exception
java.lang.NullPointerException
at _conn__jsp._jspService(/conn.jsp:29)
at com.caucho.jsp.JavaPage.service(JavaPage.java:74)
at com.caucho.jsp.Page.subservice(Page.java:485)
at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:179)
at com.caucho.server.http.Invocation.service(Invocation.java:288)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:132)
at com.caucho.server.http.ServletServer.serviceTop(ServletServer.java:937)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:213)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)
请高手指点!多谢了!
|
空指针错误,说明某个对象没有实例化为空,而你又去调用它,单步调试吧
|
1.你看看Servlet.jar加入classpath了没有。
2.是否有一个值是null,在取值时候出错。
2.是否有一个值是null,在取值时候出错。
|
代码?