db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kathey Marsden <kmarsdende...@sbcglobal.net>
Subject Re: Debugging StackOverflowError
Date Thu, 06 Jul 2006 14:06:08 GMT
Lars Gramark wrote:

>I came across the same StackOverflowError in my project and it seems as if
>the problem relates to the driver registration. If you register the driver
>twice, the shutdown process gets stuck in a loop eventually causing a
>StackOverflowError. 
>
I think the user should not register the driver. The driver will 
register itself when instantiated.
Derby registered itself when you did this:

Driver)Class.forName("org.apache.derby.jdbc.EmbeddedDriver").newInstance();

The javadoc makes it clear that a newly-loaded driver class should call 
the method |registerDriver| to make itself known to the |DriverManager|.
so you can remove both of those registerDriver calls.

http://java.sun.com/j2se/1.5.0/docs/api/java/sql/DriverManager.html#registerDriver(java.sql.Driver)

Kathey


Mime
View raw message