tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Low <tra...@dawnstar.org>
Subject Re: Fwd:Re[2]: mod_jk and JDBC?
Date Tue, 05 Dec 2000 23:09:17 GMT
Just for grins, you might also try:

getConnection("jdbc:oracle:thin:scott/tiger@xxxx:1521:ora8");

instead of:

getConnection("jdbc:oracle:thin:@xxxx:1521:ora8","scott", "tiger");

T

CPC Livelink Admin wrote:
> 
> Is this the thin driver or the one that requires OCI/client install.
> 
> I have been successfully running the thin drivers against 8.1.6 for some
> time now (jdk 1.1.8)
> 
> -----Original Message-----
> From: tlow@hq.iitedge.com [mailto:tlow@hq.iitedge.com]On Behalf Of
> Travis Low
> Sent: Tuesday, December 05, 2000 03:43 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Fwd:Re[2]: mod_jk and JDBC?
> 
> It's hard to tell from that stack trace.  It's clearly barfing inside
> the oracle driver, not in tomcat.  But I think if you set the system
> property "JdbcTrace=true", then you will see more detailed
> information.  You might need to call "OracleLog.initialize()" first --
> I'm not sure if it's done automatically or not.  Sorry I can't be of
> more help.
> 
> T
> 
> Robert Dana wrote:
> >
> > ____________________Forward Header_____________________
> > Subject:    Re[2]: mod_jk and JDBC?
> > Author: Robert Dana
> > Date:       12/5/00 12:46 PM
> >
> > Travis,
> >
> > Thanks for your interest.  Here it is:
> >
> > oracle.jdbc.dbaccess.DBError.check_error(DBError.java, Compiled Code) at
> > oracle.jdbc.driver.OracleConnection.(OracleConnection.java, Compiled Code)
> at
> > oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java, Compiled Code)
> at
> > java.sql.DriverManager.getConnection(DriverManager.java, Compiled Code) at
> > java.sql.DriverManager.getConnection(DriverManager.java, Compiled Code) at
> > ReadFromCarmen.doGet(ReadFromCarmen.java, Compiled Code) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java,
> Compiled
> > Code) at
> > org.apache.tomcat.core.Handler.service(Handler.java, Compiled Code) at
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java,
> Compiled
> > Code) at
> > org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
> > Compiled Code) at
> > org.apache.tomcat.core.ContextManager.service(ContextManager.java,
> Compiled
> > Code) at
> >
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
> (Ajp
> > 12ConnectionHandler.java, Compiled
> > Code) at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
> > Compiled Code) at
> > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java,
> Compiled
> > Code) at
> > java.lang.Thread.run(Thread.java, Compiled Code)
> >
> > ____________________Reply Separator____________________
> > Subject:    Re: mod_jk and JDBC?
> > Author: Travis Low <travis@dawnstar.org>
> > Date:       12/5/00 11:23 AM
> >
> > Would you please post the stack trace for the exception?
> >
> > T
> >
> > Robert Dana wrote:
> > >
> > > I am trying to upgrade from Tomcat 3.1 and mod_jserv to Tomcat 3.2 and
> mod_jk.
> > > Everything seemed to go just fine with the installation, and I am able
> to run
> > > JSPs and servlets without any problems.  With one BIG exception: the
> upgrade
> > has
> > > left me without the capacity to establish JDBC connections.  The details
> of my
> > > environment are as follows:
> > >
> > > RedHat Linux 6.2
> > > Apache 1.3.9
> > > mod_jk built from the Jakarta-tomcat-3.2-src distribution
> > > Oracle 8.0.5
> > >
> > > To illustrate the problem, I wrote a simple servlet to test if JDBC
> works.  I
> > > also wrote this as a Java program, which runs from the command line
> without a
> > > problem.  I know, therefore, that my database is responding normally to
> JDBC
> > > calls.  As a servlet, however, the program reports that the driver is
> loaded
> > and
> > > then throws an SQLException indicating that it cannot connect to the
> database
> > > server.  When Tomcat starts up, it does report that the JDBC drivers are
> in
> > its
> > > CLASSPATH and, as I said, the driver does get loaded OK, it just can't
> > connect.
> > >
> > > By the way, just to keep things as simple as possible, Apache, Tomcat
> and
> > Oracle
> > > are all running on the same machine in this example.  The servlet also
> runs
> > fine
> > > under Tomcat 3.1 and mod_jserv.
> > >
> > > Has anyone else experienced this problem?  Can anybody suggest a
> solution?
> > >
> > > Robert Dana
> > > ORC Macro International
> > >
> > > import java.sql.*;
> > > import java.io.*;
> > > import javax.servlet.*;
> > > import javax.servlet.http.*;
> > >
> > > public class ReadFromCarmen extends HttpServlet
> > > {
> > >    public void doGet(HttpServletRequest req, HttpServletResponse res)
> > >       throws ServletException, IOException
> > >   {
> > >        res.setContentType("text/html");
> > >        PrintWriter out = res.getWriter();
> > >
> > >        // The driver to load
> > >        String driver_class = "oracle.jdbc.driver.OracleDriver";
> > >
> > >        // The query we will execute
> > >        String query = "select sysdate from dual";
> > >
> > >        try
> > >        {
> > >             // Load the JDBC driver
> > >             Class.forName(driver_class);
> > >
> > >             out.println("loaded...<BR>");         // servlet works up
to
> this
> > > point
> > >
> > >             // Connect to the database
> > >             // !! actual server name has been removed just for this
> email !!
> > >             Connection conn = DriverManager.getConnection
> > >                 ("jdbc:oracle:thin:@xxxx:1521:ora8",
> > >                  "scott", "tiger");
> > >
> > >             out.println("connected...<BR>");   // this never makes it
to
> the
> > > browser
> > >
> > >             // Create a statement
> > >             Statement stmt = conn.createStatement();
> > >
> > >             out.println("created statement...<BR>");
> > >
> > >             // Execute the query
> > >             ResultSet rset = stmt.executeQuery(query);
> > >
> > >             out.println("executed query...<BR>");
> > >
> > >             // Dump the result
> > >             while (rset.next ())
> > >
> > >             out.println(rset.getString(1));
> > >
> > >       }
> > >       catch (ClassNotFoundException e)
> > >       {
> > >             out.println("Trouble loading JDBC driver...\n" +
> e.getMessage());
> > >       }
> > >       catch (SQLException e)
> > >       {
> > >             out.println("SQL Trouble...\n " + e.getMessage());
> > >       }
> > >   }
> > > }
> > >
> > > *******************************************************************
> > > This e-mail and any attached files are confidential.  If you feel you
> have
> > received the transmission in error, please immediately notify the system
> > manager at ORC Macro, at e-mail postmaster@macroint.com or by  phone at
> > (301)572-0911.  The entire contents of this transmission were  scanned
> during
> > the sending process using McAfee Anti-Virus software.  Macro assumes no
> > responsibility or liability for undetected viruses.  All  recipients are
> > encouraged to further scan the message/files with their  product of choice
> prior
> > to use.  Any viruses detected should be reported  as noted above.  Thank
> you.
> >
> > -- Travis Low
> >    <mailto:travis@dawnstar.org>
> >    <http://dawnstar.org/travis>
> >
> >
> ****************************************************************************
> > This email message and any attached files have been swept by McAfee
> Anti-Virus
> > Software for the presence of computer viruses.
> >     Network Support Group x.911
> >
> > *******************************************************************
> > This e-mail and any attached files are confidential.  If you feel you have
> received the transmission in error, please immediately notify the system
> manager at ORC Macro, at e-mail postmaster@macroint.com or by  phone at
> (301)572-0911.  The entire contents of this transmission were  scanned
> during the sending process using McAfee Anti-Virus software.  Macro assumes
> no responsibility or liability for undetected viruses.  All  recipients are
> encouraged to further scan the message/files with their  product of choice
> prior to use.  Any viruses detected should be reported  as noted above.
> Thank you.
> 
> -- Travis Low
>    <mailto:travis@dawnstar.org>
>    <http://dawnstar.org/travis>

-- Travis Low  
   <mailto:travis@dawnstar.org>
   <http://dawnstar.org/travis>

Mime
View raw message