[
http://jira.jboss.com/jira/browse/JBAS-1395?page=comments#action_12315260 ]
Adrian Brock commented on JBAS-1395:
------------------------------------
No.
Because isDriverLoadedForURL(URL) is part of a merry dance
that it goes through to avoid problems with non spec complaint
jdbc drivers (although I'm not sure that is still an issue,
it was a few years ago).
It can be invoked upto three times and we don't want to
see the stacktrace three times, especially when registering
the driver class will resolve the problem.
If the message is misleading, it is the exceptions thrown in
Driver getDriver(URL) that need improving.
catch (Exception e)
{
throw new JBossResourceException
("Failed to register driver for: " + driverClass, e);
}
// HERE is what should you get, which seems to be descriptive
// enough to me?
throw new JBossResourceException("Apparently wrong driver class specified
for URL: class: " + driverClass + ", url: " + url);
Please explain your problem with this message?
> LocalManagedConnectionFactory.isDriverLoadedForURL logs an insignificant
> error message
> --------------------------------------------------------------------------------------
>
> Key: JBAS-1395
> URL: http://jira.jboss.com/jira/browse/JBAS-1395
> Project: JBoss Application Server
> Type: Bug
> Versions: JBossAS-4.0.0 Final
> Environment: Win XP
> Reporter: Claude Quïzel
> Assignee: Scott M Stark
> Priority: Minor
>
> Original Estimate: 1 hour
> Remaining: 1 hour
>
> The LocalManagedConnectionFactory.isDriverLoadedForURL method logs an
> insignificant error message. If you look on line 11 (below). I would log the
> exception and write a more significant message. At this point the driver has
> been successfully loaded. The acceptsURL method failure is more likely the
> cause of the problem.
> 1> private boolean isDriverLoadedForURL(String url)
> 2> {
> 3> try
> 4> {
> 5> driver = DriverManager.getDriver(url);
> 6> log.debug("Driver already registered for url: " + url);
> 7> return true;
> 8> }
> 9> catch (Exception e)
> 10> {
> 11> log.debug("Driver not yet registered for url: " + url);
> 12> return false;
> 13> } // end of try-catch
> 14> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development