Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ORA-03114: not connected to ORACLE

 
Mark Jutras
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Java Stored Procedure which communicates with
WebLogic Server 6, sending an array of data to the doPost()
method. When running the procedure, I'm getting the ORA-03114: not connected to ORACLE error message. Following is the
code, any suggestions on why this is happening, please supply
anything that may cause this. Thanks in advance! I'm not sure
if I have a driver problem, I am using the defaultConnection
in the Java Stored Procedure.
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException, ServletException
{
ObjectOutputStream orderOutputStream;
ObjectInputStream orderInputStream;
orderHeader currentOrder;
System.out.println("In the doPost method.");
try {
orderInputStream = new ObjectInputStream (req.getInputStream());
Object o1 = orderInputStream.readObject();
currentOrder = (orderHeader) o1;

connect();
Object[] doneOrder = maporderHeader(currentOrder);
System.out.println("Object array length: " + doneOrder.length);
currentOrder = (orderHeader)doneOrder[0];
System.out.println("Number of LineItems: " + currentOrder.getLineItemList().size());
orderOutputStream = new ObjectOutputStream(resp.getOutputStream());
for(int i=0;i < currentOrder.getLineItemList().size();i++)
{
System.out.println("LineItem#: " + i);
lineItem tempLineItem = currentOrder.passLineItem(i);
System.out.println("ErrorStatus: "+tempLineItem.getErrorStatus());
ArrayList tempList = tempLineItem.getLabelList();
System.out.println("LineId: "+tempLineItem.getLineId());
System.out.println("labelRequired:"+tempLineItem.getLabelRequired());
orderOutputStream.writeObject(tempLineItem);
}
orderOutputStream.flush();
} catch (NullPointerException npe) {
System.out.println("NullPointerException: " + npe.getMessage());
} catch (IOException ioe) {
System.out.println("IOException: " + ioe.getMessage());
} catch (ClassNotFoundException e) {
System.out.println("ClassNotFoundException: " + e.getMessage());
} catch (Exception e) {
System.out.println("Exception: " + e.getMessage());
}

} // end doPost() method.
 
Beksy Kurian
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A call to Oracle was attempted when no connection was established. Usually this happens because a user´┐Żwritten program has not logged on. It may also happen if communication trouble causes a disconnection. Check whether the database is up and running.
Regards
Beksy
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the code inside the connect() method?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic