• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Servlet to Servlet comms error, Oracle 10g

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

At present I am evaluating Oracle 10g app server and I am in the process of
porting our current code from Tomcat 4.1 to Oracle.

Our system uses to 2 servlets to produce a report. The first servlet sets up
headers etc and passes this onto the producer servlet that generates PDF
document(s). The first reads the result from the producer servlet through
an inputstream and sends the report to the client broswer.

The servlet opens a connection to the producer servet via the following
code :

URLConnection con = servlet.openConnection();
// Prepare for both input and output
con.setDoInput(true);
con.setDoOutput(true);
// Turn off caching
con.setUseCaches(false);
// Work around a Netscape bug
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
// Send headers
sendHeaders(con);

// Write the arguments as post data
DataOutputStream out = new DataOutputStream( con.getOutputStream());
out.writeBytes(argString);
out.flush();
out.close();
return con.getInputStream();
//end method

The second servlet(producer) gets the data and tries to send back the pdf doc.

However,before that can happen, an exception is thrown with the following stacktrace :
java.io.IOException: Server returned HTTP response code: 500 for URL: http://it07:80/servlet/BPPaymentLetterProducer
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:791)
at HttpMessage.sendPostMessage(HttpMessage.java:164)
at OasisTools.callServlet(OasisTools.java:1393)
at BPPaymentLetter.doPost(BPPaymentLetter.java:230)
at OasisHttpServlet.service(OasisHttpServlet.java:230)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
atcom.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
atcom.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
atcom.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
atcom.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
atcom.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
atcom.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:1
92)
at java.lang.Thread.run(Thread.java:534)
: LEAVE BPPaymentLetter.POST SSubedar 2004-09-20 02:39:51 10731520 ( 10375 , 925696 )
04/09/20 02:39:51 EvermindHttpSession.endRequest()

I know there probably is a better way of communicating with servlets, but this is legacy code that I just want to port for the time being.

I am assuming I need to configure something on the App Server or the HTTP server ? As mentioned before code works fine with tomcat.

Any help on this matter would much appreciated.

Thanks in advance,
Shameer
reply
    Bookmark Topic Watch Topic
  • New Topic