Put this:
==
<resource-ref>
      <description>any description</description>
      <res-ref-name>jdbc/BooksDB</res-ref-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
  </resource-ref>
==
In web.xml of your application.

See too
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-how
to.html

Ok.

----- Original Message -----
From: "Maris Orbidans" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, February 03, 2003 15:47
Subject: DataSource.getConnection() hangs


E-mail Premium BOL
Antiv�rus, anti-spam e at� 100 MB de espa�o. Assine j�!
http://email.bol.com.br/

ok, I configured data source,  wrote those lines you can see below in
server.xml, inside Context tag.

Now Tomcat just hangs, when I call DataSource method getConnection.  I use
Tomcat 4.1.18

has anybody experienced this ?

Maris Orbidans


<ResourceParams name="jdbc/BooksDB">
<parameter>
<name>validationQuery</name>
<value/>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost/booksdb</value>
</parameter>
<parameter>
<name>password</name>
<value>hhhhhh</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>16</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>poweruser</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
</ResourceParams>


> -----Original Message-----
> From: Cristian Draghici [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 30, 2003 11:07 AM
> To: Tomcat Users List
> Subject: RE: Cannot load JDBC driver class 'null'
>
>
> yes it will
>
> shutdown tomcat and edit the server.xml file by hand.
> (add the ResourceParams entry under your context)
> add the necessary entries, start tomcat and the admin console
> should work.
>
> (at least that's what happens with my tomcat 4.1.18)
> hope this helps,
> cristi
>
> -----Original Message-----
> From: Maris Orbidans [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 30, 2003 11:03 AM
> To: Tomcat Users List
> Subject: Cannot load JDBC driver class 'null'
>
>
> hello
>
> I have run into that problem too, I defined a datasource and
> put driver and
> common/lib and defined <resource-ref> in web.xml
> of my web. app.  but if throws exception when I try to get a
> connection from
> datasource I have found.
>
> I tried to do it at home with different database with the
> same result, so I
> dont think I have mistyped something.
>
> I know this problem has been adressed before but I havent
> found any solution
> from maillist archives.
>
> BTW I have found one related thing:  If you open Tomcat admin
> tool, choose
> host -> context -> <context name> -> Data sources
> it will throw an exception:
>
> org.apache.jasper.JasperException: Exception retrieving attribute
> 'driverClassName'
>
> so...
>
> I there any known solution ?
>
>
> Maris Orbidans
> www.datapro.lv
>
> ---------------------------------------------------------------------
> 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]
>
>

---------------------------------------------------------------------
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]

Reply via email to