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

2006-01-31 Thread Lothar Krenzien
Hi,

after switching from Tomcat 5.5.9 to 5.5.15  I get the following error :

2006-01-31 16:43:38,130 [INFO ] QueryLogger.*** error.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at 
org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:298)
at 
org.objectstyle.cayenne.access.DataDomainQueryAction.performQuery(DataDomainQueryAction.java:107)
at 
org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:643)
at 
org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1100)
at 
org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:207)
at 
org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1068)
at 
org.objectstyle.cayenne.access.DataContextSelectAction.performQuery(DataContextSelectAction.java:173)
at 
org.objectstyle.cayenne.access.DataContextSelectAction.performQuery(DataContextSelectAction.java:93)
at 
org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1200)
at com.sr2.back.dao.UserDAO.getAvailableRoles(UserDAO.java:168)


Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)


I have copied the settings and libraries from the old (5.5.9) tomcat version to 
the new (5.5.19) version. And there *is* a JDBC driver in the commons/lib dir. 
I'm not sure is it a tomcat or cayenne problem. So I will post it here and in 
the cayenne group. But database access seems to work anyway. Additionally I've 
just realized that the UserDAO class is called twice and the second one it 
works without an error. So where does Tomcat searching for the database ? 
Normally it should passed per JNDI.


Thanks, Lothar
__
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130


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



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

2006-11-03 Thread Eric Yin

Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html 
and i got this error.


i'm using fedora 5 and i download "Linux (non RPM package) downloads 
/linux (x86)" of mysql and install it accoding to the insturction. I 
created a databse P6120 and table test2 by using user 'eric' and 
passwod 'ericyin1'.


I add the following to server.xml:

   username="eric" password="ericyin1" 
driverClassName="com.mysql.jdbc.Driver"

  url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>



I add the following to web.xml:
 
 DB Connection
 jdbc/TestDB
 javax.sql.DataSource
 Container
 

I add the following to the index.jsp:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

select id, name, studentid  from test2




   name ${row.name}
   studentid ${row.studentid}


thanks,

Eric.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2006-03-01 Thread David McMinn

Tomcat Server 5.5.15 - I searched for solutions and most mention a Context 
element in the server.xml.

I only have a DefaultContext tag within with I have my resouce tag:


 
 

The actual failure is on the connection = ds.getConnection(); line in the jsp 
if that helps any.

SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null'
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
 at 
org.apache.jsp.wroxjdbc.JDBCTest_jsp._jspService(org.apache.jsp.wroxjdbc.JDBCTest_jsp:83)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at 
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:831)
 at 
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
 at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1203)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
 at java.sql.DriverManager.getDriver(Unknown Source)
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
 ... 21 more



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

2006-01-31 Thread Petr Hadraba
Hi,

I have the following problem. I found this solution:

There is in the server.xml the Resource tag describing your
dataSource. Move this element into the Context element in the same xml
file (at the bottom).

See http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
section `JDBC Data Sources'

Have a nice time

PETR


On 1/31/06, Lothar Krenzien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> after switching from Tomcat 5.5.9 to 5.5.15  I get the following error :
>
> 2006-01-31 16:43:38,130 [INFO ] QueryLogger.*** error.
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
> class '' for connect URL 'null'
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
> at 
> org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:298)
> at 
> org.objectstyle.cayenne.access.DataDomainQueryAction.performQuery(DataDomainQueryAction.java:107)
> at 
> org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:643)
> at 
> org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1100)
> at 
> org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:207)
> at 
> org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1068)
> at 
> org.objectstyle.cayenne.access.DataContextSelectAction.performQuery(DataContextSelectAction.java:173)
> at 
> org.objectstyle.cayenne.access.DataContextSelectAction.performQuery(DataContextSelectAction.java:93)
> at 
> org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1200)
> at com.sr2.back.dao.UserDAO.getAvailableRoles(UserDAO.java:168)
> 
>
> Caused by: java.sql.SQLException: No suitable driver
> at java.sql.DriverManager.getDriver(DriverManager.java:243)
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
>
>
> I have copied the settings and libraries from the old (5.5.9) tomcat version 
> to the new (5.5.19) version. And there *is* a JDBC driver in the commons/lib 
> dir. I'm not sure is it a tomcat or cayenne problem. So I will post it here 
> and in the cayenne group. But database access seems to work anyway. 
> Additionally I've just realized that the UserDAO class is called twice and 
> the second one it works without an error. So where does Tomcat searching for 
> the database ? Normally it should passed per JNDI.
>
>
> Thanks, Lothar
> __
> XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
> Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

2006-01-31 Thread Lothar Krenzien

Hi Petr,

thanks for your answer. That exactly the configuration I have. But after 
playing around I got success by removing the line



from the server.xml. Even I don't know what it means ;)


Lothar

"Tomcat Users List"  schrieb am 31.01.06 17:55:29:
> 
> Hi,
> 
> I have the following problem. I found this solution:
> 
> There is in the server.xml the Resource tag describing your
> dataSource. Move this element into the Context element in the same xml
> file (at the bottom).
> 
> See http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
> section `JDBC Data Sources'
> 
> Have a nice time
> 
> PETR
> 
> 
> On 1/31/06, Lothar Krenzien <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > after switching from Tomcat 5.5.9 to 5.5.15  I get the following error :
> >
> > 2006-01-31 16:43:38,130 [INFO ] QueryLogger.*** error.
> > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver 
> > of class '' for connect URL 'null'
> > at 
> > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
> > at 
> > org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
> > at 
> > org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:298)
> > at 
> > org.objectstyle.cayenne.access.DataDomainQueryAction.performQuery(DataDomainQueryAction.java:107)
> > at 
> > org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:643)
> > at 
> > org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1100)
> > at 
> > org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:207)
> > at 
> > org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1068)
> > at 
> > org.objectstyle.cayenne.access.DataContextSelectAction.performQuery(DataContextSelectAction.java:173)
> > at 
> > org.objectstyle.cayenne.access.DataContextSelectAction.performQuery(DataContextSelectAction.java:93)
> > at 
> > org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1200)
> > at com.sr2.back.dao.UserDAO.getAvailableRoles(UserDAO.java:168)
> > 
> >
> > Caused by: java.sql.SQLException: No suitable driver
> > at java.sql.DriverManager.getDriver(DriverManager.java:243)
> > at 
> > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
> >
> >
> > I have copied the settings and libraries from the old (5.5.9) tomcat 
> > version to the new (5.5.19) version. And there *is* a JDBC driver in the 
> > commons/lib dir. I'm not sure is it a tomcat or cayenne problem. So I will 
> > post it here and in the cayenne group. But database access seems to work 
> > anyway. Additionally I've just realized that the UserDAO class is called 
> > twice and the second one it works without an error. So where does Tomcat 
> > searching for the database ? Normally it should passed per JNDI.
> >
> >
> > Thanks, Lothar
> > __
> > XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
> > Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 


__
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193


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



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

2006-02-05 Thread Petr Hadraba
Hi,

here is some more informations about JNDI, PostgreSQL, etc:

I wrote, I had the same problem, and here is my solution:

Create in your development environment (Eclipse, NetBeans, Midnight
Commander...) the META-INF/context.xml with the following content:

  


Add to your WEB-INF/web.xml the  tag.

Create WAR file containing all the required files (incl.
META-INF/context.xml!!!)
and deplay it.

Tomcat, during deploy, looks for the META-INF/context.xml and copies
it into ${CATALINA_HOME}/conf/Catalina/localhost/[app_name].xml.

Here is my files:
META-INF/context.xml:





===

WEB-INF/web.xml:

http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
Pokus


Test
Test
test.Test


Test
/


index.html
index.htm
index.jsp
default.html
default.htm
default.jsp



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.

jdbc/testDB
javax.sql.DataSource
Container

Unshareable




===

Hope to helps you!

I found it here:
http://www.theserverside.com/discussions/thread.tss?thread_id=29795#156653


Have a nice day!

PETR


On 1/31/06, Lothar Krenzien <[EMAIL PROTECTED]> wrote:
>
> Hi Petr,
>
> thanks for your answer. That exactly the configuration I have. But after 
> playing around I got success by removing the line
>
> 
>
> from the server.xml. Even I don't know what it means ;)
>
>
> Lothar
>
> "Tomcat Users List"  schrieb am 31.01.06 17:55:29:
> >
> > Hi,
> >
> > I have the following problem. I found this solution:
> >
> > There is in the server.xml the Resource tag describing your
> > dataSource. Move this element into the Context element in the same xml
> > file (at the bottom).
> >
> > See http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html
> > section `JDBC Data Sources'
> >
> > Have a nice time
> >
> > PETR
> >
> >
> > On 1/31/06, Lothar Krenzien <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > after switching from Tomcat 5.5.9 to 5.5.15  I get the following error :
> > >
> > > 2006-01-31 16:43:38,130 [INFO ] QueryLogger.*** error.
> > > org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver 
> > > of class '' for connect URL 'null'
> > > at 
> > > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
> > > at 
> > > org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
> > > at 
> > > org.objectstyle.cayenne.access.DataNode.performQueries(DataNode.java:298)
> > > at 
> > > org.objectstyle.cayenne.access.DataDomainQueryAction.performQuery(DataDomainQueryAction.java:107)
> > > at 
> > > org.objectstyle.cayenne.access.DataDomain.performQueries(DataDomain.java:643)
> > > at 
> > > org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1100)
> > > at 
> > > org.objectstyle.cayenne.access.Transaction.performQueries(Transaction.java:207)
> > > at 
> > > org.objectstyle.cayenne.access.DataContext.performQueries(DataContext.java:1068)
> > > at 
> > > org.objectstyle.cayenne.access.DataContextSelectAction.performQuery(DataContextSelectAction.java:173)
> > > at 
> > > org.objectstyle.cayenne.access.DataContextSelectAction.performQuery(DataContextSelectAction.java:93)
> > > at 
> > > org.objectstyle.cayenne.access.DataContext.performQuery(DataContext.java:1200)
> > > at com.sr2.back.dao.UserDAO.getAvailableRoles(UserDAO.java:168)
> > > 
> > >
> > > Caused by: java.sql.SQLException: No suitable driver
> > > at java.sql.DriverManager.getDriver(DriverManager.java:243)
> > > at 
> > > org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
> > >
> > >
> >

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

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Hi there:
I am using tomcat 5.5.17 and SQL Server 2000 database with SQL Server 2005 JDBC 
Driver.  OS is Windows XP professional.  I have configured web.xml in WEB-INF 
directory and context.xml in META-INF directory of my application. Both are 
attached below with this email. I have a login.jsp page that asks for username 
and password... and when submit is hit, it gives the following error.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null' 
I tried to google and tried the suggestion given but any of them doesn't seem 
to work. Is there anything wrong with my configuration? PLEASE HELP...it is 
higly appreciated. If something is not clear, please get back to me.  Thank you 
so much.
context.xml file looks like this...







web.xml looks like this...

http://java.sun.com/dtd/web-app_2_3.dtd";>

  ISOTracking
  
 Welcome TO ISO Tracking Application
  


ISOTracking.Login_jsp
ISOTracking.Login_jsp


ISOTracking.Login_jsp
/Login.jsp


 30



jdbc/sqlserver
javax.sql.DataSource
Container






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2006-11-03 Thread Eric Yin

Quoting Eric Yin <[EMAIL PROTECTED]>:


Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html 
and i got this error.


i'm using fedora 5 and i download "Linux (non RPM package) downloads 
/linux (x86)" of mysql and install it accoding to the insturction. I 
created a databse P6120 and table test2 by using user 'eric' and 
passwod 'ericyin1'.


I add the following to server.xml:

   username="eric" password="ericyin1" 
driverClassName="com.mysql.jdbc.Driver"

  url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>



I add the following to web.xml:
 
 DB Connection
 jdbc/TestDB
 javax.sql.DataSource
 Container
 

I add the following to the index.jsp:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

select id, name, studentid  from test2




   name ${row.name}
   studentid ${row.studentid}


thanks,

Eric.



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2006-11-03 Thread Martin Gainty
eric-
the name of your DB in the URL appears incorrect
instead of 
url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"

use 
url="jdbc:mysql://localhost:3306/P6120?autoReconnect=true"

anyone else?
M-
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
- Original Message - 
From: "Eric Yin" <[EMAIL PROTECTED]>
To: 
Sent: Friday, November 03, 2006 4:12 PM
Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'"


> Quoting Eric Yin <[EMAIL PROTECTED]>:
> 
>> Hi,
>>
>> I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
>> i'm doing the same thing as 
>> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html 
>> and i got this error.
>>
>> i'm using fedora 5 and i download "Linux (non RPM package) downloads 
>> /linux (x86)" of mysql and install it accoding to the insturction. I 
>> created a databse P6120 and table test2 by using user 'eric' and 
>> passwod 'ericyin1'.
>>
>> I add the following to server.xml:
>> >debug="5" reloadable="true" crossContext="true">
>>  >   maxActive="100" maxIdle="30" maxWait="1"
>>   username="eric" password="ericyin1" 
>> driverClassName="com.mysql.jdbc.Driver"
>>   url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>
>>
>> 
>>
>> I add the following to web.xml:
>>  
>>  DB Connection
>>  jdbc/TestDB
>>  javax.sql.DataSource
>>  Container
>>  
>>
>> I add the following to the index.jsp:
>> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
>> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
>> 
>> select id, name, studentid  from test2
>> 
>>
>>
>> 
>>name ${row.name}
>>studentid ${row.studentid}
>> 
>>
>> thanks,
>>
>> Eric.
>>
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

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

2006-11-03 Thread Christopher Schultz
Eric,

Eric Yin wrote:
> Hi,
> 
> I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
> i'm doing the same thing as
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> and i got this error.

Where did you put mysql-connector-*.jar? I suspect that you have it in
your webapp's lib directory, but you need to have it in Tomcat's
server-wise common/lib directory.

Another note:

> url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>

Since you are using a DataSource which defaults to the Jakarta Commons
DBCP pool, you should remove the "autoReconnect=true" from your URL;
re-connection is handled by the DPCP library, so you /should be/ able to
safely remove this parameter. This feature is documented to be
undesirable as seen here:

http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html

For the lazy: (emphasis added by me)

"Should the driver try to re-establish stale and/or dead connections? If
enabled the driver will throw an exception for a queries issued on a
stale or dead connection, which belong to the current transaction, but
will attempt reconnect before the next query issued on the connection in
a new transaction. *The use of this feature is not recommended, because
it has side effects related to session state and data consistency when
applications don'thandle SQLExceptions properly, and is only designed to
be used when you are unable to configure your application to handle
SQLExceptions resulting from dead andstale connections properly*.
Alternatively, investigate setting the MySQL server variable
"wait_timeout"to some high value rather than the default of 8 hours."

-chris



signature.asc
Description: OpenPGP digital signature


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

2006-11-03 Thread David Smith

I'll go further and say mysql discourages the use of autoReconnect.  See:

http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html

the section titled "High Availability and Clustering. "

--David

Christopher Schultz wrote:

Eric,

Eric Yin wrote:
  

Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
and i got this error.



Where did you put mysql-connector-*.jar? I suspect that you have it in
your webapp's lib directory, but you need to have it in Tomcat's
server-wise common/lib directory.

Another note:

  

url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>



Since you are using a DataSource which defaults to the Jakarta Commons
DBCP pool, you should remove the "autoReconnect=true" from your URL;
re-connection is handled by the DPCP library, so you /should be/ able to
safely remove this parameter. This feature is documented to be
undesirable as seen here:

http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html

For the lazy: (emphasis added by me)

"Should the driver try to re-establish stale and/or dead connections? If
enabled the driver will throw an exception for a queries issued on a
stale or dead connection, which belong to the current transaction, but
will attempt reconnect before the next query issued on the connection in
a new transaction. *The use of this feature is not recommended, because
it has side effects related to session state and data consistency when
applications don'thandle SQLExceptions properly, and is only designed to
be used when you are unable to configure your application to handle
SQLExceptions resulting from dead andstale connections properly*.
Alternatively, investigate setting the MySQL server variable
"wait_timeout"to some high value rather than the default of 8 hours."

-chris

  



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2006-11-04 Thread Eric Yin

Hi Chris,

Thanks for the help.

After I move the Connector/J 5.0 to the Tomcat's server-wise common/lib 
directory and remove the autoReconnect=true, i still get the same error.


thanks,

Eric.


Quoting Christopher Schultz <[EMAIL PROTECTED]>:


Eric,

Eric Yin wrote:

Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
and i got this error.


Where did you put mysql-connector-*.jar? I suspect that you have it in
your webapp's lib directory, but you need to have it in Tomcat's
server-wise common/lib directory.

Another note:


url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>


Since you are using a DataSource which defaults to the Jakarta Commons
DBCP pool, you should remove the "autoReconnect=true" from your URL;
re-connection is handled by the DPCP library, so you /should be/ able to
safely remove this parameter. This feature is documented to be
undesirable as seen here:

http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html

For the lazy: (emphasis added by me)

"Should the driver try to re-establish stale and/or dead connections? If
enabled the driver will throw an exception for a queries issued on a
stale or dead connection, which belong to the current transaction, but
will attempt reconnect before the next query issued on the connection in
a new transaction. *The use of this feature is not recommended, because
it has side effects related to session state and data consistency when
applications don'thandle SQLExceptions properly, and is only designed to
be used when you are unable to configure your application to handle
SQLExceptions resulting from dead andstale connections properly*.
Alternatively, investigate setting the MySQL server variable
"wait_timeout"to some high value rather than the default of 8 hours."

-chris







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2006-11-04 Thread Eric Yin

Hi Guys,

I just found out the reason. My index.jsp in the the Root directory, 
however,  the path of the sever.xml/context is "/DBTest".


thanks for all the help.

Eric.

Quoting Eric Yin <[EMAIL PROTECTED]>:


Hi Chris,

Thanks for the help.

After I move the Connector/J 5.0 to the Tomcat's server-wise 
common/lib directory and remove the autoReconnect=true, i still get 
the same error.


thanks,

Eric.


Quoting Christopher Schultz <[EMAIL PROTECTED]>:


Eric,

Eric Yin wrote:

Hi,

I'm using tomcat5.5.2 and mysql5.0.27 and Connector/J 5.0.
i'm doing the same thing as
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
and i got this error.


Where did you put mysql-connector-*.jar? I suspect that you have it in
your webapp's lib directory, but you need to have it in Tomcat's
server-wise common/lib directory.

Another note:


url="jdbc:mysql://localhost:3306/p6120?autoReconnect=true"/>


Since you are using a DataSource which defaults to the Jakarta Commons
DBCP pool, you should remove the "autoReconnect=true" from your URL;
re-connection is handled by the DPCP library, so you /should be/ able to
safely remove this parameter. This feature is documented to be
undesirable as seen here:

http://dev.mysql.com/doc/refman/4.1/en/connector-j-reference-configuration-properties.html

For the lazy: (emphasis added by me)

"Should the driver try to re-establish stale and/or dead connections? If
enabled the driver will throw an exception for a queries issued on a
stale or dead connection, which belong to the current transaction, but
will attempt reconnect before the next query issued on the connection in
a new transaction. *The use of this feature is not recommended, because
it has side effects related to session state and data consistency when
applications don'thandle SQLExceptions properly, and is only designed to
be used when you are unable to configure your application to handle
SQLExceptions resulting from dead andstale connections properly*.
Alternatively, investigate setting the MySQL server variable
"wait_timeout"to some high value rather than the default of 8 hours."

-chris







-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2007-06-05 Thread Pranav

Hi,

I am running an application using tomcat5.x and getting following error:
The error log is as follows:

Jun 5, 2007 7:12:31 PM org.apache.catalina.core.ApplicationContext log
SEVERE: AdminAcct Initialization Failure
javax.faces.FacesException: 
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.executeIfNecessary(CachedRowSetDataModel.java:374)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.isRowAvailable(CachedRowSetDataModel.java:133)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setRowIndex(CachedRowSetDataModel.java:286)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setWrappedData(CachedRowSetDataModel.java:323)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setCachedRowSet(CachedRowSetDataModel.java:348)

   at acctapps.AdminAcct._init(AdminAcct.java:50)
   at acctapps.AdminAcct.init(AdminAcct.java:464)
   at 
com.sun.rave.web.ui.appbase.servlet.LifecycleListener.fireInit(LifecycleListener.java:555)
   at 
com.sun.rave.web.ui.appbase.servlet.LifecycleListener.attributeAdded(LifecycleListener.java:405)
   at 
org.apache.catalina.connector.Request.setAttribute(Request.java:1398)
   at 
org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:500)
   at 
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283)
   at 
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283)
   at 
com.sun.faces.context.RequestMap.put(ExternalContextImpl.java:622)
   at 
com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:279)
   at 
com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)

   at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
   at 
com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
   at 
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
   at 
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:666)
   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:641)
   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:249)
   at 
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
   at 
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
   at 
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)

   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

   at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'
   at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSo

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

2007-06-05 Thread Martin Gainty

Previous posting displays configure Resource in context.xml
http://marc.info/?l=tomcat-user&m=117312340132291&w=2

HTH/
M--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: "Pranav" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, June 05, 2007 9:45 AM
Subject: Ref: Cannot create JDBC driver of class '' for connect URL 'null'



Hi,

I am running an application using tomcat5.x and getting following error:
The error log is as follows:

Jun 5, 2007 7:12:31 PM org.apache.catalina.core.ApplicationContext log
SEVERE: AdminAcct Initialization Failure
javax.faces.FacesException: 
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver 
of class '' for connect URL 'null'
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.executeIfNecessary(CachedRowSetDataModel.java:374)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.isRowAvailable(CachedRowSetDataModel.java:133)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setRowIndex(CachedRowSetDataModel.java:286)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setWrappedData(CachedRowSetDataModel.java:323)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setCachedRowSet(CachedRowSetDataModel.java:348)

   at acctapps.AdminAcct._init(AdminAcct.java:50)
   at acctapps.AdminAcct.init(AdminAcct.java:464)
   at 
com.sun.rave.web.ui.appbase.servlet.LifecycleListener.fireInit(LifecycleListener.java:555)
   at 
com.sun.rave.web.ui.appbase.servlet.LifecycleListener.attributeAdded(LifecycleListener.java:405)
   at 
org.apache.catalina.connector.Request.setAttribute(Request.java:1398)
   at 
org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:500)
   at 
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283)
   at 
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283)
   at 
com.sun.faces.context.RequestMap.put(ExternalContextImpl.java:622)
   at 
com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:279)
   at 
com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)

   at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
   at 
com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
   at 
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
   at 
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:666)
   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.pageBean(ViewHandlerImpl.java:641)
   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:249)
   at 
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
   at 
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
   at 
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)

   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at 
org.apache.coyote.htt

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

2007-06-05 Thread Pranav

Hi Martin,

Referring to the link you asked me to check, I checked the same and 
updated the server.xml under **, hope i guess 
that is correct.With all this done, I am getting the same error:


Jun 6, 2007 9:36:31 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
com.sun.rave.web.ui.appbase.ApplicationException: 
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:276)
   at 
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
   at 
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
   at 
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)

   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

   at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.FacesException: 
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.executeIfNecessary(CachedRowSetDataModel.java:374)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.isRowAvailable(CachedRowSetDataModel.java:133)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setRowIndex(CachedRowSetDataModel.java:286)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setWrappedData(CachedRowSetDataModel.java:323)
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setCachedRowSet(CachedRowSetDataModel.java:348)

   at acctapps.AdminAcct._init(AdminAcct.java:50)
   at acctapps.AdminAcct.init(AdminAcct.java:464)
   at 
com.sun.rave.web.ui.appbase.servlet.LifecycleListener.fireInit(LifecycleListener.java:555)
   at 
com.sun.rave.web.ui.appbase.servlet.LifecycleListener.attributeAdded(LifecycleListener.java:405)
   at 
org.apache.catalina.connector.Request.setAttribute(Request.java:1398)
   at 
org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:500)
   at 
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283)
   at 
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283)
   at 
com.sun.faces.context.RequestMap.put(ExternalContextImpl.java:622)
   at 
com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:279)
   at 
com.sun.faces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:78)

   at com.sun.faces.el.impl.NamedValue.evaluate(NamedValue.java:125)
   at 
com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
   at 
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
   at 
com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
   at 
com.sun.rave.web.u

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

2007-06-05 Thread Foo Shyn

Hi,

Did you add in the ResourceLink to your application? You'll need that if 
you configure your connection pooling under the GlobalNamingResources 
tag. Check out the configuration doc from Tomcat below:


http://tomcat.apache.org/tomcat-5.0-doc/config/globalresources.html

Additionally, you can configure the connection pooling under your 
application context too.


HTH,
FooShyn

Pranav wrote:

Hi Martin,

Referring to the link you asked me to check, I checked the same and 
updated the server.xml under **, hope i guess 
that is correct.With all this done, I am getting the same error:


Jun 6, 2007 9:36:31 AM org.apache.catalina.core.StandardWrapperValve 
invoke

SEVERE: Servlet.service() for servlet Faces Servlet threw exception
com.sun.rave.web.ui.appbase.ApplicationException: 
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559) 

   at 
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:276) 

   at 
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87) 

   at 
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
   at 
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)

   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) 

   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 

   at 
com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) 

   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 

   at 
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368) 

   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) 

   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) 

   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) 

   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) 

   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 

   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) 

   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) 

   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) 

   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) 

   at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) 

   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) 

   at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) 

   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) 


   at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.FacesException: 
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
   at 
com.sun.rave.faces.data.CachedRowSetDataModel.executeIfNecessary(CachedRowSetDataModel.java:374) 

   at 
com.sun.rave.faces.data.CachedRowSetDataModel.isRowAvailable(CachedRowSetDataModel.java:133) 

   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setRowIndex(CachedRowSetDataModel.java:286) 

   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setWrappedData(CachedRowSetDataModel.java:323) 

   at 
com.sun.rave.faces.data.CachedRowSetDataModel.setCachedRowSet(CachedRowSetDataModel.java:348) 


   at acctapps.AdminAcct._init(AdminAcct.java:50)
   at acctapps.AdminAcct.init(AdminAcct.java:464)
   at 
com.sun.rave.web.ui.appbase.servlet.LifecycleListener.fireInit(LifecycleListener.java:555) 

   at 
com.sun.rave.web.ui.appbase.servlet.LifecycleListener.attributeAdded(LifecycleListener.java:405) 

   at 
org.apache.catalina.connector.Request.setAttribute(Request.java:1398)
   at 
org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:500) 

   at 
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283) 

   at 
javax.servlet.ServletRequestWrapper.setAttribute(ServletRequestWrapper.java:283) 

   at 
com.sun.faces.context.RequestMap.put(ExternalContextImpl.java:622)
   at 
com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBea

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

2006-03-01 Thread Mike Sabroff

Isn't that the old mysql driver?? I thought the new one is:
org.gjt.mm.mysql.Driver
or do I have it backwards?

David McMinn wrote:


Tomcat Server 5.5.15 - I searched for solutions and most mention a 
Context element in the server.xml.


I only have a DefaultContext tag within with I have my resouce tag:


 
url="jdbc:mysql://localhost:3306/everycitizen?autoReconnect=true"

username="everyuser"
/>
 

The actual failure is on the connection = ds.getConnection(); line in 
the jsp if that helps any.


SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
 at 
org.apache.jsp.wroxjdbc.JDBCTest_jsp._jspService(org.apache.jsp.wroxjdbc.JDBCTest_jsp:83)

 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at 
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:831)
 at 
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
 at 
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1203)

 at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
 at java.sql.DriverManager.getDriver(Unknown Source)
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)

 ... 21 more



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



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

2006-03-01 Thread Tim Lucia
Backwards.  See http://www.mysql.com/products/connector/j/

Tim

-Original Message-
From: Mike Sabroff [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 01, 2006 10:43 PM
To: Tomcat Users List
Subject: Re: Cannot create JDBC driver of class '' for connect URL 'null'

Isn't that the old mysql driver?? I thought the new one is:
org.gjt.mm.mysql.Driver
or do I have it backwards?

David McMinn wrote:
>
> Tomcat Server 5.5.15 - I searched for solutions and most mention a 
> Context element in the server.xml.
>
> I only have a DefaultContext tag within with I have my resouce tag:
>
> 
>   auth="Container"
> driverClassName="com.mysql.jdbc.Driver"
> logAbandoned="true"
> maxActive="100"
> maxIdle="30"
> maxWait="1"
> name="jdbc/wroxTC5"
> password="everypass"
> removeAbandoned="true"
> removeAbandonedTimeout="300"
> type="javax.sql.DataSource"
> 
> url="jdbc:mysql://localhost:3306/everycitizen?autoReconnect=true"
> username="everyuser"
> />
>  
>
> The actual failure is on the connection = ds.getConnection(); line in 
> the jsp if that helps any.
>
> SEVERE: Servlet.service() for servlet jsp threw exception
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
> driver of class '' for connect URL 'null'
>  at 
>
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:780)
>  at 
>
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:540)
>  at 
>
org.apache.jsp.wroxjdbc.JDBCTest_jsp._jspService(org.apache.jsp.wroxjdbc.JDB
CTest_jsp:83)
>  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>  at 
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
32)
>  at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>  at 
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:252)
>  at 
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:173)
>  at 
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)
>  at 
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:178)
>  at 
>
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:432)
>  at 
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
)
>  at 
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
)
>  at 
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:107)
>  at 
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>  at 
>
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:
831)
>  at 
>
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(H
ttp11AprProtocol.java:639)
>  at 
> org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1203)
>  at java.lang.Thread.run(Unknown Source)
> Caused by: java.sql.SQLException: No suitable driver
>  at java.sql.DriverManager.getDriver(Unknown Source)
>  at 
>
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
.java:773)
>  ... 21 more
>

-- 
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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

2006-03-02 Thread David Smith
I've done several developments with MySQL and Tomcat.  Never defined the
datasource in the  element so I can't speak to how that
should work.  The error is usually the result of a configuration element
out of place between where the  element is declared and your
java code.  The  config looks good though.

My advice is :

- Move this  definition to your context's  element
in [tomcat_dir]conf/Catalina/localhost/[webapp_name_here].xml.  If
deploying in a .war file, the file should be named context.xml and
placed in the META-INF directory of your .war file.

- Make sure you have a  section in the web.xml file of
your webapp. 

- This is pretty much a laundry list item, but make sure your mysql.jar
file is in [tomcat_dir]/common/lib.  The jar has to be there to be
picked up by the tomcat container and instantiate a database pool.

If you make these changes, restart tomcat to make sure it catches the
new config.

--David

David McMinn wrote:

>Tomcat Server 5.5.15 - I searched for solutions and most mention a Context 
>element in the server.xml.
>
>I only have a DefaultContext tag within with I have my resouce tag:
>
>
> auth="Container" 
>driverClassName="com.mysql.jdbc.Driver" 
>logAbandoned="true" 
>maxActive="100" 
>maxIdle="30" 
>maxWait="1" 
>name="jdbc/wroxTC5" 
>password="everypass" 
>removeAbandoned="true" 
>removeAbandonedTimeout="300" 
>type="javax.sql.DataSource" 
>
> url="jdbc:mysql://localhost:3306/everycitizen?autoReconnect=true" 
>username="everyuser" 
>/>
> 
>
>The actual failure is on the connection = ds.getConnection(); line in the jsp 
>if that helps any.
>
>SEVERE: Servlet.service() for servlet jsp threw exception
>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
>class '' for connect URL 'null'
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
> at 
> org.apache.jsp.wroxjdbc.JDBCTest_jsp._jspService(org.apache.jsp.wroxjdbc.JDBCTest_jsp:83)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
> at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
> at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
> at 
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> at 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
> at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> at 
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:831)
> at 
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
> at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1203)
> at java.lang.Thread.run(Unknown Source)
>Caused by: java.sql.SQLException: No suitable driver
> at java.sql.DriverManager.getDriver(Unknown Source)
> at 
> org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
> ... 21 more
>
>
>  
>


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



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

2006-01-01 Thread Eric Munson
I am using Tomcat 5.5.9, MySQL 4.1.14, Java 5.0 Update 5, MySQL-JDBC
Connector version 3.1.11, commons-collections-3.1.jar,
commons-pool-1.2.jar, commons-dbcp-1.2.1.jar, running on Debian
Stable.  I have been fighting with this for several days now and I am
no closer to a solution, can
someone please point out what I am doing incorrectly.  Here is the exception:

Jan 1, 2006 1:26:45 PM org.eandk.data.User load
SEVERE: [User.load]: Load query failed with SQLException: Cannot
create JDBC driver of class '' for connect URL 'null'
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
driver of class '' for connect URL 'null'
   at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
   at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
   at org.eandk.data.User.load(Unknown Source)
   at org.eandk.pages.admin.SecureHandler.handleRequest(Unknown Source)
   at org.eandk.AdminSite.doPost(Unknown Source)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
   at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
   at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: No suitable driver
   at java.sql.DriverManager.getDriver(DriverManager.java:243)
   at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
   ... 20 more

Here is my server.xml:


 
 
 
 
   
   
   
 
 
   
   
   
   
   
   
   
 
 
   
 WEB-INF/web.xml
   
 
   
 


I have a context.xml in $CATALINA_HOME/webapps/pfadmin/META-INF, its
contents are:

 
 


I know the servlet is working because I get a static response from it
before a database query is made.  Here is the method that is the code
snippet around the query:
...
Context ctx = new InitialContext( );
DataSource ds = (DataSource)ctx.lookup(
"java:comp/env/jdbc/presserfoot" );
conn = ds.getConnection();
stmt = conn.createStatement( );
String query = "SELECT id,passwd FROM user WHERE uname LIKE " + uName +
   ";";
rs = stmt.executeQuery( query );
...

Can someone please point out the error I am making, I would appreciate
any help that can be given.  Thanks.

Eric

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



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

2006-07-31 Thread David Smith
Is your SQL JDBC driver in common/lib?  It has to be there for tomcat to 
set it up as a resource.


Also drop the  tag from your context definition.  Not 
needed when the resource is defined inside the  tag and may 
confuse tomcat.


--David

Aynalem, Seblewengel (Trawick) wrote:


Hi there:
I am using tomcat 5.5.17 and SQL Server 2000 database with SQL Server 2005 JDBC 
Driver.  OS is Windows XP professional.  I have configured web.xml in WEB-INF 
directory and context.xml in META-INF directory of my application. Both are 
attached below with this email. I have a login.jsp page that asks for username 
and password... and when submit is hit, it gives the following error.
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' 
I tried to google and tried the suggestion given but any of them doesn't seem to work. Is there anything wrong with my configuration? PLEASE HELP...it is higly appreciated. If something is not clear, please get back to me.  Thank you so much.

context.xml file looks like this...


 		prefix="ISOTRackingTest_Log." suffix=".txt" timestamp="true"/>





web.xml looks like this...

http://java.sun.com/dtd/web-app_2_3.dtd";>

 ISOTracking
 
Welcome TO ISO Tracking Application
 

   
   ISOTracking.Login_jsp
   ISOTracking.Login_jsp
   
   
   ISOTracking.Login_jsp
   /Login.jsp
   
   
30
   


jdbc/sqlserver
javax.sql.DataSource
Container






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Parse error in default web.xml
org.xml.sax.SAXParseException: Element type "Resource" must be followed by 
either attribute specifications, ">" or "/>".
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at 
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:781)
at 
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:721)
at 
org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:977)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:278)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.core.StandardContext.init(StandardContext.java:5130)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3945)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Occurred at line 11 column 79
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ISOTrackingTest] startup failed due to previous errors
Jul 31, 2006 3:01:09 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 31, 2006 3:01:10 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 31, 2006 3:01:10 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/70  config=null
Jul 31, 2006 3:01:10 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 31, 2006 3:01:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5147 ms

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 2:53 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Is your SQL JDBC driver in common/lib?  It has to be there for tomcat to 
set it up as a resource.

Also drop the  tag from your context definition.  Not 
needed when the resource is defined in

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

2006-07-31 Thread Filip Hanik - Dev Lists
catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Parse error in default web.xml
org.xml.sax.SAXParseException: Element type "Resource" must be followed by either attribute 
specifications, ">" or "/>".
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at 
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:781)
at 
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:721)
at 
org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:977)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:278)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.core.StandardContext.init(StandardContext.java:5130)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3945)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Occurred at line 11 column 79
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ISOTrackingTest] startup failed due to previous errors
Jul 31, 2006 3:01:09 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 31, 2006 3:01:10 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 31, 2006 3:01:10 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/70  config=null
Jul 31, 2006 3:01:10 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 31, 2006 3:01:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5147 ms

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 2:53 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Is your SQL JDBC driver in common/lib?  It has to be there for tomcat to 
set it up as 

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

2006-07-31 Thread David Smith
he.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Parse error in default web.xml
org.xml.sax.SAXParseException: Element type "Resource" must be followed by either attribute 
specifications, ">" or "/>".
at 
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1269)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
at 
org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:781)
at 
org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:721)
at 
org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:977)
at 
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:278)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at 
org.apache.catalina.core.StandardContext.init(StandardContext.java:5130)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:3945)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at 
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:294)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig 
processContextConfig
SEVERE: Occurred at line 11 column 79
Jul 31, 2006 3:01:08 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jul 31, 2006 3:01:08 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/ISOTrackingTest] startup failed due to previous errors
Jul 31, 2006 3:01:09 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 31, 2006 3:01:10 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 31, 2006 3:01:10 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/70  config=null
Jul 31, 2006 3:01:10 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jul 31, 2006 3:01:10 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5147 ms

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 2:53 PM
To: Tomcat Users List
Subject: Re: org.apache

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

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Hi Filip:

I checked it... what is it missing?  Many thanks your help.

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:12 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


looks like your context XML file is not a valid XML format

Filip


Aynalem, Seblewengel (Trawick) wrote:
> Yes I do have SQL JDBC driver in common/lib as sqljdbc.jar and did drop 
>  from context.xml file.  Another error comes ups as follows:
>
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.AprLifecycleListener 
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal performance in 
> production environments was not found on the java.library.path: 
> C:\Java\jdk1.5.0_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
>  Files\Common Files\Roxio 
> Shared\DLLShared;C:\Java\jdk1.5.0_07\bin;%CATALINA_BASE%\bin;C:\Program 
> Files\Microsoft SQL Server\80\Tools\BINN
> Jul 31, 2006 3:01:05 PM org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Jul 31, 2006 3:01:05 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1732 ms
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Jul 31, 2006 3:01:08 PM org.apache.tomcat.util.digester.Digester fatalError
> SEVERE: Parse Fatal Error at line 11 column 79: Element type "Resource" must 
> be followed by either attribute specifications, ">" or "/>".
> org.xml.sax.SAXParseException: Element type "Resource" must be followed by 
> either attribute specifications, ">" or "/>".
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:845)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>   at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>   at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
>   at 
> org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:781)
>   at 
> org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:721)
>   at 
> org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:977)
>   at 
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:278)
>   at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>   at 
> org.apache.catalina.core.StandardContext.init(StandardContext.java:5130)
>   at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3945)
>   at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>   at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
>   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
>   at 
> org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:904)
>   at 
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:867)
>   at 
> org.apache.catalina.startup.Ho

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

2006-07-31 Thread Saha Rabindra N
You could open your context.xml file using IE browser and that will tell you 
the syntax problem, if any.



-Original Message-
From: Aynalem, Seblewengel (Trawick)
[mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:18 PM
To: Tomcat Users List
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hi Filip:

I checked it... what is it missing?  Many thanks your help.

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:12 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


looks like your context XML file is not a valid XML format

Filip


Aynalem, Seblewengel (Trawick) wrote:
> Yes I do have SQL JDBC driver in common/lib as sqljdbc.jar and did drop 
>  from context.xml file.  Another error comes ups as follows:
>
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.AprLifecycleListener 
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal performance in 
> production environments was not found on the java.library.path: 
> C:\Java\jdk1.5.0_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
>  Files\Common Files\Roxio 
> Shared\DLLShared;C:\Java\jdk1.5.0_07\bin;%CATALINA_BASE%\bin;C:\Program 
> Files\Microsoft SQL Server\80\Tools\BINN
> Jul 31, 2006 3:01:05 PM org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Jul 31, 2006 3:01:05 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1732 ms
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Jul 31, 2006 3:01:08 PM org.apache.tomcat.util.digester.Digester fatalError
> SEVERE: Parse Fatal Error at line 11 column 79: Element type "Resource" must 
> be followed by either attribute specifications, ">" or "/>".
> org.xml.sax.SAXParseException: Element type "Resource" must be followed by 
> either attribute specifications, ">" or "/>".
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:845)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>   at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>   at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
>   at 
> org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:781)
>   at 
> org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:721)
>   at 
> org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:977)
>   at 
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:278)
>   at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>   at 
> org.apache.catalina.core.StandardContext.init(StandardContext.java:5130)
>   at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3945)
>   at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
>   at 
> org.apache.cat

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

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Hi David:

Thanks for your quick reply.  I don't have  tag in web.xml.  
Here is the updated context.xml,  dropped from it and 
web.xml as it were before.

context.xml file 






 





web.xml file



http://java.sun.com/dtd/web-app_2_3.dtd";>



  ISOTracking
  
 Welcome TO ISO Tracking Application
  




ISOTracking.Login_jsp
ISOTracking.Login_jsp



ISOTracking.Login_jsp
/Login.jsp



 30





jdbc/sqlserver
javax.sql.DataSource
Container






-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:17 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


The stack traces mention that the  tag is in web.xml (and 
apparently not well formed xml to boot).  Please remove it.  It should 
only be in context.xml with a  tag in web.xml.  If there 
are further stack traces, could you post your new context.xml and web.xml?

--David

Aynalem, Seblewengel (Trawick) wrote:

>Yes I do have SQL JDBC driver in common/lib as sqljdbc.jar and did drop 
> from context.xml file.  Another error comes ups as follows:
>
>Jul 31, 2006 3:01:05 PM org.apache.catalina.core.AprLifecycleListener 
>lifecycleEvent
>INFO: The Apache Tomcat Native library which allows optimal performance in 
>production environments was not found on the java.library.path: 
>C:\Java\jdk1.5.0_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
> Files\Common Files\Roxio 
>Shared\DLLShared;C:\Java\jdk1.5.0_07\bin;%CATALINA_BASE%\bin;C:\Program 
>Files\Microsoft SQL Server\80\Tools\BINN
>Jul 31, 2006 3:01:05 PM org.apache.coyote.http11.Http11BaseProtocol init
>INFO: Initializing Coyote HTTP/1.1 on http-8080
>Jul 31, 2006 3:01:05 PM org.apache.catalina.startup.Catalina load
>INFO: Initialization processed in 1732 ms
>Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardService start
>INFO: Starting service Catalina
>Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardEngine start
>INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
>Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardHost start
>INFO: XML validation disabled
>Jul 31, 2006 3:01:08 PM org.apache.tomcat.util.digester.Digester fatalError
>SEVERE: Parse Fatal Error at line 11 column 79: Element type "Resource" must 
>be followed by either attribute specifications, ">" or "/>".
>org.xml.sax.SAXParseException: Element type "Resource" must be followed by 
>either attribute specifications, ">" or "/>".
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:845)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
>   at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
>   at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
>   at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1561)
>   at 
> org.apache.catalina.startup.ContextConfig.processContextConfig(ContextConfig.java:781)
>   at 
> org.apache.catalina.startup.ContextConfig.contextConfig(ContextConfig.java:721)
>   at 
> org.apache.catalina.startup.ContextConfig.init(ContextConfig.java:977)
>   at 
> org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:278)
>   at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecy

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

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
  
 at 
org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at 
org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
  at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
   ... 23 
more
 error Cannot 
create PoolableConnectionFactory (The TCP/IP connection to the host  has 
failed. java.net.ConnectException: Connection refused: connect)   

-Original Message-
From: Saha Rabindra N [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:21 PM
To: Tomcat Users List
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


You could open your context.xml file using IE browser and that will tell you 
the syntax problem, if any.



-Original Message-
From: Aynalem, Seblewengel (Trawick)
[mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:18 PM
To: Tomcat Users List
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hi Filip:

I checked it... what is it missing?  Many thanks your help.

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:12 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


looks like your context XML file is not a valid XML format

Filip


Aynalem, Seblewengel (Trawick) wrote:
> Yes I do have SQL JDBC driver in common/lib as sqljdbc.jar and did drop 
>  from context.xml file.  Another error comes ups as follows:
>
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.AprLifecycleListener 
> lifecycleEvent
> INFO: The Apache Tomcat Native library which allows optimal performance in 
> production environments was not found on the java.library.path: 
> C:\Java\jdk1.5.0_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
>  Files\Common Files\Roxio 
> Shared\DLLShared;C:\Java\jdk1.5.0_07\bin;%CATALINA_BASE%\bin;C:\Program 
> Files\Microsoft SQL Server\80\Tools\BINN
> Jul 31, 2006 3:01:05 PM org.apache.coyote.http11.Http11BaseProtocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Jul 31, 2006 3:01:05 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1732 ms
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
> Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardHost start
> INFO: XML validation disabled
> Jul 31, 2006 3:01:08 PM org.apache.tomcat.util.digester.Digester fatalError
> SEVERE: Parse Fatal Error at line 11 column 79: Element type "Resource" must 
> be followed by either attribute specifications, ">" or "/>".
> org.xml.sax.SAXParseException: Element type "Resource" must be followed by 
> either attribute specifications, ">" or "/>".
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
>   at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:845)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
>   at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
>   at 
> com.sun.org.apache.xerces.internal.pa

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

2006-07-31 Thread David Smith
own Source) at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source) at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290) at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)  at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)   ... 23 more error Cannot create PoolableConnectionFactory (The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect)   


-Original Message-
From: Saha Rabindra N [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:21 PM
To: Tomcat Users List
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


You could open your context.xml file using IE browser and that will tell you 
the syntax problem, if any.



-Original Message-
From: Aynalem, Seblewengel (Trawick)
[mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:18 PM
To: Tomcat Users List
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hi Filip:

I checked it... what is it missing?  Many thanks your help.

-Original Message-
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:12 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


looks like your context XML file is not a valid XML format

Filip


Aynalem, Seblewengel (Trawick) wrote:
 


Yes I do have SQL JDBC driver in common/lib as sqljdbc.jar and did drop 
 from context.xml file.  Another error comes ups as follows:

Jul 31, 2006 3:01:05 PM org.apache.catalina.core.AprLifecycleListener 
lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in 
production environments was not found on the java.library.path: 
C:\Java\jdk1.5.0_07\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
 Files\Common Files\Roxio 
Shared\DLLShared;C:\Java\jdk1.5.0_07\bin;%CATALINA_BASE%\bin;C:\Program 
Files\Microsoft SQL Server\80\Tools\BINN
Jul 31, 2006 3:01:05 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 31, 2006 3:01:05 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1732 ms
Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
Jul 31, 2006 3:01:05 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 31, 2006 3:01:08 PM org.apache.tomcat.util.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 11 column 79: Element type "Resource" must be followed by either 
attribute specifications, ">" or "/>".
org.xml.sax.SAXParseException: Element type "Resource" must be followed by either attribute 
specifications, ">" or "/>".
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
at 
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
at 
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:845)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at 
com.sun.org.apache.xerces.internal.parsers.XML11Configur

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

2006-07-31 Thread Aynalem, Seblewengel (Trawick)
Sorry to ask this... how do you verify server connection independently.  This 
is my first time configuring doing database connection. Thanks a lot,

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:49 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hmmm connection refused.   Is your server listening for connections 
at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?

--David



Aynalem, Seblewengel (Trawick) wrote:

>Thanks a lot... I do need to have a space in context.xml file.  That solved 
>the problem with xml syntax.  I now seem to have problem with database 
>connection.  Here is the code I use to connect...
>
>InitialContext ic=null;
>
>DataSource ds=null;
>
>Connection conn = null;
>
> try {
>  // testing
>   ic = new InitialContext();
>  ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
>  conn = ds.getConnection();
>  } catch (Exception e) {
>  StringWriter sw = new StringWriter();
>  e.printStackTrace(new PrintWriter(sw, true));
>  lastError = sw.toString();
>   System.out.println(lastError);
>   return false;
>}
>
>And the error I get is this...
>
>lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
>PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
>java.net.ConnectException: Connection refused: connect)
>   at 
>org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
>   at 
>org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
>  at 
>ISOTracking.SessionBean.login(SessionBean.java:217)  
>at 
>org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57)
>  
>at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)  
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)   
>  at 
>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
>  
>at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
>   
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) 
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
>at 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>at 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>at 
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>  at 
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>  at 
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)  
>  
>at 
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)  
>  
>at 
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>at 
>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>  
>at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)  
>   
>  at 
>org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>   at 
>org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>   at 
>org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>   

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

2006-07-31 Thread David Smith
Well this is supposed to be an "SQL Server 2000" database server.  
Use it's client tool to connect to the database.  If successful, your 
server is running.  I'm not familiar with the product, but if you can 
find it in the preferences, make sure you connect via TCP just like 
tomcat would.


--David

Aynalem, Seblewengel (Trawick) wrote:


Sorry to ask this... how do you verify server connection independently.  This 
is my first time configuring doing database connection. Thanks a lot,

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:49 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hmmm connection refused.   Is your server listening for connections 
at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?


--David



Aynalem, Seblewengel (Trawick) wrote:

 


Thanks a lot... I do need to have a space in context.xml file.  That solved the 
problem with xml syntax.  I now seem to have problem with database connection.  
Here is the code I use to connect...

InitialContext ic=null;

DataSource ds=null;

Connection conn = null;

try {
// testing
ic = new InitialContext();
ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
conn = ds.getConnection();
} catch (Exception e) {
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw, true));
lastError = sw.toString();
System.out.println(lastError);
return false;
  }

And the error I get is this...

lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)  at ISOTracking.SessionBean.login(SessionBean.java:217)  at org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57)  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)  

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

2006-08-01 Thread Aynalem, Seblewengel (Trawick)
Thanks David.  I am able to connect to SQL Server 2000. Actually Tomcat 5.5.17 
and SQL Server 2000 is on the same machine that I am working on. Could there be 
any other cause for this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
java.net.ConnectException: Connection refused: connect)

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 4:21 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Well this is supposed to be an "SQL Server 2000" database server.  
Use it's client tool to connect to the database.  If successful, your 
server is running.  I'm not familiar with the product, but if you can 
find it in the preferences, make sure you connect via TCP just like 
tomcat would.

--David

Aynalem, Seblewengel (Trawick) wrote:

>Sorry to ask this... how do you verify server connection independently.  This 
>is my first time configuring doing database connection. Thanks a lot,
>
>-Original Message-
>From: David Smith [mailto:[EMAIL PROTECTED]
>Sent: Monday, July 31, 2006 3:49 PM
>To: Tomcat Users List
>Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
>create JDBC driver of class '' for connect URL 'null'
>
>
>Hmmm connection refused.   Is your server listening for connections 
>at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?
>
>--David
>
>
>
>Aynalem, Seblewengel (Trawick) wrote:
>
>  
>
>>Thanks a lot... I do need to have a space in context.xml file.  That solved 
>>the problem with xml syntax.  I now seem to have problem with database 
>>connection.  Here is the code I use to connect...
>>
>>InitialContext ic=null;
>>
>>DataSource ds=null;
>>
>>Connection conn = null;
>>
>>try {
>> // testing
>>  ic = new InitialContext();
>> ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
>> conn = ds.getConnection();
>> } catch (Exception e) {
>> StringWriter sw = new StringWriter();
>> e.printStackTrace(new PrintWriter(sw, true));
>> lastError = sw.toString();
>>  System.out.println(lastError);
>>  return false;
>>   }
>>
>>And the error I get is this...
>>
>>lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
>>PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
>>java.net.ConnectException: Connection refused: connect)   
>>at 
>>org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
>>   at 
>>org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
>>  at 
>>ISOTracking.SessionBean.login(SessionBean.java:217)  
>>at 
>>org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57)
>>  
>>at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) 
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
>>at 
>>org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
>>  
>>at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)   
>>  
>>at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)  
>>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) 
>>at 
>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>>at 
>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>>at 
>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>>  at 
>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>>

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

2006-08-01 Thread David Smith
And you are sure your test with the client software was via TCP, not 
some other piped/ODBC connection scheme?  I'm guessing this is a Windows 
system.  Have you checked your firewall for allowing the connections?  
Also try using TCPMon from sysinternals.org to see what's happening with 
connections to the database.  It's good at showing net connection on a 
Windows box in real time.


--David

Aynalem, Seblewengel (Trawick) wrote:


Thanks David.  I am able to connect to SQL Server 2000. Actually Tomcat 5.5.17 
and SQL Server 2000 is on the same machine that I am working on. Could there be 
any other cause for this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
java.net.ConnectException: Connection refused: connect)

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 4:21 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Well this is supposed to be an "SQL Server 2000" database server.  
Use it's client tool to connect to the database.  If successful, your 
server is running.  I'm not familiar with the product, but if you can 
find it in the preferences, make sure you connect via TCP just like 
tomcat would.


--David

Aynalem, Seblewengel (Trawick) wrote:

 


Sorry to ask this... how do you verify server connection independently.  This 
is my first time configuring doing database connection. Thanks a lot,

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:49 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hmmm connection refused.   Is your server listening for connections 
at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?


--David



Aynalem, Seblewengel (Trawick) wrote:



   


Thanks a lot... I do need to have a space in context.xml file.  That solved the 
problem with xml syntax.  I now seem to have problem with database connection.  
Here is the code I use to connect...

InitialContext ic=null;

DataSource ds=null;

Connection conn = null;

try {
   // testing
ic = new InitialContext();
   ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
   conn = ds.getConnection();
   } catch (Exception e) {
   StringWriter sw = new StringWriter();
   e.printStackTrace(new PrintWriter(sw, true));
   lastError = sw.toString();
System.out.println(lastError);
return false;
 }

And the error I get is this...

lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)  at ISOTracking.SessionBean.login(SessionBean.java:217)  at org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57)  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)  at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1

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

2006-08-01 Thread Raju Balugu

Hi ,

1.Have you fallowed the same steps whic is mentioned in this
link.Pleasecheck once again .
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
and check one more link they also having the same problem
http://forum.sun.com/jive/thread.jspa?threadID=101183&tstart=0

2.Check your system weather its blocking the ports by navigating to virus
scanner console if its there.

Regards
Raju





On 8/1/06, David Smith <[EMAIL PROTECTED]> wrote:


And you are sure your test with the client software was via TCP, not
some other piped/ODBC connection scheme?  I'm guessing this is a Windows
system.  Have you checked your firewall for allowing the connections?
Also try using TCPMon from sysinternals.org to see what's happening with
connections to the database.  It's good at showing net connection on a
Windows box in real time.

--David

Aynalem, Seblewengel (Trawick) wrote:

>Thanks David.  I am able to connect to SQL Server 2000. Actually Tomcat
5.5.17 and SQL Server 2000 is on the same machine that I am working on.
Could there be any other cause for this error:
>
>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (The TCP/IP connection to the host  has failed.
java.net.ConnectException: Connection refused: connect)
>
>-Original Message-
>From: David Smith [mailto:[EMAIL PROTECTED]
>Sent: Monday, July 31, 2006 4:21 PM
>To: Tomcat Users List
>Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
>create JDBC driver of class '' for connect URL 'null'
>
>
>Well this is supposed to be an "SQL Server 2000" database server.
>Use it's client tool to connect to the database.  If successful, your
>server is running.  I'm not familiar with the product, but if you can
>find it in the preferences, make sure you connect via TCP just like
>tomcat would.
>
>--David
>
>Aynalem, Seblewengel (Trawick) wrote:
>
>
>
>>Sorry to ask this... how do you verify server connection
independently.  This is my first time configuring doing database connection.
Thanks a lot,
>>
>>-Original Message-
>>From: David Smith [mailto:[EMAIL PROTECTED]
>>Sent: Monday, July 31, 2006 3:49 PM
>>To: Tomcat Users List
>>Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
>>create JDBC driver of class '' for connect URL 'null'
>>
>>
>>Hmmm connection refused.   Is your server listening for connections
>>at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?
>>
>>--David
>>
>>
>>
>>Aynalem, Seblewengel (Trawick) wrote:
>>
>>
>>
>>
>>
>>>Thanks a lot... I do need to have a space in context.xml file.  That
solved the problem with xml syntax.  I now seem to have problem with
database connection.  Here is the code I use to connect...
>>>
>>>InitialContext ic=null;
>>>
>>>DataSource ds=null;
>>>
>>>Connection conn = null;
>>>
>>>try {
>>>// testing
>>> ic = new InitialContext();
>>>ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
>>>conn = ds.getConnection();
>>>} catch (Exception e) {
>>>StringWriter sw = new StringWriter();
>>>e.printStackTrace(new PrintWriter(sw, true));
>>>lastError = sw.toString();
>>> System.out.println(lastError);
>>> return false;
>>>  }
>>>
>>>And the error I get is this...
>>>
>>>lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
PoolableConnectionFactory (The TCP/IP connection to the host  has failed.
java.net.ConnectException: Connection refused:
connect)   at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(
BasicDataSource.java:855)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(
BasicDataSource.java:540)   
   at
ISOTracking.SessionBean.login(SessionBean.java:217)  at
org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57) 
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:332) 
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspSe

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

2006-08-01 Thread johnny
Just a thought Is the SQL server installed as a non-default named 
instance?  If so, the port probably not 1433.  You can check it by using 
the Server Network Utility (select TCP/IP and click on properties).

Good luck,
Johnny







"Aynalem, Seblewengel (Trawick)" <[EMAIL PROTECTED]> 
08/01/2006 08:13 AM
Please respond to
"Tomcat Users List" 


To
"Tomcat Users List" 
cc

Subject
[***Probable Spam***] RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot create JDBC driver of class '' for connect URL 'null'






Thanks David.  I am able to connect to SQL Server 2000. Actually Tomcat 
5.5.17 and SQL Server 2000 is on the same machine that I am working on. 
Could there be any other cause for this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
java.net.ConnectException: Connection refused: connect)

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 4:21 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Well this is supposed to be an "SQL Server 2000" database server. 
Use it's client tool to connect to the database.  If successful, your 
server is running.  I'm not familiar with the product, but if you can 
find it in the preferences, make sure you connect via TCP just like 
tomcat would.

--David

Aynalem, Seblewengel (Trawick) wrote:

>Sorry to ask this... how do you verify server connection independently. 
This is my first time configuring doing database connection. Thanks a lot,
>
>-Original Message-
>From: David Smith [mailto:[EMAIL PROTECTED]
>Sent: Monday, July 31, 2006 3:49 PM
>To: Tomcat Users List
>Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
>create JDBC driver of class '' for connect URL 'null'
>
>
>Hmmm connection refused.   Is your server listening for connections 
>at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?
>
>--David
>
>
>
>Aynalem, Seblewengel (Trawick) wrote:
>
> 
>
>>Thanks a lot... I do need to have a space in context.xml file.  That 
solved the problem with xml syntax.  I now seem to have problem with 
database connection.  Here is the code I use to connect...
>>
>>InitialContext ic=null;
>>
>>DataSource ds=null;
>>
>>Connection conn = null;
>>
>>try {
>> // testing
>>   ic = new InitialContext();
>> ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
>> conn = ds.getConnection();
>> } catch (Exception e) {
>> StringWriter sw = new StringWriter();
>> e.printStackTrace(new PrintWriter(sw, true));
>> lastError = sw.toString();
>>   System.out.println(lastError);
>>   return false;
>>   }
>>
>>And the error I get is this...
>>
>>lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
java.net.ConnectException: Connection refused: connect)  at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
 
  at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
 
 at ISOTracking.SessionBean.login(SessionBean.java:217)   at 
org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57) 
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)   
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)   at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332) 
   at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)   
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)  
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)   
   at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 
   at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 
   at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) 
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportV

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

2006-08-01 Thread Aynalem, Seblewengel (Trawick)
Thanks David, Raju and Johnny for your time and valuable suggestions.  

To David's question:  I checked Client Network Utility service for SQL server 
2000 and saw that TCP/IP is enabled on port 1433.  I do check the firewall, yes 
it was on.  It has the option of adding exceptions to allow programs/service to 
connect to the machine.  So I added SQL server 2000 on port 1433. I did netstat 
-an on command prompt to see active connection... but port 1433 is not listed.  
I also used sysinternals.org as suggested and SQL Server is not listed. This 
might mean SQL Server is not using TCP/IP on port 1433???

To Raju's question... I have tried to read and re-read tomcat manual... I will 
check if there is anything I missed.  I am also trying to see how I can apply 
the solution suggested on the link provided.  

Jonny - SQL Server is installed as default instance... TCP/IP was enabled on 
port 1433.

Any further help is higly appreciated.  

Thanks a lot. 

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 01, 2006 8:26 AM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


And you are sure your test with the client software was via TCP, not 
some other piped/ODBC connection scheme?  I'm guessing this is a Windows 
system.  Have you checked your firewall for allowing the connections?  
Also try using TCPMon from sysinternals.org to see what's happening with 
connections to the database.  It's good at showing net connection on a 
Windows box in real time.

--David

Aynalem, Seblewengel (Trawick) wrote:

>Thanks David.  I am able to connect to SQL Server 2000. Actually Tomcat 5.5.17 
>and SQL Server 2000 is on the same machine that I am working on. Could there 
>be any other cause for this error:
>
>org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
>PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
>java.net.ConnectException: Connection refused: connect)
>
>-Original Message-
>From: David Smith [mailto:[EMAIL PROTECTED]
>Sent: Monday, July 31, 2006 4:21 PM
>To: Tomcat Users List
>Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
>create JDBC driver of class '' for connect URL 'null'
>
>
>Well this is supposed to be an "SQL Server 2000" database server.  
>Use it's client tool to connect to the database.  If successful, your 
>server is running.  I'm not familiar with the product, but if you can 
>find it in the preferences, make sure you connect via TCP just like 
>tomcat would.
>
>--David
>
>Aynalem, Seblewengel (Trawick) wrote:
>
>  
>
>>Sorry to ask this... how do you verify server connection independently.  This 
>>is my first time configuring doing database connection. Thanks a lot,
>>
>>-Original Message-
>>From: David Smith [mailto:[EMAIL PROTECTED]
>>Sent: Monday, July 31, 2006 3:49 PM
>>To: Tomcat Users List
>>Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
>>create JDBC driver of class '' for connect URL 'null'
>>
>>
>>Hmmm connection refused.   Is your server listening for connections 
>>at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?
>>
>>--David
>>
>>
>>
>>Aynalem, Seblewengel (Trawick) wrote:
>>
>> 
>>
>>
>>
>>>Thanks a lot... I do need to have a space in context.xml file.  That solved 
>>>the problem with xml syntax.  I now seem to have problem with database 
>>>connection.  Here is the code I use to connect...
>>>
>>>InitialContext ic=null;
>>>
>>>DataSource ds=null;
>>>
>>>Connection conn = null;
>>>
>>>try {
>>>// testing
>>> ic = new InitialContext();
>>>ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
>>>conn = ds.getConnection();
>>>} catch (Exception e) {
>>>StringWriter sw = new StringWriter();
>>>e.printStackTrace(new PrintWriter(sw, true));
>>>lastError = sw.toString();
>>> System.out.println(lastError);
>>> return false;
>>>  }
>>>
>>>And the error I get is this...
>>>
>>>lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
>>>PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
>>>java.net.ConnectException: Connection refused: connect)  
>>> at 
>>>org.apache.tomcat.dbcp.dbcp.BasicDataSour

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

2006-08-01 Thread David Smith
I think you have your answer.  The SQL Server is not setup to listen on 
1433 or not running.  Address this and things should start working.


--David

Aynalem, Seblewengel (Trawick) wrote:

Thanks David, Raju and Johnny for your time and valuable suggestions.  


To David's question:  I checked Client Network Utility service for SQL server 
2000 and saw that TCP/IP is enabled on port 1433.  I do check the firewall, yes 
it was on.  It has the option of adding exceptions to allow programs/service to 
connect to the machine.  So I added SQL server 2000 on port 1433. I did netstat 
-an on command prompt to see active connection... but port 1433 is not listed.  
I also used sysinternals.org as suggested and SQL Server is not listed. This 
might mean SQL Server is not using TCP/IP on port 1433???

To Raju's question... I have tried to read and re-read tomcat manual... I will check if there is anything I missed.  I am also trying to see how I can apply the solution suggested on the link provided.  


Jonny - SQL Server is installed as default instance... TCP/IP was enabled on 
port 1433.

Any further help is higly appreciated.  

Thanks a lot. 


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 01, 2006 8:26 AM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


And you are sure your test with the client software was via TCP, not 
some other piped/ODBC connection scheme?  I'm guessing this is a Windows 
system.  Have you checked your firewall for allowing the connections?  
Also try using TCPMon from sysinternals.org to see what's happening with 
connections to the database.  It's good at showing net connection on a 
Windows box in real time.


--David

Aynalem, Seblewengel (Trawick) wrote:

 


Thanks David.  I am able to connect to SQL Server 2000. Actually Tomcat 5.5.17 
and SQL Server 2000 is on the same machine that I am working on. Could there be 
any other cause for this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
PoolableConnectionFactory (The TCP/IP connection to the host  has failed. 
java.net.ConnectException: Connection refused: connect)

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 4:21 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Well this is supposed to be an "SQL Server 2000" database server.  
Use it's client tool to connect to the database.  If successful, your 
server is running.  I'm not familiar with the product, but if you can 
find it in the preferences, make sure you connect via TCP just like 
tomcat would.


--David

Aynalem, Seblewengel (Trawick) wrote:



   


Sorry to ask this... how do you verify server connection independently.  This 
is my first time configuring doing database connection. Thanks a lot,

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Monday, July 31, 2006 3:49 PM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Hmmm connection refused.   Is your server listening for connections 
at jdbc:sqlserver://localhost:1433 ?  Can you verify it independently?


--David



Aynalem, Seblewengel (Trawick) wrote:



  

 


Thanks a lot... I do need to have a space in context.xml file.  That solved the 
problem with xml syntax.  I now seem to have problem with database connection.  
Here is the code I use to connect...

InitialContext ic=null;

DataSource ds=null;

Connection conn = null;

try {
  // testing
ic = new InitialContext();
  ds = (DataSource)ic.lookup("java:comp/env/jdbc/sqlserver");
  conn = ds.getConnection();
  } catch (Exception e) {
  StringWriter sw = new StringWriter();
  e.printStackTrace(new PrintWriter(sw, true));
  lastError = sw.toString();
System.out.println(lastError);
return false;
}

And the error I get is this...

lasterror org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)   at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)  at ISOTracking.SessionBean.login(SessionBean.java:217)  at org.apache.jsp.ISOTracking.LoginAction_jsp._jspService(LoginAction_jsp.java:57)

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

2006-08-01 Thread Christopher Schultz
Trawick,

> I do check the firewall, yes it was on.  It has the option of adding 
> exceptions to allow programs/service to connect to the machine.  So I
> added SQL server 2000 on port 1433.

This probably shouldn't have mattered, since you mentioned that
everything is running on the local machine. The firewall usually won't
interfere with localhost->localhost communications.

> I did netstat -an on command prompt to see active connection... but 
> port 1433 is not listed.  I also used sysinternals.org as suggested 
> and SQL Server is not listed. This might mean SQL Server is not using
> TCP/IP on port 1433???

I'm not sure about SQL Server, but some DBs like MySQL allow localhost
communication through some means /other than/ TCP (MySQL uses a named
pipe on the filesystem -- not an option in win32 AFAIK).

Anyhow, is it possible that TCP/IP communication is not enabled? This
would suggest otherwise:

> I checked Client Network Utility service for SQL server 2000 and saw
> that TCP/IP is enabled on port 1433.

Does that mean that SQL Server is expecting to accept connections on
1433? I assume so.

Stupid question: is SQL Server actually running?

-chris



signature.asc
Description: OpenPGP digital signature


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

2006-08-01 Thread Aynalem, Seblewengel (Trawick)
Yes, SQL Server is expected to accept connection on 1433 - which is the default 
port.  For you question: SQL Server is running... I can see it clearly on the 
Task Manager.  I am trying to see if it is actually using TCP/IP or named 
pipes...

Thanks,

-Original Message-
From: Christopher Schultz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 01, 2006 10:23 AM
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


Trawick,

> I do check the firewall, yes it was on.  It has the option of adding 
> exceptions to allow programs/service to connect to the machine.  So I
> added SQL server 2000 on port 1433.

This probably shouldn't have mattered, since you mentioned that
everything is running on the local machine. The firewall usually won't
interfere with localhost->localhost communications.

> I did netstat -an on command prompt to see active connection... but 
> port 1433 is not listed.  I also used sysinternals.org as suggested 
> and SQL Server is not listed. This might mean SQL Server is not using
> TCP/IP on port 1433???

I'm not sure about SQL Server, but some DBs like MySQL allow localhost
communication through some means /other than/ TCP (MySQL uses a named
pipe on the filesystem -- not an option in win32 AFAIK).

Anyhow, is it possible that TCP/IP communication is not enabled? This
would suggest otherwise:

> I checked Client Network Utility service for SQL server 2000 and saw
> that TCP/IP is enabled on port 1433.

Does that mean that SQL Server is expecting to accept connections on
1433? I assume so.

Stupid question: is SQL Server actually running?

-chris



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

2007-06-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pranav,

Pranav wrote:
> I am running an application using tomcat5.x and getting following error:

[snip]

> I would appreciate if any one could help me with this. I running the
> application using Netbeans 5.5 and have setup the MySql and made the
> connection on that. Further I have copied the mysqlxxx.jar in
> commons/lib folder. Please help me to find the cause of the error.

First, search the archives. This issue comes up over and over again.

If the archives don't help, please post your DBCP configuration.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZWr09CaO5/Lv0PARAs0qAKCPe0VeECHpfvHHVNO1h3YTDb7fbwCeI7gR
06l35ckDx6zDnm2Z+bBnv2s=
=iIvk
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2007-06-05 Thread David Smith
Additionally the tomcat website has some excellent docs on how to set 
this up.  I would refer to those docs for your specific version of 
tomcat (5.0.x or 5.5.x)


--David

Christopher Schultz wrote:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pranav,

Pranav wrote:
 


I am running an application using tomcat5.x and getting following error:
   



[snip]

 


I would appreciate if any one could help me with this. I running the
application using Netbeans 5.5 and have setup the MySql and made the
connection on that. Further I have copied the mysqlxxx.jar in
commons/lib folder. Please help me to find the cause of the error.
   



First, search the archives. This issue comes up over and over again.

If the archives don't help, please post your DBCP configuration.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZWr09CaO5/Lv0PARAs0qAKCPe0VeECHpfvHHVNO1h3YTDb7fbwCeI7gR
06l35ckDx6zDnm2Z+bBnv2s=
=iIvk
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2006-01-02 Thread Roberto Rios

Copy your jdbc driver into [tomcat]/common/lib

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



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

2006-01-02 Thread Eric Munson
Thanks for your reply, but I have already moved the proper driver into
the $CATALINA_HOME/common/lib.  Is there anything else that would
cause this behavior?

Thanks,
Eric
On 1/2/06, Roberto Rios <[EMAIL PROTECTED]> wrote:
> Copy your jdbc driver into [tomcat]/common/lib
>
> -
> 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' Exception Help

2006-01-02 Thread Eric Munson
I found the error, there was a misspelling of the Context object in
one of the context.xml files.  When it was corrected everything
worked.  Thanks for all of your help.

Thanks,
Eric

On 1/2/06, Eric Munson <[EMAIL PROTECTED]> wrote:
> Thanks for your reply, but I have already moved the proper driver into
> the $CATALINA_HOME/common/lib.  Is there anything else that would
> cause this behavior?
>
> Thanks,
> Eric
> On 1/2/06, Roberto Rios <[EMAIL PROTECTED]> wrote:
> > Copy your jdbc driver into [tomcat]/common/lib
> >
> > -
> > 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' Exception Help

2006-01-04 Thread Gary Blomquist

I am also getting this error in 5.5.9 and 5.5.12.  I have the mysql
driver in  $CATALINA_HOME/common/lib.  My application was working in
5.0.28.

I took the following from the server.xml in 5.0.28 (that was working)
and pasted it 
in the 5.5.x server.xml and I get the "Cannot create JDBC driver" error.

   

  



  
factory
 
org.apache.commons.dbcp.BasicDataSourceFactory
  
  maxActive10
  maxWait500
 
usernameroot
 
passwordroot
  
driverClassName
com.mysql.jdbc.Driver
  
  
url
jdbc:mysql://localhost/hello
  



I have Hello2.war in the webapps directory.

Is there a change re: deployment between Tomcat 5.0.x and Tomcat 5.5.x?

Thanks,

Gary

-Original Message-
From: Eric Munson [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 02, 2006 6:44 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Cannot create JDBC driver of class '' for connect URL
'null' Exception Help

I found the error, there was a misspelling of the Context object in one
of the context.xml files.  When it was corrected everything worked.
Thanks for all of your help.

Thanks,
Eric

On 1/2/06, Eric Munson <[EMAIL PROTECTED]> wrote:
> Thanks for your reply, but I have already moved the proper driver into

> the $CATALINA_HOME/common/lib.  Is there anything else that would 
> cause this behavior?
>
> Thanks,
> Eric
> On 1/2/06, Roberto Rios <[EMAIL PROTECTED]> wrote:
> > Copy your jdbc driver into [tomcat]/common/lib
> >
> > 
> > - 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]



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

2006-01-04 Thread Caldarale, Charles R
> From: Gary Blomquist [mailto:[EMAIL PROTECTED] 
> Subject: RE: Cannot create JDBC driver of class '' for 
> connect URL 'null' Exception Help
> 
> I took the following from the server.xml in 5.0.28 (that was working)
> and pasted it in the 5.5.x server.xml and I get the "Cannot create
JDBC 
> driver" error.
> 
> Is there a change re: deployment between Tomcat 5.0.x and 
> Tomcat 5.5.x?

RTFM.  The ResourceParameter element is no longer used in 5.5.  The
following is taken from:
http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

"You MUST also define the needed resource parameters as attributes of
the Resource element..."

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



>>Tomcat 4<<: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-08-03 Thread Roy Kiesler

I have been trying for 2 days now to setup a simple connection pool in
Tomcat 4.0.6 for a Hypersonic database with the ever-so-popular error in the
subject. I have read every possible Google post on the subject, but found
not solution for Tomcat 4, only 5.x.

Anyhow, here's the setup:


  1. hsqldb.jar is placed in %CATALINA_HOME%/common/lib
  2. %CATALINA_HOME%/server/conf/server.xml contains the following
  context definition:

  

 

 

 

   factory
   org.apache.commons.dbcp.BasicDataSourceFactory



   maxActive
   100



   maxIdle
   30



   maxWait
   1



   username
   sa



   password
   



   driverClassName
   org.hsqldb.jdbcDriver



   url
   jdbc:hsqldb:file:c:/bookmart



   removeAbandoned
   true



   removeAbandonedTimeout
   60



   logAbandoned
   true


 
  

  3. %CATALINA_HOME%/server/webapps/bookmartClient/WEB-INF/web.xml
  contains the following resource reference:

  
 DB Connection
 jdbc/BookmartDB
 javax.sql.DataSource
 Container
  

  4. My JSP code contains the following:

  Context initCtx = new InitialContext();
  Context envCtx = (Context) initCtx.lookup("java:comp/env");
  DataSource ds = (DataSource)envCtx.lookup("jdbc/BookmartDB");
  Connection conn = ds.getConnection();

This does not appear to be an issue with the driver, as the following code
works just fine:

Class.forName("org.hsqldb.jdbcDriver" );
Connection conn = DriverManager.getConnection("jdbc:hsqldb:file:c:/bookmart",
"sa", "");
Statement stmt = conn.createStatement();
ResultSet rst = stmt.executeQuery("select * from testdata");
if (rst.next())
{
  foo = rst.getString(2);
  bar = rst.getInt(3);
}

Hopefully this paints the picture clearly enough. Any insights?

Thanks,
--
Roy


Re: >>Tomcat 4<<: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-08-03 Thread David Smith
Your setup is textbook for tomcat 4.1.x, but I took a quick look at the 
docs for 4.0 and things look very slightly different.  Take a look at:


http://tomcat.apache.org/tomcat-4.0-doc/jndi-resources-howto.html

One thing I'm wondering considering the docs for 4.0 don't mention the 
DBCP pooling is where you put dbcp.jar.  It'll have to be in common/lib 
right next to the hsqldb.jar.


--David

Roy Kiesler wrote:


I have been trying for 2 days now to setup a simple connection pool in
Tomcat 4.0.6 for a Hypersonic database with the ever-so-popular error 
in the

subject. I have read every possible Google post on the subject, but found
not solution for Tomcat 4, only 5.x.

Anyhow, here's the setup:


  1. hsqldb.jar is placed in %CATALINA_HOME%/common/lib
  2. %CATALINA_HOME%/server/conf/server.xml contains the following
  context definition:

  

 

 

 

   factory
   org.apache.commons.dbcp.BasicDataSourceFactory



   maxActive
   100



   maxIdle
   30



   maxWait
   1



   username
   sa



   password
   



   driverClassName
   org.hsqldb.jdbcDriver



   url
   jdbc:hsqldb:file:c:/bookmart



   removeAbandoned
   true



   removeAbandonedTimeout
   60



   logAbandoned
   true


 
  

  3. %CATALINA_HOME%/server/webapps/bookmartClient/WEB-INF/web.xml
  contains the following resource reference:

  
 DB Connection
 jdbc/BookmartDB
 javax.sql.DataSource
 Container
  

  4. My JSP code contains the following:

  Context initCtx = new InitialContext();
  Context envCtx = (Context) initCtx.lookup("java:comp/env");
  DataSource ds = (DataSource)envCtx.lookup("jdbc/BookmartDB");
  Connection conn = ds.getConnection();

This does not appear to be an issue with the driver, as the following 
code

works just fine:

Class.forName("org.hsqldb.jdbcDriver" );
Connection conn = 
DriverManager.getConnection("jdbc:hsqldb:file:c:/bookmart",

"sa", "");
Statement stmt = conn.createStatement();
ResultSet rst = stmt.executeQuery("select * from testdata");
if (rst.next())
{
  foo = rst.getString(2);
  bar = rst.getInt(3);
}

Hopefully this paints the picture clearly enough. Any insights?

Thanks,
--
Roy




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: >>Tomcat 4<<: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-08-03 Thread Tejas Bavishi
1. You can try giving a password to the database and setting the same in the
server.xml. See if this works.

Thanks
Tejas

-Original Message-
From: Roy Kiesler [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 03, 2006 10:41 PM
To: users@tomcat.apache.org
Subject: >>Tomcat 4<<: org.apache.commons.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'


I have been trying for 2 days now to setup a simple connection pool in
Tomcat 4.0.6 for a Hypersonic database with the ever-so-popular error in the
subject. I have read every possible Google post on the subject, but found
not solution for Tomcat 4, only 5.x.

Anyhow, here's the setup:


   1. hsqldb.jar is placed in %CATALINA_HOME%/common/lib
   2. %CATALINA_HOME%/server/conf/server.xml contains the following
   context definition:

   

  

  

  
 
factory
org.apache.commons.dbcp.BasicDataSourceFactory
 

 
maxActive
100
 

 
maxIdle
30
 

 
maxWait
1
 

 
username
sa
 

 
password

 

 
driverClassName
org.hsqldb.jdbcDriver
 

 
url
jdbc:hsqldb:file:c:/bookmart
 

 
removeAbandoned
true
 

 
removeAbandonedTimeout
60
 

 
logAbandoned
true
 

  
   

   3. %CATALINA_HOME%/server/webapps/bookmartClient/WEB-INF/web.xml
   contains the following resource reference:

   
  DB Connection
  jdbc/BookmartDB
  javax.sql.DataSource
  Container
   

   4. My JSP code contains the following:

   Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:comp/env");
   DataSource ds = (DataSource)envCtx.lookup("jdbc/BookmartDB");
   Connection conn = ds.getConnection();

This does not appear to be an issue with the driver, as the following code
works just fine:

Class.forName("org.hsqldb.jdbcDriver" );
Connection conn =
DriverManager.getConnection("jdbc:hsqldb:file:c:/bookmart",
"sa", "");
Statement stmt = conn.createStatement();
ResultSet rst = stmt.executeQuery("select * from testdata");
if (rst.next())
{
   foo = rst.getString(2);
   bar = rst.getInt(3);
}

Hopefully this paints the picture clearly enough. Any insights?

Thanks,
--
Roy


http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

SOLVED: >>Tomcat 4<<: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-08-04 Thread Roy Kiesler

the docBase attribute of the  element in server.xml must point to
the fully qualified path of the web app from which you will be referencing
this data source. An incorrect path will result in the SQL exception in the
subject.

Case closed.

On 8/3/06, Roy Kiesler <[EMAIL PROTECTED]> wrote:


I have been trying for 2 days now to setup a simple connection pool in
Tomcat 4.0.6 for a Hypersonic database with the ever-so-popular error in
the subject. I have read every possible Google post on the subject, but
found not solution for Tomcat 4, only 5.x.

Anyhow, here's the setup:


   1. hsqldb.jar is placed in %CATALINA_HOME%/common/lib
   2. %CATALINA_HOME%/server/conf/server.xml contains the following
   context definition:

   

  

  

  
 
factory
org.apache.commons.dbcp.BasicDataSourceFactory
 

 
maxActive
100
 

 
maxIdle
30
 

 
maxWait
1
 

 
username
sa
 

 
password

 

 
driverClassName
org.hsqldb.jdbcDriver
 

 
url
jdbc:hsqldb:file:c:/bookmart
 

 
removeAbandoned
true
 

 
removeAbandonedTimeout
60
 

 
logAbandoned
true
 

  
   

   3. %CATALINA_HOME%/server/webapps/bookmartClient/WEB-INF/web.xml
   contains the following resource reference:

   
  DB Connection
  jdbc/BookmartDB
  javax.sql.DataSource
  Container
   

   4. My JSP code contains the following:

   Context initCtx = new InitialContext();
   Context envCtx = (Context) initCtx.lookup("java:comp/env");
   DataSource ds = (DataSource)envCtx.lookup("jdbc/BookmartDB");
   Connection conn = ds.getConnection();

This does not appear to be an issue with the driver, as the following code
works just fine:

Class.forName("org.hsqldb.jdbcDriver" );
Connection conn = DriverManager.getConnection("jdbc:hsqldb:file:c:/bookmart",
"sa", "");
Statement stmt = conn.createStatement();
ResultSet rst = stmt.executeQuery("select * from testdata");
if (rst.next())
{
   foo = rst.getString(2);
   bar = rst.getInt(3);
}

Hopefully this paints the picture clearly enough. Any insights?

Thanks,
--
Roy





--
Roy Kiesler | [EMAIL PROTECTED] | f: 801-439-4051 | m: 925-876-6323


DataSource created but not initialized => Cannot create JDBC driver of class '' for connect URL 'null'

2007-12-07 Thread Thomas Okken

Hi all,

I'm trying to set up a DataSource to manage connections to a MySQL 
database, but whenever I call getConnection(), I get this error:


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of 
class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
...
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
...


The datasource is defined in a file called 
$TOMCAT_HOME/conf/Catalina/localhost/smm.xml (the web app's context path 
is /smm); it looks like this:


crossContext="true">

  username="wmmdev" password="wmmdev" 
driverClassName="com.mysql.jdbc.Driver"
   
url="jdbc:mysql://ss-1.research.att.com:3306/wmmdev?autoReconnect=true"/>



The fact that the datasource gets created and bound in JNDI tells me 
that smm.xml is getting read, but apparently it is not getting 
initialized properly; getDriverClassName(), getUrl(), getUsername(), and 
getPassword() all return null, and it looks like that's what causes the 
exception in getConnection().
I've seen quite a few questions about this error, but in the archived 
threads on this mailing list, I haven't found any solution to this 
particular problem... One poster who had the same diagnosis mentioned 
that the problem went away when he got rid of the Context element in 
META-INF/context.xml, but in my case, that file does not exist; in fact, 
the only Context elements I have are the one shown above, and the 
standard one in $TOMCAT_HOME/conf/context.xml.
The MySQL JDBC driver is in $TOMCAT_HOME/lib, and when I do 
Class.forName("com.mysql.jdbc.Driver") in a JSP, it succeeds, but I'm 
not sure that's relevant because, first of all, DriverManager will only 
use drivers that were loaded by the same class loader as itself, and 
second, the DataSource can't use the driver anyway as long as its 
driverClassName and url properties remain unset.


I'm using Tomcat 6.0.14, JDK 1.5.0_11, MySQL 5.0.45, and 
mysql-connector-java-5.1.5-bin.jar.


I'm stumped... Any thoughts would be much appreciated!

- Thomas

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DataSource created but not initialized => Cannot create JDBC driver of class '' for connect URL 'null'

2007-12-07 Thread Thomas Okken

Hi Martin,

My MySQL server is alive and well; I can connect to it using the same 
parameters, using a JDBC-based database browser.
I didn't know about autoReconnect being deprecated; it still appears to 
be supported, but I see that the MySQL 5.0 reference manual recommends 
cranking up the server's wait_timeout instead. I'll do that and get rid 
of the autoReconnect; I don't want the server to ever drop idle 
connections anyway.
Unfortunately, this doesn't fix the problem of the DataSource not 
getting initialized... but thanks anyway! :-)


- Thomas

[EMAIL PROTECTED] wrote:

Hi Tom

here is my jdbc.properties which is used for petstore access to MySQL tables
#jdbc.driverClassName=org.hsqldb.jdbcDriver
jdbc.driverClassName=com.mysql.jdbc.Driver
#jdbc.url=jdbc:hsqldb:hsql://localhost:9001
jdbc.url=jdbc:mysql://localhost:3306/petclinic
jdbc.username=fu
jdbc.password=bar

your URL is quite similar and constructed correctly
url="jdbc:mysql://ss-1.research.att.com:3306/wmmdev?autoReconnect=true"/

so I would check to see if there is a MySQL Listening on
ss1-.research.att.com e.g.
login to ss-1.research.att.com
netstat -a | grep 3306

the newer versions of mySQL (specifically 4 and 5) dont support deprecated
autoReconnect attribute
http://forums.mysql.com/read.php?39,32231,32231

HTH
Martin-
- Original Message -
Wrom: UZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPN
To: "Tomcat Users List" 
Sent: Friday, December 07, 2007 12:14 PM
Subject: DataSource created but not initialized => Cannot create JDBC driver
of class '' for connect URL 'null'


  

Hi all,

I'm trying to set up a DataSource to manage connections to a MySQL
database, but whenever I call getConnection(), I get this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver


of class '' for connect URL 'null'
  

at


org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
java:1150)
  

at


org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:880)
  

...
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at


org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
java:1143)
  

...


The datasource is defined in a file called
$TOMCAT_HOME/conf/Catalina/localhost/smm.xml (the web app's context path
is /smm); it looks like this:




type="javax.sql.DataSource"
  

maxActive="100" maxIdle="30" maxWait="1"
username="wmmdev" password="wmmdev"
driverClassName="com.mysql.jdbc.Driver"

url="jdbc:mysql://ss-1.research.att.com:3306/wmmdev?autoReconnect=true"/>


The fact that the datasource gets created and bound in JNDI tells me
that smm.xml is getting read, but apparently it is not getting
initialized properly; getDriverClassName(), getUrl(), getUsername(), and
getPassword() all return null, and it looks like that's what causes the
exception in getConnection().
I've seen quite a few questions about this error, but in the archived
threads on this mailing list, I haven't found any solution to this
particular problem... One poster who had the same diagnosis mentioned
that the problem went away when he got rid of the Context element in
META-INF/context.xml, but in my case, that file does not exist; in fact,
the only Context elements I have are the one shown above, and the
standard one in $TOMCAT_HOME/conf/context.xml.
The MySQL JDBC driver is in $TOMCAT_HOME/lib, and when I do
Class.forName("com.mysql.jdbc.Driver") in a JSP, it succeeds, but I'm
not sure that's relevant because, first of all, DriverManager will only
use drivers that were loaded by the same class loader as itself, and
second, the DataSource can't use the driver anyway as long as its
driverClassName and url properties remain unset.

I'm using Tomcat 6.0.14, JDK 1.5.0_11, MySQL 5.0.45, and
mysql-connector-java-5.1.5-bin.jar.

I'm stumped... Any thoughts would be much appreciated!

 - Thomas

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


Re: DataSource created but not initialized => Cannot create JDBC driver of class '' for connect URL 'null'

2007-12-07 Thread Thomas Okken
The MySQL driver is in $TOMCAT_HOME/lib, but I don't think that is even 
the issue here -- the real problem is that the DataSource object is not 
initialized, so it doesn't even have the url, driver class name, etc.

This is what my log looks like when I restart Tomcat:

Dec 7, 2007 1:18:50 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance 
in production environments was not found on the java.library.path: 
/home/tokken/software/jdk1.5.0_11/bin:/home/tokken/apache-tomcat-6.0.14/bin

Dec 7, 2007 1:18:51 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-
Dec 7, 2007 1:18:51 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 729 ms
Dec 7, 2007 1:18:51 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 7, 2007 1:18:51 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Dec 7, 2007 1:18:51 PM org.apache.catalina.startup.HostConfig 
deployDescriptor
WARNING: A docBase /home/tokken/apache-tomcat-6.0.14/webapps/smm inside 
the host appBase has been specified, and will be ignored

Dec 7, 2007 1:18:52 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from 
jar:file:/home/tokken/apache-tomcat-6.0.14/webapps/smm/WEB-INF/lib/struts-core-1.3.8.jar!/org/apache/struts/chain/chain-config.xml

Dec 7, 2007 1:18:53 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive BBYPServer.war
Dec 7, 2007 1:18:53 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 7, 2007 1:18:53 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 7, 2007 1:18:53 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-
Dec 7, 2007 1:18:53 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 7, 2007 1:18:54 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/43  config=null
Dec 7, 2007 1:18:54 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3005 ms

There is a warning about the docBase attribute (strange; I copied that 
text verbatim from the Tomcat FAQ); if I remove that attribute, the 
warning goes away, but the DataSource remains uninitialized.


- Thomas

David Smith wrote:
Where did you place your mysql driver jar file?  It has to be in 
tomcat's /lib directory to be visible to tomat's internal code for 
building the db pool and your webapp.  Also did you happen to look at 
the logs around when your webapp started for any relevant messages?


--David

Thomas Okken wrote:


Hi all,

I'm trying to set up a DataSource to manage connections to a MySQL 
database, but whenever I call getConnection(), I get this error:


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150) 

at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 


...
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143) 


...


The datasource is defined in a file called 
$TOMCAT_HOME/conf/Catalina/localhost/smm.xml (the web app's context 
path is /smm); it looks like this:


crossContext="true">
   type="javax.sql.DataSource"

   maxActive="100" maxIdle="30" maxWait="1"
   username="wmmdev" password="wmmdev" 
driverClassName="com.mysql.jdbc.Driver"
   
url="jdbc:mysql://ss-1.research.att.com:3306/wmmdev?autoReconnect=true"/> 




The fact that the datasource gets created and bound in JNDI tells me 
that smm.xml is getting read, but apparently it is not getting 
initialized properly; getDriverClassName(), getUrl(), getUsername(), 
and getPassword() all return null, and it looks like that's what 
causes the exception in getConnection().
I've seen quite a few questions about this error, but in the archived 
threads on this mailing list, I haven't found any solution to this 
particular problem... One poster who had the same diagnosis mentioned 
that the problem went away when he got rid of the Context element in 
META-INF/context.xml, but in my case, that file does not exist; in 
fact, the only Context elements I have are the one shown above, and 
the standard one in $TOMCAT_HOME/conf/context.xml.
The MySQL JDBC driver is in $TOMCAT_HOME/lib, and when I do 
Class.forName("com.mysql.jdbc.Driver") in a JSP, it succeeds, but I'm 
not

Re: DataSource created but not initialized => Cannot create JDBC driver of class '' for connect URL 'null'

2007-12-07 Thread mgainty
Hi Tom

here is my jdbc.properties which is used for petstore access to MySQL tables
#jdbc.driverClassName=org.hsqldb.jdbcDriver
jdbc.driverClassName=com.mysql.jdbc.Driver
#jdbc.url=jdbc:hsqldb:hsql://localhost:9001
jdbc.url=jdbc:mysql://localhost:3306/petclinic
jdbc.username=fu
jdbc.password=bar

your URL is quite similar and constructed correctly
url="jdbc:mysql://ss-1.research.att.com:3306/wmmdev?autoReconnect=true"/

so I would check to see if there is a MySQL Listening on
ss1-.research.att.com e.g.
login to ss-1.research.att.com
netstat -a | grep 3306

the newer versions of mySQL (specifically 4 and 5) dont support deprecated
autoReconnect attribute
http://forums.mysql.com/read.php?39,32231,32231

HTH
Martin-
- Original Message -
Wrom: UZXUWLSZLKBRNVWWCUFPEGAUTFJMVRESKPN
To: "Tomcat Users List" 
Sent: Friday, December 07, 2007 12:14 PM
Subject: DataSource created but not initialized => Cannot create JDBC driver
of class '' for connect URL 'null'


> Hi all,
>
> I'm trying to set up a DataSource to manage connections to a MySQL
> database, but whenever I call getConnection(), I get this error:
>
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver
of class '' for connect URL 'null'
> at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
java:1150)
> at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.ja
va:880)
> ...
> Caused by: java.sql.SQLException: No suitable driver
> at java.sql.DriverManager.getDriver(DriverManager.java:243)
> at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource
java:1143)
> ...
>
>
> The datasource is defined in a file called
> $TOMCAT_HOME/conf/Catalina/localhost/smm.xml (the web app's context path
> is /smm); it looks like this:
>
>  crossContext="true">
>  maxActive="100" maxIdle="30" maxWait="1"
> username="wmmdev" password="wmmdev"
> driverClassName="com.mysql.jdbc.Driver"
>
> url="jdbc:mysql://ss-1.research.att.com:3306/wmmdev?autoReconnect=true"/>
> 
>
> The fact that the datasource gets created and bound in JNDI tells me
> that smm.xml is getting read, but apparently it is not getting
> initialized properly; getDriverClassName(), getUrl(), getUsername(), and
> getPassword() all return null, and it looks like that's what causes the
> exception in getConnection().
> I've seen quite a few questions about this error, but in the archived
> threads on this mailing list, I haven't found any solution to this
> particular problem... One poster who had the same diagnosis mentioned
> that the problem went away when he got rid of the Context element in
> META-INF/context.xml, but in my case, that file does not exist; in fact,
> the only Context elements I have are the one shown above, and the
> standard one in $TOMCAT_HOME/conf/context.xml.
> The MySQL JDBC driver is in $TOMCAT_HOME/lib, and when I do
> Class.forName("com.mysql.jdbc.Driver") in a JSP, it succeeds, but I'm
> not sure that's relevant because, first of all, DriverManager will only
> use drivers that were loaded by the same class loader as itself, and
> second, the DataSource can't use the driver anyway as long as its
> driverClassName and url properties remain unset.
>
> I'm using Tomcat 6.0.14, JDK 1.5.0_11, MySQL 5.0.45, and
> mysql-connector-java-5.1.5-bin.jar.
>
> I'm stumped... Any thoughts would be much appreciated!
>
>  - Thomas
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DataSource created but not initialized => Cannot create JDBC driver of class '' for connect URL 'null'

2007-12-07 Thread David Smith
Where did you place your mysql driver jar file?  It has to be in 
tomcat's /lib directory to be visible to tomat's internal code for 
building the db pool and your webapp.  Also did you happen to look at 
the logs around when your webapp started for any relevant messages?


--David

Thomas Okken wrote:


Hi all,

I'm trying to set up a DataSource to manage connections to a MySQL 
database, but whenever I call getConnection(), I get this error:


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150) 

at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 


...
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143) 


...


The datasource is defined in a file called 
$TOMCAT_HOME/conf/Catalina/localhost/smm.xml (the web app's context 
path is /smm); it looks like this:


crossContext="true">
   type="javax.sql.DataSource"

   maxActive="100" maxIdle="30" maxWait="1"
   username="wmmdev" password="wmmdev" 
driverClassName="com.mysql.jdbc.Driver"
   
url="jdbc:mysql://ss-1.research.att.com:3306/wmmdev?autoReconnect=true"/>



The fact that the datasource gets created and bound in JNDI tells me 
that smm.xml is getting read, but apparently it is not getting 
initialized properly; getDriverClassName(), getUrl(), getUsername(), 
and getPassword() all return null, and it looks like that's what 
causes the exception in getConnection().
I've seen quite a few questions about this error, but in the archived 
threads on this mailing list, I haven't found any solution to this 
particular problem... One poster who had the same diagnosis mentioned 
that the problem went away when he got rid of the Context element in 
META-INF/context.xml, but in my case, that file does not exist; in 
fact, the only Context elements I have are the one shown above, and 
the standard one in $TOMCAT_HOME/conf/context.xml.
The MySQL JDBC driver is in $TOMCAT_HOME/lib, and when I do 
Class.forName("com.mysql.jdbc.Driver") in a JSP, it succeeds, but I'm 
not sure that's relevant because, first of all, DriverManager will 
only use drivers that were loaded by the same class loader as itself, 
and second, the DataSource can't use the driver anyway as long as its 
driverClassName and url properties remain unset.


I'm using Tomcat 6.0.14, JDK 1.5.0_11, MySQL 5.0.45, and 
mysql-connector-java-5.1.5-bin.jar.


I'm stumped... Any thoughts would be much appreciated!

- Thomas

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DataSource created but not initialized => Cannot create JDBC driver of class '' for connect URL 'null'

2007-12-07 Thread David Smith

Ok...

The other statistical common thread in this type of issue is a typo or 
missing config somewhere along the line in one of these files:


context.xml  -- you've provided that and named the resource jdbc/SmmDB

web.xml -- do you have this in your WEB-INF/web.xml:

   jdbc/SmmDB
   javax.sql.DataSource
   Container
   

your java source code -- did you try to fech the DataSource using the 
path 'java:/comp/env/jdbc/SmmDB'?


Case is important all the way through this as well.  FWIW the Resource 
element you posted below looks fine -- good case, valid attributes, 
etc., ... 

Two things you might want to consider once your db pool starts working 
is removing autoReconnect=true from your database url and adding 
validationQuery="select 1".  Autoreconnect doesn't re-establish a 
connection until a request has failed -- makes it virtually useless in a 
db pool.  validationQuery="select 1" as a Resource attribute causes the 
database pool to test the connection with a simple query on borrowing.


--David

Thomas Okken wrote:

The MySQL driver is in $TOMCAT_HOME/lib, but I don't think that is 
even the issue here -- the real problem is that the DataSource object 
is not initialized, so it doesn't even have the url, driver class 
name, etc.

This is what my log looks like when I restart Tomcat:

Dec 7, 2007 1:18:50 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the 
java.library.path: 
/home/tokken/software/jdk1.5.0_11/bin:/home/tokken/apache-tomcat-6.0.14/bin 


Dec 7, 2007 1:18:51 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-
Dec 7, 2007 1:18:51 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 729 ms
Dec 7, 2007 1:18:51 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 7, 2007 1:18:51 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Dec 7, 2007 1:18:51 PM org.apache.catalina.startup.HostConfig 
deployDescriptor
WARNING: A docBase /home/tokken/apache-tomcat-6.0.14/webapps/smm 
inside the host appBase has been specified, and will be ignored

Dec 7, 2007 1:18:52 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from 
jar:file:/home/tokken/apache-tomcat-6.0.14/webapps/smm/WEB-INF/lib/struts-core-1.3.8.jar!/org/apache/struts/chain/chain-config.xml 


Dec 7, 2007 1:18:53 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive BBYPServer.war
Dec 7, 2007 1:18:53 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 7, 2007 1:18:53 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 7, 2007 1:18:53 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-
Dec 7, 2007 1:18:53 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 7, 2007 1:18:54 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/43  config=null
Dec 7, 2007 1:18:54 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3005 ms

There is a warning about the docBase attribute (strange; I copied that 
text verbatim from the Tomcat FAQ); if I remove that attribute, the 
warning goes away, but the DataSource remains uninitialized.


- Thomas

David Smith wrote:

Where did you place your mysql driver jar file?  It has to be in 
tomcat's /lib directory to be visible to tomat's internal code for 
building the db pool and your webapp.  Also did you happen to look at 
the logs around when your webapp started for any relevant messages?


--David

Thomas Okken wrote:


Hi all,

I'm trying to set up a DataSource to manage connections to a MySQL 
database, but whenever I call getConnection(), I get this error:


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150) 

at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 


...
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143) 


...


The datasource is defined in a file called 
$TOMCAT_HOME/conf/Catalina/localhost/smm.xml (the web app's context 
path is /smm); it looks like this:


crossContext="true">
   type="javax.sql.DataSource"

   maxActive="100" maxIdle="30" maxWait="1"
   username="wmmdev" password="wmmdev" 

Re: DataSource created but not initialized => Cannot create JDBC driver of class '' for connect URL 'null'

2007-12-07 Thread Thomas Okken
You're right, it was a typo! I called the datasource SmmDS everywhere, 
except in the Context element, where I mistakenly called it SmmDB.
I think it's pretty weird that the JNDI lookup succeeded anyway. That 
sounds like a Tomcat bug; it should throw a NameNotFoundException, not 
return an uninitialized object.
Anyway, it's working perfectly now. My sincere thanks to everyone who 
responded!


- Thomas

David Smith wrote:

Ok...

The other statistical common thread in this type of issue is a typo or 
missing config somewhere along the line in one of these files:


context.xml  -- you've provided that and named the resource jdbc/SmmDB

web.xml -- do you have this in your WEB-INF/web.xml:

   jdbc/SmmDB
   javax.sql.DataSource
   Container
   

your java source code -- did you try to fech the DataSource using the 
path 'java:/comp/env/jdbc/SmmDB'?


Case is important all the way through this as well.  FWIW the Resource 
element you posted below looks fine -- good case, valid attributes, 
etc., ...
Two things you might want to consider once your db pool starts working 
is removing autoReconnect=true from your database url and adding 
validationQuery="select 1".  Autoreconnect doesn't re-establish a 
connection until a request has failed -- makes it virtually useless in 
a db pool.  validationQuery="select 1" as a Resource attribute causes 
the database pool to test the connection with a simple query on 
borrowing.


--David

Thomas Okken wrote:

The MySQL driver is in $TOMCAT_HOME/lib, but I don't think that is 
even the issue here -- the real problem is that the DataSource object 
is not initialized, so it doesn't even have the url, driver class 
name, etc.

This is what my log looks like when I restart Tomcat:

Dec 7, 2007 1:18:50 PM org.apache.catalina.core.AprLifecycleListener 
init
INFO: The Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the 
java.library.path: 
/home/tokken/software/jdk1.5.0_11/bin:/home/tokken/apache-tomcat-6.0.14/bin 


Dec 7, 2007 1:18:51 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-
Dec 7, 2007 1:18:51 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 729 ms
Dec 7, 2007 1:18:51 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Dec 7, 2007 1:18:51 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
Dec 7, 2007 1:18:51 PM org.apache.catalina.startup.HostConfig 
deployDescriptor
WARNING: A docBase /home/tokken/apache-tomcat-6.0.14/webapps/smm 
inside the host appBase has been specified, and will be ignored

Dec 7, 2007 1:18:52 PM org.apache.struts.action.ActionServlet initChain
INFO: Loading chain catalog from 
jar:file:/home/tokken/apache-tomcat-6.0.14/webapps/smm/WEB-INF/lib/struts-core-1.3.8.jar!/org/apache/struts/chain/chain-config.xml 


Dec 7, 2007 1:18:53 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive BBYPServer.war
Dec 7, 2007 1:18:53 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 7, 2007 1:18:53 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 7, 2007 1:18:53 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-
Dec 7, 2007 1:18:53 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Dec 7, 2007 1:18:54 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/43  config=null
Dec 7, 2007 1:18:54 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3005 ms

There is a warning about the docBase attribute (strange; I copied 
that text verbatim from the Tomcat FAQ); if I remove that attribute, 
the warning goes away, but the DataSource remains uninitialized.


- Thomas

David Smith wrote:

Where did you place your mysql driver jar file?  It has to be in 
tomcat's /lib directory to be visible to tomat's internal code for 
building the db pool and your webapp.  Also did you happen to look 
at the logs around when your webapp started for any relevant messages?


--David

Thomas Okken wrote:


Hi all,

I'm trying to set up a DataSource to manage connections to a MySQL 
database, but whenever I call getConnection(), I get this error:


org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1150) 

at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880) 


...
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource