|
From: Jody G. <jga...@re...> - 2004-12-22 18:06:13
|
Xavier M=E9haut wrote: > Bonjour =E0 tous, > I'm quite worry with something quite simple ; I've succeeded running=20 > the spearfish demo with Mysql as standalone java application...but=20 > when I tried (with the same code) to include it in an eclipse plugin,=20 > I obtains systematically this meaningful eroor msg : We are running geotools code from eclipse plugin land. One thing we did was make a single plugin called libs and included all=20 the opensource jars in this one plugin, this makes sure they are in the=20 same classloader. Eclipse keeps each plugin is a separate class loader and figures out who=20 can see whom based on dependency. If you have the same jar in different=20 plugins the actual class files will be from different class loaders and=20 thus will not be able to be cast to each other. Not sure if this information helps, but what the heck. Our libs plugin is available for svn checkout here: - http://svn.geotools.org/udig/trunk/plugins/net.refractions.udig.libs/ It is LGPL just like geotools so go ahead and use it in your project. The externalToolBuilders and build.xml file are *magic* - they will=20 download the latest 2.1.x jars, either in your local maven repository,=20 or from the web. To repeat the plugin needs to be "cleaned" once, it will then fetch all=20 the latest jars :-) Jody |