On 4/15/05, Sevillano sevi llano <[EMAIL PROTECTED]> wrote:
> Hi, Iīm a newbie trying to configurate DBCP with Tomcat 5.0.28
> 
> Iīm following this documentation:
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
> 
> "...Add this in between the </Context> tag of the examples context and the
> </Host> tag closing the localhost definition..."
> but there is no </Context> in my server.xml
> 
> also Iīver read tons of forums about this question, and Iīve tested a lot of
> different configuration.
> 
> this is the error Iīve got (the usual I think):
> org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
> class '' for connect URL 'null'
> 
> any help please? Iīve been the whole week trying to fix it
> 
> thanks
> 
> these are my files:
> 
> SERVER.XML
> 
> <Server port="8005" shutdown="SHUTDOWN">
> 
>   <GlobalNamingResources>
>     <!-- Used by Manager webapp -->
>     <Resource name="UserDatabase" auth="Container"
>               type="org.apache.catalina.UserDatabase"
>       description="User database that can be updated and saved">
>     </Resource>
>     <ResourceParams name="UserDatabase">
>       <parameter>
>         <name>factory</name>
>         <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
>       </parameter>
>       <parameter>
>         <name>pathname</name>
>         <value>conf/tomcat-users.xml</value>
>       </parameter>
>     </ResourceParams>
> 
>         <Resource name="jdbc/myoracle" auth="Container"
> type="javax.sql.DataSource"/>
>         <ResourceParams name="jdbc/myoracle">
> 
> <parameter><name>factory</name><value>org.apache.commons.dbcp.BasicDataSourceFactory</value></parameter>
>            <parameter><name>username</name><value>***</value></parameter>
>            <parameter><name>password</name><value>***</value></parameter>
> 
> <parameter><name>driverClassName</name><value>oracle.jdbc.driver.OracleDriver</value></parameter>
> 
> <parameter><name>url</name><value>jdbc:oracle:thin:@****:1521:bddesa</value></parameter>
>            
> <parameter><name>removeAbandoned</name><value>false</value></parameter>
> 
> <parameter><name>removeAbandonedTimeout</name><value>300</value></parameter>
>            <parameter><name>logAbandoned</name><value>true</value></parameter>
>            <parameter><name>maxActive</name><value>10</value></parameter>
>         </ResourceParams>
> 
>   </GlobalNamingResources>
> 
>   <Service name="Catalina">
>     <Connector port="8080" />
> 
>     <!-- This is here for compatibility only, not required -->
>     <Connector port="8009" protocol="AJP/1.3" />
> 
>     <Engine name="Catalina" defaultHost="localhost">
>       <Logger className="org.apache.catalina.logger.FileLogger" />
> 
>       <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
>              resourceName="UserDatabase" />
> 
>       <Host name="localhost" appBase="webapps" />
>     </Engine>
>   </Service>
> </Server>
> 
> WEB.XML
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <web-app xmlns="http://java.sun.com/xml/ns/j2ee";
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
>     version="2.4">
> 
>   <display-name>Welcome to Tomcat</display-name>
>   <description>
>      Welcome to Tomcat
>   </description>
> 
>         <resource-ref>
>                 <res-ref-name>jdbc/myoracle</res-ref-name>
>                 <res-type>javax.sql.DataSource</res-type>
>                 <res-auth>Container</res-auth>
>         </resource-ref>
> 
> </web-app>
> 
> TEST.JSP
> 
> ...
> Context initContext = new InitialContext();
> Context envContext  = (Context)initContext.lookup("java:/comp/env");
> DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle");
> conn = ds.getConnection();
> ...
> 
> _________________________________________________________________
> Descarga gratis la Barra de Herramientas de MSN
> http://www.msn.es/usuario/busqueda/barra?XAPID=2031&DI=1055&SU=http%3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
You have the Oracle JDBC driver in place. I think best place is
common\lib. You have rename the zip file to jar.

-- 
Anto Paul

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to