that means that it works just fine. and that YOU are doing something wrong,
not tomcat :)
so try this
<%
try {
java.sql.Driver driver = new oracle.jdbc.driver.OraceDriver();
String url = "jdbc:oracle:thin:@localhost:1521:ora"; //of course substitute
your own values
java.sql.Connection con = driver.getConnection(url,"scott","tiger");
java.sql.Statement stmt = con.createStatement();
java.sql.ResultSet rs = stmt.executeQuery("select 1 from dual");
while ( rs.next() ) {
System.out.println("Received database result="+rs.getObject(1));
}
rs.close();
stmt.close();
con.close();
}catch ( Exception x ) { x.printStackTrace(); }
%>
if that works, then Oracle and Tomcat works great together, post your code,
and I can tell you what is wrong
Filip
-----Original Message-----
From: Dor Orgad [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 11, 2004 6:51 PM
To: Tomcat Users List
Subject: Re: Problems finding my JDBC driver for Oracle
Sorry, i screwed up...
it does seem to be working
So what does that mean?
Filip Hanik wrote:
>can you do this inside of a JSP
>
><%
>try {
>
>this.getClass().getClassLoader().loadClass("oracle.jdbc.driver.Orac
leDriver"
>);
>}catch ( Exception x ) {
>x.printStackTrace();
>}
>%>
>
>without an exception being thrown?
>
>Filip
>
>-----Original Message-----
>From: Dor Orgad [mailto:[EMAIL PROTECTED]
>Sent: Sunday, January 11, 2004 5:28 PM
>To: Tomcat Users List
>Subject: Re: Problems finding my JDBC driver for Oracle
>
>
>It is a .jar file and I can fully unzip it, and the contents contain the
>directory
>
>oracle/jdbc/driver/OracleDriver
>
>So i don't think its that.
>
>
>Filip Hanik wrote:
>
>
>
>>make sure your jar file ends with .jar and also, make sure it is
>>
>>
>not corrupt
>
>
>>Filip
>>
>>-----Original Message-----
>>From: Dor Orgad [mailto:[EMAIL PROTECTED]
>>Sent: Sunday, January 11, 2004 5:18 PM
>>To: [EMAIL PROTECTED]
>>Subject: Problems finding my JDBC driver for Oracle
>>
>>
>>Hi,
>>Im having a great deal of trouble getting tomcat to see my OracleDriver
>>for the JDBC class. I have tried putting it the file classes.jar in
>>both my tomcat/jakarta-tomcat-4.1.29/common/lib/ directory and my
>>WEB-INF/lib directory in my docroot, and nothing seems to work. It
>>seems to pick up the MySQL drivers just fine, but when I stick in the
>>Oracle Driver is comes up with:
>>Caught in processRequest
>>java.lang.RuntimeException: java.lang.ClassNotFoundException:
>>oracle/jdbc/driver/OracleDriver.
>>
>>Can anybody help?
>>Thanks alot
>>Dor
>>
>>
>>
>>
>
>
>--
>Dor Orgad
>Support Center
>SolNet Solutions Ltd
>Ph: +64 4 462 5129
>
>
>
>testing.jsp
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
Dor Orgad
Support Center
SolNet Solutions Ltd
Ph: +64 4 462 5129
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]