Subject Re: [Firebird-Java] Re: Nullpointer Exception when connecting with Beta2
Author Roman Rokytskyy
> Thanks Roman, that solved my problem. Although I have been using this
> code for years now and all major JDBC drivers (Oracle, Postgres, JTDS,
> HSQLDB, McKoi, Firebird 1.x, SQL Anywhere, DB2) worked without
> problems.

The only reason for this is the ClassLoader.getResources() call within the
one of the Sun classes that we use. Probably we can create similar
implementation and use the classloader that created GDSFactory class.

If you want to contribute the code, please check the
sun.misc.Service.providers method.

> But reading the docs for setContextClassLoader() seems to indicate that
> this should not create problems for other drivers.

It depends...

> One question though (this is getting a bit off-topic, I know). As this
> is a multi-threaded application, do I need to set that for each and
> every Thread I create, or is it sufficient to set this in the thread
> that is loading and instantiating the driver?

For JayBird that should be enough.

Roman