----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------

Current Configuration:

JServ 1.1.1
Apache 1.3.6
AIX 4.3.3
Oracle 8.1.6 w/ classes12.zip

I'm trying to isolate this to see if it's a JSERV configuration problem or
not. I'm currently trying to connect to an oracle database through a
servlet. I have the listener running and tests with sqlplus scott/tiger@SID
are working correctly. I also tested this java code as a standalone app and
it connects fine. However, once I wrap it around as a servlet I get the
following getMessage: "Closed Connection". This occurs roughly 90% of the
time and the other 10% of the time, I would receive parts of the data that
I'm querying for and it die without ending the resulting HTML page that
should be outputed. Also, the Hello and IsItWorking test ervlets to work
correctly for a quick servlet test.


Here's the code sniplet of my connect string:
import java.sql.*;
import oracle.jdbc.driver.*;
import javax.servlet.*;
import javax.servlet.http.*;
...
static final String driver_class = "oracle.jdbc.driver.OracleDriver";
Connection conn;
...
try
    {
       // See if we need to open the connection to the database
        if (conn == null)
        {
          Class.forName(driver_class);
          DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver
());
          conn =
DriverManager.getConnection("jdbc:oracle:thin:@server01:1526:drs","scott",
"tiger");
        }
...


Thanks,
 Anthony



--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search Archives: 
<http://www.mail-archive.com/java-apache-users%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to