RE: Cannot create JDBC driver of class - help!!

2005-08-01 Thread Allistair Crossley
Is Context not supposed to be within a Host element? You also have a lowercase 
"c" in http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

Allistair.

> -Original Message-
> From: Anish Tom Ashley [mailto:[EMAIL PROTECTED]
> Sent: 01 August 2005 16:30
> To: tomcat-user@jakarta.apache.org
> Subject: Cannot create JDBC driver of class - help!!
> Importance: High
> 
> 
> Hi,
>   I'm trying to create a struts based application which tries to
> access MySQL dB using mysql-connector-java-3.1.10 connector.
>   I'm having problem with my getConnection() code. The 
> following error
> is occurring.
> 
> org.apache.commons.dbcp.SQLNestedException: 
> Cannot create JDBC
> driver of class ' ' for connect URL 'null'
> at
> org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic
> DataSource.jav
> a:780)
> at
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat
> aSource.java:5
> 40)
> at
> com.tavant.app1_2.dao.MySQLLoader.executeQuery(MySQLLoader.java:29)
> at
> com.tavant.app1_2.action.HomePageAction.execute(HomePageAction
> .java:28)
> at
> org.apache.struts.action.RequestProcessor.processActionPerform
> (RequestProces
> sor.java:419)
> at
> org.apache.struts.action.RequestProcessor.process(RequestProce
> ssor.java:224)
> at
> org.apache.struts.action.ActionServlet.process(ActionServlet.j
> ava:1194)
> at
> org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
>   ..etcetc
>   
> 
>   I've pasted the server.xml, web.xml and my java program only
> including relevant parts.
> 
>    server.xml
> 
> 
> 
>reloadable="true"> 
> 
> 
>   
> factory
> org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
> maxWait
> 5000
>   
>   
> maxActive
> 4
>   
>   
> password
> f_695248
>   
>   
> url
> jdbc:mysql://localhost:3306/tavant
>   
>   
> driverClassName
> com.mysql.jdbc.Driver
>   
>   
> maxIdle
> 2
>   
>   
> username
> root
>   
> 
> 
> 
>   
> --
> --
> -
>    web.xml
> 
> 
> 
>PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd";>
>  
>  
>
> Resource reference to a factory for java.sql.Connection
> instances that may be used for talking to a particular
> database that is configured in the server.xml file.
>
>mydatasource
>javax.sql.DataSource
>Container
>  
> 
>   
> --
> --
> -
> 
> 
>    MySQLLoader.java
> 
> package com.tavant.app1_2.dao;
> import java.sql.Connection;
> import java.sql.SQLException;
> import java.sql.Statement;
> import javax.naming.Context;
> import javax.naming.InitialContext;
> import javax.sql.DataSource;
> 
> public class MySQLLoader {
>   public void executeQuery() {
>   try { 
>   InitialContext ctx = new InitialContext();
>   Context ctx2 = (Context)ctx.lookup("java:comp/env");
> 
>   DataSource ds = 
> (DataSource)ctx2.lookup("mydatasource");
>   Connection conn = ds.getConnection();
>   Statement stmt = conn.createStatement();
> stmt.executeUpdate("Insert into customer
> values('001','Anish','001')");
> stmt.close(); 
>   conn.close();  
>} catch(Exception e) { 
>   //some code
>} finally{
>   //some code
>  }
> }
>   
> --
> --
> -
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Aus

RE: Cannot create JDBC driver of class '' for connect URL 'null'

2005-02-15 Thread Phillip Qin
My url is jdbc:oracle:thin:@ora.mydomain.com:1521:SID



-Original Message-
From: g k [mailto:[EMAIL PROTECTED] 
Sent: February 15, 2005 5:15 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'


yes have defined that


  








  
factory
org.apache.catalina.users.MemoryUserDatabaseFactory
  
  
pathname
conf/tomcat-users.xml
  






factory
org.apache.commons.dbcp.BasicDataSourceFactory


driverClassName
oracle.jdbc.driver.OracleDriver


url
jdbc:oracle:thin:[EMAIL PROTECTED]:1521:mysid


username
**


password
**
 

maxActive
20


maxIdle
10


maxWait
-1




  

>From: Phillip Qin <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" 
>To: 'Tomcat Users List' 
>Subject: RE: Cannot create JDBC driver of class '' for connect URL 
>'null'
>Date: Tue, 15 Feb 2005 13:32:59 -0500
>
>Didn't you define url, password etc. in your server.xml 
>?
>
>-Original Message-
>From: g k [mailto:[EMAIL PROTECTED]
>Sent: February 15, 2005 12:49 PM
>To: tomcat-user@jakarta.apache.org
>Subject: RE: Cannot create JDBC driver of class '' for connect URL 
>'null'
>
>
>Server.xml contains :
>
>type="javax.sql.DataSource"/> No context tag is in server.xml
>
>Context.xml file contains
>
>type="javax.sql.DataSource"/> 
>
>
> >From: Phillip Qin <[EMAIL PROTECTED]>
> >Reply-To: "Tomcat Users List" 
> >To: 'Tomcat Users List' 
> >Subject: RE: Cannot create JDBC driver of class '' for connect URL 
> >'null'
> >Date: Tue, 15 Feb 2005 11:33:35 -0500
> >
> >In your context.xml or server.xml, you would define your jdbc 
> >resource. Find out that url and post it here. Jdbc driver and 
> >location are correct.
> >
> >-Original Message-
> >From: g k [mailto:[EMAIL PROTECTED]
> >Sent: February 15, 2005 11:25 AM
> >To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org
> >Subject: RE: Cannot create JDBC driver of class '' for connect URL 
> >'null'
> >
> >
> >
> >Hi
> >
> >
> >ojdbc14.jar - is in the tomcat/common/lib directory
> >
> >post jdc url? - not to clear on what this is?
> >
> >do i need to create a context.xml?
> >
> >regards
> >
> >Gurpreet
> >
> > >From: "David Short" <[EMAIL PROTECTED]>
> > >Reply-To: <[EMAIL PROTECTED]>
> > >To: "'Tomcat Users List'" 
> > >Subject: RE: Cannot create JDBC driver of class '' for connect URL 
> > >'null'
> > >Date: Tue, 15 Feb 2005 07:18:58 -0800
> > >
> > >Rename the Oracle classes12.zip file to classes12.jar and move to 
> > >the tomcat\common\lib directory.
> > >
> > >-Original Message-
> > >From: Phillip Qin [mailto:[EMAIL PROTECTED]
> > >Sent: Tuesday, February 15, 2005 6:39 AM
> > >To: 'Tomcat Users List'
> > >Subject: RE: Cannot create JDBC driver of class '' for connect URL 
> > >'null'
> > >
> > >
> > >Post your jdbc url.
> > >
> > >-Original Message-
> > >From: g k [mailto:[EMAIL PROTECTED]
> > >Sent: February 15, 2005 6:44 AM
> > >To: tomcat-user@jakarta.apache.org
> > >Subject: Cannot create JDBC driver of class '' for connect URL 
> > >'null'
> > >
> > >
> > >Hi
> > >
> > >I have added Oracle resource params to the server.xml file and 
> > >reference parameters to oracle in the web.xml
> > >
> > >When i startup tomcat - i get the following error:
> > >
> > >11:20:38,385 [ConnectDB.java] [ConnectDB] 
> > >[getConnectionPoolForOracle:101]
> > >-
> > >
> > >ERR
> > >OR - failed to get the connection:
> > >org.apache.commons.dbcp.SQLNestedException: C
> > >annot create JDBC driver of class '' for connect URL 'null', cause: 
> > >No suitable driver 11:20:38,385 [SendMessageAction.java] 
> > >[SendMessageAction] [Send:227] - DEBUG
> > >
> > >- C

RE: Cannot create JDBC driver of class '' for connect URL 'null'

2005-02-15 Thread g k
yes have defined that

 
   
   
   
   
   
   
 
   factory
   org.apache.catalina.users.MemoryUserDatabaseFactory
 
 
   pathname
   conf/tomcat-users.xml
 
   
   


   factory
   org.apache.commons.dbcp.BasicDataSourceFactory


   driverClassName
   oracle.jdbc.driver.OracleDriver


   url
   jdbc:oracle:thin:[EMAIL PROTECTED]:1521:mysid


   username
   **


   password
   **
 

   maxActive
   20


   maxIdle
   10


   maxWait
   -1


 
From: Phillip Qin <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" 
To: 'Tomcat Users List' 
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'
Date: Tue, 15 Feb 2005 13:32:59 -0500
Didn't you define url, password etc. in your server.xml
?
-Original Message-
From: g k [mailto:[EMAIL PROTECTED]
Sent: February 15, 2005 12:49 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'
Server.xml contains :

No context tag is in server.xml
Context.xml file contains



>From: Phillip Qin <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" 
>To: 'Tomcat Users List' 
>Subject: RE: Cannot create JDBC driver of class '' for connect URL
>'null'
>Date: Tue, 15 Feb 2005 11:33:35 -0500
>
>In your context.xml or server.xml, you would define your jdbc resource.
>Find
>out that url and post it here. Jdbc driver and location are correct.
>
>-Original Message-
>From: g k [mailto:[EMAIL PROTECTED]
>Sent: February 15, 2005 11:25 AM
>To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org
>Subject: RE: Cannot create JDBC driver of class '' for connect URL
>'null'
>
>
>
>Hi
>
>
>ojdbc14.jar - is in the tomcat/common/lib directory
>
>post jdc url? - not to clear on what this is?
>
>do i need to create a context.xml?
>
>regards
>
>Gurpreet
>
> >From: "David Short" <[EMAIL PROTECTED]>
> >Reply-To: <[EMAIL PROTECTED]>
> >To: "'Tomcat Users List'" 
> >Subject: RE: Cannot create JDBC driver of class '' for connect URL
> >'null'
> >Date: Tue, 15 Feb 2005 07:18:58 -0800
> >
> >Rename the Oracle classes12.zip file to classes12.jar and move to the
> >tomcat\common\lib directory.
> >
> >-Original Message-
> >From: Phillip Qin [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, February 15, 2005 6:39 AM
> >To: 'Tomcat Users List'
> >Subject: RE: Cannot create JDBC driver of class '' for connect URL
> >'null'
> >
> >
> >Post your jdbc url.
> >
> >-Original Message-
> >From: g k [mailto:[EMAIL PROTECTED]
> >Sent: February 15, 2005 6:44 AM
> >To: tomcat-user@jakarta.apache.org
> >Subject: Cannot create JDBC driver of class '' for connect URL 'null'
> >
> >
> >Hi
> >
> >I have added Oracle resource params to the server.xml file and
> >reference parameters to oracle in the web.xml
> >
> >When i startup tomcat - i get the following error:
> >
> >11:20:38,385 [ConnectDB.java] [ConnectDB]
> >[getConnectionPoolForOracle:101]
> >-
> >
> >ERR
> >OR - failed to get the connection:
> >org.apache.commons.dbcp.SQLNestedException: C
> >annot create JDBC driver of class '' for connect URL 'null', cause:
> >No suitable driver 11:20:38,385 [SendMessageAction.java]
> >[SendMessageAction] [Send:227] - DEBUG
> >
> >- C
> >onnection after:
> >null
> >java.net.MalformedURLException: no protocol:
> > at java.net.URL.(URL.java:537)
> > at java.net.URL.(URL.java:434)
> > at java.net.URL.(URL.java:383)
> > at
> >com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe
> >ssageAction.java:231)
> >
> >any thoughts?
> >
> >regards
> >
> >Gurpreet
> >
> >
> >
> >-
> >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]
!DSPAM:42123612105131331513667!

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


Re: Cannot create JDBC driver of class '' for connect URL 'null'

2005-02-15 Thread karjera

Laba diena.

Dėkojame, kad mums parašėte.
Jūsų atsiųsta žinutė išsaugota mūsų duomenų bazėje.


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



RE: Cannot create JDBC driver of class '' for connect URL 'null'

2005-02-15 Thread Phillip Qin
Didn't you define url, password etc. in your server.xml
?

-Original Message-
From: g k [mailto:[EMAIL PROTECTED] 
Sent: February 15, 2005 12:49 PM
To: tomcat-user@jakarta.apache.org
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'


Server.xml contains :


No context tag is in server.xml

Context.xml file contains





>From: Phillip Qin <[EMAIL PROTECTED]>
>Reply-To: "Tomcat Users List" 
>To: 'Tomcat Users List' 
>Subject: RE: Cannot create JDBC driver of class '' for connect URL 
>'null'
>Date: Tue, 15 Feb 2005 11:33:35 -0500
>
>In your context.xml or server.xml, you would define your jdbc resource.
>Find
>out that url and post it here. Jdbc driver and location are correct.
>
>-Original Message-
>From: g k [mailto:[EMAIL PROTECTED]
>Sent: February 15, 2005 11:25 AM
>To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org
>Subject: RE: Cannot create JDBC driver of class '' for connect URL 
>'null'
>
>
>
>Hi
>
>
>ojdbc14.jar - is in the tomcat/common/lib directory
>
>post jdc url? - not to clear on what this is?
>
>do i need to create a context.xml?
>
>regards
>
>Gurpreet
>
> >From: "David Short" <[EMAIL PROTECTED]>
> >Reply-To: <[EMAIL PROTECTED]>
> >To: "'Tomcat Users List'" 
> >Subject: RE: Cannot create JDBC driver of class '' for connect URL 
> >'null'
> >Date: Tue, 15 Feb 2005 07:18:58 -0800
> >
> >Rename the Oracle classes12.zip file to classes12.jar and move to the 
> >tomcat\common\lib directory.
> >
> >-Original Message-
> >From: Phillip Qin [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, February 15, 2005 6:39 AM
> >To: 'Tomcat Users List'
> >Subject: RE: Cannot create JDBC driver of class '' for connect URL 
> >'null'
> >
> >
> >Post your jdbc url.
> >
> >-Original Message-
> >From: g k [mailto:[EMAIL PROTECTED]
> >Sent: February 15, 2005 6:44 AM
> >To: tomcat-user@jakarta.apache.org
> >Subject: Cannot create JDBC driver of class '' for connect URL 'null'
> >
> >
> >Hi
> >
> >I have added Oracle resource params to the server.xml file and 
> >reference parameters to oracle in the web.xml
> >
> >When i startup tomcat - i get the following error:
> >
> >11:20:38,385 [ConnectDB.java] [ConnectDB] 
> >[getConnectionPoolForOracle:101]
> >-
> >
> >ERR
> >OR - failed to get the connection:
> >org.apache.commons.dbcp.SQLNestedException: C
> >annot create JDBC driver of class '' for connect URL 'null', cause: 
> >No suitable driver 11:20:38,385 [SendMessageAction.java] 
> >[SendMessageAction] [Send:227] - DEBUG
> >
> >- C
> >onnection after:
> >null
> >java.net.MalformedURLException: no protocol:
> > at java.net.URL.(URL.java:537)
> > at java.net.URL.(URL.java:434)
> > at java.net.URL.(URL.java:383)
> > at 
> >com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe
> >ssageAction.java:231)
> >
> >any thoughts?
> >
> >regards
> >
> >Gurpreet
> >
> >
> >
> >-
> >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]


!DSPAM:42123612105131331513667!


RE: Cannot create JDBC driver of class '' for connect URL 'null'

2005-02-15 Thread g k
Server.xml contains :

No context tag is in server.xml

Context.xml file contains





From: Phillip Qin <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" 
To: 'Tomcat Users List' 
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'
Date: Tue, 15 Feb 2005 11:33:35 -0500
In your context.xml or server.xml, you would define your jdbc resource. 
Find
out that url and post it here. Jdbc driver and location are correct.

-Original Message-
From: g k [mailto:[EMAIL PROTECTED]
Sent: February 15, 2005 11:25 AM
To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'

Hi
ojdbc14.jar - is in the tomcat/common/lib directory
post jdc url? - not to clear on what this is?
do i need to create a context.xml?
regards
Gurpreet
>From: "David Short" <[EMAIL PROTECTED]>
>Reply-To: <[EMAIL PROTECTED]>
>To: "'Tomcat Users List'" 
>Subject: RE: Cannot create JDBC driver of class '' for connect URL
>'null'
>Date: Tue, 15 Feb 2005 07:18:58 -0800
>
>Rename the Oracle classes12.zip file to classes12.jar and move to the
>tomcat\common\lib directory.
>
>-Original Message-
>From: Phillip Qin [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, February 15, 2005 6:39 AM
>To: 'Tomcat Users List'
>Subject: RE: Cannot create JDBC driver of class '' for connect URL
>'null'
>
>
>Post your jdbc url.
>
>-Original Message-
>From: g k [mailto:[EMAIL PROTECTED]
>Sent: February 15, 2005 6:44 AM
>To: tomcat-user@jakarta.apache.org
>Subject: Cannot create JDBC driver of class '' for connect URL 'null'
>
>
>Hi
>
>I have added Oracle resource params to the server.xml file and
>reference parameters to oracle in the web.xml
>
>When i startup tomcat - i get the following error:
>
>11:20:38,385 [ConnectDB.java] [ConnectDB]
>[getConnectionPoolForOracle:101]
>-
>
>ERR
>OR - failed to get the connection:
>org.apache.commons.dbcp.SQLNestedException: C
>annot create JDBC driver of class '' for connect URL 'null', cause: No
>suitable driver
>11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] -
>DEBUG
>
>- C
>onnection after:
>null
>java.net.MalformedURLException: no protocol:
> at java.net.URL.(URL.java:537)
> at java.net.URL.(URL.java:434)
> at java.net.URL.(URL.java:383)
> at
>com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe
>ssageAction.java:231)
>
>any thoughts?
>
>regards
>
>Gurpreet
>
>
>
>-
>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]
!DSPAM:4212229798071307422972!

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


RE: Cannot create JDBC driver of class '' for connect URL 'null'

2005-02-15 Thread Phillip Qin
In your context.xml or server.xml, you would define your jdbc resource. Find
out that url and post it here. Jdbc driver and location are correct.

-Original Message-
From: g k [mailto:[EMAIL PROTECTED] 
Sent: February 15, 2005 11:25 AM
To: [EMAIL PROTECTED]; tomcat-user@jakarta.apache.org
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'



Hi


ojdbc14.jar - is in the tomcat/common/lib directory

post jdc url? - not to clear on what this is?

do i need to create a context.xml?

regards

Gurpreet

>From: "David Short" <[EMAIL PROTECTED]>
>Reply-To: <[EMAIL PROTECTED]>
>To: "'Tomcat Users List'" 
>Subject: RE: Cannot create JDBC driver of class '' for connect URL 
>'null'
>Date: Tue, 15 Feb 2005 07:18:58 -0800
>
>Rename the Oracle classes12.zip file to classes12.jar and move to the 
>tomcat\common\lib directory.
>
>-Original Message-
>From: Phillip Qin [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, February 15, 2005 6:39 AM
>To: 'Tomcat Users List'
>Subject: RE: Cannot create JDBC driver of class '' for connect URL 
>'null'
>
>
>Post your jdbc url.
>
>-Original Message-
>From: g k [mailto:[EMAIL PROTECTED]
>Sent: February 15, 2005 6:44 AM
>To: tomcat-user@jakarta.apache.org
>Subject: Cannot create JDBC driver of class '' for connect URL 'null'
>
>
>Hi
>
>I have added Oracle resource params to the server.xml file and 
>reference parameters to oracle in the web.xml
>
>When i startup tomcat - i get the following error:
>
>11:20:38,385 [ConnectDB.java] [ConnectDB] 
>[getConnectionPoolForOracle:101]
>-
>
>ERR
>OR - failed to get the connection:
>org.apache.commons.dbcp.SQLNestedException: C
>annot create JDBC driver of class '' for connect URL 'null', cause: No 
>suitable driver
>11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - 
>DEBUG
>
>- C
>onnection after:
>null
>java.net.MalformedURLException: no protocol:
> at java.net.URL.(URL.java:537)
> at java.net.URL.(URL.java:434)
> at java.net.URL.(URL.java:383)
> at 
>com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe
>ssageAction.java:231)
>
>any thoughts?
>
>regards
>
>Gurpreet
>
>
>
>-
>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]


!DSPAM:4212229798071307422972!


RE: Cannot create JDBC driver of class '' for connect URL 'null'

2005-02-15 Thread g k
Hi
ojdbc14.jar - is in the tomcat/common/lib directory
post jdc url? - not to clear on what this is?
do i need to create a context.xml?
regards
Gurpreet
From: "David Short" <[EMAIL PROTECTED]>
Reply-To: <[EMAIL PROTECTED]>
To: "'Tomcat Users List'" 
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'
Date: Tue, 15 Feb 2005 07:18:58 -0800
Rename the Oracle classes12.zip file to classes12.jar and move to the
tomcat\common\lib directory.
-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 15, 2005 6:39 AM
To: 'Tomcat Users List'
Subject: RE: Cannot create JDBC driver of class '' for connect URL
'null'
Post your jdbc url.
-Original Message-
From: g k [mailto:[EMAIL PROTECTED]
Sent: February 15, 2005 6:44 AM
To: tomcat-user@jakarta.apache.org
Subject: Cannot create JDBC driver of class '' for connect URL 'null'
Hi
I have added Oracle resource params to the server.xml file and reference
parameters to oracle in the web.xml
When i startup tomcat - i get the following error:
11:20:38,385 [ConnectDB.java] [ConnectDB] [getConnectionPoolForOracle:101] 
-

ERR
OR - failed to get the connection:
org.apache.commons.dbcp.SQLNestedException: C
annot create JDBC driver of class '' for connect URL 'null', cause: No
suitable
driver
11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - 
DEBUG

- C
onnection after:
null
java.net.MalformedURLException: no protocol:
at java.net.URL.(URL.java:537)
at java.net.URL.(URL.java:434)
at java.net.URL.(URL.java:383)
at
com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe
ssageAction.java:231)
any thoughts?
regards
Gurpreet

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
!DSPAM:4211e08b66521973816187!

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


RE: Cannot create JDBC driver of class '' for connect URL 'null'

2005-02-15 Thread David Short
Rename the Oracle classes12.zip file to classes12.jar and move to the
tomcat\common\lib directory.

-Original Message-
From: Phillip Qin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 15, 2005 6:39 AM
To: 'Tomcat Users List'
Subject: RE: Cannot create JDBC driver of class '' for connect URL
'null'


Post your jdbc url.

-Original Message-
From: g k [mailto:[EMAIL PROTECTED]
Sent: February 15, 2005 6:44 AM
To: tomcat-user@jakarta.apache.org
Subject: Cannot create JDBC driver of class '' for connect URL 'null'


Hi

I have added Oracle resource params to the server.xml file and reference
parameters to oracle in the web.xml

When i startup tomcat - i get the following error:

11:20:38,385 [ConnectDB.java] [ConnectDB] [getConnectionPoolForOracle:101] -

ERR
OR - failed to get the connection:
org.apache.commons.dbcp.SQLNestedException: C
annot create JDBC driver of class '' for connect URL 'null', cause: No
suitable
driver
11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - DEBUG

- C
onnection after:
null
java.net.MalformedURLException: no protocol:
at java.net.URL.(URL.java:537)
at java.net.URL.(URL.java:434)
at java.net.URL.(URL.java:383)
at
com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe
ssageAction.java:231)

any thoughts?

regards

Gurpreet



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


!DSPAM:4211e08b66521973816187!



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



RE: Cannot create JDBC driver of class '' for connect URL 'null'

2005-02-15 Thread Phillip Qin
Post your jdbc url.

-Original Message-
From: g k [mailto:[EMAIL PROTECTED] 
Sent: February 15, 2005 6:44 AM
To: tomcat-user@jakarta.apache.org
Subject: Cannot create JDBC driver of class '' for connect URL 'null'


Hi

I have added Oracle resource params to the server.xml file and reference 
parameters to oracle in the web.xml

When i startup tomcat - i get the following error:

11:20:38,385 [ConnectDB.java] [ConnectDB] [getConnectionPoolForOracle:101] -

ERR
OR - failed to get the connection: 
org.apache.commons.dbcp.SQLNestedException: C
annot create JDBC driver of class '' for connect URL 'null', cause: No 
suitable
driver
11:20:38,385 [SendMessageAction.java] [SendMessageAction] [Send:227] - DEBUG

- C
onnection after:
null
java.net.MalformedURLException: no protocol:
at java.net.URL.(URL.java:537)
at java.net.URL.(URL.java:434)
at java.net.URL.(URL.java:383)
at 
com.csc.nhs.web.legacypas.struts.action.SendMessageAction.Send(SendMe
ssageAction.java:231)

any thoughts?

regards

Gurpreet



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


!DSPAM:4211e08b66521973816187!


Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-17 Thread Ed Sykes
Hi,
does anyone have any other suggestions that I should try?
should i try an earlier version of Tomcat?
thanks,
Ed Sykes
- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 1:28 PM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'


actually that may also be the jdbc connectivity ;) you are sure your 
database listener is operational?

-Original Message- 
From: Ed Sykes [mailto:[EMAIL PROTECTED]
Sent: Mon 15/11/2004 18:04
To: Tomcat Users List
Cc:
Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'


Hi Allistair,
Thank you very much for helping.
Here's my revised server.xml :

   
  type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
  username="jits" password="testing" maxActive="20" 
maxIdle="10"
  maxWait="-1"/>


it is located inside   the tag
Unfortunately, Tomcat responds with:
SEVERE:  Catalina.stop:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
etc.
and doesn't start.
Just to make things clear here is the location of the important stuff:
my JDBC files:
C:\jakarta-tomcat-5.5.4\common\lib
my server.xml:
C:\jakarta-tomcat-5.5.4\conf
my web app:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS
the web app web.xml file:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF
Thanks,
Ed Sykes

- Original Message -
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 12:25 PM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'
your docBase should be /ROOT which should in turn contain WEB-INF/web.xml
and path can be scrapped

ADC
> -Original Message-
> From: Ed Sykes [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 17:24
> To: Tomcat Users List
> Subject: Re: Cannot create JDBC driver of class '' for connect URL
> 'null'
>
>
> Hi Yoav Shapira,
>
> Thank you for your help.
>
> I've corrected my server.xml file.  the first line now looks like:
> 
> Tomcat starts up properly.
>
> The Oracle JDBC driver (classes12.jar, classes12dms.jar, and
> nls_charset12.jar)  are in:
>
> C:\jakarta-tomcat-5.5.4\common\lib
>
>
> One thing I am worried about is, during Tomcat startup, the
> log produces:
> INFO: Missing application web.xml, using defaults only
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT]
>
> do you think this is related to the problem?
> it is curious because Tomcat can find and serve up the
> Servlet which is
> defined in the web.xml file...
>
> Thanks
> -Ed Sykes
>
>
>
>
> - Original Message -
> From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 15, 2004 11:59 AM
> Subject: RE: Cannot create JDBC driver of class '' for
> connect URL 'null'
>
>
>
> Hi,
>
> > docBase="ROOT/WEB-INF/classes/JITS"
>
> I really doubt you mean these.  The context path attribute is the URL
> path used by browsers to retrieve your web pages, i.e.
> http://yourhost:yourport/path.  It's not a filesystem path.
>
> The context docBase is the root of your webapp.  It should point to a
> directory which has a WEB-INF subdirectory containing web.xml.
> Therefore, I'm guessting your docBase is just "ROOT" and your path is
> "".  Drop the Web-INF/classes part from both.
>
> >>
> >  type="javax.sql.DataSource"
> >driverClassName="oracle.jdbc.driver.OracleDriver"
> >
> >  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
> >
> >  username="jits" password="mypassword" maxActive="20"
> >maxIdle="10"
> >
> >  maxWait="-1"/>
>
> This looks reasonable.
>
> >
>
> As Allistair pointed out and the docs explain, this is no
> longer needed
> in Tomcat 5.5, and should be removed.
>
> >org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
> driver
> >of class '' for connect URL 'null'
>
> Where is your JDBC driver file?  In common/lib or WEB-INF/lib?  It
> should be the former if you'

Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Ed Sykes
Hi,
I have not changed the server.xml yet.
Here's the stacktrace (it dissappears in an instant) and tomcat fails to 
start.

Thanks,
-Ed Sykes
SEVERE: createMBeans: Throwable
java.lang.NullPointerException
   at 
org.apache.catalina.mbeans.MBeanUtils.createObjectName(MBeanUtils.java:1221)
   at 
org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:533)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:569)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:365)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:534)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:497)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:659)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:627)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecycleListener.java:277)
   at 
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLifecycleListener.java:128)
   at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2003)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 1:27 PM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'


it's looking better but this error is interesting. Are you using an API 
like validator that tries to connect out of an internal corporate network? 
have you got any more stack trace that what you provided?

-Original Message- 
From: Ed Sykes [mailto:[EMAIL PROTECTED]
Sent: Mon 15/11/2004 18:04
To: Tomcat Users List
Cc:
Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'


Hi Allistair,
Thank you very much for helping.
Here's my revised server.xml :

   
  type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
  username="jits" password="testing" maxActive="20" 
maxIdle="10"
  maxWait="-1"/>


it is located inside   the tag
Unfortunately, Tomcat responds with:
SEVERE:  Catalina.stop:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
etc.
and doesn't start.
Just to make things clear here is the location of the important stuff:
my JDBC files:
C:\jakarta-tomcat-5.5.4\common\lib
my server.xml:
C:\jakarta-tomcat-5.5.4\conf
my web app:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS
the web app web.xml file:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF
Thanks,
Ed Sykes

- Original Message -----
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 12:25 PM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'
your docBase should be /ROOT which should in turn contain WEB-INF/web.xml
and path can be scrapped

ADC
> -Original Message-
> From: Ed Sykes [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 17:24
> To: Tomcat Users List
> Subject: Re: Cannot create JDBC driver of class '' for connect URL
> 'null'
>
>
> Hi Yoav Shapira,
>
> Thank you for your help.
>
> I've corrected my server.xml file.  the first line now looks like:
> 
> Tomcat starts up properly.
>
> The Oracle JDBC driver (classes12.jar, classes12dms.jar, and
> nls_charset12.jar)  are in:
>
> C:\jakarta-tomcat-5.5.4\common\lib
>
>
> One thing I am worried about is, during Tomcat startup, the
> log produces:
> INFO: Missing application web.xml, using defaults only
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT]
>
> do you think this is related to the problem?
> it is curious because Tomcat 

Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Ed Sykes
Hi !
i'm sure everything on the database end is fine.
All i'm doing in the Java file ( located in 
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS )
is making a database connection at this time.
if I use:

Class.forName("oracle.jdbc.driver.OracleDriver");
conn = 
DriverManager.getConnection("jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2", 
"jits", "pass");
stmt = conn.createStatement();

works fine.  So, Tomcat finds the Oracle JDBC driver fine and the version of 
the JDBC driver is fine.

I think it must be something in the server.xml or web.xml  or another xml 
file where Tomcat is expecting to see the parameters for the  jdbc driver 
classname, and the connectionURL..

Thanks,
Ed Sykes

- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 1:28 PM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'


actually that may also be the jdbc connectivity ;) you are sure your 
database listener is operational?

-Original Message- 
From: Ed Sykes [mailto:[EMAIL PROTECTED]
Sent: Mon 15/11/2004 18:04
To: Tomcat Users List
Cc:
Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'


Hi Allistair,
Thank you very much for helping.
Here's my revised server.xml :

   
  type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
  username="jits" password="testing" maxActive="20" 
maxIdle="10"
  maxWait="-1"/>


it is located inside   the tag
Unfortunately, Tomcat responds with:
SEVERE:  Catalina.stop:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
etc.
and doesn't start.
Just to make things clear here is the location of the important stuff:
my JDBC files:
C:\jakarta-tomcat-5.5.4\common\lib
my server.xml:
C:\jakarta-tomcat-5.5.4\conf
my web app:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS
the web app web.xml file:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF
Thanks,
Ed Sykes

- Original Message -
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 12:25 PM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'
your docBase should be /ROOT which should in turn contain WEB-INF/web.xml
and path can be scrapped

ADC
> -Original Message-
> From: Ed Sykes [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 17:24
> To: Tomcat Users List
> Subject: Re: Cannot create JDBC driver of class '' for connect URL
> 'null'
>
>
> Hi Yoav Shapira,
>
> Thank you for your help.
>
> I've corrected my server.xml file.  the first line now looks like:
> 
> Tomcat starts up properly.
>
> The Oracle JDBC driver (classes12.jar, classes12dms.jar, and
> nls_charset12.jar)  are in:
>
> C:\jakarta-tomcat-5.5.4\common\lib
>
>
> One thing I am worried about is, during Tomcat startup, the
> log produces:
> INFO: Missing application web.xml, using defaults only
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT]
>
> do you think this is related to the problem?
> it is curious because Tomcat can find and serve up the
> Servlet which is
> defined in the web.xml file...
>
> Thanks
> -Ed Sykes
>
>
>
>
> - Original Message -
> From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 15, 2004 11:59 AM
> Subject: RE: Cannot create JDBC driver of class '' for
> connect URL 'null'
>
>
>
> Hi,
>
> > docBase="ROOT/WEB-INF/classes/JITS"
>
> I really doubt you mean these.  The context path attribute is the URL
> path used by browsers to retrieve your web pages, i.e.
> http://yourhost:yourport/path.  It's not a filesystem path.
>
> The context docBase is the root of your webapp.  It should point to a
> directory which has a WEB-INF subdirectory containing web.xml.
> Therefore, I'm guessting your docBase is just "ROOT" and your path is
> "".  Drop the Web-INF/classes part from both.
>
> >>
> >  type="javax.sql.DataSource"
> >driverClassName="oracle.jdbc.driver.OracleDriver"
> >
> >  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
> >
> >   

RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Allistair Crossley
actually that may also be the jdbc connectivity ;) you are sure your database 
listener is operational?

-Original Message- 
From: Ed Sykes [mailto:[EMAIL PROTECTED] 
Sent: Mon 15/11/2004 18:04 
To: Tomcat Users List 
Cc: 
Subject: Re: Cannot create JDBC driver of class '' for connect URL 
'null'



Hi Allistair,

Thank you very much for helping.

Here's my revised server.xml :



   





it is located inside   the tag

Unfortunately, Tomcat responds with:

SEVERE:  Catalina.stop:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)

etc.

and doesn't start.


Just to make things clear here is the location of the important stuff:

my JDBC files:
C:\jakarta-tomcat-5.5.4\common\lib

my server.xml:
C:\jakarta-tomcat-5.5.4\conf

my web app:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS

the web app web.xml file:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF


Thanks,
Ed Sykes



- Original Message -
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
    Sent: Monday, November 15, 2004 12:25 PM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 
'null'


your docBase should be /ROOT which should in turn contain 
WEB-INF/web.xml
and path can be scrapped



ADC

> -Original Message-
> From: Ed Sykes [mailto:[EMAIL PROTECTED]
        > Sent: 15 November 2004 17:24
> To: Tomcat Users List
> Subject: Re: Cannot create JDBC driver of class '' for connect URL
> 'null'
>
>
> Hi Yoav Shapira,
>
> Thank you for your help.
>
> I've corrected my server.xml file.  the first line now looks like:
> 
> Tomcat starts up properly.
>
> The Oracle JDBC driver (classes12.jar, classes12dms.jar, and
> nls_charset12.jar)  are in:
>
> C:\jakarta-tomcat-5.5.4\common\lib
>
>
> One thing I am worried about is, during Tomcat startup, the
> log produces:
> INFO: Missing application web.xml, using defaults only
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT]
>
> do you think this is related to the problem?
> it is curious because Tomcat can find and serve up the
> Servlet which is
> defined in the web.xml file...
>
> Thanks
> -Ed Sykes
>
>
>
    >
    > ----- Original Message -
> From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 15, 2004 11:59 AM
> Subject: RE: Cannot create JDBC driver of class '' for
> connect URL 'null'
>
>
>
> Hi,
>
> > docBase="ROOT/WEB-INF/classes/JITS"
>
> I really doubt you mean these.  The context path attribute is the URL
> path used by browsers to retrieve your web pages, i.e.
> http://yourhost:yourport/path.  It's not a filesystem path.
>
> The context docBase is the root of your webapp.  It should point to a
> directory which has a WEB-INF subdirectory containing web.xml.
> Therefore, I'm guessting your docBase is just "ROOT" and your path is
> "".  Drop the Web-INF/classes part from both.
>
> >>
> >  type="javax.sql.DataSource"
> >driverClassName="oracle.jdbc.driver.OracleDriver"
> >
> >  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
> >
> >  username="jits" password="mypassword" maxActive="20"
> >maxIdle="10"
> >
> >  maxWait="-1"/>
>
> This looks reasonable.
>
&

RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Allistair Crossley
it's looking better but this error is interesting. Are you using an API like 
validator that tries to connect out of an internal corporate network? have you 
got any more stack trace that what you provided?

-Original Message- 
From: Ed Sykes [mailto:[EMAIL PROTECTED] 
Sent: Mon 15/11/2004 18:04 
To: Tomcat Users List 
Cc: 
Subject: Re: Cannot create JDBC driver of class '' for connect URL 
'null'



Hi Allistair,

Thank you very much for helping.

Here's my revised server.xml :



   





it is located inside   the tag

Unfortunately, Tomcat responds with:

SEVERE:  Catalina.stop:
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)

etc.

and doesn't start.


Just to make things clear here is the location of the important stuff:

my JDBC files:
C:\jakarta-tomcat-5.5.4\common\lib

my server.xml:
C:\jakarta-tomcat-5.5.4\conf

my web app:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS

the web app web.xml file:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF


Thanks,
Ed Sykes



- Original Message -
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
    Sent: Monday, November 15, 2004 12:25 PM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 
'null'


your docBase should be /ROOT which should in turn contain 
WEB-INF/web.xml
and path can be scrapped



ADC

> -Original Message-
> From: Ed Sykes [mailto:[EMAIL PROTECTED]
    > Sent: 15 November 2004 17:24
> To: Tomcat Users List
> Subject: Re: Cannot create JDBC driver of class '' for connect URL
> 'null'
>
>
> Hi Yoav Shapira,
>
> Thank you for your help.
>
> I've corrected my server.xml file.  the first line now looks like:
> 
> Tomcat starts up properly.
>
> The Oracle JDBC driver (classes12.jar, classes12dms.jar, and
> nls_charset12.jar)  are in:
>
> C:\jakarta-tomcat-5.5.4\common\lib
>
>
> One thing I am worried about is, during Tomcat startup, the
> log produces:
> INFO: Missing application web.xml, using defaults only
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT]
>
> do you think this is related to the problem?
> it is curious because Tomcat can find and serve up the
> Servlet which is
> defined in the web.xml file...
>
> Thanks
> -Ed Sykes
>
>
>
        >
    > - Original Message -
> From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 15, 2004 11:59 AM
> Subject: RE: Cannot create JDBC driver of class '' for
> connect URL 'null'
>
>
>
> Hi,
>
> > docBase="ROOT/WEB-INF/classes/JITS"
>
> I really doubt you mean these.  The context path attribute is the URL
> path used by browsers to retrieve your web pages, i.e.
> http://yourhost:yourport/path.  It's not a filesystem path.
>
> The context docBase is the root of your webapp.  It should point to a
> directory which has a WEB-INF subdirectory containing web.xml.
> Therefore, I'm guessting your docBase is just "ROOT" and your path is
> "".  Drop the Web-INF/classes part from both.
>
> >>
> >  type="javax.sql.DataSource"
> >driverClassName="oracle.jdbc.driver.OracleDriver"
> >
> >  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
> >
> >  username="jits" password="mypassword" maxActive="20"
> >maxIdle="10"
> >
> >

Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Ed Sykes
Hi Allistair,
Thank you very much for helping.
Here's my revised server.xml :

  
 type="javax.sql.DataSource" 
driverClassName="oracle.jdbc.driver.OracleDriver"
 url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
 username="jits" password="testing" maxActive="20" maxIdle="10"
 maxWait="-1"/>

   
it is located inside   the tag
Unfortunately, Tomcat responds with:
SEVERE:  Catalina.stop:
java.net.ConnectException: Connection refused: connect
   at java.net.PlainSocketImpl.socketConnect(Native Method)
etc.
and doesn't start.
Just to make things clear here is the location of the important stuff:
my JDBC files:
C:\jakarta-tomcat-5.5.4\common\lib
my server.xml:
C:\jakarta-tomcat-5.5.4\conf
my web app:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\classes\JITS
the web app web.xml file:
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF
Thanks,
Ed Sykes

- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 12:25 PM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'

your docBase should be /ROOT which should in turn contain WEB-INF/web.xml 
and path can be scrapped


ADC
-Original Message-
From: Ed Sykes [mailto:[EMAIL PROTECTED]
Sent: 15 November 2004 17:24
To: Tomcat Users List
Subject: Re: Cannot create JDBC driver of class '' for connect URL
'null'
Hi Yoav Shapira,
Thank you for your help.
I've corrected my server.xml file.  the first line now looks like:

Tomcat starts up properly.
The Oracle JDBC driver (classes12.jar, classes12dms.jar, and
nls_charset12.jar)  are in:
C:\jakarta-tomcat-5.5.4\common\lib
One thing I am worried about is, during Tomcat startup, the
log produces:
INFO: Missing application web.xml, using defaults only
StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT]
do you think this is related to the problem?
it is curious because Tomcat can find and serve up the
Servlet which is
defined in the web.xml file...
Thanks
-Ed Sykes

- Original Message ----- 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 11:59 AM
Subject: RE: Cannot create JDBC driver of class '' for
connect URL 'null'


Hi,
>
I really doubt you mean these.  The context path attribute is the URL
path used by browsers to retrieve your web pages, i.e.
http://yourhost:yourport/path.  It's not a filesystem path.
The context docBase is the root of your webapp.  It should point to a
directory which has a WEB-INF subdirectory containing web.xml.
Therefore, I'm guessting your docBase is just "ROOT" and your path is
"".  Drop the Web-INF/classes part from both.
>   
>  type="javax.sql.DataSource"
>driverClassName="oracle.jdbc.driver.OracleDriver"
>
>  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
>
>  username="jits" password="mypassword" maxActive="20"
>maxIdle="10"
>
>  maxWait="-1"/>
This looks reasonable.
>
As Allistair pointed out and the docs explain, this is no
longer needed
in Tomcat 5.5, and should be removed.
>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver
>of class '' for connect URL 'null'
Where is your JDBC driver file?  In common/lib or WEB-INF/lib?  It
should be the former if you're using DBCP this way.  The latter would
work using the primitive DriverManager approach and fail with DBCP.
Yoav Shapira http://www.yoavshapira.com

This e-mail, including any attachments, is a confidential business
communication, and may contain information that is
confidential, proprietary
and/or privileged.  This e-mail is intended only for the
individual(s) to
whom it is addressed, and may not be saved, copied, printed,
disclosed or
used by anyone else.  If you are not the(an) intended
recipient, please
immediately delete this e-mail from your computer system and
notify the
sender.  Thank you.
-
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]



---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---

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


RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Allistair Crossley
your docBase should be /ROOT which should in turn contain WEB-INF/web.xml and 
path can be scrapped



ADC

> -Original Message-
> From: Ed Sykes [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 17:24
> To: Tomcat Users List
> Subject: Re: Cannot create JDBC driver of class '' for connect URL
> 'null'
> 
> 
> Hi Yoav Shapira,
> 
> Thank you for your help.
> 
> I've corrected my server.xml file.  the first line now looks like:
>  
> Tomcat starts up properly.
> 
> The Oracle JDBC driver (classes12.jar, classes12dms.jar, and 
> nls_charset12.jar)  are in:
> 
> C:\jakarta-tomcat-5.5.4\common\lib
> 
> 
> One thing I am worried about is, during Tomcat startup, the 
> log produces:
> INFO: Missing application web.xml, using defaults only 
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT]
> 
> do you think this is related to the problem?
> it is curious because Tomcat can find and serve up the 
> Servlet which is 
> defined in the web.xml file...
> 
> Thanks
> -Ed Sykes
> 
> 
> 
> 
> - Original Message - 
> From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 15, 2004 11:59 AM
> Subject: RE: Cannot create JDBC driver of class '' for 
> connect URL 'null'
> 
> 
> 
> Hi,
> 
> > docBase="ROOT/WEB-INF/classes/JITS"
> 
> I really doubt you mean these.  The context path attribute is the URL
> path used by browsers to retrieve your web pages, i.e.
> http://yourhost:yourport/path.  It's not a filesystem path.
> 
> The context docBase is the root of your webapp.  It should point to a
> directory which has a WEB-INF subdirectory containing web.xml.
> Therefore, I'm guessting your docBase is just "ROOT" and your path is
> "".  Drop the Web-INF/classes part from both.
> 
> >>
> >  type="javax.sql.DataSource"
> >driverClassName="oracle.jdbc.driver.OracleDriver"
> >
> >  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
> >
> >  username="jits" password="mypassword" maxActive="20"
> >maxIdle="10"
> >
> >  maxWait="-1"/>
> 
> This looks reasonable.
> 
> >
> 
> As Allistair pointed out and the docs explain, this is no 
> longer needed
> in Tomcat 5.5, and should be removed.
> 
> >org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
> driver
> >of class '' for connect URL 'null'
> 
> Where is your JDBC driver file?  In common/lib or WEB-INF/lib?  It
> should be the former if you're using DBCP this way.  The latter would
> work using the primitive DriverManager approach and fail with DBCP.
> 
> Yoav Shapira http://www.yoavshapira.com
> 
> 
> 
> This e-mail, including any attachments, is a confidential business 
> communication, and may contain information that is 
> confidential, proprietary 
> and/or privileged.  This e-mail is intended only for the 
> individual(s) to 
> whom it is addressed, and may not be saved, copied, printed, 
> disclosed or 
> used by anyone else.  If you are not the(an) intended 
> recipient, please 
> immediately delete this e-mail from your computer system and 
> notify the 
> sender.  Thank you.
> 
> 
> -
> 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]
> 
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Ed Sykes
Hi Yoav Shapira,
Thank you for your help.
I've corrected my server.xml file.  the first line now looks like:

Tomcat starts up properly.
The Oracle JDBC driver (classes12.jar, classes12dms.jar, and 
nls_charset12.jar)  are in:

C:\jakarta-tomcat-5.5.4\common\lib
One thing I am worried about is, during Tomcat startup, the log produces:
INFO: Missing application web.xml, using defaults only 
StandardEngine[Catalina].StandardHost[localhost].StandardContext[ROOT]

do you think this is related to the problem?
it is curious because Tomcat can find and serve up the Servlet which is 
defined in the web.xml file...

Thanks
-Ed Sykes

- Original Message - 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 11:59 AM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'


Hi,
docBase="ROOT/WEB-INF/classes/JITS"
I really doubt you mean these.  The context path attribute is the URL
path used by browsers to retrieve your web pages, i.e.
http://yourhost:yourport/path.  It's not a filesystem path.
The context docBase is the root of your webapp.  It should point to a
directory which has a WEB-INF subdirectory containing web.xml.
Therefore, I'm guessting your docBase is just "ROOT" and your path is
"".  Drop the Web-INF/classes part from both.
  
 type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
 url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
 username="jits" password="mypassword" maxActive="20"
maxIdle="10"
 maxWait="-1"/>
This looks reasonable.

As Allistair pointed out and the docs explain, this is no longer needed
in Tomcat 5.5, and should be removed.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver
of class '' for connect URL 'null'
Where is your JDBC driver file?  In common/lib or WEB-INF/lib?  It
should be the former if you're using DBCP this way.  The latter would
work using the primitive DriverManager approach and fail with DBCP.
Yoav Shapira http://www.yoavshapira.com

This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to 
whom it is addressed, and may not be saved, copied, printed, disclosed or 
used by anyone else.  If you are not the(an) intended recipient, please 
immediately delete this e-mail from your computer system and notify the 
sender.  Thank you.

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


RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Allistair Crossley
i've never seen a path attribute with a value of /ROOT/WEB-INF/classes ... why 
have you chosen this?

> -Original Message-
> From: Ed Sykes [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 16:58
> To: Tomcat Users List
> Subject: Re: Cannot create JDBC driver of class '' for connect URL
> 'null'
> 
> 
> Hi Allistair,
> 
> Thanks for your quick response.
> I just removed all the ResourceParam elements and it has no effect.
> 
> -Ed
> - Original Message - 
> From: "Allistair Crossley" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 15, 2004 11:51 AM
> Subject: RE: Cannot create JDBC driver of class '' for 
> connect URL 'null'
> 
> 
> Ed,
> 
> Not sure if it will _cause_ it, but you need to remove ResourceParam 
> elements, as it's all covered in Resource.
> 
> ADC
> 
> > -Original Message-
> > From: Ed Sykes [mailto:[EMAIL PROTECTED]
> > Sent: 15 November 2004 16:49
> > To: [EMAIL PROTECTED]
> > Subject: Cannot create JDBC driver of class '' for connect 
> URL 'null'
> >
> >
> > Hi,
> >
> >
> >
> > I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6
> > using Java 1.5.0
> >
> >
> >
> > I've read FAQ, and the Jakarta How-To Docs:
> >
> > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc
> > e-examples-howto.html
> >
> >
> >
> > Everything works fine if I don't use connection pooling or
> > JNDI lookups.
> >
> > i.e.,
> >
> >
> >
> > Class.forName(Connection_Info.JDBC_DRIVER);
> >
> > conn = DriverManager.getConnection(URL, USERNAME, PASSWORD);
> >
> > stmt = conn.createStatement();
> >
> >
> >
> > works fine.  So, Tomcat finds the Oracle JDBC driver fine.
> >
> >
> >
> > I'm getting the following error:
> >
> >
> >
> > Cannot create JDBC driver of class '' for connect URL 'null'
> >
> >
> >
> > Here's is the section I've added to
> > C:\jakarta-tomcat-5.5.4\conf\server.xml
> >
> >
> >
> >  > docBase="ROOT/WEB-INF/classes/JITS"
> >
> > debug="5" reloadable="true" crossContext="true">
> >
> >
> >
> > >
> >   type="javax.sql.DataSource"
> > driverClassName="oracle.jdbc.driver.OracleDriver"
> >
> >   
> url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
> >
> >   username="jits" password="mypassword"
> > maxActive="20" maxIdle="10"
> >
> >   maxWait="-1"/>
> >
> >
> >
> > 
> >
> >   
> >
> > factory
> >
> > org.apache.commons.dbcp.BasicDataSourceFactory
> >
> >   
> >
> >   
> >
> > driverClassName
> >
> > oracle.jdbc.driver.OracleDriver
> >
> >   
> >
> >   
> >
> > url
> >
> > jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2
> >
> >   
> >
> >   
> >
> > username
> >
> > jits
> >
> >   
> >
> >   
> >
> > password
> >
> > mypassword
> >
> >   
> >
> >   
> >
> > maxActive
> >
> > 20
> >
> >   
> >
> >   
> >
> > maxIdle
> >
> > 10
> >
> >   
> >
> >   
> >
> > maxWait
> >
> > -1
> >
> >   
> >
> > 
> >
> >
> >
> >
> >
> > 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Here's the contents of
> > C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml
> >
> >
> >
> >
> >
> > 
> >
> > JITS.ImageServer
> >
> > JITS.ImageServer
> >
> > 
> >
> >
> >
> >   
> >
> > JITS.ImageServer
> >
> > /servlet/JITS.ImageServer
> >
> > 
> >
> >
> >
> >  
> >
> >  Oracle Datasource example
> >
> >  jdbc/myoracle
> >
> >  javax.sql.DataSource
> >
> >  Container
&g

RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Shapira, Yoav

Hi,

>http://yourhost:yourport/path.  It's not a filesystem path.

The context docBase is the root of your webapp.  It should point to a
directory which has a WEB-INF subdirectory containing web.xml.
Therefore, I'm guessting your docBase is just "ROOT" and your path is
"".  Drop the Web-INF/classes part from both.

>   
>  type="javax.sql.DataSource"
>driverClassName="oracle.jdbc.driver.OracleDriver"
>
>  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
>
>  username="jits" password="mypassword" maxActive="20"
>maxIdle="10"
>
>  maxWait="-1"/>

This looks reasonable.

>

As Allistair pointed out and the docs explain, this is no longer needed
in Tomcat 5.5, and should be removed.

>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver
>of class '' for connect URL 'null'

Where is your JDBC driver file?  In common/lib or WEB-INF/lib?  It
should be the former if you're using DBCP this way.  The latter would
work using the primitive DriverManager approach and fail with DBCP.

Yoav Shapira http://www.yoavshapira.com



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


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



Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Ed Sykes
Hi Allistair,
I'll read through it and report back.
Thanks !!
-Ed
- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 11:53 AM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'

Also, you may want to look at configuring your webapp outside of server.xml 
using the tomcat/Catalina/localhost/ROOT.xml method

I recently discussed this here
http://www.adcworks.com/blog/index.php/archives/2004/11/14/getting-up-and-running-with-tomcat-55
Hope it helps, ADC.
-Original Message-
From: Ed Sykes [mailto:[EMAIL PROTECTED]
Sent: 15 November 2004 16:49
To: [EMAIL PROTECTED]
Subject: Cannot create JDBC driver of class '' for connect URL 'null'
Hi,

I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6
using Java 1.5.0

I've read FAQ, and the Jakarta How-To Docs:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc
e-examples-howto.html

Everything works fine if I don't use connection pooling or
JNDI lookups.
i.e.,

Class.forName(Connection_Info.JDBC_DRIVER);
conn = DriverManager.getConnection(URL, USERNAME, PASSWORD);
stmt = conn.createStatement();

works fine.  So, Tomcat finds the Oracle JDBC driver fine.

I'm getting the following error:

Cannot create JDBC driver of class '' for connect URL 'null'

Here's is the section I've added to
C:\jakarta-tomcat-5.5.4\conf\server.xml


debug="5" reloadable="true" crossContext="true">

   
  type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
  username="jits" password="mypassword"
maxActive="20" maxIdle="10"
  maxWait="-1"/>


  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
url
jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2
  
  
username
jits
  
  
password
mypassword
  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  








Here's the contents of
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml



JITS.ImageServer
JITS.ImageServer


  
JITS.ImageServer
/servlet/JITS.ImageServer


 
 Oracle Datasource example
 jdbc/myoracle
 javax.sql.DataSource
 Container




In my java file ( ImageServer.java )  :


Context initContext = new InitialContext();
System.out.println("1 got an initial context from JNDI");

Context envContext =
(Context)initContext.lookup("java:/comp/env");
System.out.println("2 got a context from JNDI");

DataSource ds =
(DataSource)envContext.lookup("jdbc/myoracle");
System.out.println("3 got a datasource from JNDI");


Connection conn = ds.getConnection();
System.out.println("4 got a connection from the pool");



OUTPUT:
1 got an initial context from JNDI
2 got a context from JNDI
3 got a datasource from JNDI
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
JDBC driver of class '' for connect URL 'null'
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(B
asicDataSource.java:780)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(Basi
cDataSource.java:554)
at JITS.ImageServer.getImage(ImageServer.java:48)


Any suggestions would be gratefully appreciated !

Sincerely,
Ed Sykes




---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---

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


Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Ed Sykes
Hi Allistair,
Thanks for your quick response.
I just removed all the ResourceParam elements and it has no effect.
-Ed
- Original Message - 
From: "Allistair Crossley" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 11:51 AM
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'

Ed,
Not sure if it will _cause_ it, but you need to remove ResourceParam 
elements, as it's all covered in Resource.

ADC
-Original Message-
From: Ed Sykes [mailto:[EMAIL PROTECTED]
Sent: 15 November 2004 16:49
To: [EMAIL PROTECTED]
Subject: Cannot create JDBC driver of class '' for connect URL 'null'
Hi,

I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6
using Java 1.5.0

I've read FAQ, and the Jakarta How-To Docs:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc
e-examples-howto.html

Everything works fine if I don't use connection pooling or
JNDI lookups.
i.e.,

Class.forName(Connection_Info.JDBC_DRIVER);
conn = DriverManager.getConnection(URL, USERNAME, PASSWORD);
stmt = conn.createStatement();

works fine.  So, Tomcat finds the Oracle JDBC driver fine.

I'm getting the following error:

Cannot create JDBC driver of class '' for connect URL 'null'

Here's is the section I've added to
C:\jakarta-tomcat-5.5.4\conf\server.xml


debug="5" reloadable="true" crossContext="true">

   
  type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
  url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
  username="jits" password="mypassword"
maxActive="20" maxIdle="10"
  maxWait="-1"/>


  
factory
org.apache.commons.dbcp.BasicDataSourceFactory
  
  
driverClassName
oracle.jdbc.driver.OracleDriver
  
  
url
jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2
  
  
username
jits
  
  
password
mypassword
  
  
maxActive
20
  
  
maxIdle
10
  
  
maxWait
-1
  








Here's the contents of
C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml



JITS.ImageServer
JITS.ImageServer


  
JITS.ImageServer
/servlet/JITS.ImageServer


 
 Oracle Datasource example
 jdbc/myoracle
 javax.sql.DataSource
 Container




In my java file ( ImageServer.java )  :


Context initContext = new InitialContext();
System.out.println("1 got an initial context from JNDI");

Context envContext =
(Context)initContext.lookup("java:/comp/env");
System.out.println("2 got a context from JNDI");

DataSource ds =
(DataSource)envContext.lookup("jdbc/myoracle");
System.out.println("3 got a datasource from JNDI");


Connection conn = ds.getConnection();
System.out.println("4 got a connection from the pool");



OUTPUT:
1 got an initial context from JNDI
2 got a context from JNDI
3 got a datasource from JNDI
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
JDBC driver of class '' for connect URL 'null'
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(B
asicDataSource.java:780)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(Basi
cDataSource.java:554)
at JITS.ImageServer.getImage(ImageServer.java:48)


Any suggestions would be gratefully appreciated !

Sincerely,
Ed Sykes




---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---

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


RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Allistair Crossley
Also, you may want to look at configuring your webapp outside of server.xml 
using the tomcat/Catalina/localhost/ROOT.xml method

I recently discussed this here 

http://www.adcworks.com/blog/index.php/archives/2004/11/14/getting-up-and-running-with-tomcat-55

Hope it helps, ADC.

> -Original Message-
> From: Ed Sykes [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 16:49
> To: [EMAIL PROTECTED]
> Subject: Cannot create JDBC driver of class '' for connect URL 'null'
> 
> 
> Hi,
> 
>  
> 
> I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6 
> using Java 1.5.0
> 
>  
> 
> I've read FAQ, and the Jakarta How-To Docs:  
> 
> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc
> e-examples-howto.html
> 
>  
> 
> Everything works fine if I don't use connection pooling or 
> JNDI lookups.
> 
> i.e., 
> 
>  
> 
> Class.forName(Connection_Info.JDBC_DRIVER);
> 
> conn = DriverManager.getConnection(URL, USERNAME, PASSWORD);
> 
> stmt = conn.createStatement();
> 
>  
> 
> works fine.  So, Tomcat finds the Oracle JDBC driver fine.
> 
>  
> 
> I'm getting the following error:
> 
>  
> 
> Cannot create JDBC driver of class '' for connect URL 'null'
> 
>  
> 
> Here's is the section I've added to 
> C:\jakarta-tomcat-5.5.4\conf\server.xml
> 
>  
> 
>  docBase="ROOT/WEB-INF/classes/JITS"
> 
> debug="5" reloadable="true" crossContext="true">
> 
>   
> 
> 
>   type="javax.sql.DataSource" 
> driverClassName="oracle.jdbc.driver.OracleDriver"
> 
>   url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
> 
>   username="jits" password="mypassword" 
> maxActive="20" maxIdle="10"
> 
>   maxWait="-1"/> 
> 
>  
> 
> 
> 
>   
> 
> factory
> 
> org.apache.commons.dbcp.BasicDataSourceFactory
> 
>   
> 
>   
> 
> driverClassName
> 
> oracle.jdbc.driver.OracleDriver
> 
>   
> 
>   
> 
> url
> 
> jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2
> 
>   
> 
>   
> 
> username
> 
> jits
> 
>   
> 
>   
> 
> password
> 
> mypassword
> 
>   
> 
>   
> 
> maxActive
> 
> 20
> 
>   
> 
>   
> 
> maxIdle
> 
> 10
> 
>   
> 
>   
> 
> maxWait
> 
> -1
> 
>   
> 
> 
> 
>  
> 
>  
> 
> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Here's the contents of 
> C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml
> 
>  
> 
>  
> 
> 
> 
> JITS.ImageServer
> 
> JITS.ImageServer
> 
> 
> 
>  
> 
>   
> 
> JITS.ImageServer
> 
> /servlet/JITS.ImageServer
> 
> 
> 
>  
> 
>  
> 
>  Oracle Datasource example
> 
>  jdbc/myoracle
> 
>  javax.sql.DataSource
> 
>  Container
> 
> 
> 
>  
> 
>  
> 
>  
> 
> In my java file ( ImageServer.java )  :
> 
>  
> 
>  
> 
> Context initContext = new InitialContext();
> 
> System.out.println("1 got an initial context from JNDI");
> 
> 
> 
> Context envContext = 
> (Context)initContext.lookup("java:/comp/env");
> 
> System.out.println("2 got a context from JNDI");
> 
> 
> 
> DataSource ds = 
> (DataSource)envContext.lookup("jdbc/myoracle");
> 
> System.out.println("3 got a datasource from JNDI");
> 
> 
> 
> 
> 
> Connection conn = ds.getConnection();   
> 
> System.out.println("4 got a connection from the pool");
> 
>
> 
>  
> 
>  
> 
> OUTPUT:
> 
> 1 got an initial context from JNDI
> 
> 2 got a context from JNDI
> 
> 3 got a datasource from JNDI
> 
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
> JDBC driver of class '' for connect URL 'null'
> 
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(B
> asicDataSource.java:780)
> 
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(Basi
> cDataSource.java:554)
> 
> at JITS.ImageServer.getImage(ImageServer.java:48)
> 
>  
> 
>  
> 
> Any suggestions would be gratefully appreciated !
> 
>  
> 
> Sincerely,
> 
> Ed Sykes
> 
>  
> 
>  
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-11-15 Thread Allistair Crossley
Ed,

Not sure if it will _cause_ it, but you need to remove ResourceParam elements, 
as it's all covered in Resource.

ADC

> -Original Message-
> From: Ed Sykes [mailto:[EMAIL PROTECTED]
> Sent: 15 November 2004 16:49
> To: [EMAIL PROTECTED]
> Subject: Cannot create JDBC driver of class '' for connect URL 'null'
> 
> 
> Hi,
> 
>  
> 
> I'm trying to setup DBCP with Tomcat 5.5.4 with Oracle 8.1.6 
> using Java 1.5.0
> 
>  
> 
> I've read FAQ, and the Jakarta How-To Docs:  
> 
> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasourc
> e-examples-howto.html
> 
>  
> 
> Everything works fine if I don't use connection pooling or 
> JNDI lookups.
> 
> i.e., 
> 
>  
> 
> Class.forName(Connection_Info.JDBC_DRIVER);
> 
> conn = DriverManager.getConnection(URL, USERNAME, PASSWORD);
> 
> stmt = conn.createStatement();
> 
>  
> 
> works fine.  So, Tomcat finds the Oracle JDBC driver fine.
> 
>  
> 
> I'm getting the following error:
> 
>  
> 
> Cannot create JDBC driver of class '' for connect URL 'null'
> 
>  
> 
> Here's is the section I've added to 
> C:\jakarta-tomcat-5.5.4\conf\server.xml
> 
>  
> 
>  docBase="ROOT/WEB-INF/classes/JITS"
> 
> debug="5" reloadable="true" crossContext="true">
> 
>   
> 
> 
>   type="javax.sql.DataSource" 
> driverClassName="oracle.jdbc.driver.OracleDriver"
> 
>   url="jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2"
> 
>   username="jits" password="mypassword" 
> maxActive="20" maxIdle="10"
> 
>   maxWait="-1"/> 
> 
>  
> 
> 
> 
>   
> 
> factory
> 
> org.apache.commons.dbcp.BasicDataSourceFactory
> 
>   
> 
>   
> 
> driverClassName
> 
> oracle.jdbc.driver.OracleDriver
> 
>   
> 
>   
> 
> url
> 
> jdbc:oracle:thin:@newton.sheridanc.on.ca:1522:DB2
> 
>   
> 
>   
> 
> username
> 
> jits
> 
>   
> 
>   
> 
> password
> 
> mypassword
> 
>   
> 
>   
> 
> maxActive
> 
> 20
> 
>   
> 
>   
> 
> maxIdle
> 
> 10
> 
>   
> 
>   
> 
> maxWait
> 
> -1
> 
>   
> 
> 
> 
>  
> 
>  
> 
> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
> Here's the contents of 
> C:\jakarta-tomcat-5.5.4\webapps\ROOT\WEB-INF\web.xml
> 
>  
> 
>  
> 
> 
> 
> JITS.ImageServer
> 
> JITS.ImageServer
> 
> 
> 
>  
> 
>   
> 
> JITS.ImageServer
> 
> /servlet/JITS.ImageServer
> 
> 
> 
>  
> 
>  
> 
>  Oracle Datasource example
> 
>  jdbc/myoracle
> 
>  javax.sql.DataSource
> 
>  Container
> 
> 
> 
>  
> 
>  
> 
>  
> 
> In my java file ( ImageServer.java )  :
> 
>  
> 
>  
> 
> Context initContext = new InitialContext();
> 
> System.out.println("1 got an initial context from JNDI");
> 
> 
> 
> Context envContext = 
> (Context)initContext.lookup("java:/comp/env");
> 
> System.out.println("2 got a context from JNDI");
> 
> 
> 
> DataSource ds = 
> (DataSource)envContext.lookup("jdbc/myoracle");
> 
> System.out.println("3 got a datasource from JNDI");
> 
> 
> 
> 
> 
> Connection conn = ds.getConnection();   
> 
> System.out.println("4 got a connection from the pool");
> 
>
> 
>  
> 
>  
> 
> OUTPUT:
> 
> 1 got an initial context from JNDI
> 
> 2 got a context from JNDI
> 
> 3 got a datasource from JNDI
> 
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
> JDBC driver of class '' for connect URL 'null'
> 
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(B
> asicDataSource.java:780)
> 
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(Basi
> cDataSource.java:554)
> 
> at JITS.ImageServer.getImage(ImageServer.java:48)
> 
>  
> 
>  
> 
> Any suggestions would be gratefully appreciated !
> 
>  
> 
> Sincerely,
> 
> Ed Sykes
> 
>  
> 
>  
> 


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



RE: Cannot create JDBC driver of class

2004-07-29 Thread Shapira, Yoav
Hi,
Only declare the Resource once: it's EITHER GlobalNamingResources or a
Resource under your Context, but not both.

Yoav Shapira
Millennium Research Informatics


>-Original Message-
>From: Bussie, Andre D [mailto:[EMAIL PROTECTED]
>Sent: Thursday, July 29, 2004 1:13 PM
>To: [EMAIL PROTECTED]
>Subject: Cannot create JDBC driver of class
>
>At a standstill with accessing a datasource through JNDI in Tomcat
>5.0.19.
>
>
>
>Snippet of server.xml
>
>...
>
>docBase="phone" path="/phone">
>
>  
>
>  
>
>
>
>url
>
>jdbc:hsqldb.hsql://localhost
>
>
>
>
>
>   driverClassName
>
>   org.hsqldb.jdbcDriver
>
>
>
>  
>
>  
>
>
>
>
>
>...
>
>
>
>...
>
>  
>
>maxWait
>
>5000
>
>  
>
>  
>
>maxActive
>
>4
>
>  
>
>  
>
>password
>
>
>
>  
>
>  
>
>url
>
>jdbc:hsqldb.hsql://localhost
>
>  
>
>  
>
>driverClassName
>
>org.hsqldb.jdbcDriver
>
>  
>
>  
>
>maxIdle
>
>2
>
>  
>
>  
>
>username
>
>sa
>
>  
>
>
>
>
>
>
>
>Here is a snippet of web.xml
>
>
>
>Database Connection for the phone web
>application
>
>  jdbc/phone
>
>  javax.sql.DataSource
>
>  Container
>
>  
>
>
>
>Snippet of context.xml
>
>
>
>docBase="phone" path="/phone">
>
> type="javax.sql.DataSource"/>
>
>
>
>
>
>
>
>Code Snippet
>
>Context ctx = new InitialContext();
>
>   Context env = (Context)ctx.lookup("java:comp/env");
>
>   DataSource ds = (DataSource) env.lookup("jdbc/phone");
>
>   Connection conn = ds.getConnection();
>
>   try{
>
>
>
>Error message received
>
>org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
>class 'org.hsqldb.jdbcDriver' for connect URL
>'jdbc:hsqldb.hsql://localhost', cause:
>
>java.sql.SQLException: No suitable driver
>
>
>
> What more can I do to get this working?
>
>
>
>


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



RE: Cannot create JDBC driver of class

2004-07-29 Thread Shapira, Yoav
Hi,
Among the steps you've done, you didn't list putting the driver JAR in
common/lib.  Try that, restart the server, and see what happens.

To answer the last question in your post: yes.


Yoav Shapira
Millennium Research Informatics


>-Original Message-
>From: Bussie, Andre D [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, July 28, 2004 4:42 PM
>To: [EMAIL PROTECTED]
>Subject: Cannot create JDBC driver of class
>
>What's triggers this error message I've been trying to connect to a
>datasource via JNDI on Tomcat 5.0.19 for the past couple of days and it
>seems like when I fix one problem I run into another. Does anyone know
>what causes this error message?
>
>
>
>org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
>class 'org.hsqldb.jdbcDriver' for connect URL 'jdbc:hsqldb.hsql:x',
>cause:
>
>java.sql.SQLException: No suitable driver
>
>
>
>Before you answer these are the steps I completed so far
>
>1.) Added DataSource via Tomcat Admin Tool
>
>2.) Modified server.xml  to include info for datasource
>
>3.) Modified web.xml file with  tag
>
>4.) Modified webapp.xml file in tomcat/conf/Catalina file with
>datasource params
>
>
>
>Can anyone help me?
>
>
>
>Has anyone had a successful connection to a datasource?
>
>
>
>Thanks is advance
>
>
>
>Andre' D. Bussie
>
>Sourcing Rotational Program
>
>MAC-MAR
>
>532 Fellowship Rd
>
>Moorestown, NJ 08057
>
>856.787.3273
>
>856.952.7325 - Cell
>
>[EMAIL PROTECTED] 
>
>


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



RE: Cannot create JDBC driver of class

2004-07-28 Thread Wilson, Allen
I not sure but when I did this for mysql and got this error. It was due
to the version of the driver that I used. The version that I had was
lower than what the java libraries was expecting. You may want to check
the driver to see what version of Java it works with.

Allen

-Original Message-
From: Bussie, Andre D [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 28, 2004 3:42 PM
To: [EMAIL PROTECTED]
Subject: Cannot create JDBC driver of class


What's triggers this error message I've been trying to connect to a
datasource via JNDI on Tomcat 5.0.19 for the past couple of days and it
seems like when I fix one problem I run into another. Does anyone know
what causes this error message?

 

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class 'org.hsqldb.jdbcDriver' for connect URL 'jdbc:hsqldb.hsql:x',
cause: 

java.sql.SQLException: No suitable driver

 

Before you answer these are the steps I completed so far

1.) Added DataSource via Tomcat Admin Tool

2.) Modified server.xml  to include info for datasource

3.) Modified web.xml file with  tag

4.) Modified webapp.xml file in tomcat/conf/Catalina file with
datasource params

 

Can anyone help me? 

 

Has anyone had a successful connection to a datasource?

 

Thanks is advance

 

Andre' D. Bussie

Sourcing Rotational Program 

MAC-MAR

532 Fellowship Rd

Moorestown, NJ 08057

856.787.3273 

856.952.7325 - Cell

[EMAIL PROTECTED]  

 


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



RE: Cannot create JDBC driver of class '' for connect URL 'null' -- RESOLVED

2004-04-05 Thread Kumar Abhay-CAK203C
Hi All,

Wanna share the solution,

If you look the error
Error Caught while creating a connection in EPP dB: = 
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, 
cause: Io exception: Connection 
refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=( 
ERROR=(CODE=12505)(EMFI=4

ORA Error Code "12505" means "TNS:listener could not resolve SID given in connect 
descriptor"

After correcting every thing is woking fine ..

Thanks 
ABhay

-Original Message-
From: Harry Mantheakis [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 05, 2004 1:56 PM
To: Tomcat Users List
Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'
Importance: High


Hello


> What is postgresql JAR?


It is the JDBC driver for the PostgreSQL database. You do not need it if you are 
connecting to an Oracle database - but, of course, you need the Oracle equivalent, 
which I am sure you already have if you have managed to make 'single' connections, as 
you say.

I cannot help you with your problem, but the key words in the error output would seem 
to be: 'Connection refused'.

Make sure that *all* your connection details are specified correctly.

HTH

Harry


> Hi,
> 
> This is my server.xml code:
> 
> 
> driverClassName 
> oracle.jdbc.driver.OracleDriver
> 
> 
> url 
> jdbc:oracle:thin:@servername.mot.com:1521:dev
> 
> 
> What is postgresql JAR?
> Do I need this ?
> I am using Oracle 8.x and T5.
> I am able to connect thru driverManager code .. Single connection
> 
> Best Regards
> Abhay Kumar
> 
> -Original Message-----
> From: Paul Mansfield [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 05, 2004 12:29 PM
> To: Tomcat Users List
> Subject: RE: Cannot create JDBC driver of class '' for connect URL 
> 'null'
> 
> 
> On Mon, 2004-04-05 at 18:35, Kumar Abhay-CAK203C wrote:
>> Hi,
>> 
>> I am getting following error while creating Connection Pool using 
>> above code:
>> 
>> Error Caught while creating a connection in EPP dB: =
>> org.apache.commons.dbcp.SQLNestedException: Cannot create 
>> PoolableConnectionFactory, cause: Io exception: Connection 
>> refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=(
>> E
>> RROR=(CODE=12505)(EMFI=4
> 
> sounds like either firewall blocking conn's, or bad username/password 
> in your config
> 
> try an manual "telnet dbserver portnum" to verify the former


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



Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-04-05 Thread Harry Mantheakis
Hello


> What is postgresql JAR?


It is the JDBC driver for the PostgreSQL database. You do not need it if you
are connecting to an Oracle database - but, of course, you need the Oracle
equivalent, which I am sure you already have if you have managed to make
'single' connections, as you say.

I cannot help you with your problem, but the key words in the error output
would seem to be: 'Connection refused'.

Make sure that *all* your connection details are specified correctly.

HTH

Harry


> Hi,
> 
> This is my server.xml code:
> 
> 
> driverClassName
> oracle.jdbc.driver.OracleDriver
> 
> 
> url
> jdbc:oracle:thin:@servername.mot.com:1521:dev
> 
> 
> What is postgresql JAR?
> Do I need this ? 
> I am using Oracle 8.x and T5.
> I am able to connect thru driverManager code .. Single connection
> 
> Best Regards
> Abhay Kumar
> 
> -Original Message-
> From: Paul Mansfield [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 05, 2004 12:29 PM
> To: Tomcat Users List
> Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'
> 
> 
> On Mon, 2004-04-05 at 18:35, Kumar Abhay-CAK203C wrote:
>> Hi,
>> 
>> I am getting following error while creating Connection Pool using
>> above code:
>> 
>> Error Caught while creating a connection in EPP dB: =
>> org.apache.commons.dbcp.SQLNestedException: Cannot create
>> PoolableConnectionFactory, cause: Io exception: Connection
>> refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=(E
>> RROR=(CODE=12505)(EMFI=4
> 
> sounds like either firewall blocking conn's, or bad username/password in your
> config
> 
> try an manual "telnet dbserver portnum" to verify the former


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



RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-04-05 Thread Kumar Abhay-CAK203C
Hi,

This is my server.xml code:

 
  driverClassName
  oracle.jdbc.driver.OracleDriver
 
 
  url
  jdbc:oracle:thin:@servername.mot.com:1521:dev
 

What is postgresql JAR?
Do I need this ? 
I am using Oracle 8.x and T5.
I am able to connect thru driverManager code .. Single connection 

Best Regards
Abhay Kumar

-Original Message-
From: Paul Mansfield [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 05, 2004 12:29 PM
To: Tomcat Users List
Subject: RE: Cannot create JDBC driver of class '' for connect URL 'null'


On Mon, 2004-04-05 at 18:35, Kumar Abhay-CAK203C wrote:
> Hi,
> 
> I am getting following error while creating Connection Pool using 
> above code:
> 
> Error Caught while creating a connection in EPP dB: = 
> org.apache.commons.dbcp.SQLNestedException: Cannot create 
> PoolableConnectionFactory, cause: Io exception: Connection 
> refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=(E
> RROR=(CODE=12505)(EMFI=4

sounds like either firewall blocking conn's, or bad username/password in your config

try an manual "telnet dbserver portnum" to verify the former




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



RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-04-05 Thread Paul Mansfield
On Mon, 2004-04-05 at 18:35, Kumar Abhay-CAK203C wrote:
> Hi,
> 
> I am getting following error while creating Connection Pool using above code:
> 
> Error Caught while creating a connection in EPP dB: = 
> org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, 
> cause: Io exception: Connection 
> refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4

sounds like either firewall blocking conn's, or bad username/password in
your config

try an manual "telnet dbserver portnum" to verify the former




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



RE: Cannot create JDBC driver of class '' for connect URL 'null'

2004-04-05 Thread Kumar Abhay-CAK203C
Hi,

I am getting following error while creating Connection Pool using above code:

Error Caught while creating a connection in EPP dB: = 
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, 
cause: Io exception: Connection 
refused(DESCRIPTION=(TMP=)(VSNNUM=135290880)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4

Please Help !!

Regards
Abhay


-Original Message-
From: Andy Grove [mailto:[EMAIL PROTECTED] 
Sent: Monday, April 05, 2004 9:22 AM
To: Tomcat Users List
Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'


I found the problem.

To get it working I needed to have the  and  in the Global 
section and then add a  in the context for my webapp. This enabled 
Tomcat to resolve the parameters.

I've posted my config files here for anyone interested:

http://www.codefutures.com/weblog/openknowledge/archives/77.html

On Mon, 2004-04-05 at 15:08, Andy Grove wrote:

> Thanks Harry but the problem is that it is not even trying to load the 
> Postgres driver - it is not getting that far. It is trying to load 
> JDBC driver class '' (empty string) and is trying to access JDBC URL 
> of 'null'. It seems that the ResourceParams section is not being used.
> 
> I do have the postgres jar deployed to common/lib.
> 
> Thanks.
> 
> On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote:
> 
> > Hello
> > 
> > 
> > > My web.xml contains:
> > 
> > 
> > That looks the same as mine (which works) so no problem there. You 
> > do not actually *need* this element in the deployment descriptor if 
> > you are using Tomcat 5, but it makes your code portable, should you 
> > ever (God forbid!) switch to another servlet container.
> > 
> > 
> > > My $TOMCAT_HOME/conf/server.xml contains the following...
> > 
> > 
> > BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used.
> > 
> > Looking at your resource definitions, this sub-element:
> > 
> > 
> > 
> >  url
> >  
> >  jdbc:postgresql://localhost/mydb
> >  
> > 
> > 
> > 
> > Maybe should read:
> > 
> > 
> > 
> >  url
> >  
> >  jdbc:postgresql://localhost:5432/mydb
> >  
> > 
> > 
> > 
> > Mine, at least, needs a port number to be specified.
> > 
> > The rest of the resource element looks okay to me. Also, your 
> > look-up code looks good too, so my only guess is that you have 
> > forgotten to put the PostgreSQL JDBC driver under the container's 
> > classpath.
> > 
> > You probably have the driver located under your application's 
> > 'WEB-INF/lib' directory.
> > 
> > Try placing the driver in the '$CATALINA_HOME/common/lib' directory, 
> > but do not have it both places! (Remove it from the 'WEB-INF/lib' 
> > directory.)
> > 
> > Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one 
> > that comes bundled with the PostgreSQL 7.4 RPM is out of date. You 
> > can download the 7.4 driver from PG's JDBC site.
> > 
> > Good luck.
> > 
> > Harry Mantheakis
> > London, UK
> > 
> > 
> > 
> > 
> > > Hi,
> > > 
> > > I am trying to convert my Tomcat web application to use JNDI to 
> > > lookup a DataSource rather than using DriverManager directly. My 
> > > application works fine using DriverManager so I know I have my 
> > > classpath set up correctly.
> > > 
> > > The problem I have seems to be a very common one yet I cannot find 
> > > a solution to it using Google. I am getting the following error 
> > > message when I attempt to look up a DataSource:
> > > 
> > > Cannot create JDBC driver of class '' for connect URL 'null'
> > > 
> > > This implies to me that Tomcat is recognizing my  
> > > declaration in my conf/server.xml but is not loading the 
> > > associated . I get this problem with Tomcat 4.1 
> > > and 5.0 on Red Hat 9 with Sun JDK 1.4.2.
> > > 
> > > My web.xml contains:
> > > 
> > > 
> > >   DB Connection
> > >   jdbc/mydb
> > >   javax.sql.DataSource
> > >   Container
> > > 
> > > 
> > > My $TOMCAT_HOME/conf/server.xml contains the following (I have 
> > > tried defining this within the context of my webapp and also in 
> > > the GlobalNamingResources section).
> > > 
> > >  > > type="javax.sql.

Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-04-05 Thread Harry Mantheakis
I'm glad you sorted yourself out Andy.

Just for the record, you *can* define the resource (and its parameters)
within the context of an application - as opposed to making it a global
resource that requires a resource link.

I have it working that way, and I suspect so do many others because this is
the way the Tomcat documents indicate things should be done. See, for
example:

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

In that document the resource element is defined as part of a context.

I'm tempted to think that you had something broken in your code, before, and
when you rehashed everything the other way it worked because you got it
right.

IOW it's another way to skin this particular cat (oops!) but not the only
way.

All the best

Harry



> I found the problem.
> 
> To get it working I needed to have the  and 
> in the Global section and then add a  in the context for
> my webapp. This enabled Tomcat to resolve the parameters.
> 
> I've posted my config files here for anyone interested:
> 
> http://www.codefutures.com/weblog/openknowledge/archives/77.html
> 
> On Mon, 2004-04-05 at 15:08, Andy Grove wrote:
> 
>> Thanks Harry but the problem is that it is not even trying to load the
>> Postgres driver - it is not getting that far. It is trying to load JDBC
>> driver class '' (empty string) and is trying to access JDBC URL of
>> 'null'. It seems that the ResourceParams section is not being used.
>> 
>> I do have the postgres jar deployed to common/lib.
>> 
>> Thanks.
>> 
>> On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote:
>> 
>>> Hello
>>> 
>>> 
 My web.xml contains:
>>> 
>>> 
>>> That looks the same as mine (which works) so no problem there. You do not
>>> actually *need* this element in the deployment descriptor if you are using
>>> Tomcat 5, but it makes your code portable, should you ever (God forbid!)
>>> switch to another servlet container.
>>> 
>>> 
 My $TOMCAT_HOME/conf/server.xml contains the following...
>>> 
>>> 
>>> BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used.
>>> 
>>> Looking at your resource definitions, this sub-element:
>>> 
>>> 
>>> 
>>>  url
>>>  
>>>  jdbc:postgresql://localhost/mydb
>>>  
>>> 
>>> 
>>> 
>>> Maybe should read:
>>> 
>>> 
>>> 
>>>  url
>>>  
>>>  jdbc:postgresql://localhost:5432/mydb
>>>  
>>> 
>>> 
>>> 
>>> Mine, at least, needs a port number to be specified.
>>> 
>>> The rest of the resource element looks okay to me. Also, your look-up code
>>> looks good too, so my only guess is that you have forgotten to put the
>>> PostgreSQL JDBC driver under the container's classpath.
>>> 
>>> You probably have the driver located under your application's 'WEB-INF/lib'
>>> directory.
>>> 
>>> Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do
>>> not have it both places! (Remove it from the 'WEB-INF/lib' directory.)
>>> 
>>> Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that
>>> comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download
>>> the 7.4 driver from PG's JDBC site.
>>> 
>>> Good luck.
>>> 
>>> Harry Mantheakis
>>> London, UK
>>> 
>>> 
>>> 
>>> 
 Hi,
 
 I am trying to convert my Tomcat web application to use JNDI to lookup a
 DataSource rather than using DriverManager directly. My application
 works fine using DriverManager so I know I have my classpath set up
 correctly. 
 
 The problem I have seems to be a very common one yet I cannot find a
 solution to it using Google. I am getting the following error message
 when I attempt to look up a DataSource:
 
 Cannot create JDBC driver of class '' for connect URL 'null'
 
 This implies to me that Tomcat is recognizing my  declaration
 in my conf/server.xml but is not loading the associated
 . I get this problem with Tomcat 4.1 and 5.0 on Red Hat
 9 with Sun JDK 1.4.2.
 
 My web.xml contains:
 
 
   DB Connection
   jdbc/mydb
   javax.sql.DataSource
   Container
 
 
 My $TOMCAT_HOME/conf/server.xml contains the following (I have tried
 defining this within the context of my webapp and also in the
 GlobalNamingResources section).
 
 >>> />
   
 
   
 factory
 org.apache.commons.dbcp.BasicDataSourceFactory
   
   
 maxActive
 100
   
   
 maxIdle
 30
   
   
 maxWait
 1
   
   
username
ebay
   
   
password

   
   
  driverClassName
  org.postgresql.Driver
   
   
 url
 jdbc:postgresql://localhost/mydb
   
 
 
 Lastly, my Java code is as follows:
 
 InitialContext initCtx = new InitialContext();
 Object obj = initCtx.lookup( "java:comp/env/jdbc/mydb" );
 DataSource ds = (DataSour

Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-04-05 Thread Andy Grove
I found the problem.

To get it working I needed to have the  and 
in the Global section and then add a  in the context for
my webapp. This enabled Tomcat to resolve the parameters.

I've posted my config files here for anyone interested:

http://www.codefutures.com/weblog/openknowledge/archives/77.html

On Mon, 2004-04-05 at 15:08, Andy Grove wrote:

> Thanks Harry but the problem is that it is not even trying to load the
> Postgres driver - it is not getting that far. It is trying to load JDBC
> driver class '' (empty string) and is trying to access JDBC URL of
> 'null'. It seems that the ResourceParams section is not being used. 
> 
> I do have the postgres jar deployed to common/lib.
> 
> Thanks.
> 
> On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote:
> 
> > Hello
> > 
> > 
> > > My web.xml contains:
> > 
> > 
> > That looks the same as mine (which works) so no problem there. You do not
> > actually *need* this element in the deployment descriptor if you are using
> > Tomcat 5, but it makes your code portable, should you ever (God forbid!)
> > switch to another servlet container.
> > 
> > 
> > > My $TOMCAT_HOME/conf/server.xml contains the following...
> > 
> > 
> > BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used.
> > 
> > Looking at your resource definitions, this sub-element:
> > 
> > 
> > 
> >  url
> >  
> >  jdbc:postgresql://localhost/mydb
> >  
> > 
> > 
> > 
> > Maybe should read:
> > 
> > 
> > 
> >  url
> >  
> >  jdbc:postgresql://localhost:5432/mydb
> >  
> > 
> > 
> > 
> > Mine, at least, needs a port number to be specified.
> > 
> > The rest of the resource element looks okay to me. Also, your look-up code
> > looks good too, so my only guess is that you have forgotten to put the
> > PostgreSQL JDBC driver under the container's classpath.
> > 
> > You probably have the driver located under your application's 'WEB-INF/lib'
> > directory.
> > 
> > Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do
> > not have it both places! (Remove it from the 'WEB-INF/lib' directory.)
> > 
> > Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that
> > comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download
> > the 7.4 driver from PG's JDBC site.
> > 
> > Good luck.
> > 
> > Harry Mantheakis
> > London, UK
> > 
> > 
> > 
> > 
> > > Hi,
> > > 
> > > I am trying to convert my Tomcat web application to use JNDI to lookup a
> > > DataSource rather than using DriverManager directly. My application
> > > works fine using DriverManager so I know I have my classpath set up
> > > correctly. 
> > > 
> > > The problem I have seems to be a very common one yet I cannot find a
> > > solution to it using Google. I am getting the following error message
> > > when I attempt to look up a DataSource:
> > > 
> > > Cannot create JDBC driver of class '' for connect URL 'null'
> > > 
> > > This implies to me that Tomcat is recognizing my  declaration
> > > in my conf/server.xml but is not loading the associated
> > > . I get this problem with Tomcat 4.1 and 5.0 on Red Hat
> > > 9 with Sun JDK 1.4.2.
> > > 
> > > My web.xml contains:
> > > 
> > > 
> > >   DB Connection
> > >   jdbc/mydb
> > >   javax.sql.DataSource
> > >   Container
> > > 
> > > 
> > > My $TOMCAT_HOME/conf/server.xml contains the following (I have tried
> > > defining this within the context of my webapp and also in the
> > > GlobalNamingResources section).
> > > 
> > >  > > />
> > >  
> > > 
> > >   
> > > factory
> > > org.apache.commons.dbcp.BasicDataSourceFactory
> > >   
> > >   
> > > maxActive
> > > 100
> > >   
> > >   
> > > maxIdle
> > > 30
> > >   
> > >   
> > > maxWait
> > > 1
> > >   
> > >   
> > >username
> > >ebay
> > >   
> > >   
> > >password
> > >
> > >   
> > >   
> > >  driverClassName
> > >  org.postgresql.Driver
> > >   
> > >   
> > > url
> > > jdbc:postgresql://localhost/mydb
> > >   
> > > 
> > > 
> > > Lastly, my Java code is as follows:
> > > 
> > > InitialContext initCtx = new InitialContext();
> > > Object obj = initCtx.lookup( "java:comp/env/jdbc/mydb" );
> > > DataSource ds = (DataSource) obj;
> > > return ds.getConnection();
> > > 
> > > Does anyone have JNDI working with Tomcat? Any help would be much
> > > appreciated!
> > > 
> > > Thanks,
> > > 
> > > Andy Grove.
> > > 
> > > 
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 


Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-04-05 Thread Andy Grove
Thanks Harry but the problem is that it is not even trying to load the
Postgres driver - it is not getting that far. It is trying to load JDBC
driver class '' (empty string) and is trying to access JDBC URL of
'null'. It seems that the ResourceParams section is not being used. 

I do have the postgres jar deployed to common/lib.

Thanks.

On Mon, 2004-04-05 at 14:52, Harry Mantheakis wrote:

> Hello
> 
> 
> > My web.xml contains:
> 
> 
> That looks the same as mine (which works) so no problem there. You do not
> actually *need* this element in the deployment descriptor if you are using
> Tomcat 5, but it makes your code portable, should you ever (God forbid!)
> switch to another servlet container.
> 
> 
> > My $TOMCAT_HOME/conf/server.xml contains the following...
> 
> 
> BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used.
> 
> Looking at your resource definitions, this sub-element:
> 
> 
> 
>  url
>  
>  jdbc:postgresql://localhost/mydb
>  
> 
> 
> 
> Maybe should read:
> 
> 
> 
>  url
>  
>  jdbc:postgresql://localhost:5432/mydb
>  
> 
> 
> 
> Mine, at least, needs a port number to be specified.
> 
> The rest of the resource element looks okay to me. Also, your look-up code
> looks good too, so my only guess is that you have forgotten to put the
> PostgreSQL JDBC driver under the container's classpath.
> 
> You probably have the driver located under your application's 'WEB-INF/lib'
> directory.
> 
> Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do
> not have it both places! (Remove it from the 'WEB-INF/lib' directory.)
> 
> Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that
> comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download
> the 7.4 driver from PG's JDBC site.
> 
> Good luck.
> 
> Harry Mantheakis
> London, UK
> 
> 
> 
> 
> > Hi,
> > 
> > I am trying to convert my Tomcat web application to use JNDI to lookup a
> > DataSource rather than using DriverManager directly. My application
> > works fine using DriverManager so I know I have my classpath set up
> > correctly. 
> > 
> > The problem I have seems to be a very common one yet I cannot find a
> > solution to it using Google. I am getting the following error message
> > when I attempt to look up a DataSource:
> > 
> > Cannot create JDBC driver of class '' for connect URL 'null'
> > 
> > This implies to me that Tomcat is recognizing my  declaration
> > in my conf/server.xml but is not loading the associated
> > . I get this problem with Tomcat 4.1 and 5.0 on Red Hat
> > 9 with Sun JDK 1.4.2.
> > 
> > My web.xml contains:
> > 
> > 
> >   DB Connection
> >   jdbc/mydb
> >   javax.sql.DataSource
> >   Container
> > 
> > 
> > My $TOMCAT_HOME/conf/server.xml contains the following (I have tried
> > defining this within the context of my webapp and also in the
> > GlobalNamingResources section).
> > 
> >  > />
> >  
> > 
> >   
> > factory
> > org.apache.commons.dbcp.BasicDataSourceFactory
> >   
> >   
> > maxActive
> > 100
> >   
> >   
> > maxIdle
> > 30
> >   
> >   
> > maxWait
> > 1
> >   
> >   
> >username
> >ebay
> >   
> >   
> >password
> >
> >   
> >   
> >  driverClassName
> >  org.postgresql.Driver
> >   
> >   
> > url
> > jdbc:postgresql://localhost/mydb
> >   
> > 
> > 
> > Lastly, my Java code is as follows:
> > 
> > InitialContext initCtx = new InitialContext();
> > Object obj = initCtx.lookup( "java:comp/env/jdbc/mydb" );
> > DataSource ds = (DataSource) obj;
> > return ds.getConnection();
> > 
> > Does anyone have JNDI working with Tomcat? Any help would be much
> > appreciated!
> > 
> > Thanks,
> > 
> > Andy Grove.
> > 
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


Re: Cannot create JDBC driver of class '' for connect URL 'null'

2004-04-05 Thread Harry Mantheakis
Hello


> My web.xml contains:


That looks the same as mine (which works) so no problem there. You do not
actually *need* this element in the deployment descriptor if you are using
Tomcat 5, but it makes your code portable, should you ever (God forbid!)
switch to another servlet container.


> My $TOMCAT_HOME/conf/server.xml contains the following...


BTW, it is $CATALINA_HOME that matters - $TOMCAT_HOME is not used.

Looking at your resource definitions, this sub-element:



 url
 
 jdbc:postgresql://localhost/mydb
 



Maybe should read:



 url
 
 jdbc:postgresql://localhost:5432/mydb
 



Mine, at least, needs a port number to be specified.

The rest of the resource element looks okay to me. Also, your look-up code
looks good too, so my only guess is that you have forgotten to put the
PostgreSQL JDBC driver under the container's classpath.

You probably have the driver located under your application's 'WEB-INF/lib'
directory.

Try placing the driver in the '$CATALINA_HOME/common/lib' directory, but do
not have it both places! (Remove it from the 'WEB-INF/lib' directory.)

Also, make sure you have a driver named 'pg74.1jdbc3.jar'. The one that
comes bundled with the PostgreSQL 7.4 RPM is out of date. You can download
the 7.4 driver from PG's JDBC site.

Good luck.

Harry Mantheakis
London, UK




> Hi,
> 
> I am trying to convert my Tomcat web application to use JNDI to lookup a
> DataSource rather than using DriverManager directly. My application
> works fine using DriverManager so I know I have my classpath set up
> correctly. 
> 
> The problem I have seems to be a very common one yet I cannot find a
> solution to it using Google. I am getting the following error message
> when I attempt to look up a DataSource:
> 
> Cannot create JDBC driver of class '' for connect URL 'null'
> 
> This implies to me that Tomcat is recognizing my  declaration
> in my conf/server.xml but is not loading the associated
> . I get this problem with Tomcat 4.1 and 5.0 on Red Hat
> 9 with Sun JDK 1.4.2.
> 
> My web.xml contains:
> 
> 
>   DB Connection
>   jdbc/mydb
>   javax.sql.DataSource
>   Container
> 
> 
> My $TOMCAT_HOME/conf/server.xml contains the following (I have tried
> defining this within the context of my webapp and also in the
> GlobalNamingResources section).
> 
>  />
>  
> 
>   
> factory
> org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
> maxActive
> 100
>   
>   
> maxIdle
> 30
>   
>   
> maxWait
> 1
>   
>   
>username
>ebay
>   
>   
>password
>
>   
>   
>  driverClassName
>  org.postgresql.Driver
>   
>   
> url
> jdbc:postgresql://localhost/mydb
>   
> 
> 
> Lastly, my Java code is as follows:
> 
> InitialContext initCtx = new InitialContext();
> Object obj = initCtx.lookup( "java:comp/env/jdbc/mydb" );
> DataSource ds = (DataSource) obj;
> return ds.getConnection();
> 
> Does anyone have JNDI working with Tomcat? Any help would be much
> appreciated!
> 
> Thanks,
> 
> Andy Grove.
> 
> 


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