Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] DB2 plug-in, some progress, some problems

Quoting David Adler <dadler@xxxxxxxxxxx>:

> Through some hacking, I've managed to get quite a bit further, past the
> database parameter dialog.
> 
> It is failing because the DB2 JDBC driver is not found at runtime.  I added
> db2jcc.jar to the build path for my plug-in but this doesn't seem to end up
> in the classpath.  Because this jar file can't be redistributed, it isn't
> downloadable from the refractions site.
> 
> Can someone point me in the right direction?

Sure - glad you are making progress!

You are in "classloader hell". Adding the jar to the jdbc driver is "too late"
in the dependency train", your geotools DB2DataStore is in a classloader that
was used to load "libs", so you need to add your jar to libs.

Each Plugin gets its own classloader, they can only "see" classes in plugins
they depend on.

Are you happy with the concept of a fragment? If you do this with a "fragment"
everything should work out okay for your users. But that is a level 2 solution,
just add your driver to libs for now (by hand if you have to).

Jody



Back to the top