Hi,
A few notes:

First, I see on your other thread that you now have this working and
suspect something else was the cause, like a tag error.  I'm glad it's
working, and as you noted in the same message it's "rock solid."

Second, I just did a clean tomcat install and followed the JDBC
DataSource how-to *to the letter* to set up a connection pool for an
existing Oracle database.  I didn't run into any problems, including the
"cannot locate driver 'null' for url 'null' type of problem.  It works
exactly as expected.  This is obviously not my first time doing this,
but it's the first time I've done it manually from scratch in more than
a year, and I'm pleased to discover the document is complete and
accurate.

Third, and this is a bit superfluous but I'll mention it anyway: you
can't conclude that most users are finding it difficult from the
archives of this list.  The reason is that you don't hear from people
who succeed, because they have nothing to brag about, they just followed
the documentation.  All you hear from are those who are having problems,
which even if we heard about this once a day would still be a small
minority of tomcat users judging from the tomcat download counts.  Of
course this is an analysis that's hard to do precisely because we don't
know what percentage of downloaders use the connection pooling, but the
bottom line is still that you only hear problems and not good
experienced.

Finally, as to your point that this should be simpler: most of these
elements, specifically the Resource/ResourceParams declaration in a
server configuration file and matching resource link in web.xml, as well
as the JNDI environment namespace, are mandated by the J2EE
Specification.  It's not our choice to declare and configure things this
way.  The specific parameters, such as
maxActive/maxIdle/maxWait/username are mandated by the connection pool
implementation: even though we bundle DBCP and offer documentation for
it, we by no means require the user to use it.  It's trivial to swap
another DataSource pool provider and use that with tomcat instead.  So
most of this is out of our hands, and if you have a good idea for a
simpler mechanism the place to bring it up is the J2EE expert groups.

Yoav Shapira


Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Jeff Sexton [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, June 16, 2004 2:21 PM
>To: [EMAIL PROTECTED]
>Subject: Tomcat 5 Database Connections
>
>This is part question and part observation regarding database
>connectivity under Tomcat (5.0.24).
>
>My application normally runs in production at my company on a
>Tomcat 4.0.4 server.  The applications includes Cocoon and access
>to several databases (Sybase) via both Tomcat connections from
>servlets and from Cocoon XSP pages.  I've been at this for awhile
>now and I'm a huge fan of Tomcat (and Cocoon).
>
>On a new test server I setup Tomcat 5.0.24 and installed my
>applications.  For sometime I thought all was well because
>most of my stuff is Cocoon driven, and it's fine, including
>database connectivity.
>
>This week I realized that my servlets are getting:
>
>org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of
>class ''
>for connect URL 'null', cause: null
>
>I've spent several days now trying to fix this.  I've read verious
posts
>from this list's archive, and several other places.  I've studied
>many examples, and done google after google on it.
>
>My conclusion is that for whatever reason *a lot* of people have
>this trouble with TC 5x.  However there are very few solutions.
>
>Yes, my jdbc jar file is in common/lib (and WEB-INF/lib, both).
>Yes, I've tried declarations in <GlobalNamingResources> and in the apps
><context>, either.  Yes web.xml contains a <resource-ref> with the
>same <res-ref-name>.  The only thing I have not done is to create
>a META-INF/context.xml (is defining these resources in server.xml
>simply broken?).
>
>I'm dead stopped on this - yet I have no trouble at all with Tomcat
>4.0.4.
>
>It seems like some people do get this to work.  It seems like many,
>many people do not.  Is there a bug at play in all this?
>
>Here's my question - Why is it so hard?
>
>--
>The ODS Companies
>Jeff Sexton
>Information Services
>(503) 228-6554   x1026
>http://www.odscompanies.com
>
>This message is intended for the sole use of the individual and entity
>to whom it is addressed, and may contain information that is
privileged,
>confidential and exempt from disclosure under applicable law. If you
are
>not the intended addressee, nor authorized to receive for the intended
>addressee, you are hereby notified that you may not use, copy, disclose
>or distribute to anyone the message or any information contained in the
>message. If you have received this message in error, please immediately
>advise the sender by reply email and delete the message.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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


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

Reply via email to