This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Connection to the database Failure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Connection to the database Failure" Watch "Connection to the database Failure" New topic
Author

Connection to the database Failure

Menen Zwerky
Ranch Hand

Joined: Aug 06, 2010
Posts: 44
Hello When I click on a link of may web app a see the following exception:


exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /applications/Configuration/services/officelist.jsp at line 109

106:
107: // Open Connection to the database
108: try{
109: OracleStatement stmt = (OracleStatement) conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
110: OracleResultSet rs = null;
111:
112: // Build SQL


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:91)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:242)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:712)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:572)
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:366)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:317)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.lang.NullPointerException
org.apache.jsp.applications.Configuration.services.officelist_jsp._jspService(officelist_jsp.java:484)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:91)
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:242)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:712)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:572)
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:366)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:317)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)



It sounds like a problem about db connection
Any suggestions?
Thanks Menen
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

You've got a null pointer execption in your JSP. I assume that means you've put Java code in your JSP?

First step I'd take is to conform to modern standards and factor all code out of the JSP and into a servlet controller where it will be easier to debug.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Menen Zwerky
Ranch Hand

Joined: Aug 06, 2010
Posts: 44
Thanks for the advice! Unfortunately I have to reuse this old structured code i'm not allowed to change a lot. I installed the same web application in a different site node,
so that I bumped in the exception we talked above. In the other site instead it worked fine. The only setting i did where about configuration files, not src files.
Thanks Menen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection to the database Failure
 
Similar Threads
Regarding:No tag "form" defined in tag library imported with prefix "form"
what is this error
Error on View - MultiActionController + Spring:bine
error compiling view with spring mvc project
I have got this error when i try to run my spring web project.... what is this error?