You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ts...@brutele.be on 2002/03/04 17:57:22 UTC

Re: Datasources context ?


Mark,

Since then ... nothing new ?

Thomas,



--
Thomas SMETS
rue J. Wytsmanstraat 62
1050 Bruxelles
yahoo-id : smetsthomas
----- Original Message -----
From: "Mark" <ma...@bellsouth.net>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: 17 February, 2002 11:48 PM
Subject: RE: Datasources context ?


> 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:remm@apache.org]
> >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
> >  --
> >  <ma...@jakarta.apache.org>
> ><ma...@jakarta.apache.org>
> ><ma...@jakarta.apache.org>    -- To unsubscribe:
For
> >additional commands:  Troubles with the list:
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>