Hallo,
I have the same problem with a MySQL Database, configured everything
like you and also get null after the lookup.
I posted this twice on this list and saw other postings with this
problem, but nobody got an answer.

If you find a solution please post it here.

Guido

> -----Ursprungliche Nachricht-----
> Von: Jaime Garcia Bonis [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 25. Oktober 2001 11:46
> An: [EMAIL PROTECTED]
> Betreff: JNDI question
> 
> 
> Hi evryone
> 
>     I have a question about how JNDI works in Tomcat 4.0.1
>     How can i set up a JNDI naming repository in order to create a
> datasource???
> 
>     In the server.xml i have this:
> 
>          <Resource name="jdbc/FtcAppDb" auth="CONTAINER"
>                     type="javax.sql.DataSource"/>
>           <ResourceParams name="jdbc/FtcAppDb">
>             
> <parameter><name>user</name><value>scott</value></parameter>
> 
> 
> <parameter><name>password</name><value>tiger</value></parameter>
>             <parameter><name>driverClassName</name>
>               
> <value>oracle.jdbc.driver.OracleDriver</value></parameter>
> 
>             <parameter><name>driverName</name>
> 
> <value>jdbc:oracle:thin:@zagarron:1521:orcl</value></parameter>
>           </ResourceParams>
> 
>         Inside de Context tag of my application.
> 
>         In the web.xml i have this:
> 
>         <resource-ref>
>       <res-ref-name>jdbc/FtcAppDb</res-ref-name>
>       <res-type>javax.sql.DataSource</res-type>
>  <res-auth>Container</res-auth>
>     </resource-ref>
> 
> i get the datasource object doing this :DataSource ds =
> (DataSource)ctx.lookup("jdbc/FtcAppDb");
> but when i try to create the connection object i get a Null Pointer
> exception error
> 
> Could anyone help me i don't have a clue about what happen.
> 
> Thanks for the time
> 

Reply via email to