tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kenneth.baltz" <kenneth.ba...@inforonics.com>
Subject RE: Segment violation using Oracle JDBC in Tomcat
Date Fri, 14 Apr 2000 12:51:02 GMT
I suspect this won't be helpful, but you haven't gotten any other responses
yet, so here goes.  Are you sure your Oracle connection string is working?

We connect using the following:
Connection con = DriverManager.getConnection(
"jdbc:oracle:thin:@Host:1521:SID", "user", "password");

This is in JDK 1.2.1 and our Oracle class file is 816classes12b.zip.

Hope that helps,
K.C.

> -----Original Message-----
> From: Juan Alvarez Ferrando [mailto:jaferrando@oviedo.syseca.es]
> Sent: Friday, April 14, 2000 4:41 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: Segment violation using Oracle JDBC in Tomcat
> 
> 
> It's me again.
> The lines marked as --> at the console's output ar my own log 
> messages;
> those that begin jdbc... correspond to the creation os a 
> connection pool
> I've developed, an wich is started from a Servlet loaded on 
> startup and
> exists as a static class. As you can see, this static class 
> invoked from
> my startup servlet is able to create 4 connections to oracle; but when
> the same connection code is invoked directly from a java class invoked
> by a servlet I get the error.
> 
> If I use my connection pool instead of creating the 
> connection explicity
> when needed from the java class invoked by the servlet, I 
> don't get and
> error when getting the connection (It does not imply accessing the
> oracle driver at all, as the connection already exists), but when
> executing the statement (as marked at the example of my first mail).
> 
> Thus, I must conclude that there is some incopatibility in this
> scenario:
> 
> Servlet A(doPost) -> Java Class DBAccess(getData) -> Oracle OCI
> driver(any)
> 
> that does not occur at:
> 
> Startup Servlet X(init) -> Java Class PoolManager(static create) ->
> Oracle OCI driver(getConnection)
> 
> Thanks for your help.
> 
> Juan Alvarez Ferrando
> 
> Juan Alvarez Ferrando wrote:
> > 
> > Hi.
> > 
> > I'm trying to access Oracle 8.1.5 from Tomcat 3.1 and IBM JDK 1.1.8
> > using the oracle.jdbc.driver.OracleDriver with this URL
> > jdbc:oracle:oci8:/user:pwd@T.
> > 
> > I'm using the same Oracle and JDK, in the same machine from Weblogic
> > with no problem, and I've writen a simple test java app. 
> with the exact
> > code that also works fine, but the following code breaks at 
> the marked
> > point:
> > 
> > Class.forName("oracle.jdbc.driver.OracleDriver");
> > con =
> > 
> java.sql.DriverManager.getConnection("jdbc:oracle:oci8:/user:pwd@T");
> > stm = con.createStatement();
> > ERROR ---> res = stm.executeQuery("select * from table"); <--- ERROR
> > 
> > This is the output at Tomcat's console:
> > 
> > Guessing TOMCAT_HOME from tomcat.sh to ./..
> > Setting TOMCAT_HOME to ./..
> > cd /opt/tomcat
> > Using classpath:
> > 
> /opt/oracle/jdbc/lib/classes111.zip:.:/opt/tomcat/lib/ant.jar:
> /opt/tomcat/lib/jasper.jar:/opt/tomcat/lib/kk:/opt/tomcat/lib/
> servlet.jar:/opt/tomcat/lib/test:/opt/tomcat/lib/webserver.jar
> :/opt/tomcat/lib/xml.jar:/usr/lib/java/bin/../lib/tools.jar
> > Setting level to 11
> > Starting tomcat. Check logs/tomcat.log for error messages
> > -->aipool
> > -->jdbc:oracle:oci8:/user/pwd@T
> > -->jdbc:oracle:oci8:/user/pwd@T
> > -->jdbc:oracle:oci8:/user/pwd@T
> > -->jdbc:oracle:oci8:/user/pwd@T
> > -->Submit=Entrar
> > -->cusu=00000002
> > -->pswd=00000002
> > SIGSEGV   11*  segmentation violation
> >         stackbase=0x418d7000, stackpointer=0x418d6bb0
> > 
> > Full thread dump:
> >     "Thread-6" (TID:0x405962f0, sys_thread_t:0x418d6e0c, 
> state:R) prio=5
> > *current thread*
> >         oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java)
> >         
> oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
> > 
> > 
> oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDr
> iver.java)
> >         oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
> >         java.sql.DriverManager.getConnection(DriverManager.java:83)
> >         java.sql.DriverManager.getConnection(DriverManager.java:141)
> >         
> apInc.soporte.BDIncidencia.isUsuarioValido(BDIncidencia.java)
> >         apInc.soporte.Incidencia.doPost(Incidencia.java)
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:772)
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> > 
> > 
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWra
> pper.java:390)
> > 
> > 
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWra
> pper.java:422)
> > 
> > 
> org.apache.tomcat.servlets.InvokerServlet.service(InvokerServl
> et.java:257)
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
> > 
> > 
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWra
> pper.java:390)
> >         
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:523)
> > 
> > 
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.pro
> cessConnection(Ajp12ConnectionHandler.java:147)
> > 
> > 
> org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEnd
> point.java:334)
> >         java.lang.Thread.run(Thread.java)
> >     "Thread-5" (TID:0x4057fd50, sys_thread_t:0x418b5e0c, state:CW)
> > prio=5
> >         java.net.PlainSocketImpl.accept(PlainSocketImpl.java:379)
> >         java.net.ServerSocket.implAccept(ServerSocket.java:198)
> >         java.net.ServerSocket.accept(ServerSocket.java:181)
> > 
> > 
> org.apache.tomcat.service.SimpleTcpEndpoint.acceptSocket(Simpl
> eTcpEndpoint.java:263)
> > 
> > 
> org.apache.tomcat.service.SimpleTcpEndpoint.acceptConnections(
> SimpleTcpEndpoint.java:244)
> > 
> > 
> org.apache.tomcat.service.TcpListenerThread.run(SimpleTcpEndpo
> int.java:315)
> >         java.lang.Thread.run(Thread.java)
> >     "StandardManager" (TID:0x4057d200, sys_thread_t:0x41827e0c,
> > state:CW) prio=5
> > 
> > 
> org.apache.tomcat.session.StandardManager.threadSleep(Standard
> Manager.java:418)
> >         
> org.apache.tomcat.session.StandardManager.run(StandardManager.
> java:475)
> >         java.lang.Thread.run(Thread.java)
> >     "StandardManager" (TID:0x405805a0, sys_thread_t:0x41806e0c,
> > state:CW) prio=5
> > 
> > 
> org.apache.tomcat.session.StandardManager.threadSleep(Standard
> Manager.java:418)
> >         
> org.apache.tomcat.session.StandardManager.run(StandardManager.
> java:475)
> >         java.lang.Thread.run(Thread.java)
> >     "StandardManager" (TID:0x4058f7b0, sys_thread_t:0x417e5e0c,
> > state:CW) prio=5
> > 
> > 
> org.apache.tomcat.session.StandardManager.threadSleep(Standard
> Manager.java:418)
> >         
> org.apache.tomcat.session.StandardManager.run(StandardManager.
> java:475)
> >         java.lang.Thread.run(Thread.java)
> >     "StandardManager" (TID:0x40587aa0, sys_thread_t:0x417c4e0c,
> > state:CW) prio=5
> > 
> > 
> org.apache.tomcat.session.StandardManager.threadSleep(Standard
> Manager.java:418)
> >         
> org.apache.tomcat.session.StandardManager.run(StandardManager.
> java:475)
> >         java.lang.Thread.run(Thread.java)
> >     "StandardManager" (TID:0x40594a90, sys_thread_t:0x41303e0c,
> > state:CW) prio=5
> > 
> > 
> org.apache.tomcat.session.StandardManager.threadSleep(Standard
> Manager.java:418)
> >         
> org.apache.tomcat.session.StandardManager.run(StandardManager.
> java:475)
> >         java.lang.Thread.run(Thread.java)
> >     "Thread-4" (TID:0x4056df50, sys_thread_t:0x412e2e0c, 
> state:R) prio=5
> >         org.apache.tomcat.util.Queue.pull(Queue.java:92)
> >         
> org.apache.tomcat.logging.LogDaemon$1.run(TomcatLogger.java:189)
> >         
> org.apache.tomcat.logging.LogDaemon.run(TomcatLogger.java:204)
> >     "Finalizer thread" (TID:0x40567210, sys_thread_t:0x412abe0c,
> > state:CW) prio=1
> >     "Async Garbage Collector" (TID:0x40567258, 
> sys_thread_t:0x4128ae0c,
> > state:CW) prio=1
> >     "Idle thread" (TID:0x405672a0, sys_thread_t:0x41269e0c, state:R)
> > prio=0
> >     "Clock" (TID:0x40567088, sys_thread_t:0x41248e0c, 
> state:CW) prio=12
> >     "main" (TID:0x405670b0, sys_thread_t:0x8096c48, state:CW) prio=5
> > Monitor Cache Dump:
> >     org.apache.tomcat.util.Queue@1079435120/1079831024: 
> owner "Thread-4"
> > (0x412e2e0c, 0 entries)
> >     oracle.jdbc.oci8.OCIDBAccess@1079531864/1080367576: 
> owner "Thread-6"
> > (0x418d6e0c, 1 entry)
> >     java.lang.Class@1079550544/1080137840: owner "Thread-6" 
> (0x418d6e0c,
> > 2 entries)
> >     java.net.PlainSocketImpl@1079508800/1080474680: owner "Thread-5"
> > (0x418b5e0c, 1 entry)
> >     <unknown key> (0x0x4128ae0c): <unowned>
> >         Waiting to be notified:
> >             "Async Garbage Collector" (0x4128ae0c)
> >     <unknown key> (0x0x41827e0c): <unowned>
> >         Waiting to be notified:
> >             "StandardManager" (0x41827e0c)
> >     <unknown key> (0x0x41806e0c): <unowned>
> >         Waiting to be notified:
> >             "StandardManager" (0x41806e0c)
> >     <unknown key> (0x0x417e5e0c): <unowned>
> >         Waiting to be notified:
> >             "StandardManager" (0x417e5e0c)
> >     <unknown key> (0x0x417c4e0c): <unowned>
> >         Waiting to be notified:
> >             "StandardManager" (0x417c4e0c)
> >     <unknown key> (0x0x41303e0c): <unowned>
> >         Waiting to be notified:
> >             "StandardManager" (0x41303e0c)
> > Registered Monitor Dump:
> >     Verifier lock: <unowned>
> >     Thread queue lock: <unowned>
> >         Waiting to be notified:
> >             "main" (0x8096c48)
> >     Name and type hash table lock: <unowned>
> >     String intern lock: <unowned>
> >     JNI pinning lock: <unowned>
> >     JNI global reference lock: <unowned>
> >     BinClass lock: <unowned>
> >     Class loading lock: <unowned>
> >     Java stack lock: <unowned>
> >     Code rewrite lock: <unowned>
> >     Heap lock: <unowned>
> >     Has finalization queue lock: <unowned>
> >     Finalize me queue lock: <unowned>
> >         Waiting to be notified:
> >             "Finalizer thread" (0x412abe0c)
> >     Dynamic loading lock: <unowned>
> >     Monitor IO lock: <unowned>
> >     Child death monitor: <unowned>
> >     Event monitor: <unowned>
> >     I/O monitor: <unowned>
> >     Alarm monitor: <unowned>
> >         Waiting to be notified:
> >             "Clock" (0x41248e0c)
> >     Monitor registry: owner "Thread-6" (0x418d6e0c, 1 entry)
> > Thread Alarm Q:
> >     sys_thread_t 0x4128ae0c   [Timeout in 739 ms]
> >     sys_thread_t 0x41303e0c   [Timeout in 39467 ms]
> >     sys_thread_t 0x417c4e0c   [Timeout in 40118 ms]
> >     sys_thread_t 0x417e5e0c   [Timeout in 40319 ms]
> >     sys_thread_t 0x41806e0c   [Timeout in 40780 ms]
> >     sys_thread_t 0x41827e0c   [Timeout in 41148 ms]
> > 
> > One more thing, the tomcat user has all the needed ORACLE 
> environment
> > variables, including LD_LIBRARY_PATH.
> > 
> > Juan Alvarez Ferrando
> > 
> > 
> --------------------------------------------------------------
> ------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> --------------------------------------------------------------
> ------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 

Mime
View raw message