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

2010-06-22 Thread yuccanel
tomcats!,  clearly it is time to move onbecause there is a workaround to 
this issue by having hibernate manage it's own connection pool. I am not 
going to recheck my iurls again and jndi names because they are correct and 
my hosting provider has  assisted me in checking and found no wrong. for 
future visitors to this thread, try allowing hibernate to manage own pool, 
it worked for me before i rwefactored my app in an attempt to gwt hibernate 
to use the tomcat pool. The guide  over here: 
http://wiki.apache.org/tomcat/TomcatHibernate will still show you how to do 
that and is ver well written and overall the guide did allow me get 
hibernate to use my tomcat pool on my test rig but it failed with two 
production environments. I will try again to get it working on tomcat 7 in 
the future and report back here.


--
From: David Smith david.sm...@cornell.edu
Sent: Monday, June 21, 2010 2:54 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null' AGAIN!




I do not see the mistake that you see


I didn't say I saw a mistake ... just listing stuff to look at in
diagnosing this issue.  The file permission issue can definitely
contribute to what you were seeing.  Other comments inline 

--David

On 6/21/2010 8:32 AM, yucca...@live.co.za wrote:


--
From: Martin Gainty mgai...@hotmail.com
Sent: Monday, June 21, 2010 1:16 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create

JDBC driver of class '' for connect URL 'null' AGAIN!


if you took time to look at tomcat-users archive you would've come 
across

this post by david smith..the answer is just as good now as when
originally posted



On 6/19/2010 1:31 PM, yucca...@live.co.za wrote:

I have no choice left but to not let hibernate use my tomcat 
datasource.

This is not good. I have even moved host provider in hope that it was
previous fult tomcat install from dailyrazor (tomcat 6 does not hav
common/lib) and is meant to have tomcat/lib

I can say that my new container is correct and that I am 100% sure that
all mus jdbc configuration is correct in zml after having gone though 
it

at least 20 times and checked the wiki that was linked here earlier and
still have issues. Yes mysql jdbc bin is in tomcat/lib so that is not
cause of the error. /the error is very weird though as I have another
point that uses hibernate without error on the same database. It is not
possible for me to use hibernate to use tomcat datasource sadly. Many
thanks for all the help though.




DS
If you put the following into a jsp and call the jsp, does it work?

%...@page import=java.sql.Connection%
%...@page import=java.sql.DriverManager%
%...@page import=java.sql.SQLException%

%
Class.forName(com.mysql.jdbc.Driver).newInstance();
conn = DriverManager.getConnection(jdbc:mysql://localhost/test? +
user=montypassword=greatsqldb);
out.println( The connection worked!! ) ;


Did this and it works , I even made this page my welcome page at
thejarbar.org




Great!  That's one giant step in the right direction.


%


If that works then your jdbc driver is available and installed properly
(I trust there is only one copy of that jar in your entire tomcat
install ... right?).


I do not see or find another copy of the driver




Now check to see if there's an xml in tomcat/conf/Catalina/localhost


there isn't one



Ok ... this is one of a couple of places a Context ... / element can
be.  It maybe in one of the others I mentioned like your webapp's
META-INF folder.  The one that might be in
tomcat/conf/Catalina/localhost will take precedence over any in your
webapp's META-INF folder.  People have been bitten before changing the
one in META-INF, not realizing there was an old copy in
tomcat/conf/Catalina/localhost.




matching your webapp's deployed name. For instance if you access your
webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml
file there. Take a look at it for the Resource ... / or ResourceLink
... / (which ever you setup) and make sure they are correct. If this
file is not available, take a look at context.xml in your webapp's
META-INF folder (same process). If it's not there, then the Context
...  element for your webapp is in server.xml and it should NOT be
there. It's bad practice and requires a full tomcat restart to make


I did not do this




If you mean restart, it's not necessary as long as the Context ...
/Context element defining your app to tomcat is not in server.xml.


changes.


Did this and it works , I even made this page my welcome page at
thejarbar.org




??? I'm confused here.  What did you do at this point that  works?


Lastly, case matters. Be sure everything is typed correctly including
whether it's upper or lower case.

Now take a look at the logs

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

2010-06-22 Thread Pid
On 22/06/2010 07:55, yucca...@live.co.za wrote:
 tomcats!,  clearly it is time to move onbecause there is a workaround to
 this issue by having hibernate manage it's own connection pool. I am not
 going to recheck my iurls again and jndi names because they are correct
 and my hosting provider has  assisted me in checking and found no wrong.
 for future visitors to this thread, try allowing hibernate to manage own
 pool, it worked for me before i rwefactored my app in an attempt to gwt
 hibernate to use the tomcat pool. The guide  over here:
 http://wiki.apache.org/tomcat/TomcatHibernate will still show you how to
 do that and is ver well written and overall the guide did allow me get
 hibernate to use my tomcat pool on my test rig but it failed with two
 production environments. I will try again to get it working on tomcat 7
 in the future and report back here.

Changing Tomcat version isn't going to make any difference.

You've tested the DB connection by manually creating a Connection using
the DriverManager method, but have you tested the DataSource works by
performing a JNDI lookup?

 Context initContext = new InitialContext();
 Context envContext  = (Context)initContext.lookup(java:/comp/env);
 DataSource ds = (DataSource)envContext.lookup(jdbc/my_db_name_here);
 Connection conn = ds.getConnection();

From:

 http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html


p

 --
 From: David Smith david.sm...@cornell.edu
 Sent: Monday, June 21, 2010 2:54 PM
 To: Tomcat Users List users@tomcat.apache.org
 Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
 create JDBC driver of class '' for connect URL 'null' AGAIN!
 

 I do not see the mistake that you see

 I didn't say I saw a mistake ... just listing stuff to look at in
 diagnosing this issue.  The file permission issue can definitely
 contribute to what you were seeing.  Other comments inline 

 --David

 On 6/21/2010 8:32 AM, yucca...@live.co.za wrote:

 --
 From: Martin Gainty mgai...@hotmail.com
 Sent: Monday, June 21, 2010 1:16 PM
 To: Tomcat Users List users@tomcat.apache.org
 Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
 create
 JDBC driver of class '' for connect URL 'null' AGAIN!


 if you took time to look at tomcat-users archive you would've come
 across
 this post by david smith..the answer is just as good now as when
 originally posted



 On 6/19/2010 1:31 PM, yucca...@live.co.za wrote:

 I have no choice left but to not let hibernate use my tomcat
 datasource.
 This is not good. I have even moved host provider in hope that it was
 previous fult tomcat install from dailyrazor (tomcat 6 does not hav
 common/lib) and is meant to have tomcat/lib

 I can say that my new container is correct and that I am 100% sure
 that
 all mus jdbc configuration is correct in zml after having gone
 though it
 at least 20 times and checked the wiki that was linked here earlier
 and
 still have issues. Yes mysql jdbc bin is in tomcat/lib so that is not
 cause of the error. /the error is very weird though as I have another
 point that uses hibernate without error on the same database. It is
 not
 possible for me to use hibernate to use tomcat datasource sadly. Many
 thanks for all the help though.



 DS
 If you put the following into a jsp and call the jsp, does it work?

 %...@page import=java.sql.Connection%
 %...@page import=java.sql.DriverManager%
 %...@page import=java.sql.SQLException%

 %
 Class.forName(com.mysql.jdbc.Driver).newInstance();
 conn = DriverManager.getConnection(jdbc:mysql://localhost/test? +
 user=montypassword=greatsqldb);
 out.println( The connection worked!! ) ;

 Did this and it works , I even made this page my welcome page at
 thejarbar.org



 Great!  That's one giant step in the right direction.

 %


 If that works then your jdbc driver is available and installed properly
 (I trust there is only one copy of that jar in your entire tomcat
 install ... right?).

 I do not see or find another copy of the driver



 Now check to see if there's an xml in tomcat/conf/Catalina/localhost

 there isn't one


 Ok ... this is one of a couple of places a Context ... / element can
 be.  It maybe in one of the others I mentioned like your webapp's
 META-INF folder.  The one that might be in
 tomcat/conf/Catalina/localhost will take precedence over any in your
 webapp's META-INF folder.  People have been bitten before changing the
 one in META-INF, not realizing there was an old copy in
 tomcat/conf/Catalina/localhost.


 matching your webapp's deployed name. For instance if you access your
 webapp as http://localhost:8088/mywebapp, there should be a
 mywebapp.xml
 file there. Take a look at it for the Resource ... / or ResourceLink
 ... / (which ever you setup) and make sure they are correct. If this
 file is not available, take a look at context.xml in your webapp's
 META-INF folder

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

2010-06-21 Thread Mark Thomas
On 20/06/2010 21:49, akhlaqur Rahman wrote:
 How do I unsubscribe from this list? I have tried following the unsubscribe
 link in the emails and it has not worked... Any tips would be appreciated.

Ask one of the list owners for help.

I'll unsubscribe you in a sec.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-21 Thread yuccanel
Ok I thought I found my solution yesterday with eapps but turns out not to 
be. I am posting a possible fix in hope that this may help someone els who 
reads this thread one day.


apart from making sure that paths are correct, driver is inside tomcat/lib 
and that resource etc are defined correct, I hadnot ensured that tomcat had 
RW permission for the driver inside tomcat/lib upon doing so I was stuck 
with same issue but hope this may solve someone elses issue.


--
From: Mark Thomas ma...@apache.org
Sent: Monday, June 21, 2010 8:57 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null' AGAIN!



On 20/06/2010 21:49, akhlaqur Rahman wrote:
How do I unsubscribe from this list? I have tried following the 
unsubscribe
link in the emails and it has not worked... Any tips would be 
appreciated.


Ask one of the list owners for help.

I'll unsubscribe you in a sec.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-21 Thread Martin Gainty

if you took time to look at tomcat-users archive you would've come across this 
post by david smith..the answer is just as good now as when originally posted 

 

On 6/19/2010 1:31 PM, yucca...@live.co.za wrote:
 I have no choice left but to not let hibernate use my tomcat datasource. This 
 is not good. I have even moved host provider in hope that it was previous 
 fult tomcat install from dailyrazor (tomcat 6 does not hav common/lib) and is 
 meant to have tomcat/lib

 I can say that my new container is correct and that I am 100% sure that all 
 mus jdbc configuration is correct in zml after having gone though it at least 
 20 times and checked the wiki that was linked here earlier and still have 
 issues. Yes mysql jdbc bin is in tomcat/lib so that is not cause of the 
 error. /the error is very weird though as I have another point that uses 
 hibernate without error on the same database. It is not possible for me to 
 use hibernate to use tomcat datasource sadly. Many thanks for all the help 
 though.
 
 

DS
If you put the following into a jsp and call the jsp, does it work?
 
%...@page import=java.sql.Connection%
%...@page import=java.sql.DriverManager%
%...@page import=java.sql.SQLException%
 
%
Class.forName(com.mysql.jdbc.Driver).newInstance();
conn = DriverManager.getConnection(jdbc:mysql://localhost/test? +
user=montypassword=greatsqldb);
out.println( The connection worked!! ) ;
%
 
 
If that works then your jdbc driver is available and installed properly
(I trust there is only one copy of that jar in your entire tomcat
install ... right?). 
 
Now check to see if there's an xml in tomcat/conf/Catalina/localhost
matching your webapp's deployed name. For instance if you access your
webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml
file there. Take a look at it for the Resource ... / or ResourceLink
... / (which ever you setup) and make sure they are correct. If this
file is not available, take a look at context.xml in your webapp's
META-INF folder (same process). If it's not there, then the Context
...  element for your webapp is in server.xml and it should NOT be
there. It's bad practice and requires a full tomcat restart to make
changes.
 
Lastly, case matters. Be sure everything is typed correctly including
whether it's upper or lower case. 
 
Now take a look at the logs and post any relevant messages including
complete stacktraces of exceptions w/o edits except to protect usernames
and passwords.
 
--David
/DS


Martin Gainty 
__ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.



 

 From: yucca...@live.co.za
 To: users@tomcat.apache.org
 Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 JDBC driver of class '' for connect URL 'null' AGAIN!
 Date: Mon, 21 Jun 2010 10:49:41 +0200
 
 Ok I thought I found my solution yesterday with eapps but turns out not to 
 be. I am posting a possible fix in hope that this may help someone els who 
 reads this thread one day.
 
 apart from making sure that paths are correct, driver is inside tomcat/lib 
 and that resource etc are defined correct, I hadnot ensured that tomcat had 
 RW permission for the driver inside tomcat/lib upon doing so I was stuck 
 with same issue but hope this may solve someone elses issue.
 
 --
 From: Mark Thomas ma...@apache.org
 Sent: Monday, June 21, 2010 8:57 AM
 To: Tomcat Users List users@tomcat.apache.org
 Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 JDBC driver of class '' for connect URL 'null' AGAIN!
 
  On 20/06/2010 21:49, akhlaqur Rahman wrote:
  How do I unsubscribe from this list? I have tried following the 
  unsubscribe
  link in the emails and it has not worked... Any tips would be 
  appreciated.
 
  Ask one of the list owners for help.
 
  I'll unsubscribe you in a sec.
 
  Mark
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr

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

2010-06-21 Thread yuccanel



--
From: Martin Gainty mgai...@hotmail.com
Sent: Monday, June 21, 2010 1:16 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null' AGAIN!




if you took time to look at tomcat-users archive you would've come across 
this post by david smith..the answer is just as good now as when 
originally posted




On 6/19/2010 1:31 PM, yucca...@live.co.za wrote:
I have no choice left but to not let hibernate use my tomcat datasource. 
This is not good. I have even moved host provider in hope that it was 
previous fult tomcat install from dailyrazor (tomcat 6 does not hav 
common/lib) and is meant to have tomcat/lib


I can say that my new container is correct and that I am 100% sure that 
all mus jdbc configuration is correct in zml after having gone though it 
at least 20 times and checked the wiki that was linked here earlier and 
still have issues. Yes mysql jdbc bin is in tomcat/lib so that is not 
cause of the error. /the error is very weird though as I have another 
point that uses hibernate without error on the same database. It is not 
possible for me to use hibernate to use tomcat datasource sadly. Many 
thanks for all the help though.




DS
If you put the following into a jsp and call the jsp, does it work?

%...@page import=java.sql.Connection%
%...@page import=java.sql.DriverManager%
%...@page import=java.sql.SQLException%

%
Class.forName(com.mysql.jdbc.Driver).newInstance();
conn = DriverManager.getConnection(jdbc:mysql://localhost/test? +
user=montypassword=greatsqldb);
out.println( The connection worked!! ) ;


Did this and it works , I even made this page my welcome page at 
thejarbar.org



%


If that works then your jdbc driver is available and installed properly
(I trust there is only one copy of that jar in your entire tomcat
install ... right?).


I do not see or find another copy of the driver




Now check to see if there's an xml in tomcat/conf/Catalina/localhost


there isn't one


matching your webapp's deployed name. For instance if you access your
webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml
file there. Take a look at it for the Resource ... / or ResourceLink
... / (which ever you setup) and make sure they are correct. If this
file is not available, take a look at context.xml in your webapp's
META-INF folder (same process). If it's not there, then the Context
...  element for your webapp is in server.xml and it should NOT be
there. It's bad practice and requires a full tomcat restart to make


I did not do this



changes.


Did this and it works , I even made this page my welcome page at 
thejarbar.org





Lastly, case matters. Be sure everything is typed correctly including
whether it's upper or lower case.

Now take a look at the logs and post any relevant messages including
complete stacktraces of exceptions w/o edits except to protect usernames
and passwords.


I have checked this several times and see no syntax errors,  further, if 
there were url syntax errors  (because they can only be url errors due to it 
not being an accessdenied exception from mysql, it ould show on my test 
environment as I use same database names and table names. In fact I would 
say that because I am able to do that test page with success  it proves my 
driver is in place and can be found .


I do not see the mistake that you see


--David
/DS


Martin Gainty
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene 
Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte 
Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht 
dient lediglich dem Austausch von Informationen und entfaltet keine 
rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von 
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.


Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire 
informez l'expéditeur. N'importe quelle diffusion non autorisée ou la 
copie de ceci est interdite. Ce message sert à l'information seulement et 
n'aura pas n'importe quel effet légalement obligatoire. Étant donné que 
les email peuvent facilement être sujets à la manipulation, nous ne 
pouvons accepter aucune responsabilité pour le contenu fourni.







From: yucca...@live.co.za
To: users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null' AGAIN!

Date: Mon, 21 Jun 2010 10:49:41 +0200

Ok I thought I found my solution yesterday with eapps but turns out not 
to
be. I am posting a possible fix in hope that this may help someone els 
who

reads this thread one day.

apart from making sure

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

2010-06-21 Thread David Smith

 I do not see the mistake that you see

I didn't say I saw a mistake ... just listing stuff to look at in
diagnosing this issue.  The file permission issue can definitely
contribute to what you were seeing.  Other comments inline 

--David

On 6/21/2010 8:32 AM, yucca...@live.co.za wrote:

 --
 From: Martin Gainty mgai...@hotmail.com
 Sent: Monday, June 21, 2010 1:16 PM
 To: Tomcat Users List users@tomcat.apache.org
 Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 JDBC driver of class '' for connect URL 'null' AGAIN!

   
 if you took time to look at tomcat-users archive you would've come across 
 this post by david smith..the answer is just as good now as when 
 originally posted



 On 6/19/2010 1:31 PM, yucca...@live.co.za wrote:
 
 I have no choice left but to not let hibernate use my tomcat datasource. 
 This is not good. I have even moved host provider in hope that it was 
 previous fult tomcat install from dailyrazor (tomcat 6 does not hav 
 common/lib) and is meant to have tomcat/lib

 I can say that my new container is correct and that I am 100% sure that 
 all mus jdbc configuration is correct in zml after having gone though it 
 at least 20 times and checked the wiki that was linked here earlier and 
 still have issues. Yes mysql jdbc bin is in tomcat/lib so that is not 
 cause of the error. /the error is very weird though as I have another 
 point that uses hibernate without error on the same database. It is not 
 possible for me to use hibernate to use tomcat datasource sadly. Many 
 thanks for all the help though.
   


 DS
 If you put the following into a jsp and call the jsp, does it work?

 %...@page import=java.sql.Connection%
 %...@page import=java.sql.DriverManager%
 %...@page import=java.sql.SQLException%

 %
 Class.forName(com.mysql.jdbc.Driver).newInstance();
 conn = DriverManager.getConnection(jdbc:mysql://localhost/test? +
 user=montypassword=greatsqldb);
 out.println( The connection worked!! ) ;
 
 Did this and it works , I even made this page my welcome page at 
 thejarbar.org

   

Great!  That's one giant step in the right direction. 

 %


 If that works then your jdbc driver is available and installed properly
 (I trust there is only one copy of that jar in your entire tomcat
 install ... right?).
 
 I do not see or find another copy of the driver


   
 Now check to see if there's an xml in tomcat/conf/Catalina/localhost
 
 there isn't one
   

Ok ... this is one of a couple of places a Context ... / element can
be.  It maybe in one of the others I mentioned like your webapp's
META-INF folder.  The one that might be in
tomcat/conf/Catalina/localhost will take precedence over any in your
webapp's META-INF folder.  People have been bitten before changing the
one in META-INF, not realizing there was an old copy in
tomcat/conf/Catalina/localhost.

   
 matching your webapp's deployed name. For instance if you access your
 webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml
 file there. Take a look at it for the Resource ... / or ResourceLink
 ... / (which ever you setup) and make sure they are correct. If this
 file is not available, take a look at context.xml in your webapp's
 META-INF folder (same process). If it's not there, then the Context
 ...  element for your webapp is in server.xml and it should NOT be
 there. It's bad practice and requires a full tomcat restart to make
 
 I did not do this


   
If you mean restart, it's not necessary as long as the Context ...
/Context element defining your app to tomcat is not in server.xml.

 changes.
 
 Did this and it works , I even made this page my welcome page at 
 thejarbar.org


   
??? I'm confused here.  What did you do at this point that  works?

 Lastly, case matters. Be sure everything is typed correctly including
 whether it's upper or lower case.

 Now take a look at the logs and post any relevant messages including
 complete stacktraces of exceptions w/o edits except to protect usernames
 and passwords.
 
 I have checked this several times and see no syntax errors,  further, if 
 there were url syntax errors  (because they can only be url errors due to it 
 not being an accessdenied exception from mysql, it ould show on my test 
 environment as I use same database names and table names. In fact I would 
 say that because I am able to do that test page with success  it proves my 
 driver is in place and can be found .
   

Excellent. (on the lack of syntax errors).  Are there any exceptions
during startup of your webapp in the logs or other messages relating to
the database pooling?

 I do not see the mistake that you see
   



 --David
 /DS



 
 From: yucca...@live.co.za
 To: users@tomcat.apache.org
 Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
 create JDBC driver of class '' for connect URL 'null' AGAIN!
 Date: Mon, 21 Jun 2010 10:49:41 +0200

 Ok I

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

2010-06-21 Thread yuccanel

Hello, I have done as David suggested  and has not fixed issue. If you visit
thejarbar.org you will see the test page that confirms the jdbc has been
opned and therefore the lib is present
I found a possible reason in hibernate .cfg and fixed it but still got error
after redeployment 1 my databse credentials are correct as I am not getting 
the mysql access

denied exception
this only leaves the possibilities of incorrect database url and names which
is unlikely because my test environment uses same version of mysql and mysql
driver and because I have removed resource and realm tags from server.xml in
both test and production and because I get it running in the test
environment I back my urls to be mapped right.
This exception only happens from hibernate so have made extra sure to check
hibernate xml but still can not find fault


--
From: David Smith david.sm...@cornell.edu
Sent: Monday, June 21, 2010 2:54 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null' AGAIN!




I do not see the mistake that you see


I didn't say I saw a mistake ... just listing stuff to look at in
diagnosing this issue.  The file permission issue can definitely
contribute to what you were seeing.  Other comments inline 

--David

On 6/21/2010 8:32 AM, yucca...@live.co.za wrote:


--
From: Martin Gainty mgai...@hotmail.com
Sent: Monday, June 21, 2010 1:16 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create

JDBC driver of class '' for connect URL 'null' AGAIN!


if you took time to look at tomcat-users archive you would've come 
across

this post by david smith..the answer is just as good now as when
originally posted



On 6/19/2010 1:31 PM, yucca...@live.co.za wrote:

I have no choice left but to not let hibernate use my tomcat 
datasource.

This is not good. I have even moved host provider in hope that it was
previous fult tomcat install from dailyrazor (tomcat 6 does not hav
common/lib) and is meant to have tomcat/lib

I can say that my new container is correct and that I am 100% sure that
all mus jdbc configuration is correct in zml after having gone though 
it

at least 20 times and checked the wiki that was linked here earlier and
still have issues. Yes mysql jdbc bin is in tomcat/lib so that is not
cause of the error. /the error is very weird though as I have another
point that uses hibernate without error on the same database. It is not
possible for me to use hibernate to use tomcat datasource sadly. Many
thanks for all the help though.




DS
If you put the following into a jsp and call the jsp, does it work?

%...@page import=java.sql.Connection%
%...@page import=java.sql.DriverManager%
%...@page import=java.sql.SQLException%

%
Class.forName(com.mysql.jdbc.Driver).newInstance();
conn = DriverManager.getConnection(jdbc:mysql://localhost/test? +
user=montypassword=greatsqldb);
out.println( The connection worked!! ) ;


Did this and it works , I even made this page my welcome page at
thejarbar.org




Great!  That's one giant step in the right direction.


%


If that works then your jdbc driver is available and installed properly
(I trust there is only one copy of that jar in your entire tomcat
install ... right?).


I do not see or find another copy of the driver




Now check to see if there's an xml in tomcat/conf/Catalina/localhost


there isn't one



Ok ... this is one of a couple of places a Context ... / element can
be.  It maybe in one of the others I mentioned like your webapp's
META-INF folder.  The one that might be in
tomcat/conf/Catalina/localhost will take precedence over any in your
webapp's META-INF folder.  People have been bitten before changing the
one in META-INF, not realizing there was an old copy in
tomcat/conf/Catalina/localhost.




matching your webapp's deployed name. For instance if you access your
webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml
file there. Take a look at it for the Resource ... / or ResourceLink
... / (which ever you setup) and make sure they are correct. If this
file is not available, take a look at context.xml in your webapp's
META-INF folder (same process). If it's not there, then the Context
...  element for your webapp is in server.xml and it should NOT be
there. It's bad practice and requires a full tomcat restart to make


I did not do this




If you mean restart, it's not necessary as long as the Context ...
/Context element defining your app to tomcat is not in server.xml.


changes.


Did this and it works , I even made this page my welcome page at
thejarbar.org




??? I'm confused here.  What did you do at this point that  works?


Lastly, case matters. Be sure everything is typed correctly including
whether it's upper or lower case.

Now take

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

2010-06-20 Thread akhlaqur Rahman
How do I unsubscribe from this list? I have tried following the unsubscribe
link in the emails and it has not worked... Any tips would be appreciated.

-Original Message-
From: David Smith [mailto:david.sm...@cornell.edu] 
Sent: 19 June 2010 22:36
To: Tomcat Users List
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
JDBC driver of class '' for connect URL 'null' AGAIN!

On 6/19/2010 1:31 PM, yucca...@live.co.za wrote:
 I have no choice left but to not let hibernate use my tomcat datasource.
This is not good. I have even moved host provider in hope that it was
previous fult tomcat install from dailyrazor (tomcat 6 does not hav
common/lib) and is meant to have tomcat/lib

 I can say that my new container is correct and that I am 100% sure that
all mus jdbc configuration is correct in zml after having gone though it at
least 20 times and checked the wiki that was linked here earlier and still
have issues. Yes mysql jdbc bin is in tomcat/lib so that is not cause of the
error. /the error is very weird though as I have another point that uses
hibernate without error on the same database. It is not possible for me to
use hibernate to use tomcat datasource sadly. Many thanks for all the help
though.


If you put the following into a jsp and call the jsp, does it work?

%...@page import=java.sql.Connection%
%...@page import=java.sql.DriverManager%
%...@page import=java.sql.SQLException%

%
Class.forName(com.mysql.jdbc.Driver).newInstance();
conn =  DriverManager.getConnection(jdbc:mysql://localhost/test? +
   user=montypassword=greatsqldb);
out.println( The connection worked!! ) ;
%


If that works then your jdbc driver is available and installed properly
(I trust there is only one copy of that jar in your entire tomcat
install ... right?). 

Now check to see if there's an xml in tomcat/conf/Catalina/localhost
matching your webapp's deployed name.  For instance if you access your
webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml
file there.  Take a look at it for the Resource ... / or ResourceLink
... / (which ever you setup) and make sure they are correct.  If this
file is not available, take a look at context.xml in your webapp's
META-INF folder (same process).  If it's not there, then the Context
...  element for your webapp is in server.xml and it should  NOT be
there.  It's bad practice and requires a full tomcat restart to make
changes.

Lastly, case matters.  Be sure everything is typed correctly including
whether it's upper or lower case. 

Now take a look at the logs and post any relevant messages including
complete stacktraces of exceptions w/o edits except to protect usernames
and passwords.

--David

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-19 Thread yuccanel
I moved hosting provider and have found eapps to be excellent. Despite the 
same version of tomcat and same layout, I am unable to resolve this 
exception.  my databases are correct, the jdbc jar is in tomcat/lib. I don't 
know what more to do :(


--
From: yucca...@live.co.za
Sent: Wednesday, June 16, 2010 1:08 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'


I manually added the lib dir to root of production server and am still 
stuck with same exception


I now have also remove mysql connector as provider instructed me t because 
there is already a connector on server-side...


My last hope, it would appear is that I missed something in config files 
so I am posting all 3 here in hope of moving on.


SERVER:


?xml version='1.0' encoding='utf-8'?
!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the License); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an AS IS BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
--
!-- Note:  A Server is not itself a Container, so you may not
define subcomponents such as Valves at this level.
Documentation at /docs/config/server.html
--
Server port=8005 shutdown=SHUTDOWN

 !--APR library loader. Documentation at /docs/apr.html --
 Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /
 !--Initialize Jasper prior to webapps are loaded. Documentation at 
/docs/jasper-howto.html --

 Listener className=org.apache.catalina.core.JasperListener /
 !-- Prevent memory leaks due to use of particular java/javax APIs--
 Listener 
className=org.apache.catalina.core.JreMemoryLeakPreventionListener /
 !-- JMX Support for the Tomcat server. Documentation at 
/docs/non-existent.html --
 Listener className=org.apache.catalina.mbeans.ServerLifecycleListener 
/
 Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /


 !-- Global JNDI resources
  Documentation at /docs/jndi-resources-howto.html
 --
 GlobalNamingResources
   !-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
   --
 Resource
   name=jdbc/auth
   description=The Jar Bar user authentication
   type=javax.sql.DataSource
   auth=Container
   driverClassName=com.mysql.jdbc.Driver
   maxActive=30 maxIdle=10
   maxWait=1
   password=pookie123
   url=jdbc:mysql://localhost:3306/yucca123_thejarbar
   validationQuery=/* ping */ SELECT 1
   username=yucca123_tom/

 /GlobalNamingResources

 !-- A Service is a collection of one or more Connectors that share
  a single Container Note:  A Service is not itself a Container,
  so you may not define subcomponents such as Valves at this level.
  Documentation at /docs/config/service.html
  --
 Service name=Catalina

   !--The connectors can use a shared executor, you can define one or 
more named thread pools--

   !--
   Executor name=tomcatThreadPool namePrefix=catalina-exec-
   maxThreads=150 minSpareThreads=4/
   --


   !-- A Connector represents an endpoint by which requests are 
received

and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking  
non-blocking)

Java AJP  Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
   --
   Connector port=8080 protocol=HTTP/1.1
  connectionTimeout=2
  redirectPort=8443 /
   !-- A Connector using the shared thread pool--
   !--
   Connector executor=tomcatThreadPool
  port=8080 protocol=HTTP/1.1
  connectionTimeout=2
  redirectPort=8443 /
   --
   !-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation --
   !--
   Connector port=8443 protocol=HTTP/1.1 SSLEnabled=true
  maxThreads=150 scheme=https secure=true
  clientAuth=false sslProtocol=TLS /
   --

   !-- Define an AJP 1.3 Connector on port 8009 --
   Connector port=8009 protocol=AJP/1.3 redirectPort=8443 /


   !-- An Engine represents

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

2010-06-19 Thread yuccanel
I have no choice left but to not let hibernate use my tomcat datasource. This 
is not good. I have even moved host provider in hope that it was previous fult 
tomcat install from dailyrazor (tomcat 6 does not hav common/lib) and is meant 
to have tomcat/lib

I can say that my new container is correct and that I am 100% sure that all mus 
jdbc configuration is correct in zml after having gone though it at least 20 
times and checked the wiki that was linked here earlier and still have issues. 
Yes mysql jdbc bin is in tomcat/lib so that is not cause of the error. /the 
error is very weird though as I have another point that uses hibernate without 
error on the same database. It is not possible for me to use hibernate to use 
tomcat datasource sadly. Many thanks for all the help though.

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

2010-06-19 Thread David Smith
On 6/19/2010 1:31 PM, yucca...@live.co.za wrote:
 I have no choice left but to not let hibernate use my tomcat datasource. This 
 is not good. I have even moved host provider in hope that it was previous 
 fult tomcat install from dailyrazor (tomcat 6 does not hav common/lib) and is 
 meant to have tomcat/lib

 I can say that my new container is correct and that I am 100% sure that all 
 mus jdbc configuration is correct in zml after having gone though it at least 
 20 times and checked the wiki that was linked here earlier and still have 
 issues. Yes mysql jdbc bin is in tomcat/lib so that is not cause of the 
 error. /the error is very weird though as I have another point that uses 
 hibernate without error on the same database. It is not possible for me to 
 use hibernate to use tomcat datasource sadly. Many thanks for all the help 
 though.


If you put the following into a jsp and call the jsp, does it work?

%...@page import=java.sql.Connection%
%...@page import=java.sql.DriverManager%
%...@page import=java.sql.SQLException%

%
Class.forName(com.mysql.jdbc.Driver).newInstance();
conn =  DriverManager.getConnection(jdbc:mysql://localhost/test? +
   user=montypassword=greatsqldb);
out.println( The connection worked!! ) ;
%


If that works then your jdbc driver is available and installed properly
(I trust there is only one copy of that jar in your entire tomcat
install ... right?). 

Now check to see if there's an xml in tomcat/conf/Catalina/localhost
matching your webapp's deployed name.  For instance if you access your
webapp as http://localhost:8088/mywebapp, there should be a mywebapp.xml
file there.  Take a look at it for the Resource ... / or ResourceLink
... / (which ever you setup) and make sure they are correct.  If this
file is not available, take a look at context.xml in your webapp's
META-INF folder (same process).  If it's not there, then the Context
...  element for your webapp is in server.xml and it should  NOT be
there.  It's bad practice and requires a full tomcat restart to make
changes.

Lastly, case matters.  Be sure everything is typed correctly including
whether it's upper or lower case. 

Now take a look at the logs and post any relevant messages including
complete stacktraces of exceptions w/o edits except to protect usernames
and passwords.

--David

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-16 Thread yuccanel
my provider has asked me to use common/lib for connector or those wishing to 
argue that there is no common/lib. This is where I currently have it  in 
production and am getting the runtime exception.
as mentioned, in test server I am uaing tomcat/lib and all works, waiting to 
confirm that tomcat versions for test/production do not match but from what 
I am being told here, my production seems to be configured incorrectly as I 
have no tomcat/lib and DO have a tomcat/common/lib


--
From: yucca...@live.co.za
Sent: Wednesday, June 16, 2010 6:03 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'


Ok, no need to accuse me of lying, please see screenshot showing 
common/lib

and other screenie showing there is no tomcat/lib :o


--
From: Caldarale, Charles R chuck.caldar...@unisys.com
Sent: Wednesday, June 16, 2010 4:03 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
JDBC driver of class '' for connect URL 'null'


From: yucca...@live.co.za [mailto:yucca...@live.co.za]
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'

production is tomcat 6.0.20


Then there's no common/lib or shared/lib in production either.  Get your
story straight.

I would strongly recommend that you do your development and testing on
exactly the same Tomcat version that runs in production.  Anything else
puts you at risk for unexpected surprises.  (I'd also upgrade production
ASAP.)

- 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org










-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org 



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-16 Thread yuccanel
Ok I am getting to the bottom of this but my hosting provider wish to argue. 
They moved me over a month ago from tomcat 5 to 6 and I remember the 
installation was not clean because I had some stuff left over from the 
tomcat 5 in my new tomcat 6.


I downloaded tomcat 5 and viewed the root directory layout which looks 
exactly like tomcat 5 and my current  tomcat layout from provider. Clearly I 
am meant to have a lib dir in root if this is tomcat 6 and NOT a common/lib


--
From: yucca...@live.co.za
Sent: Wednesday, June 16, 2010 3:50 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'


production is tomcat 6.0.20 thanks for the reply. had to call it a night 
so sorry for delay in reply.


--
From: Mark Eggers its_toas...@yahoo.com
Sent: Wednesday, June 16, 2010 3:16 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'



Are you developing on 6.0.x but deploying on 5.?.x (5.0 or 5.5)?

What version is running in production?

--- On Tue, 6/15/10, yucca...@live.co.za yucca...@live.co.za wrote:


From: yucca...@live.co.za yucca...@live.co.za
Subject: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'

To: Tomcat Users List users@tomcat.apache.org
Date: Tuesday, June 15, 2010, 1:11 PM
I have tried to check why this
exception is thrown in production but not development

The difference between production snd development server
is:

development) put mysql jar into CATALINA/lib (tomcat
6.0.26)

production) choice of common/lib or share/lib

exception is thrown by hibernate which is wrapping the
exception from realm






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-16 Thread yuccanel
 at documentation at:
 /docs/cluster-howto.html  (simple how to)
 /docs/config/cluster.html (reference documentation) --
 !--
 Cluster className=org.apache.catalina.ha.tcp.SimpleTcpCluster/
 --

 !-- The request dumper valve dumps useful debugging information about
  the request and response data received and sent by Tomcat.
  Documentation at: /docs/config/valve.html --
 !--
 Valve className=org.apache.catalina.valves.RequestDumperValve/
 --

 !-- This Realm uses the UserDatabase configured in the global JNDI
  resources under the key UserDatabase.  Any edits
  that are performed against this UserDatabase are immediately
  available for use by the Realm.  --
 Realm className=org.apache.catalina.realm.DataSourceRealm
  userTable=users
  userNameCol=user_name
  userCredCol=user_pass
  userRoleTable=user_roles
  roleNameCol=role_name
  dataSourceName=jdbc/auth/

 !-- Define the default virtual host
  Note: XML Schema validation will not work with Xerces 2.2.
  --
 Host name=localhost  appBase=webapps
   unpackWARs=true autoDeploy=true
   xmlValidation=false xmlNamespaceAware=false

   !-- SingleSignOn valve, share authentication between web 
applications

Documentation at: /docs/config/valve.html --
   !--
   Valve className=org.apache.catalina.authenticator.SingleSignOn /
   --

   !-- Access log processes all example.
Documentation at: /docs/config/valve.html --
   !--
   Valve className=org.apache.catalina.valves.AccessLogValve 
directory=logs
  prefix=localhost_access_log. suffix=.txt pattern=common 
resolveHosts=false/

   --

 /Host
   /Engine
 /Service
/Server


CONTEXT.xml:

?xml version=1.0 encoding=UTF-8? Context antiJARLocking=true
   reloadable=true

 ResourceLink name=jdbc/auth
   global=jdbc/auth
   type=javax.sql.DataSource/
   /Context


WEB.xml:

?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://java.sun.com/xml/ns/javaee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
  version=2.5
   error-page
   exception-typejava.lang.Throwable/exception-type
   location/oops.jsp/location

   /error-page

   servlet
   servlet-nameFaces Servlet/servlet-name
   servlet-classjavax.faces.webapp.FacesServlet/servlet-class
   load-on-startup1/load-on-startup
   /servlet
   resource-ref
 descriptionThis is a MySQL database connection/description
 res-ref-namejdbc/auth/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref

   servlet-mapping
   servlet-nameFaces Servlet/servlet-name
   url-pattern*.jsf/url-pattern
   /servlet-mapping
   welcome-file-list
   welcome-fileindex.jsp/welcome-file
   /welcome-file-list

   security-rolerole-nameRegisteredUser/role-name/security-role
   security-role
   role-nameAdmin/role-name
   /security-role

   security-constraint
   web-resource-collection
   web-resource-nameloggedInUser/web-resource-name
   url-pattern/pages/user/secure/*/url-pattern
   http-methodGET/http-method
   http-methodPOST/http-method
   /web-resource-collection
   auth-constraint
   role-nameRegisteredUser/role-name

   /auth-constraint

   /security-constraint
   security-constraint
   web-resource-collection
   web-resource-nameAdminArea/web-resource-name
   url-pattern/pages/admin/*/url-pattern
   http-methodGET/http-method
   http-methodPOST/http-method
   /web-resource-collection
   auth-constraint
   role-nameAdmin/role-name
   /auth-constraint


   /security-constraint
   login-config
   auth-methodFORM/auth-method
   form-login-config
   form-login-page/login.jsf/form-login-page
   form-error-page/loginerror.jsf/form-error-page
   /form-login-config
   /login-config

context-param
param-nameemail/param-name
param-valuethejarten...@thejarbar.org/param-value
/context-param
/web-app

I am probably missing a tag I guess from one of the configurations and can 
not tell where.

--
From: yucca...@live.co.za
Sent: Tuesday, June 15, 2010 10:11 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'


I have tried to check why this exception is thrown in production but not 
development


The difference between production snd development server is:

development) put mysql jar into CATALINA/lib (tomcat 6.0.26)

production) choice of common/lib or share/lib

exception is thrown by hibernate which is wrapping

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

2010-06-16 Thread Pid
form-login-page/login.jsf/form-login-page
form-error-page/loginerror.jsf/form-error-page
/form-login-config
/login-config
 
 context-param
 param-nameemail/param-name
 param-valuethejarten...@thejarbar.org/param-value
 /context-param
 /web-app
 
 I am probably missing a tag I guess from one of the configurations and
 can not tell where.
 --
 From: yucca...@live.co.za
 Sent: Tuesday, June 15, 2010 10:11 PM
 To: Tomcat Users List users@tomcat.apache.org
 Subject: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create
 JDBC driver of class '' for connect URL 'null'
 
 I have tried to check why this exception is thrown in production but
 not development

 The difference between production snd development server is:

 development) put mysql jar into CATALINA/lib (tomcat 6.0.26)

 production) choice of common/lib or share/lib

 exception is thrown by hibernate which is wrapping the exception from
 realm 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 




signature.asc
Description: OpenPGP digital signature


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

2010-06-16 Thread yuccanel
The bottom line for me is that this exception from what I have read usually 
happens when container can not find the mysql connector. Gonna ask them to 
reinstall my tomcat instance and take it from there.


--
From: Pid p...@pidster.com
Sent: Wednesday, June 16, 2010 1:18 PM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-16 Thread David Smith
-config
 form-login-page/login.jsf/form-login-page
 form-error-page/loginerror.jsf/form-error-page
 /form-login-config
 /login-config

  context-param
  param-nameemail/param-name
  param-valuethejarten...@thejarbar.org/param-value
  /context-param
 /web-app

 I am probably missing a tag I guess from one of the configurations and can
 not tell where.
 --
 From: yucca...@live.co.za
 Sent: Tuesday, June 15, 2010 10:11 PM
 To: Tomcat Users List users@tomcat.apache.org
 Subject: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
 driver of class '' for connect URL 'null'

   
 I have tried to check why this exception is thrown in production but not
 development

 The difference between production snd development server is:

 development) put mysql jar into CATALINA/lib (tomcat 6.0.26)

 production) choice of common/lib or share/lib

 exception is thrown by hibernate which is wrapping the exception from
 realm
 

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org

   


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-16 Thread David Smith
It can also (and frequently does) happen when there is some mismatch
between where the resource is defined and where it's used.  Maybe the
context.xml file you think tomcat is using for your webapp isn't being
used at all.

--David

On 6/16/10 7:33 AM, yucca...@live.co.za wrote:
 The bottom line for me is that this exception from what I have read usually 
 happens when container can not find the mysql connector. Gonna ask them to 
 reinstall my tomcat instance and take it from there.

 --
 From: Pid p...@pidster.com
 Sent: Wednesday, June 16, 2010 1:18 PM
 To: Tomcat Users List users@tomcat.apache.org
 Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
 JDBC driver of class '' for connect URL 'null'

  


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org

   


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-15 Thread yuccanel
I have tried to check why this exception is thrown in production but not 
development

The difference between production snd development server is:

development) put mysql jar into CATALINA/lib (tomcat 6.0.26)

production) choice of common/lib or share/lib

exception is thrown by hibernate which is wrapping the exception from realm

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

2010-06-15 Thread Mark Eggers
Are you developing on 6.0.x but deploying on 5.?.x (5.0 or 5.5)?

What version is running in production?

--- On Tue, 6/15/10, yucca...@live.co.za yucca...@live.co.za wrote:

 From: yucca...@live.co.za yucca...@live.co.za
 Subject: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
 driver of class '' for connect URL 'null'
 To: Tomcat Users List users@tomcat.apache.org
 Date: Tuesday, June 15, 2010, 1:11 PM
 I have tried to check why this
 exception is thrown in production but not development
 
 The difference between production snd development server
 is:
 
 development) put mysql jar into CATALINA/lib (tomcat
 6.0.26)
 
 production) choice of common/lib or share/lib
 
 exception is thrown by hibernate which is wrapping the
 exception from realm


  


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-15 Thread yuccanel
production is tomcat 6.0.20 thanks for the reply. had to call it a night so 
sorry for delay in reply.


--
From: Mark Eggers its_toas...@yahoo.com
Sent: Wednesday, June 16, 2010 3:16 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'



Are you developing on 6.0.x but deploying on 5.?.x (5.0 or 5.5)?

What version is running in production?

--- On Tue, 6/15/10, yucca...@live.co.za yucca...@live.co.za wrote:


From: yucca...@live.co.za yucca...@live.co.za
Subject: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'

To: Tomcat Users List users@tomcat.apache.org
Date: Tuesday, June 15, 2010, 1:11 PM
I have tried to check why this
exception is thrown in production but not development

The difference between production snd development server
is:

development) put mysql jar into CATALINA/lib (tomcat
6.0.26)

production) choice of common/lib or share/lib

exception is thrown by hibernate which is wrapping the
exception from realm






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-15 Thread Caldarale, Charles R
 From: yucca...@live.co.za [mailto:yucca...@live.co.za]
 Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
 create JDBC driver of class '' for connect URL 'null'
 
 production is tomcat 6.0.20

Then there's no common/lib or shared/lib in production either.  Get your story 
straight.

I would strongly recommend that you do your development and testing on exactly 
the same Tomcat version that runs in production.  Anything else puts you at 
risk for unexpected surprises.  (I'd also upgrade production ASAP.)

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2010-06-15 Thread yuccanel
Ok, no need to accuse me of lying, please see screenshot showing common/lib 
and other screenie showing there is no tomcat/lib :o



--
From: Caldarale, Charles R chuck.caldar...@unisys.com
Sent: Wednesday, June 16, 2010 4:03 AM
To: Tomcat Users List users@tomcat.apache.org
Subject: RE: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create 
JDBC driver of class '' for connect URL 'null'



From: yucca...@live.co.za [mailto:yucca...@live.co.za]
Subject: Re: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot
create JDBC driver of class '' for connect URL 'null'

production is tomcat 6.0.20


Then there's no common/lib or shared/lib in production either.  Get your 
story straight.


I would strongly recommend that you do your development and testing on 
exactly the same Tomcat version that runs in production.  Anything else 
puts you at risk for unexpected surprises.  (I'd also upgrade production 
ASAP.)


- 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-27 Thread Neil Youngman
The solution to this one seems to be that removing webapps/axis2.war allows it 
to see the context.xml file.

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-27 Thread Caldarale, Charles R
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'
 
 The solution to this one seems to be that removing webapps/axis2.war
 allows it to see the context.xml file.

I'm confused; isn't the Context element located in META-INF/context.xml 
inside webapps/axis2.war?  Wouldn't removing the .war file make the whole 
webapp non-existant?

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-27 Thread Neil Youngman
Caldarale, Charles R wrote:
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'

 The solution to this one seems to be that removing webapps/axis2.war
 allows it to see the context.xml file.

 I'm confused; isn't the Context element located in META-INF/context.xml 
 inside webapps/axis2.war?  Wouldn't removing the .war file make the whole 
 webapp non-existant?

No, the axis2.war is the standard Axis2 WAR distribution, as downloaded from 
the relevant website. I've loaded my classes/config into the directories under 
webapp, I haven't built a custom axis2.war. 

AIUI the axis2.war file was extracted onto the disk when I ran it up for the 
first time and now I've removed the .war file the axis2 stuff is left behind in 
the extracted directory structure, so it doesn't actually need the axis2.war 
file to run.

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-27 Thread Caldarale, Charles R
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'
 
 No, the axis2.war is the standard Axis2 WAR distribution, as downloaded
 from the relevant website. I've loaded my classes/config into the
 directories under webapp, I haven't built a custom axis2.war.

O.k., that explains it.  The expanded .war is there for Tomcat's convenience, 
not yours.  You should not be modifying anything in the expanded directory - it 
may be overwritten, deleted, or ignored by Tomcat at its whim, as you have 
discovered.  Even after expansion, the .war file is the master copy.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-27 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Neil,

On 7/24/2009 3:39 PM, Neil Youngman wrote:
 I don't think there's a permissions issue.
 
 $ ls -l 
 ~/wirefast/dev/tomcat6/servlet-example/webapps/axis2/META-INF/context.xml
 -rw-r--r-- 1 neil neil 343 2009-07-22 14:44 
 /home/neil/wirefast/dev/tomcat6/servlet-example/webapps/axis2/META-INF/context.xml

Assuming Tomcat is running as 'neil', you're probably okay. If it's
running as someone else, you need to check that the euid has read and
execute access to all intermediate directories.

 If there was I would expect strace to show an open() returning -1
 and I don't see that. Also double checking the permissions, it looks
 to me to be world readable.

Maybe not: if the stat() call returns enough information that the code
decides it can't read the file, no open() will ever occur.

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

iEYEARECAAYFAkpt06YACgkQ9CaO5/Lv0PA8pwCffvojntuJBOvbtgLY09+nSLlD
OSMAoKu32OcczznFHbDnSRnY+XOc6Ca7
=+vq7
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-24 Thread Neil Youngman
I'm still banging my head against this particular brick wall. I've cut the 
servlet down to a minimal example and tried to get as much debug out as 
possible, but I've not got much in the way of clues. I've reached a point where 
tracing the tomcat session with strace was the only thing I could think of that 
I hadn't tried. This is the outcome

$ grep META-INF/context.xml /tmp/catalina.trace.*
/tmp/catalina.trace.3726:stat64(/home/neil/wirefast/dev/tomcat6/servlet-example/webapps/axis2/META-INF/context.xml,
 {st_mode=S_IFREG|0644, st_size=343, ...}) = 0

That is interesting, because it appears to check the existence of the 
axis2/META-INF/context.xml file, but, as far as can be seen from the strace 
output, it never opens it. That would be consistent with the fact that I 
couldn't see it being opened or processed in any of the debug output. 

It's not obvious to me what part of the source would handle this. Where should 
I look for documentation of the process of handling individual contexts?

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-24 Thread Caldarale, Charles R
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'
 
 That is interesting, because it appears to check the existence of the
 axis2/META-INF/context.xml file, but, as far as can be seen from the
 strace output, it never opens it.

This is indicative that there may be another Context element around that's 
overriding the one in META-INF.  Check for the existence of 
conf/Catalina/[host]/axis2.xml; if it's there, that will preclude reading the 
one from META-INF.

Also, since it's been ten days since your original posting, can you please show 
us the server.xml for Tomcat and the context.xml for this webapp as they now 
stand?

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-24 Thread Neil Youngman
Caldarale, Charles R wrote:
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'

 That is interesting, because it appears to check the existence of the
 axis2/META-INF/context.xml file, but, as far as can be seen from the
 strace output, it never opens it.

 This is indicative that there may be another Context element around that's 
 overriding the one in META-INF.  Check for the existence of 
 conf/Catalina/[host]/axis2.xml; if it's there, that will preclude reading the 
 one from META-INF.

It doesn't look like that's it

/tmp/catalina.trace.3726:stat64(/home/neil/wirefast/dev/tomcat6/servlet-example/conf/example/localhost/axis2.xml,
 0xffce99c4) = -1 ENOENT (No such file or directory)


$ find ~/wirefast/dev/tomcat6/servlet-example -iname \*.xml | xargs grep 
'Resource'
/home/neil/wirefast/dev/tomcat6/servlet-example/webapps/axis2/META-INF/context.xml:
Resource name=jdbc/TestDatabase auth=Container
$

 Also, since it's been ten days since your original posting, can you please 
 show us the server.xml for Tomcat and the context.xml for this webapp as they 
 now stand?

This is servlet-example/conf/server.xml

?xml version='1.0' encoding='utf-8'?
Server port=6262

  Service name=example
Connector debug=6261 port=6260 /
Engine name=example defaultHost=localhost
  Host name=localhost
appBase=webapps
unpackWARs=true
autoDeploy=true
xmlValidation=false
xmlNamespaceAware=false /
/Engine
  /Service

/Server

and this is servlet-example/webapps/axis2/META-INF/context.xml

Context
Resource name=jdbc/TestDatabase auth=Container
  type=javax.sql.DataSource driverClassName=oracle.jdbc.OracleDr\
iver
  url=jdbc:oracle:thin:@192.168.2.143:1521:w2
  username=wire2 password=wire2
  maxActive=20 maxIdle=10
  maxWait=-1/
/Context

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Neil,

On 7/24/2009 10:21 AM, Neil Youngman wrote:
   type=javax.sql.DataSource 
 driverClassName=oracle.jdbc.OracleDr\
 iver

Is that really the content from your XML file with the backslash and
everything? 'cause XML doesn't do backslashes like that.

If stat is being called, but the file is never opened, could there be a
permissions issue, here? I always hate it when people ask about file
permissions on the list because they are usually grasping at straws and
haven't really read the post. In this case, it seems like a possibility
given your strace output.

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

iEYEARECAAYFAkpqC38ACgkQ9CaO5/Lv0PB68QCeLQum/0J7jrmq6tRXoO68QE58
CNYAnRoF0FGHY0myG8ieEGuy4fIufBGK
=vO5e
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-24 Thread Neil Youngman
Christopher Schultz wrote:
 Neil,

 On 7/24/2009 10:21 AM, Neil Youngman wrote:
   type=javax.sql.DataSource 
 driverClassName=oracle.jdbc.OracleDr\
 iver

 Is that really the content from your XML file with the backslash and
 everything? 'cause XML doesn't do backslashes like that.

Oops, I missed that. No the original doesn't have a backslash and line break 
there. I think that's an artefact from a listing in an xterm.

 If stat is being called, but the file is never opened, could there be a
 permissions issue, here? I always hate it when people ask about file
 permissions on the list because they are usually grasping at straws and
 haven't really read the post. In this case, it seems like a possibility
 given your strace output.

I don't think there's a permissions issue. If there was I would expect strace 
to show an open() returning -1 and I don't see that. Also double checking the 
permissions, it looks to me to be world readable.

$ ls -l 
~/wirefast/dev/tomcat6/servlet-example/webapps/axis2/META-INF/context.xml
-rw-r--r-- 1 neil neil 343 2009-07-22 14:44 
/home/neil/wirefast/dev/tomcat6/servlet-example/webapps/axis2/META-INF/context.xml

Thanks for the input.

Neil


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

[ERROR] Cannot create JDBC driver of class '' for connect URL 'null'

2009-07-14 Thread Neil Youngman
I'm having trouble getting Oracle access from Axis2 to work under
Tomcat 6. I've spent a lot of time Googling and prodding and poking
the application and I haven't found a solution that works for me.

Oddly the configuration I'm using seems to work for another
application. 

Let's start with the configuration in axis2/META-INF/context.xml,
which is:

?xml version='1.0' encoding='utf-8'?

Context
Resource name=jdbc/AppDatabase
  auth=Container
  type=javax.sql.DataSource
  factory=org.apache.commons.dbcp.BasicDataSourceFactory
  maxWait=-1
  maxActive=20
  maxIdle=10
  url=jdbc:oracle:thin:@frogfoot:1521:w2
  driverClassName=oracle.jdbc.OracleDriver
  username=
  password=
  accessToUnderlyingConnectionAllowed=true
/
/Context

this seems to work for another app, without a resource-ref, but this
app gets the javax.naming.NameNotFoundException: Name jdbc is not
bound in this Context. To resolve this I add the following
resource-ref in axis2/WEB-INF/web.xml:

resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/AppDatabase/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
/resource-ref

I now get org.apache.axis2.AxisFault: Cannot create JDBC driver of
class '' for connect URL 'null'. The full stack trace is:

[ERROR] Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.reflect.InvocationTargetException
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:597)
at 
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
at 
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
at 
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at 
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValvejava:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValvejava:175)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
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.createDataSource(BasicDataSource.java:1150)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourcejava:880)
at 
com.wirefast.wsam.service.WMSSubmissionService.getConnection(WMSSubmissionService.java:208)
at 
com.wirefast.wsam.service.WMSSubmissionService.submitMessage(WMSSubmissionService.java:570)
... 25 more
Caused by: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
at java.sql.DriverManager.getDriver(DriverManager.java:253)
at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
... 28 more

Obviously something isn't right, but I can't figure out where the problem lies. 
Maybe the fact

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

2009-07-14 Thread Pid

On 14/7/09 09:42, Neil Youngman wrote:

I'm having trouble getting Oracle access from Axis2 to work under
Tomcat 6. I've spent a lot of time Googling and prodding and poking
the application and I haven't found a solution that works for me.



Oddly the configuration I'm using seems to work for another
application.


Perhaps you should try the Tomcat configuration method then:

http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

p




Let's start with the configuration in axis2/META-INF/context.xml,
which is:

?xml version='1.0' encoding='utf-8'?

Context
Resource name=jdbc/AppDatabase
auth=Container
type=javax.sql.DataSource
factory=org.apache.commons.dbcp.BasicDataSourceFactory
maxWait=-1
maxActive=20
maxIdle=10
url=jdbc:oracle:thin:@frogfoot:1521:w2
driverClassName=oracle.jdbc.OracleDriver
username=
password=
accessToUnderlyingConnectionAllowed=true
/
/Context

this seems to work for another app, without a resource-ref, but this
app gets the javax.naming.NameNotFoundException: Name jdbc is not
bound in this Context. To resolve this I add the following
resource-ref in axis2/WEB-INF/web.xml:

resource-ref
descriptionDB Connection/description
res-ref-namejdbc/AppDatabase/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

I now get org.apache.axis2.AxisFault: Cannot create JDBC driver of
class '' for connect URL 'null'. The full stack trace is:

[ERROR] Cannot create JDBC driver of class '' for connect URL 'null'
java.lang.reflect.InvocationTargetException
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:597)
at
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:194)
at
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
at
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValvejava:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValvejava:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
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.createDataSource(BasicDataSource.java:1150)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourcejava:880)
at
com.wirefast.wsam.service.WMSSubmissionService.getConnection(WMSSubmissionService.java:208)
at
com.wirefast.wsam.service.WMSSubmissionService.submitMessage(WMSSubmissionService.java:570)
... 25 more
Caused by: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
at java.sql.DriverManager.getDriver(DriverManager.java:253)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
... 28 more

Obviously something isn't right, but I can't figure out where the
problem lies. Maybe the fact that it is invoking
sun.jdbc.odbc.JdbcOdbcDriver instead of oracle.jdbc.OracleDriver is a
clue? Or am I missing something else?

Neil Youngman



Neil Youngman
Developer
Wirefast Limited


Wirefast provides secure corporate messaging services.
See our messaging solutions at _http://www.wirefast.com/_

Please consider the environment.
Does this email or attachment need to be printed

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

2009-07-14 Thread Neil Youngman
 Perhaps you should try the Tomcat configuration method then:

 http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

Oddly enough, my configuration matches the Oracle example in that document, as 
far as I can see, possibly because I've read that document half a dozen times 
while searching for a solution. 

If you can see where my configuration differs from that in the document 
(obviously excluding local names), feel free to provide a helpful answer.

Neil Youngman


Neil Youngman 
Developer
Wirefast Limited
 
Wirefast provides secure corporate messaging services.
See our messaging solutions at http://www.wirefast.com/
Please consider the environment.
Does this email or attachment need to be printed? 
This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England  Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ



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

2009-07-14 Thread Konstantin Kolinko
2009/7/14 Neil Youngman neil.young...@wirefast.com:
 I'm having trouble getting Oracle access from Axis2 to work under
 Tomcat 6. I've spent a lot of time Googling and prodding and poking
 the application and I haven't found a solution that works for me.

 Oddly the configuration I'm using seems to work for another
 application.

 Let's start with the configuration in axis2/META-INF/context.xml,
 which is:

(...)

Look at $CATALINA_BASE/conf/Catalina/localhost/your web app name.xml

That is a copy of your context.xml file that Tomcat creates when the
app is deployed. This copy takes precedence over its original. Maybe
your Resource isn't defined there.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Neil Youngman
Konstantin Kolinko wrote:
 Look at $CATALINA_BASE/conf/Catalina/localhost/your web app name.xml

 That is a copy of your context.xml file that Tomcat creates when the
 app is deployed. This copy takes precedence over its original. Maybe
 your Resource isn't defined there.

I can't see any sign that tomcat is creating such a file. There is no 
$CATALINA_BASE/conf/Catalina directory.

Using CATALINA_BASE:   /home/tomcat6/wsam

$ ls -l /home/tomcat6/wsam/conf/
total 28
-rw-r--r--1 tomcat6  tomcat6   426 Jul 10 13:45 server.xml
-rw-r--r--1 tomcat6  tomcat6   436 Jul 10 13:43 server.xml~
-rw-r--r--1 tomcat6  tomcat6 15305 Jul  8 14:26 transform.xsl
drwxrwxr-x3 tomcat6  tomcat6  4096 Jan 28 14:09 WSAM
$ 

Directory WSAM just contains an empty localhost subdirectory.

Neil Youngman


Neil Youngman 
Developer
Wirefast Limited
 
Wirefast provides secure corporate messaging services.
See our messaging solutions at http://www.wirefast.com/
Please consider the environment.
Does this email or attachment need to be printed? 
This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England  Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ



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

2009-07-14 Thread Caldarale, Charles R
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'
 
 Using CATALINA_BASE:   /home/tomcat6/wsam
 
 $ ls -l /home/tomcat6/wsam/conf/
 total 28
 -rw-r--r--    1 tomcat6  tomcat6   426 Jul 10 13:45 server.xml
 -rw-r--r--    1 tomcat6  tomcat6   436 Jul 10 13:43 server.xml~
 -rw-r--r--    1 tomcat6  tomcat6 15305 Jul  8 14:26 transform.xsl
 drwxrwxr-x    3 tomcat6  tomcat6  4096 Jan 28 14:09 WSAM
 $

It's unlikely that's the real Tomcat conf directory - there's not enough stuff 
in there to get Tomcat started.  You either have a very broken installation, or 
the Tomcat you're actually using is installed somewhere else.

I'd suggest starting over with a clean installation and work up from there.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Neil Youngman
Caldarale, Charles R wrote:
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'

 Using CATALINA_BASE:   /home/tomcat6/wsam

 $ ls -l /home/tomcat6/wsam/conf/
 total 28
 -rw-r--r--1 tomcat6  tomcat6   426 Jul 10 13:45 server.xml
 -rw-r--r--1 tomcat6  tomcat6   436 Jul 10 13:43 server.xml~
 -rw-r--r--1 tomcat6  tomcat6 15305 Jul  8 14:26 transform.xsl
 drwxrwxr-x3 tomcat6  tomcat6  4096 Jan 28 14:09 WSAM
 $

 It's unlikely that's the real Tomcat conf directory - there's not enough 
 stuff in there to get Tomcat started.  You either have a very broken 
 installation, or the Tomcat you're actually using is installed somewhere else.

That's $CATALINA_BASE/conf, not $CATALINA_HOME/conf

Neil Youngman


Neil Youngman 
Developer
Wirefast Limited
 
Wirefast provides secure corporate messaging services.
See our messaging solutions at http://www.wirefast.com/
Please consider the environment.
Does this email or attachment need to be printed? 
This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England  Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ



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

2009-07-14 Thread Caldarale, Charles R
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'
 
 That's $CATALINA_BASE/conf, not $CATALINA_HOME/conf

Regardless, the lack of an [engine] subdirectory is an indication that you may 
not be running Tomcat from where you think you are.

1) What's in $CATALINA_HOME/conf?

2) What do the startup scripts display for the $CATALINA_xxx variables when you 
bring up Tomcat?

The fact that the JDBC-ODBC bridge shows up in the stack trace says that your 
published Resource config is not the one being used.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Neil Youngman
Caldarale, Charles R wrote:
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 That's $CATALINA_BASE/conf, not $CATALINA_HOME/conf

 Regardless, the lack of an [engine] subdirectory is an indication that you 
 may not be running Tomcat from where you think you are.

 1) What's in $CATALINA_HOME/conf?

$ ls -l /usr/local/apache-tomcat-6.0.16/conf
total 92
-rw---1 root root 8568 Jan 28  2008 catalina.policy
-rw---1 root root 3665 Jan 28  2008 catalina.properties
-rw---1 root root 1396 Jan 28  2008 context.xml
-rw---1 root root 3664 Jan 28  2008 logging.properties
-rw---1 root root 6462 Jan 28  2008 server.xml
-rw---1 root root 1107 Jan 28  2008 tomcat-users.xml
-rw---1 root root51226 Jan 28  2008 web.xml
$


 2) What do the startup scripts display for the $CATALINA_xxx variables when 
 you bring up Tomcat?

Using CATALINA_BASE:   /home/tomcat6/wsam
Using CATALINA_HOME:   /usr/local/apache-tomcat-6.0.16
Using CATALINA_TMPDIR: /home/tomcat6/wsam/temp
Using JRE_HOME:   /usr/java/jdk1.6.0_06

That looks correct to me, but as you say:

 The fact that the JDBC-ODBC bridge shows up in the stack trace says that your 
 published Resource config is not the one being used.

The resource config is in 
/home/tomcat6/wsam/webapps/axis2/META-INF/context.xml

Again that seems right to me, but obviously I am missing something.

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-14 Thread Rainer Frey
On Tuesday 14 July 2009 14:31:06 Caldarale, Charles R wrote:
  From: Neil Youngman [mailto:neil.young...@wirefast.com]
  Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
  URL 'null'
 
  That's $CATALINA_BASE/conf, not $CATALINA_HOME/conf

 Regardless, the lack of an [engine] subdirectory is an indication that you
 may not be running Tomcat from where you think you are.

Maybe 'WSAM' is the engine name. Maybe the OP should post his complete 
server.xml.

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Neil Youngman
Rainer Frey wrote:
 Maybe 'WSAM' is the engine name. Maybe the OP should post his complete 
 server.xml.

Rainer is of course right. I should have realised that WSAM is the engine name 
from server.xml

The server.xml is quite simple.


$ cat /home/tomcat6/wsam/conf/server.xml 
?xml version='1.0' encoding='utf-8'?
Server port=4582

  Service name=WSAM
Connector debug=1 port=4580 /
Engine name=WSAM defaultHost=localhost
  Host name=localhost
appBase=webapps
unpackWARs=true
autoDeploy=true
xmlValidation=false
xmlNamespaceAware=false /
/Engine
  /Service

/Server

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-14 Thread Rainer Frey (Inxmail GmbH)
On Tuesday 14 July 2009 10:42:19 Neil Youngman wrote:
 I'm having trouble getting Oracle access from Axis2 to work under
 Tomcat 6. I've spent a lot of time Googling and prodding and poking
 the application and I haven't found a solution that works for me.

 Oddly the configuration I'm using seems to work for another
 application.

 Let's start with the configuration in axis2/META-INF/context.xml,
 which is:

 ?xml version='1.0' encoding='utf-8'?

 Context
 Resource name=jdbc/AppDatabase
   auth=Container
   type=javax.sql.DataSource
   factory=org.apache.commons.dbcp.BasicDataSourceFactory

You are explicitly specifying the original DBCP factory 
class org.apache.commons.dbcp.BasicDataSourceFactory here. Is this for 
specific reason, and is the jar file available (I believe it needs to be in 
tomcat's lib dir, though I'm not sure if the resource is application 
specific)? What happens if you leave out the factory attribute?

 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.createDataSource(BasicDataSourc
e.java:1150) at
 org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourceja
va:880) at

Obviously the packaged and renamed tomcat DBCP factory is used. Maybe a tomcat 
fallback if the specified factory is not found? Also might there be a 
fallback for the JDBC driver if the driver is not found?

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Caldarale, Charles R
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'
 
 I should have realised that WSAM is the engine name from server.xml

So what's under the WSAM directory?

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Neil Youngman
Rainer Frey (Inxmail GmbH) wrote:
 On Tuesday 14 July 2009 10:42:19 Neil Youngman wrote:
 I'm having trouble getting Oracle access from Axis2 to work under
 Tomcat 6. I've spent a lot of time Googling and prodding and poking
 the application and I haven't found a solution that works for me.

 Oddly the configuration I'm using seems to work for another
 application.

 Let's start with the configuration in axis2/META-INF/context.xml,
 which is:

 ?xml version='1.0' encoding='utf-8'?

 Context
 Resource name=jdbc/AppDatabase
   auth=Container
   type=javax.sql.DataSource
   factory=org.apache.commons.dbcp.BasicDataSourceFactory

 You are explicitly specifying the original DBCP factory 
 class org.apache.commons.dbcp.BasicDataSourceFactory here. Is this for 
 specific reason, and is the jar file available (I believe it needs to be in 
 tomcat's lib dir, though I'm not sure if the resource is application 
 specific)? What happens if you leave out the factory attribute?

That was copied from a working application that I mentioned previously. 
Commons-dbcp-1.1.jar is in the /home/tomcat6/wsam/webapps/axis2/WEB-INF/lib 
directory. 

If I remove the factory attribute it fails in exactly the same way.

 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.createDataSource(BasicDataSourc
 e.java:1150) at
 org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourceja
 va:880) at

 Obviously the packaged and renamed tomcat DBCP factory is used. Maybe a 
 tomcat 
 fallback if the specified factory is not found? Also might there be a 
 fallback for the JDBC driver if the driver is not found?

That seems likely.

The app I currently have works under tomcat5 and I haven't written any apps 
from scratch under tomcat6. Maybe if I try to create a minimal app from 
scratch, I'll get a little more insight into what is actually needed. 

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-14 Thread Neil Youngman
Caldarale, Charles R wrote:
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'

 I should have realised that WSAM is the engine name from server.xml

 So what's under the WSAM directory?

There was a localhost subdirectory, which was completely empty.

As an experiment I removed the WSAM directory and several restarts have not 
recreated it.

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-14 Thread Caldarale, Charles R
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'
 
 As an experiment I removed the WSAM directory and several restarts have
 not recreated it.

Tomcat won't create the [engine]/[host] directory until it needs to, such as 
when copying a Context element from a META-INF/context.xml file.  Since that 
directory is not being created, either you're not running Tomcat from where you 
think you are, or the Context element in your webapp's META-INF/context.xml 
file is not being recognized.  Might want to double-check spelling of 
everything, since the XML files are case-sensitive.

Could also try a fresh install of 6.0.20 and see if that works.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Rainer Frey
On Tuesday 14 July 2009 15:56:07 Caldarale, Charles R wrote:
  From: Neil Youngman [mailto:neil.young...@wirefast.com]
  Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
  URL 'null'
 
  As an experiment I removed the WSAM directory and several restarts have
  not recreated it.

 Tomcat won't create the [engine]/[host] directory until it needs to, such
 as when copying a Context element from a META-INF/context.xml file. 

Has Tomcat 6 done that since initial release? I vaguely remember reading s.th. 
related in 6.0.20 change log.

To the OP: what exact version are you using?

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Mark Shifman
I wonder if somehow the factory classes are confused.
My tomcat6/lib contains tomcat-dbcp.jar and I don't have commons-dbcp-1.1.jar 
in my webapp at all.
I also don't have a factory attribute in my resource definition since the right 
one is picked up by default.
(I think this changed in tomcat6)

my 2 cents
mas

Neil Youngman wrote:
 Rainer Frey (Inxmail GmbH) wrote:
 On Tuesday 14 July 2009 10:42:19 Neil Youngman wrote:
 I'm having trouble getting Oracle access from Axis2 to work under
 Tomcat 6. I've spent a lot of time Googling and prodding and poking
 the application and I haven't found a solution that works for me.

 Oddly the configuration I'm using seems to work for another
 application.

 Let's start with the configuration in axis2/META-INF/context.xml,
 which is:

 ?xml version='1.0' encoding='utf-8'?

 Context
 Resource name=jdbc/AppDatabase
   auth=Container
   type=javax.sql.DataSource
   factory=org.apache.commons.dbcp.BasicDataSourceFactory
 You are explicitly specifying the original DBCP factory 
 class org.apache.commons.dbcp.BasicDataSourceFactory here. Is this for 
 specific reason, and is the jar file available (I believe it needs to be in 
 tomcat's lib dir, though I'm not sure if the resource is application 
 specific)? What happens if you leave out the factory attribute?
 
 That was copied from a working application that I mentioned previously. 
 Commons-dbcp-1.1.jar is in the /home/tomcat6/wsam/webapps/axis2/WEB-INF/lib 
 directory. 
 
 If I remove the factory attribute it fails in exactly the same way.
 
 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.createDataSource(BasicDataSourc
 e.java:1150) at
 org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourceja
 va:880) at
 Obviously the packaged and renamed tomcat DBCP factory is used. Maybe a 
 tomcat 
 fallback if the specified factory is not found? Also might there be a 
 fallback for the JDBC driver if the driver is not found?
 
 That seems likely.
 
 The app I currently have works under tomcat5 and I haven't written any apps 
 from scratch under tomcat6. Maybe if I try to create a minimal app from 
 scratch, I'll get a little more insight into what is actually needed. 
 
 Neil Youngman
 
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org

-- 
 Mark Shifman MD. Ph.D.
 Yale Center for Medical Informatics
 Phone (203)737-5219
 mark.shif...@yale.edu

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Caldarale, Charles R
 From: Rainer Frey [mailto:rainer.f...@inxmail.de]
 Subject: Re: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'
 
  Tomcat won't create the [engine]/[host] directory until it 
  needs to, such as when copying a Context element from a 
  META-INF/context.xml file.
 
 Has Tomcat 6 done that since initial release?

No, the [appName].xml file used to be created just when expanding a .war (and 
possibly some other conditions).

 To the OP: what exact version are you using?

He's already shown us: 6.0.16.

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 7/14/2009 8:31 AM, Caldarale, Charles R wrote:
 The fact that the JDBC-ODBC bridge shows up in the stack trace says
 that your published Resource config is not the one being used.

Actually, I think it's the driver registration that's failing. Since the
DriverManager is being asked to get an appropriate driver for a
particular URL, all available drivers will be queried, including the
JdbcOdbcDriver. It's presence in the stack trace is misleading, but not
particularly troubling.

What /is/ interesting is that this is the /first time ever/ I've seen a
complete stack trace including all the Caused by elements from someone
getting this error. I'll quote it because I think it's important:

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.createDataSource(BasicDataSource.java:1150)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourcejava:880)
at
com.wirefast.wsam.service.WMSSubmissionService.getConnection(WMSSubmissionService.java:208)
at
com.wirefast.wsam.service.WMSSubmissionService.submitMessage(WMSSubmissionService.java:570)
... 25 more
Caused by: java.lang.NullPointerException
at sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
at sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
at java.sql.DriverManager.getDriver(DriverManager.java:253)
at
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
... 28 more


The root cause is a NullPointerException within the
JdbcOdbcDriver.acceptsURL call: basically, this driver is not properly
checking its arguments for null (it's probably doing something like
if(url.startsWith(jdbc:odbc:)) which means it'll blow up if the URL is
null.

The URL may or may not be null, in spite of this error message. I wonder
if the message itself is inaccurate. I haven't traced through the code,
but it would be nice to know what's going on.

This error has come up over and over on this list and the solution
usually ends up being that you just have to throw out your configuration
and start over again, and everything seems to work out just fine. It
would be nice to know what the real problem is.

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

iEYEARECAAYFAkpcoc8ACgkQ9CaO5/Lv0PALJACgj45GZ7AYEjHMTb8RLIK4lqAN
nsQAoMBLjWnRKHdyEvMOjhJYitSaP/wp
=r5kk
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread David Smith
In the past, it's typically been caused by some misspell of the JNDI
name  between the Resource / element and the
resource-ref.../resource-ref in the WEB-INF/web.xml.  I'd have to go
back to the original post to tell if that's the case here or not. 
Either that or the resource was declared as a global resource without
the requisite ResourceLink / in the context.  Either way, it's
typically a disconnect between the Resource .../ and it's use in the
jsp/servlet code.

Having said all that, I'm certain there are a few cases that blow what I
just wrote out of the water. :-)

--David

Christopher Schultz wrote:
 Chuck,

 On 7/14/2009 8:31 AM, Caldarale, Charles R wrote:
  The fact that the JDBC-ODBC bridge shows up in the stack trace says
  that your published Resource config is not the one being used.

 Actually, I think it's the driver registration that's failing. Since the
 DriverManager is being asked to get an appropriate driver for a
 particular URL, all available drivers will be queried, including the
 JdbcOdbcDriver. It's presence in the stack trace is misleading, but not
 particularly troubling.

 What /is/ interesting is that this is the /first time ever/ I've seen a
 complete stack trace including all the Caused by elements from someone
 getting this error. I'll quote it because I think it's important:

 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.createDataSource(BasicDataSource.java:1150)
 at
 org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSourcejava:880)
 at
 com.wirefast.wsam.service.WMSSubmissionService.getConnection(WMSSubmissionService.java:208)
 at
 com.wirefast.wsam.service.WMSSubmissionService.submitMessage(WMSSubmissionService.java:570)
 ... 25 more
 Caused by: java.lang.NullPointerException
 at
 sun.jdbc.odbc.JdbcOdbcDriver.getProtocol(JdbcOdbcDriver.java:507)
 at sun.jdbc.odbc.JdbcOdbcDriver.knownURL(JdbcOdbcDriver.java:476)
 at
 sun.jdbc.odbc.JdbcOdbcDriver.acceptsURL(JdbcOdbcDriver.java:307)
 at java.sql.DriverManager.getDriver(DriverManager.java:253)
 at
 org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1143)
 ... 28 more


 The root cause is a NullPointerException within the
 JdbcOdbcDriver.acceptsURL call: basically, this driver is not properly
 checking its arguments for null (it's probably doing something like
 if(url.startsWith(jdbc:odbc:)) which means it'll blow up if the URL is
 null.

 The URL may or may not be null, in spite of this error message. I wonder
 if the message itself is inaccurate. I haven't traced through the code,
 but it would be nice to know what's going on.

 This error has come up over and over on this list and the solution
 usually ends up being that you just have to throw out your configuration
 and start over again, and everything seems to work out just fine. It
 would be nice to know what the real problem is.

 -chris


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

David,

On 7/14/2009 11:29 AM, David Smith wrote:
 In the past, it's typically been caused by some misspell of the JNDI
 name  between the Resource / element and the
 resource-ref.../resource-ref in the WEB-INF/web.xml.

I've never had to use a resourcr-ref element in web.xml for a
Resourcre defined in META-INF/context.xml. I've even created incorrect
resource-ref elements in web.xml and not had a problem. I /do/ have
them in there, though, just in case :)

 I'd have to go
 back to the original post to tell if that's the case here or not. 

Tsk, tsk. It was only a few hours ago:

META-INF/context.xml:
 Resource name=jdbc/AppDatabase

web.xml:
 resource-ref
   descriptionDB Connection/description
   res-ref-namejdbc/AppDatabase/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
 /resource-ref

Looks good to me.

 Either that or the resource was declared as a global resource without
 the requisite ResourceLink / in the context.

Nope, it was done in the recommended way (from the Tomcat docs, and
checked multiple times according to the OP).

 Either way, it's
 typically a disconnect between the Resource .../ and it's use in the
 jsp/servlet code.

He didn't post his code. It would be good to see what is on line 208 in
com.wirefast.wsam.service.WMSSubmissionService.getConnection.

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

iEYEARECAAYFAkpcqD0ACgkQ9CaO5/Lv0PBSBACaA3d45tyyA7K62NtHS4NWZ7FA
9KcAn0xqAVHruti85qkheBztd25N/n0d
=N63Z
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Neil Youngman
Christopher Schultz wrote:
 Either way, it's
 typically a disconnect between the Resource .../ and it's use in the
 jsp/servlet code.

 He didn't post his code. It would be good to see what is on line 208 in
 com.wirefast.wsam.service.WMSSubmissionService.getConnection.

Oops. I meant to include that.

private static final String CONTEXT_NAME = java:/comp/env;
private static final String DB_NAME = jdbc/InterceptDatabase;

 ...

private static Connection getConnection ()
throws Exception, SQLException
{
if( DATA_SOURCE == null )
{
// Get the data source (from context.xml)
try
{
Class.forName(oracle.jdbc.OracleDriver);
Context initContext = new InitialContext();
Context envContext = (Context) initContext.lookup(CONTEXT_NAME);
DATA_SOURCE = (DataSource)envContext.lookup(DB_NAME);
}
catch (Exception ex)
{
System.err.println( ex );
ex.printStackTrace();
throw ex;
}
}

return DATA_SOURCE.getConnection(); // line 208
}

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-14 Thread Caldarale, Charles R
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'
 
 private static final String DB_NAME = jdbc/InterceptDatabase;

But your Context has:

Resource name=jdbc/AppDatabase

 - 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: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Neil Youngman
Caldarale, Charles R wrote:
 From: Neil Youngman [mailto:neil.young...@wirefast.com]
 Subject: RE: [ERROR] Cannot create JDBC driver of class '' for connect
 URL 'null'

 private static final String DB_NAME = jdbc/InterceptDatabase;

 But your Context has:

 Resource name=jdbc/AppDatabase

Oops. It's late in the day and I'm getting careless. That's from a different 
application. I'll try to copy from the correct editor window this time.

private static final String CONTEXT_NAME = java:/comp/env;
private static final String DB_NAME = jdbc/AppDatabase;

 ...

private static Connection getConnection ()
throws Exception, SQLException
{
if( DATA_SOURCE == null )
{
// Get the data source (from context.xml)
try
{
Class.forName(oracle.jdbc.OracleDriver);
Context initContext = new InitialContext();
Context envContext = (Context) initContext.lookup(CONTEXT_NAME);
DATA_SOURCE = (DataSource)envContext.lookup(DB_NAME);
}
catch (Exception ex)
{
System.err.println( ex );
ex.printStackTrace();
throw ex;
}
}

return DATA_SOURCE.getConnection(); // line 208
}

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-07-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Neil,

Just a few comments on your connection acquisition code:

On 7/14/2009 12:45 PM, Neil Youngman wrote:
 private static final String CONTEXT_NAME = java:/comp/env;
 private static final String DB_NAME = jdbc/AppDatabase;

If you have the same class in two applications (except for these two
constants), why not use the same class plus a configuration file?

 private static Connection getConnection ()
 throws Exception, SQLException
 {
 if( DATA_SOURCE == null )

Hmm... a DataSource object is not guaranteed to be threadsafe. I would
not bother to cache the DataSource object in your class: at least not in
a static field.

The performance hit you experience from performing repeated JNDI
lookups is negligible, and your code has the benefit of always getting
the current DataSource from the directory.

 // Get the data source (from context.xml)
 try
 {
 Class.forName(oracle.jdbc.OracleDriver);

This line of code is not necessary at all, for several reasons:

1. The connection pool will already make sure this class is loaded

2. Standard JDBC practice is to call Class.forName(driver).newInstance()
to make sure that the driver is, in fact, registered with the DriverManager.

3. A driver used with a DataSource does not bother to register itself
with the DriverManager (see javadoc for javax.sql.DataSource).

This is all you need:

 Context initContext = new InitialContext();
 Context envContext = (Context) 
 initContext.lookup(CONTEXT_NAME);
 DATA_SOURCE = (DataSource)envContext.lookup(DB_NAME);

That's it.

 catch (Exception ex)
 {
 System.err.println( ex );
 ex.printStackTrace();
 throw ex;
 }


This exception handler doesn't add much: the caller has the opportunity
to catch this exception, so why log it at this level?

If I were you, I'd try these steps to resolve your problem:

1. Remove the 'factory' attribute from your Resource declaration
2. Remove commons-dbcp-*.jar from WEB-INF/lib

This has a fair chance of working. Any particular reason you want to use
a webapp-provided connection pool factory?

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

iEYEARECAAYFAkpc0SgACgkQ9CaO5/Lv0PD2WACghKVp2vvrk2F9m78R2lwcFGNp
JMcAn0g1W2O2C6h9dcRihYdClENiXIv1
=u5uA
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-07-14 Thread Neil Youngman
Christopher Schultz wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Neil,

 Just a few comments on your connection acquisition code:

 On 7/14/2009 12:45 PM, Neil Youngman wrote:
 private static final String CONTEXT_NAME = java:/comp/env;
 private static final String DB_NAME = jdbc/AppDatabase;

 If you have the same class in two applications (except for these two
 constants), why not use the same class plus a configuration file?

It's not the same class, but they share the code that connects to the database. 
It might be advantageous to factor it out, but they are currently small self 
contained apps.

 private static Connection getConnection ()
 throws Exception, SQLException
 {
 if( DATA_SOURCE == null )

 Hmm... a DataSource object is not guaranteed to be threadsafe. I would
 not bother to cache the DataSource object in your class: at least not in
 a static field.

OK, I'm happy to drop that.


 The performance hit you experience from performing repeated JNDI
 lookups is negligible, and your code has the benefit of always getting
 the current DataSource from the directory.

 // Get the data source (from context.xml)
 try
 {
 Class.forName(oracle.jdbc.OracleDriver);

 This line of code is not necessary at all, for several reasons:

 1. The connection pool will already make sure this class is loaded

 2. Standard JDBC practice is to call Class.forName(driver).newInstance()
 to make sure that the driver is, in fact, registered with the DriverManager.

 3. A driver used with a DataSource does not bother to register itself
 with the DriverManager (see javadoc for javax.sql.DataSource).

 This is all you need:

 Context initContext = new InitialContext();
 Context envContext = (Context) 
 initContext.lookup(CONTEXT_NAME);
 DATA_SOURCE = (DataSource)envContext.lookup(DB_NAME);

 That's it.

 catch (Exception ex)
 {
 System.err.println( ex );
 ex.printStackTrace();
 throw ex;
 }


 This exception handler doesn't add much: the caller has the opportunity
 to catch this exception, so why log it at this level?

I prefer not to rely on the caller logging exceptions. I want to be sure that I 
get a full stack trace and I can't always rely on the caller to provide it.

 If I were you, I'd try these steps to resolve your problem:

 1. Remove the 'factory' attribute from your Resource declaration
 2. Remove commons-dbcp-*.jar from WEB-INF/lib

I've already done both of these.

 This has a fair chance of working. Any particular reason you want to use
 a webapp-provided connection pool factory?

I think that was a hangover from tomcat 5. I've removed that, to no obvious 
effect.

Thanks for the pointers. I've still got a long way to go before I'm an expert 
and all the feedback helps.

Neil Youngman


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

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

2009-03-09 Thread Stanley Wong
I know very little about UminnServer. We just pick a GIS handy. 

We use javascripts to interact with GoogleEarth Server. Certainly GWT
can do the jobs, but we use pure javascripts instead.

Mostly we interact with Google Map API. There are tons of sample codes
in Google Map API website that provide good examples.

Stanley  

-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com] 
Sent: Saturday, March 07, 2009 10:06 AM
To: Tomcat Users List
Subject: RE: Cannot create JDBC driver of class '' for connect URL
'null'


Hello Wong-

Now that your PostGIS Datasource and JDBCRealm configurations are
correct..a few questions
do you prefer GoogleEarth over the UMinn MapServer?
Can you use GWT Ajax tools to construct pages to interact with
GoogleEarth Server?
Does GoogleEarth have any tutorials available?

Thanks
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official
business of Sender. This transmission is of a confidential nature and
Sender does not endorse distribution to any party other than intended
recipient. Sender does not necessarily endorse content contained within
this transmission. 




 Subject: RE: FW: Cannot create JDBC driver of class '' for connect URL
'null'
 Date: Wed, 4 Mar 2009 11:02:26 -0500
 From: w...@pcigeomatics.com
 To: users@tomcat.apache.org
 
 Thank you. In fact, I did follow it step-by-step. The someApp is the
 actual app that I use. 
 
 And, the server that I use is the one with Google Earth Enterprise. It
 is possible that some settings may have been overidden. 
 
 Thanks for your help!!
 
 Stanley 
 
 -Original Message-
 From: David Smith [mailto:d...@cornell.edu] 
 Sent: Wednesday, March 04, 2009 10:57 AM
 To: Tomcat Users List
 Subject: Re: FW: Cannot create JDBC driver of class '' for connect URL
 'null'
 
 Stanley Wong wrote:
  Thanks, David. 
 
  Unfortunately, it still fails. 
 
  Does it have other tools that we may use to get more clues? 
 
  Thank you,
 
  Stanley 
 

 Unfortunately I'm out of ideas at this point.  Everything in front of
me
 suggests this should be working at this point.  If I were you, I would
 go through the JNDI howto on tomcat's website step by step in a
parallel
 webapp and see if you can get the examples there to work.  After
getting
 that to work, compare what you have with that to see where the
 differences are.  I've done this setup many, many times and have
 consistently been able to get it working almost from the first try.
 
 One last thought -- looking back through the thread, I can't see where
 this might have been mentioned, but is this tomcat install a genuine
 tomcat from tomcat.apache.org or is this a third party repackage?  If
 it's a third party repackage (possibly from a linux vendor), try your
 webapp with a genuine tomcat downloaded from tomcat.apache.org.  If
that
 fixes anything, you might want to either replace the third party
package
 or contact people maintaining your linux distribution for help.
 
 --David
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

_
Hotmail(r) is up to 70% faster. Now good news travels really fast. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_0320
09


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-03-04 Thread David Smith
Stanley Wong wrote:
 Thanks, David. 

 Unfortunately, it still fails. 

 Does it have other tools that we may use to get more clues? 

 Thank you,

 Stanley 

   
Unfortunately I'm out of ideas at this point.  Everything in front of me
suggests this should be working at this point.  If I were you, I would
go through the JNDI howto on tomcat's website step by step in a parallel
webapp and see if you can get the examples there to work.  After getting
that to work, compare what you have with that to see where the
differences are.  I've done this setup many, many times and have
consistently been able to get it working almost from the first try.

One last thought -- looking back through the thread, I can't see where
this might have been mentioned, but is this tomcat install a genuine
tomcat from tomcat.apache.org or is this a third party repackage?  If
it's a third party repackage (possibly from a linux vendor), try your
webapp with a genuine tomcat downloaded from tomcat.apache.org.  If that
fixes anything, you might want to either replace the third party package
or contact people maintaining your linux distribution for help.

--David

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



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

2009-03-04 Thread Martin Gainty

at last count there are 16 different supported drivers for Postgres
http://jdbc.postgresql.org/download.html#current

which driver are you implementing?

BTW here the url should be
jdbc:postgresql://host:port/database

contents of %POSTGRES_HOME%/data/postgresql.conf:

listen_addresses = 'localhost'# what IP address(es) to listen on; 
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432
assuming the host and port are identical the URL should be..
jdbc:postgresql://localhost:5432/databaseask your DBA what the name of the DB 
is..
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 




 Date: Wed, 4 Mar 2009 10:56:52 -0500
 From: d...@cornell.edu
 To: users@tomcat.apache.org
 Subject: Re: FW: Cannot create JDBC driver of class '' for connect URL 'null'
 
 Stanley Wong wrote:
  Thanks, David. 
 
  Unfortunately, it still fails. 
 
  Does it have other tools that we may use to get more clues? 
 
  Thank you,
 
  Stanley 
 

 Unfortunately I'm out of ideas at this point.  Everything in front of me
 suggests this should be working at this point.  If I were you, I would
 go through the JNDI howto on tomcat's website step by step in a parallel
 webapp and see if you can get the examples there to work.  After getting
 that to work, compare what you have with that to see where the
 differences are.  I've done this setup many, many times and have
 consistently been able to get it working almost from the first try.
 
 One last thought -- looking back through the thread, I can't see where
 this might have been mentioned, but is this tomcat install a genuine
 tomcat from tomcat.apache.org or is this a third party repackage?  If
 it's a third party repackage (possibly from a linux vendor), try your
 webapp with a genuine tomcat downloaded from tomcat.apache.org.  If that
 fixes anything, you might want to either replace the third party package
 or contact people maintaining your linux distribution for help.
 
 --David
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 

_
Windows Live™ Groups: Create an online spot for your favorite groups to meet.
http://windowslive.com/online/groups?ocid=TXT_TAGLM_WL_groups_032009

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 users@tomcat.apache.org
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:

Context path=/smm docBase=smm debug=5 reloadable=true
crossContext=true
Resource name=jdbc/SmmDB auth=Container


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/
/Context

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:


Context path=/smm docBase=smm debug=5 reloadable=true 
crossContext=true
   Resource name=jdbc/SmmDB auth=Container 
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/ 


/Context

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

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 users@tomcat.apache.org
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:

 Context path=/smm docBase=smm debug=5 reloadable=true
 crossContext=true
 Resource name=jdbc/SmmDB auth=Container
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/
 /Context

 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:


Context path=/smm docBase=smm debug=5 reloadable=true 
crossContext=true
   Resource name=jdbc/SmmDB auth=Container 
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/

/Context

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:
resource-ref
   res-ref-namejdbc/SmmDB/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref

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:


Context path=/smm docBase=smm debug=5 reloadable=true 
crossContext=true
   Resource name=jdbc/SmmDB auth=Container 
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:
resource-ref
   res-ref-namejdbc/SmmDB/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref

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

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:


Context path=/smm docBase=smm debug=5 reloadable=true 
crossContext=true

   Resource name=jdbc/SmmDB auth=Container 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/

/Context

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: Cannot create JDBC driver of class '' for connect URL 'null'

2007-06-06 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 *GlobalNamingResources*, 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

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.createDataSource(BasicDataSource.java:780

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'

2007-06-05 Thread Martin Gainty

Previous posting displays configure Resource in context.xml
http://marc.info/?l=tomcat-userm=117312340132291w=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: users@tomcat.apache.org
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.http11.Http11BaseProtocol

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 *GlobalNamingResources*, 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

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



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:
Context path=/DBTest docBase=DBTest
   debug=5 reloadable=true crossContext=true
 Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource
  maxActive=100 maxIdle=30 maxWait=1
  username=eric password=ericyin1 
driverClassName=com.mysql.jdbc.Driver

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

/Context

I add the following to web.xml:
 resource-ref
 descriptionDB Connection/description
 res-ref-namejdbc/TestDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref

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 %
sql:query var=rs dataSource=jdbc/TestDB
select id, name, studentid  from test2
/sql:query


c:forEach var=row items=${rs.rows}
   name ${row.name}br/
   studentid ${row.studentid}br/
/c:forEach

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]



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:
Context path=/DBTest docBase=DBTest
   debug=5 reloadable=true crossContext=true
 Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource
  maxActive=100 maxIdle=30 maxWait=1
  username=eric password=ericyin1 
driverClassName=com.mysql.jdbc.Driver

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

/Context

I add the following to web.xml:
 resource-ref
 descriptionDB Connection/description
 res-ref-namejdbc/TestDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref

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 %
sql:query var=rs dataSource=jdbc/TestDB
select id, name, studentid  from test2
/sql:query


c:forEach var=row items=${rs.rows}
   name ${row.name}br/
   studentid ${row.studentid}br/
/c:forEach

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: users@tomcat.apache.org
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:
 Context path=/DBTest docBase=DBTest
debug=5 reloadable=true crossContext=true
  Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource
   maxActive=100 maxIdle=30 maxWait=1
   username=eric password=ericyin1 
 driverClassName=com.mysql.jdbc.Driver
   url=jdbc:mysql://localhost:3306/p6120?autoReconnect=true/

 /Context

 I add the following to web.xml:
  resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/TestDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref

 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 %
 sql:query var=rs dataSource=jdbc/TestDB
 select id, name, studentid  from test2
 /sql:query


 c:forEach var=row items=${rs.rows}
name ${row.name}br/
studentid ${row.studentid}br/
 /c:forEach

 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_timeoutto 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_timeoutto 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: Tomcat 4: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

2006-08-04 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:

   Context path=/BookmartDB
docBase=BookmartDB
debug=5
reloadable=true
crossContext=true

  Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_BookmartDB_log.
  suffix=.txt
  timestamp=true/

  Resource name=jdbc/BookmartDB
auth=Container
type=javax.sql.DataSource/

  ResourceParams name=jdbc/BookmartDB
 parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter

 parameter
namemaxActive/name
value100/value
 /parameter

 parameter
namemaxIdle/name
value30/value
 /parameter

 parameter
namemaxWait/name
value1/value
 /parameter

 parameter
nameusername/name
valuesa/value
 /parameter

 parameter
namepassword/name
value/value
 /parameter

 parameter
namedriverClassName/name
valueorg.hsqldb.jdbcDriver/value
 /parameter

 parameter
nameurl/name
valuejdbc:hsqldb:file:c:/bookmart/value
 /parameter

 parameter
nameremoveAbandoned/name
valuetrue/value
 /parameter

 parameter
nameremoveAbandonedTimeout/name
value60/value
 /parameter

 parameter
namelogAbandoned/name
valuetrue/value
 /parameter

  /ResourceParams
   /Context

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

   resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/BookmartDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
   /resource-ref

   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 Context 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:

   Context path=/BookmartDB
docBase=BookmartDB
debug=5
reloadable=true
crossContext=true

  Logger className=org.apache.catalina.logger.FileLogger
  prefix=localhost_BookmartDB_log.
  suffix=.txt
  timestamp=true/

  Resource name=jdbc/BookmartDB
auth=Container
type=javax.sql.DataSource/

  ResourceParams name=jdbc/BookmartDB
 parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter

 parameter
namemaxActive/name
value100/value
 /parameter

 parameter
namemaxIdle/name
value30/value
 /parameter

 parameter
namemaxWait/name
value1/value
 /parameter

 parameter
nameusername/name
valuesa/value
 /parameter

 parameter
namepassword/name
value/value
 /parameter

 parameter
namedriverClassName/name
valueorg.hsqldb.jdbcDriver/value
 /parameter

 parameter
nameurl/name
valuejdbc:hsqldb:file:c:/bookmart/value
 /parameter

 parameter
nameremoveAbandoned/name
valuetrue/value
 /parameter

 parameter
nameremoveAbandonedTimeout/name
value60/value
 /parameter

 parameter
namelogAbandoned/name
valuetrue/value
 /parameter

  /ResourceParams
   /Context

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

   resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/BookmartDB/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
   /resource-ref

   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


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:

  Context path=/BookmartDB
   docBase=BookmartDB
   debug=5
   reloadable=true
   crossContext=true

 Logger className=org.apache.catalina.logger.FileLogger
 prefix=localhost_BookmartDB_log.
 suffix=.txt
 timestamp=true/

 Resource name=jdbc/BookmartDB
   auth=Container
   type=javax.sql.DataSource/

 ResourceParams name=jdbc/BookmartDB
parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter

parameter
   namemaxActive/name
   value100/value
/parameter

parameter
   namemaxIdle/name
   value30/value
/parameter

parameter
   namemaxWait/name
   value1/value
/parameter

parameter
   nameusername/name
   valuesa/value
/parameter

parameter
   namepassword/name
   value/value
/parameter

parameter
   namedriverClassName/name
   valueorg.hsqldb.jdbcDriver/value
/parameter

parameter
   nameurl/name
   valuejdbc:hsqldb:file:c:/bookmart/value
/parameter

parameter
   nameremoveAbandoned/name
   valuetrue/value
/parameter

parameter
   nameremoveAbandonedTimeout/name
   value60/value
/parameter

parameter
   namelogAbandoned/name
   valuetrue/value
/parameter

 /ResourceParams
  /Context

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

  resource-ref
 descriptionDB Connection/description
 res-ref-namejdbc/BookmartDB/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
  /resource-ref

  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: 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=101183tstart=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.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 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.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

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)  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97

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



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...
?xml version=1.0 encoding=UTF-8?
Context debug=0 displayName=ISOTracking 
docBase=C:\Java\TomcatTestServer\apache-tomcat-5.5.17\webapps\ISOTrackingTest 
path=/ISOTracking reloadable=true
Logger className=org.apache.catalina.logger.FileLogger 
prefix=ISOTRackingTest_Log. suffix=.txt timestamp=true/
!-- Define a database connection pool for SQL SERVER 2000 --
Resource name=jdbc/sqlserver auth=Container 
factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory 
type=javax.sql.DataSource 
driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:sqlserver://localhost:1433 username=xxx 
password=xxxmaxActive=100 maxIdle=30 maxWait=1 
removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true/
ResourceLink name=jdbc/sqlserver type=javax.sql.DataSource 
global=jdbc/sqlserver/
/Context
web.xml looks like this...
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
  display-nameISOTracking/display-name
  description
 Welcome TO ISO Tracking Application
  /description
!-- JSPC servlet mappings start --
servlet
servlet-nameISOTracking.Login_jsp/servlet-name
servlet-classISOTracking.Login_jsp/servlet-class
/servlet
servlet-mapping
servlet-nameISOTracking.Login_jsp/servlet-name
url-pattern/Login.jsp/url-pattern
/servlet-mapping
session-config
 session-timeout30/session-timeout
/session-config
!-- JSPC servlet mappings end --
resource-ref
res-ref-namejdbc/sqlserver/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
/web-app




-
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 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 ResourceLink.../ tag from your context definition.  Not 
needed when the resource is defined inside the Context... 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...
?xml version=1.0 encoding=UTF-8?
Context debug=0 displayName=ISOTracking 
docBase=C:\Java\TomcatTestServer\apache-tomcat-5.5.17\webapps\ISOTrackingTest path=/ISOTracking 
reloadable=true
 	Logger className=org.apache.catalina.logger.FileLogger 
	prefix=ISOTRackingTest_Log. suffix=.txt timestamp=true/

!-- Define a database connection pool for SQL SERVER 2000 --
Resource name=jdbc/sqlserver auth=Container 
factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory type=javax.sql.DataSource 
driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:sqlserver://localhost:1433 username=xxx password=xxxmaxActive=100 maxIdle=30 
maxWait=1 removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true/
ResourceLink name=jdbc/sqlserver type=javax.sql.DataSource 
global=jdbc/sqlserver/
/Context
web.xml looks like this...
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN 
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
 display-nameISOTracking/display-name
 description
Welcome TO ISO Tracking Application
 /description
!-- JSPC servlet mappings start --
   servlet
   servlet-nameISOTracking.Login_jsp/servlet-name
   servlet-classISOTracking.Login_jsp/servlet-class
   /servlet
   servlet-mapping
   servlet-nameISOTracking.Login_jsp/servlet-name
   url-pattern/Login.jsp/url-pattern
   /servlet-mapping
   session-config
session-timeout30/session-timeout
   /session-config
!-- JSPC servlet mappings end --
resource-ref
res-ref-namejdbc/sqlserver/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
/web-app




-
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 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 ResourceLink.../ tag from your context definition.  Not 
needed when the resource is defined inside the Context... tag and may 
confuse tomcat.

--David

Aynalem, Seblewengel (Trawick) wrote:

Hi there:
I am using

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
)
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 a resource.


Also drop the ResourceLink.../ tag from your context definition.  Not 
needed when the resource is defined inside

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

2006-07-31 Thread David Smith
 '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 ResourceLink.../ tag from your context definition.  Not 
needed when the resource is defined inside the Context... 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...
?xml version=1.0 encoding=UTF-8?
Context debug=0 displayName=ISOTracking 
docBase=C:\Java\TomcatTestServer\apache-tomcat-5.5.17\webapps\ISOTrackingTest path=/ISOTracking 
reloadable=true
	Logger className=org.apache.catalina.logger.FileLogger 
	prefix=ISOTRackingTest_Log. suffix=.txt timestamp=true/

!-- Define a database connection pool for SQL SERVER 2000 --
Resource name=jdbc/sqlserver auth=Container 
factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory type=javax.sql.DataSource 
driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:sqlserver://localhost:1433 username=xxx password=xxxmaxActive=100 maxIdle=30 
maxWait=1 removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true/
ResourceLink name=jdbc/sqlserver type=javax.sql.DataSource 
global=jdbc/sqlserver/
/Context
web.xml looks like this...
?xml version=1.0 encoding=ISO-8859-1?
!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN 
http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
display-nameISOTracking/display-name
description
   Welcome TO ISO Tracking Application
/description
!-- JSPC servlet mappings start --
  servlet
  servlet-nameISOTracking.Login_jsp/servlet-name
  servlet-classISOTracking.Login_jsp/servlet-class
  /servlet
  servlet-mapping
  servlet-nameISOTracking.Login_jsp/servlet-name
  url-pattern/Login.jsp/url-pattern
  /servlet-mapping
  session-config
   session-timeout30/session-timeout
  /session-config
!-- JSPC servlet mappings end --
resource-ref
res-ref-namejdbc/sqlserver/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
/web-app




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




-
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)
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 
 ResourceLink.../ 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.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

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 
 ResourceLink.../ 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.HostConfig.deployApps

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 Resource .../ tag in web.xml.  
Here is the updated context.xml, ResourceLink .../ dropped from it and 
web.xml as it were before.

context.xml file 

?xml version=1.0 encoding=UTF-8?
Context debug=0 displayName=ISOTracking 
docBase=C:\Java\TomcatTestServer\apache-tomcat-5.5.17\webapps\ISOTrackingTest 
path=/ISOTracking reloadable=true

Logger className=org.apache.catalina.logger.FileLogger 
prefix=ISOTRackingTest_Log. suffix=.txt timestamp=true/

 
!-- Define a database connection pool for SQL SERVER 2000 --
Resource name=jdbc/sqlserver auth=Container 
factory=org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory 
type=javax.sql.DataSource 
driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:sqlserver://localhost:1433 username=XXX 
password=XXXmaxActive=100 maxIdle=30 maxWait=1 
removeAbandoned=true removeAbandonedTimeout=60 logAbandoned=true/

/Context

web.xml file

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 
2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;

web-app

  display-nameISOTracking/display-name
  description
 Welcome TO ISO Tracking Application
  /description

!-- JSPC servlet mappings start --

servlet
servlet-nameISOTracking.Login_jsp/servlet-name
servlet-classISOTracking.Login_jsp/servlet-class
/servlet

servlet-mapping
servlet-nameISOTracking.Login_jsp/servlet-name
url-pattern/Login.jsp/url-pattern
/servlet-mapping

session-config
 session-timeout30/session-timeout
/session-config

!-- JSPC servlet mappings end --

resource-ref
res-ref-namejdbc/sqlserver/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

/web-app



-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 Resource .../ 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 resource-ref 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 
ResourceLink.../ 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

  1   2   >