Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9083

Investigate camel-hazelcast feature failure when installed with other bundles

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.16.0
    • 2.17.0
    • camel-hazelcast, osgi
    • None
    • Unknown

    Description

      karaf@root> features:install camel-aws
      karaf@root> features:install camel-groovy
      karaf@root> features:install camel-hazelcast
      Error executing command: Can't install feature camel-hazelcast/0.0.0:
      Could not start bundle mvn:com.hazelcast/hazelcast/3.5.1 in feature(s) camel-hazelcast-2.16-SNAPSHOT, camel-vertx-2.16-SNAPSHOT: Activator start error in bundle com.hazelcast [79].
      

      Where camel-hazelcast throws this exception:

      Caused by: org.osgi.framework.BundleException: Activator start error in bundle com.hazelcast [188].
      	at org.apache.felix.framework.Felix.activateBundle(Felix.java:2204)
      	at org.apache.felix.framework.Felix.startBundle(Felix.java:2072)
      	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:976)
      	at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:963)
      	at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:51)
      	... 17 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_79]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_79]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_79]
      	at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_79]
      	at com.hazelcast.internal.osgi.Activator.activateJavaxScripting(Activator.java:70)
      	at com.hazelcast.internal.osgi.Activator.start(Activator.java:46)
      	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
      	at org.apache.felix.framework.Felix.activateBundle(Felix.java:2154)
      	... 21 more
      Caused by: java.lang.NoSuchMethodError: javax.script.ScriptEngineManager.setBindings(Ljavax/script/Bindings;)V
      	at com.hazelcast.internal.osgi.OSGiScriptEngineManager.createScriptEngineManager(OSGiScriptEngineManager.java:262)
      	at com.hazelcast.internal.osgi.OSGiScriptEngineManager.findManagers(OSGiScriptEngineManager.java:235)
      	at com.hazelcast.internal.osgi.OSGiScriptEngineManager.<init>(OSGiScriptEngineManager.java:87)
      	at com.hazelcast.internal.osgi.ScriptEngineActivator.registerOsgiScriptEngineManager(ScriptEngineActivator.java:44)
      	... 29 more
      

      This issue only occurs when certain other bundles are installed. In the above example, either one of camel-aws or camel-groovy are dragging some dependencies related to scripting (likely camel-groovy) that the Hazelcast library doesn't like. Probably because Hazelcast doesn't specify a version range in their javax.script import:

      [...]
      Bundle-Vendor = Hazelcast, Inc.
      Bundle-Activator = com.hazelcast.internal.osgi.Activator
      Bundle-Name = hazelcast
      Bundle-DocURL = http://www.hazelcast.com/
      Bundle-Description = Core Hazelcast Module
      Bundle-SymbolicName = com.hazelcast
      Bundle-Version = 3.5.1
      Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt
      Bundle-ManifestVersion = 2
      [...]
      Import-Package =
      [...]
      	javax.script,
      [...]
      

      We'll have to investigate further and perhaps open a ticket at Hazelcast.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            raulvk Raúl Kripalani
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: