kendzi / josm-jogl

Provides the JOGL (OpenGl) library for other JOSM plugins.
2 stars 1 forks source link

RuntimeException: this plugin is liblary and it can be loaded only once #3

Closed don-vip closed 8 years ago

don-vip commented 8 years ago

Our plugin integration test fails since the new version of jogl plugin, would you have any idea why?

https://josm.openstreetmap.de/jenkins/job/JOSM/lastCompletedBuild/jdk=JDK7/testReport/org.openstreetmap.josm.plugins/PluginHandlerTestIT/testValidityOfAvailablePlugins/

ERROR: org.openstreetmap.josm.plugins.PluginException: An error occurred in plugin jogl. Cause: java.lang.reflect.InvocationTargetException. Cause: java.lang.RuntimeException: this plugin is liblary and it can be loaded only once!
org.openstreetmap.josm.plugins.PluginException: An error occurred in plugin jogl
    at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:336)
    at org.openstreetmap.josm.plugins.PluginHandler.loadPlugin(PluginHandler.java:710)
    at org.openstreetmap.josm.plugins.PluginHandler.loadPlugins(PluginHandler.java:772)
    at org.openstreetmap.josm.plugins.PluginHandler.loadLatePlugins(PluginHandler.java:811)
    at org.openstreetmap.josm.plugins.PluginHandlerTestIT.testValidityOfAvailablePlugins(PluginHandlerTestIT.java:81)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
    at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.openstreetmap.josm.plugins.PluginInformation.load(PluginInformation.java:333)
    ... 16 more
Caused by: java.lang.RuntimeException: this plugin is liblary and it can be loaded only once!
    at kendzi.josm.jogl.JoglPlugin.setInstance(JoglPlugin.java:71)
    at kendzi.josm.jogl.JoglPlugin.<init>(JoglPlugin.java:85)
    ... 21 more

note: there's a typo in the error message :)

don-vip commented 8 years ago

Are there two versions of the same plugin out there?

jogl.jar;http://zibi.openstreetmap.org.pl/kendzi/Kendzi3d/snapshot-jogl/jogl.jar
    Manifest-Version: 1.0
    Plugin-Date: 
    Built-By: jenkins
    Plugin-Stage: 5
    Created-By: Apache Maven 3.1.0
    Plugin-Version: 1.0.45
    Plugin-Link: https://github.com/kendzi/josm-jogl
    Plugin-Requires: 
    url: https://github.com/kendzi/josm-jogl
    Plugin-Class: kendzi.josm.jogl.JoglPlugin
    Author: Tomasz Kędziora (kendzi)
    Plugin-Mainversion: 8931
    Build-Jdk: 1.7.0_51
    Plugin-Description: Provides the JOGL (OpenGl) library for other JOSM plugins. Not meant to be installed directly by users, but rather as a dependency for other plugins.
    Archiver-Version: Plexus Archiver
    Plugin-Icon-Size: 32x32

kendzi3d-jogl.jar;http://zibi.openstreetmap.org.pl/kendzi/Kendzi3d/snapshot-jogl/current/kendzi3d-jogl.jar
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.9.4
    Created-By: 1.7.0_51-b13 (Oracle Corporation)
    Author: Tomasz Kędziora (kendzi)
    Plugin-Class: kendzi.josm.jogl.JoglPlugin
    Plugin-Date: 2015-09-10 09:40 PM
    Plugin-Description: Provides the JOGL (OpenGl) library for other JOSM plugins. Not meant to be installed directly by users, but rather as a dependency for other plugins. It is highly experimental. It may crash! Use with caution!
    Plugin-Link: http://wiki.openstreetmap.org/index.php/JOSM/Plugins/Kendzi3D
    Plugin-Stage: 5
    Plugin-Mainversion: 5241
    Plugin-Version: 41
    Plugin-Icon-Size: 32x32

Should we deprecate kendzi3d-jogl in favour to "jogl" ?

don-vip commented 8 years ago

You cannot list two incompatible versions of the same plugin in https://josm.openstreetmap.de/wiki/PluginsSource

Please remove one of them.

don-vip commented 8 years ago

I have deprecated kendi3d-jogl in 9870 in order to have stable unit tests again: https://josm.openstreetmap.de/changeset/9870/josm

kendzi commented 8 years ago

Made few clean-ups to kendzi3d-jogl. One of them was to rename it to "josm-jogl". Unfortunately I don't released kendz3d which is using it because of some problems. I will fix it tomorrow. Meantime I will remove "jogl" from plugin list.

kendzi commented 8 years ago

I switch kendzi3d to new project name.