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

Adding the DB2 JDBC jar files to the udig.libs plugin resolved the classpath problem for now.

I'm not actually familiar with developing Eclipse plug-ins or fragments but guess I will have to learn.

There was a strange problem that DB2GeoResourceInfo was not seeing the 'name' value from the containing DB2GeoResource class. I made changes to pass the name as a parameter and after that was able to display the roads and zipcodes in San Diego county successfully.

I'm a little concerned that the bounds are always computed for all layers. This can take a while if one has several million rows in the table.

At 06:39 PM 7/7/2005, jgarnett@xxxxxxxxxxxxxxx wrote:
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