You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/02/19 05:58:19 UTC
DO NOT REPLY [Bug 48773] New: DataSourceWrapper and DriverManager
problems
https://issues.apache.org/bugzilla/show_bug.cgi?id=48773
Summary: DataSourceWrapper and DriverManager problems
Product: Taglibs
Version: nightly
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Standard Taglib
AssignedTo: dev@tomcat.apache.org
ReportedBy: jgawor@gmail.com
Created an attachment (id=25022)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25022)
Patch for this issue.
In certain situations the DataSourceWrapper is not able to connect to the
database even if a driver class name was explicitly set. The core of the
problem is that the DriverManager uses the caller's classloader (in this case
the classloader of DataSourceWrapper) to find a driver for the given url. In
some cases the classloader of DataSourceWrapper might be totally different and
separate from the context classloader that registered the driver with
DriverManager. In these cases the DriverManager will not "see" the driver
registered earlier because of the different classloaders and the
DataSourceWrapper.getConnection() will fail with "unable to find suitable
driver" type of error message.
One easy work solution for this problem is to actually use the driver object
that was registered in setDriverClassName() to connect to the database. And if
the connection fails then fallback to using the DriverManager API.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 48773] DataSourceWrapper and DriverManager
problems
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48773
Jeremy Boynes <jb...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Jeremy Boynes <jb...@apache.org> 2010-10-09 18:28:25 EDT ---
Patch applied as r1006229.
Thanks
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org