Modify

Opened 13 years ago

Closed 12 years ago

#7984 closed defect (fixed)

Conflict between opendata plugin and ImportImagePlugin

Reported by: Don-vip Owned by: Don-vip
Priority: major Milestone:
Component: Plugin opendata Version: latest
Keywords: Cc:

Description

When installing these two plugins, ImportImagePlugin cannot start. This is likely to be caused by the stripped geotools implementation of opendata:

org.openstreetmap.josm.plugins.PluginException: An error occurred in plugin ImportImagePlugin
	at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:284)
	at org.openstreetmap.josm.plugins.PluginHandler.loadPlugin(PluginHandler.java:501)
	at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:559)
	at org.openstreetmap.josm.plugins.PluginHandler.loadLatePlugins(PluginHandler.java:598)
	at org.openstreetmap.josm.gui.MainApplication.main(MainApplication.java:348)
Caused by: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:275)
	... 4 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.opengis.referencing.crs.CRSAuthorityFactory.getDescriptionText(Ljava/lang/String;)Lorg/opengis/util/InternationalString;" the class loader (instance of java/net/URLClassLoader) of the current class, org/openstreetmap/josm/plugins/ImportImagePlugin/PluginOperations, and the class loader (instance of sun/misc/Launcher$AppClassLoader) for resolved class, org/opengis/referencing/crs/CRSAuthorityFactory, have different Class objects for the type xt(Ljava/lang/String;)Lorg/opengis/util/InternationalString; used in the signature
	at org.openstreetmap.josm.plugins.ImportImagePlugin.PluginOperations.loadCRSData(PluginOperations.java:388)
	at org.openstreetmap.josm.plugins.ImportImagePlugin.ImportImagePlugin.<init>(ImportImagePlugin.java:106)
	... 9 more

Attachments (0)

Change History (6)

comment:1 by bastiK, 13 years ago

I see two possible solutions at the moment:

  • Put one of the plugins in a separate class loader. The drawback is, that this plugin will be isolated: it cannot depend on other plugins and other plugins cannot depend on it. Technically, this could be done by some fancy bootstrap mechanism in the plugin itself or in JOSM core code (when a certain parameter in the Manifest file is found).
  • Put all the geotools code in a single plugin and make the other one depend on it.

Btw. ImportImagePlugin is unmaintained and very buggy, similar to PicLayer, but has some unique stuff, like image warping and more projections.

in reply to:  1 comment:2 by Don-vip, 13 years ago

Replying to bastiK:

  • Put all the geotools code in a single plugin and make the other one depend on it.

I was thinking of something like that. We already have the jts library available for opendata and conflation plugin, I can also make a geotools library plugin for all plugins that would require it. It's transparent for users as they are automaticaly selected when needed. This solution makes user download geotools code only once, then the other plugins can be updated without producing a big jar file each time.

EDIT: Btw I see ImportImagePlugin also includes jts.

Last edited 13 years ago by Don-vip (previous) (diff)

comment:3 by bastiK, 13 years ago

Yes, this is probably the better option.

comment:4 by stoecker, 13 years ago

I would like to have a much better image integration (piclayer, importimage, ...) in JOSM environment. Ideal would be joining all the image stuff into a single plugin. So anything which improves situation is welcome :-)

comment:5 by bastiK, 13 years ago

The imagery warping feature #7427 (not implemented) also depends on geotools.

comment:6 by Don-vip, 12 years ago

Resolution: fixed
Status: newclosed

GeoTools plugin is available. Both plugins use it.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.