This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlet Exeption error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Exeption error" Watch "Servlet Exeption error" New topic

Servlet Exeption error

Suhaila Abdullah

Joined: Jun 23, 2008
Posts: 1
Hi..I'm running my application on Tomcat5.5l Lately I encounter the following error in the catalina log file. I just wanted to ask, generally what will cause this type of error since I am not able to detect which part of the application that giving this error. Thank you in advance.

Jun 23, 2008 1:18:18 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.sql.SQLException: Can not issue NULL query.
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.Statement.checkNullOrEmptyQuery(
at com.mysql.jdbc.Statement.executeQuery(
at bgoc.bis.siteDiary.SDWorkProgress.chkPrgTyp(
at org.apache.jsp.bis.siteOpt.siteDiary.sd_005fview_jsp._jspService(
at org.apache.jasper.runtime.HttpJspBase.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$
at Source)
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Suhaila Abdullah:


It appears that, on line 196, you're trying to perform a JDBC operation with a null SQL query.

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2796

Hi Suhaila Abdullah, welcome to Javaranch,
as posted by Ben, the problem seems to be with the null query.
I think you should get the same with your exception stack trace in your exception handling code.

Hope this helps

|Asking Good Questions|
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Servlet Exeption error
jQuery in Action, 3rd edition