Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> this shouldn't be happening
I have a jsp page that runs fine......for about twenty minutes......I
am trying to run a query against an oracle database using the thin
driver.
all of the data is being passed correctly from a form.... i know this because i am able to use the query to populate the table. I also print out the query and it is correct. This whole thing works fine. I then will leave it alone for a while and come back to it to run it again and I get this error. This happens on Websphere 3.5.4 as well as Websphere 4.0 both running on Windows NT.
com.ibm.servlet.engine.webapp.WebAppErrorReport: ORA-01009: missing mandatory parameter
at com.ibm.servlet.engine.webapp.WebApp.sendError(WebApp.java:542) at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:92) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315) at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242) at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
This is my connection statement
<%
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con =
DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:FIRST",
"sys", "change_on_install");
Statement dept = con.createStatement();
%>
here is the query and what it outputs
<%String queryStr3 = "";%>
<%
if (((String)session.getAttribute("getR1")).equals("IT")) { queryStr3 = "Select * from IT ";
if (((String)session.getAttribute("getEmg")).equals("on")) { queryStr3 = queryStr3 + "where req_type = 'it_emer'"; session.setAttribute("getEmg", ("X"));
if (((String)session.getAttribute("getR1")).equals("NON_IT")) {
queryStr3 = "select * from NON_IT "; if (((String)session.getAttribute("getEmg")).equals("on")) { queryStr3 = queryStr3 + "where req_type = 'non_it_emer'"; session.setAttribute("getEmg", ("X")); } else { queryStr3 = queryStr3 + "where req_type = 'non_it_reg'"; session.setAttribute("getEmg", ("X")); }
if (((String)session.getAttribute("getR1")).equals("CONST")) {
queryStr3 = "select * from NON_IT "; if (((String)session.getAttribute("getEmg")).equals("on")) { queryStr3 = queryStr3 + "where req_type = 'construct_emer'"; session.setAttribute("getEmg", ("X")); } else { queryStr3 = queryStr3 + "where req_type = 'construct_reg'"; session.setAttribute("getEmg", ("X")); }
if (((String)session.getAttribute("getR2")).equals("SUB")) {
queryStr3 = queryStr3 + " and (req_status = 'Submitted') ";
}
if (((String)session.getAttribute("getR2")).equals("PEN")) {
queryStr3 = queryStr3 + " and (req_status = 'Pending') ";
}
if (((String)session.getAttribute("getR2")).equals("APP")) {
queryStr3 = queryStr3 + " and (req_status = 'Approved') ";
}
if (((String)session.getAttribute("getR2")).equals("R")) {
queryStr3 = queryStr3 + " and (req_status = 'Rejected') "; }
cart.setStuff((String)session.getAttribute("getLoc")) ; String
location = cart.getStuff();
if (location.trim().length() > 1) {
queryStr3 = queryStr3 + " and (facility = '" + ((String)session.getAttribute("getLoc")) + "') "; }
cart.setStuff((String)session.getAttribute("getDept")) ; String
department = cart.getStuff();
if (department.trim().length() > 1) {
queryStr3 = queryStr3 + " and (department = '" +
((String)session.getAttribute("getDept")) + "') ";
}
//fyi i used this to help me debug the sql the sql works fine
//try {
ResultSet eresults = dept.executeQuery(queryStr3);
//}
//catch (SQLException e){
// while(e!=null){
//out.println("** SQLExceptiom");
// out.println("** Massage : "+e.getMessage()); //out.println("** SQLState : "+e.getSQLState()); // out.println("** ErrorCode: "+e.getErrorCode()); //e=e.getNextException(); //out.println("");
<br> <br> <br> <%=queryStr3%>
<table border="1" width="100%" cellspacing="1" cellpadding="2"> <tr>
<td width="7%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Project#</font></b></td> <td width="7%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Date Requested</font></b></td> <td width="7%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Contact</font></b></td> <td width="7%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Phone#</font></b></td> <td width="8%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Facility</font></b></td>
<td width="8%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Dept</font></b></td>
<td width="8%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Sponsor
Aprvd</font></b></td>
<td width="8%" bgcolor="#C0C0C0" align="center"><b><font
color="#000000">VP
Aprvd</font></b></td>
<td width="8%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Status</font></b></td> <td width="8%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Approval Date</font></b></td> <td width="8%" bgcolor="#C0C0C0" align="center"><b>Amount</b></td><td width="8%" bgcolor="#C0C0C0" align="center"><b><font color="#000000">Budget</font></b></td>
<%
while (eresults.next()) {
//fyi cart is a bean i import to remove any nulls this works fine and
has been tested
//EMPLOYEE INFO
cart.setStuff(eresults.getString("PROJECT_NUM")); String pnum = cart.getStuff(); cart.setStuff(eresults.getString("REQ_DATE")); String rdate = cart.getStuff(); cart.setStuff(eresults.getString("REQUESTOR_NAME")); String rname = cart.getStuff(); cart.setStuff(eresults.getString("REQUESTOR_PHONE")); String rphone = cart.getStuff(); cart.setStuff(eresults.getString("FACILITY")); String facil = cart.getStuff(); cart.setStuff(eresults.getString("DEPT")); String depart = cart.getStuff(); cart.setStuff(eresults.getString("SPONSOR_APPROVED")); String sapprove= cart.getStuff();
cart.setStuff(eresults.getString("VP_APPROVED")); String vapprove = cart.getStuff(); cart.setStuff(eresults.getString("APPROVAL_DATE")); String adate = cart.getStuff(); cart.setStuff(eresults.getString("BUDGET_LOC")); String bloc = cart.getStuff();
%>
<tr>
<td width="7%"><%= pnum %></td> <td width="7%"><%//= rdate %></td> <td width="7%"><%= rname %></td> <td width="7%"><%= rphone %></td> <td width="8%"><%= facil %></td> <td width="8%"><%= depart %></td> <td width="8%"><%= sapprove %></td> <td width="8%"><%= vapprove %></td> <td width="8%"><%//= status %></td> <td width="8%"><%= adate %></td> <td width="8%"><%//= amount%></td> <td width="8%"><%= bloc %></td>
<% } %>
</table>
Received on Wed Oct 03 2001 - 20:26:21 CDT
![]() |
![]() |