[Geoserver-devel] plugin problem

Hello all!

This is the situation:

I wrote a geotools plugin for GeoServer 1.6.3 that is almost identical to
Oracle Spatial plugin. I renamed all the classes so there wouldn't be any
problems with Oracle plugin. I also changed DataStoreFactorySpi in the
plugin.jar.

I've loaded GS 1.6.3 into Eclipse and when i run GS in the debug mode my
plugin gets picked up by GS and i can create a new Feature Data Set and then
a new FeatureType. So the plugin works as it should.

But the problem comes when i run GS in release mode. The plugin gets picked
up since i can see it when i try to create a new Feature Data Set. But the
FeatureType that i already created with this plugin doesn't work. I get:
  

"namespace:feature" org.geotools.data.SchemaNotFoundException: Feature
type could not be found for "feature"

And again, if i run GS in debug mode everything works fine.
--
View this message in context: http://www.nabble.com/plugin-problem-tp17732424p17732424.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Interesting... can you include the entire stack trace of the exception? Also is there any chance you can post your code so that we could try it out to try and diagnose the problem.

-Justin

GeoUser wrote:

Hello all!

This is the situation:

I wrote a geotools plugin for GeoServer 1.6.3 that is almost identical to
Oracle Spatial plugin. I renamed all the classes so there wouldn't be any
problems with Oracle plugin. I also changed DataStoreFactorySpi in the
plugin.jar.

I've loaded GS 1.6.3 into Eclipse and when i run GS in the debug mode my
plugin gets picked up by GS and i can create a new Feature Data Set and then
a new FeatureType. So the plugin works as it should.

But the problem comes when i run GS in release mode. The plugin gets picked
up since i can see it when i try to create a new Feature Data Set. But the
FeatureType that i already created with this plugin doesn't work. I get:
  

"namespace:feature" org.geotools.data.SchemaNotFoundException: Feature
type could not be found for "feature"

And again, if i run GS in debug mode everything works fine.

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

I think i found the problem.

In the:

public static DataStoreFactorySpi aquireFactory(Map params)

there's a line: if (factory.canProcess(params))

And the problem is that both (oracle plugin and my plugin) can handle this
FeatureType (it has same number and types of params). And in debug mode, my
plugin gets picked up first and in release the original plugin gets picked
up first.

So the problem is solved :slight_smile:

--
View this message in context: http://www.nabble.com/plugin-problem-tp17732424p17749695.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

The solution was to modify the canProcess from oracle plugin so it rejects
datastores that were generated with my plugin.
--
View this message in context: http://www.nabble.com/plugin-problem-tp17732424p17752935.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

GeoUser ha scritto:

The solution was to modify the canProcess from oracle plugin so it rejects
datastores that were generated with my plugin.

Hum, a better solution would be to have your plugin to use a different "dbtype". This is what we use to avoid jdbc datastores to trip on each other, since other params are basically the same

Cheers
Andrea