[ 
http://jira.jboss.com/jira/browse/JBAS-1395?page=comments#action_12315264 ]
     
Adrian Brock commented on JBAS-1395:
------------------------------------

JBoss is NOT a test harness for developing jdbc drivers.

Nor can it be expected to debug problems that are due to
non compliant behaviour. We have to draw the line somewhere
otherwise the code would be 90% error checking asserting
the thirdparty code was behaving as expected.

Even if this were the case, DEBUG or even TRACE 
is an appropriate logging level for when you want to dig
into the details of funny behaviour.

I do accept that passing a String to that method which provides
the context of the invocation would save you from having to 
start up a debugger.

The purpose of this code is to use the two spec defined parameters
to try to load a driver. If it cannot do this, it tells you
it did not do it and displays the two parameters involved.

Explain what this means:
"Sometimes this exception is thrown even before the URL is actually accepted by 
the driver"
What is the path through the code that reproduces this problem?

The current code is roughly:

if (driver already loaded)
   use it

load driver class
if (driver is now loaded)
   use it

try to instantiate an instance of the driver (for old non spec compliant 
drivers)
if (driver is now loaded)
   use it

Something is wrong with the configuration

If this is at all related to not being redeploy a jdbc driver
that is a known bug in java.sql.DriverManager's caching.

> 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

Reply via email to