Actually, I (Mark) fixed my problem.  I was specifying the wrong class as a
parameter in server.xml due to utter ignorance and lack of
documentation/examples.  I originally had it set up to use OracleDataSource
as the driverClassName (which seemed logical at the time), but after
looking  at the Tomcat JDBC/JNDI How-To example for the umpteenth time, I
noticed it uses a 'jdbcDriver' class.  As a desperate attempt I poked
around in the Oracle classes12.jar and tried the OracleDriver class and
voila, it worked.  I detest stabs in the dark but sometimes you get lucky. Eg:

   <parameter>
      <name>driverClassName</name> 
      <value>oracle.jdbc.OracleDriver</value>
   </parameter>

Next hurdle...getting a pooled connection. 

Mark


>     In fact I just reading the JNDI Howto and try to set up the thing for
>the very first time for JDBC access   Someone (Mark) seems to have the same
>kind of problem with oracle ;(  
>  find a working test sample ?   

-----Original Message----- 
>From: Remy Maucherat [mailto:[EMAIL PROTECTED]] 
>Sent: Friday, February 15, 2002 6:47 PM 
>To: Tomcat Users List 
>Subject: Re: Datasources context ?  
>  > I have got this error 
>> Name java:comp is not bound in this Context 
>> 
>> When I try the following code : 
>>          try { 
>>             Context initCtx = new InitialContext(); 
>>            ""); 
>>            ""); 
>>             Connection conn = ds.getConnection(); 
>> 
>>             Statement st = conn.createStatement(); 
>>            "SELECT prenom,nom FROM 
>>"); 
>>             while (rs.next()) { 
>>                "<>""")); 
>>                "&""")); 
>>             } 
>> 
>>             conn.close(); 
>>         } catch (Exception e) { 
>>             out.print(e.getMessage()); 
>>         }   Well, the big questions are: 
>- where is that code fragment located ? 
>- are you modifying the context classloader ?   To end up with the right
>JNDI context, Catalina uses context classloader 
>associations. So if you get the error you're getting, it means that the CL 
>association is not the one it should be. There were a few bugs caused 
>because in some places, it wasn't set properly (for example, you can look at 
>bug 5330).   Remy  
>  -- 
>  <mailto:[EMAIL PROTECTED]> 
><mailto:[EMAIL PROTECTED]> 
><mailto:[EMAIL PROTECTED]>    -- To unsubscribe:    For
>additional commands:  Troubles with the list: 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to