Re: Tomcat "JNDI Datasource How-To" documentation & driver managers

2021-08-17 Thread Andrew Tanton
Thank you - very helpful & much appreciated. On Sat, Aug 14, 2021 at 4:24 PM Mark Thomas wrote: > On 14/08/2021 01:51, Andrew Tanton wrote: > > In the Tomcat "JNDI Datasource How-To" documentation page > > < >

Re: Tomcat "JNDI Datasource How-To" documentation & driver managers

2021-08-14 Thread Mark Thomas
On 14/08/2021 01:51, Andrew Tanton wrote: In the Tomcat "JNDI Datasource How-To" documentation page , there is an unusually opinionated section, which discusses the Java service provider (driver

Re: Tomcat JNDI Datasource

2014-02-07 Thread David Newman
On 2/6/2014 10:45 PM, Filip Hanik wrote: Yes, define the connection pool in server.xml, GlobalNamingResources then in context.xml define a ContextLink That binds the shared connection pool to each context. Thank you, that worked perfectly. Although I think you meant ResourceLink. -Dave

Re: Tomcat JNDI Datasource

2014-02-06 Thread Filip Hanik
Yes, define the connection pool in server.xml, GlobalNamingResources then in context.xml define a ContextLink That binds the shared connection pool to each context. On Thursday, February 6, 2014, David Newman dnew...@unixmonkeys.com wrote: I have defined a JNDI JDBC datasource as a resource

RE: Tomcat JNDI datasource

2008-03-31 Thread Tom Henricksen
. We are stuck in the past like a Simon and Simon re-run... Tom -Original Message- From: David Smith [mailto:[EMAIL PROTECTED] Sent: Friday, March 28, 2008 10:19 AM To: Tomcat Users List Subject: Re: Tomcat JNDI datasource Just had a brainstorm while responding on another post. The docs

Re: Tomcat JNDI datasource

2008-03-28 Thread karthikn
Hi try this InitialContext ic = new InitialContext(); DataSource ODS = (javax.sql.DataSource) ic.lookup(java:comp/env/jdbc/medical); Connection conn = ODS.getConnection(); It works for me in Oracle 10G on TC with regards Karthik I have an application in Tomcat 5.0.30 that we are

Re: Tomcat JNDI datasource

2008-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom, Tom Henricksen wrote: | org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver | of class '' for connect URL 'null' Aah, yes. The old connect URL 'null' problem. This is always a problem with some nitpicky detail in your

Re: Tomcat JNDI datasource

2008-03-28 Thread David Smith
Your root cause seems to indicate it's having some trouble possibly with the url: Caused by: java.lang.NullPointerException at java.util.StringTokenizer.init(StringTokenizer.java:146) at com.ibm.db2.jcc.DB2Driver.acceptsURL(DB2Driver.java:245) at

Re: Tomcat JNDI datasource

2008-03-28 Thread Howard Watson
Hi. Did you try putting your .jar files in \WEB-INF\lib of you webapp? Tom Henricksen [EMAIL PROTECTED] 3/28/2008 8:08 AM I have an application in Tomcat 5.0.30 that we are trying to get to use JDBC through JNDI. I am trying to follow along with

Re: Tomcat JNDI datasource

2008-03-28 Thread David Smith
| Context debug=4 | docBase=C:/Java/eclipse-europa/europa-workspace/bop-med/web | path=/bop-med reloadable=true | workDir=work\Catalina\localhost\bop-med Bad boy: take out the docBase and path attributes. At best, they will be ignored. At worse, they will confuse both you /and/

Re: Tomcat JNDI datasource

2008-03-28 Thread David Smith
Bad suggestion. It should exist in one and only one place. That place is common/lib for tc 5.0, 5.5 so it's visible to both tomcat's internal code and the webapp. --David Howard Watson wrote: Hi. Did you try putting your .jar files in \WEB-INF\lib of you webapp? Tom Henricksen [EMAIL

Re: Tomcat JNDI datasource

2008-03-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, David Smith wrote: | | | Context debug=4 | | docBase=C:/Java/eclipse-europa/europa-workspace/bop-med/web | | path=/bop-med reloadable=true | | workDir=work\Catalina\localhost\bop-med | | Bad boy: take out the docBase and path

Re: Tomcat JNDI datasource

2008-03-28 Thread Howard Watson
If the app still had errors with the .jar file in the webapps own \WEB-INF\lib then something else is broken (called a test). Since his webapp docBase is outside the Tomcat directory structure there is merit with having associated .jar files in that docBase. And in instances where there are

Re: Tomcat JNDI datasource

2008-03-28 Thread David Smith
It does have merit to keep associated jars together except in those rare occasions where the jar has to be in the classloader heirarchy at a place visible to both tomcat's internal code and the webapp's. In that case it has to be in common/lib and not in any descendant classloader. To do

Re: Tomcat JNDI datasource

2008-03-28 Thread David Smith
Just had a brainstorm while responding on another post. The docs for 5.0.30 should describe defining a resource in terms of a Resource ... / element and a ResourceParams/ResourceParams element. The resource as setup below is only correct for version 5.5.x and later. --David Tom