0

(NOTE: Here is a link with the attachments)

I am having an issue where a Camel Flow runs correctly in the Jboss Developer Studio but will not correctly deploy to a standalone instance of Fuse. I have attached the application below.

I have added the dependencies: com.ibm.mq.allclient, providerutil, fscontext, and jms to my local mvn repository. The version of Websphere MQ is 8.0.0.2 and the version of Fuse is 6.2

This as it is (once the dependencies are added to the local mvn repo) works correctly inside of JBoss Developer Studio.

When I try to deploy the file onto my standalone Fuse instance it no longer successfully launches. This is after deploying the OSGI jars included with Websphere. (before they are deployed the error is the same except com.ibm.mq.???? replaces javax.jms.JMSException

I get the following exception in the Fuse log:

`JBossFuse:karaf@root> osgi:install -s` File:C:/Users/Administrator/workspace/WebsphereThroughput/target/WebsphereThroughput-1.0.0.jar
    Bundle ID: 330
    JBossFuse:karaf@root> log:display
    2015-09-18 09:24:47,088 | INFO  | l Console Thread | BlueprintExtender
          | ?                                   ? | 21 - org.apache.aries.blueprint.core - 1.4.2 | Destroying BlueprintContainer for bundle org.Fuse.Testing.WebsphereThroughput
    2015-09-18 09:24:50,851 | WARN  | rint Extender: 3 | BeanRecipe
          | ?                                   ? | 21 - org.apache.aries.blueprint.core - 1.4.2 | Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null
    2015-09-18 09:24:50,851 | INFO  | rint Extender: 3 | BlueprintCamelContext
          | ?                                   ? | 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Apache Camel 2.15.1.redhat-620133 (CamelContext: camel-4) is shutting down
    2015-09-18 09:24:50,851 | INFO  | rint Extender: 3 | BlueprintCamelContext
          | ?                                   ? | 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Apache Camel 2.15.1.redhat-620133 (CamelContext: camel-4) uptime not started
    2015-09-18 09:24:50,851 | INFO  | rint Extender: 3 | BlueprintCamelContext
          | ?                                   ? | 198 - org.apache.camel.camel-core - 2.15.1.redhat-620133 | Apache Camel 2.15.1.redhat-620133 (CamelContext: camel-4) is shutdown in 0.000 seconds
    2015-09-18 09:24:50,851 | ERROR | rint Extender: 3 | BlueprintContainerImpl
          | ?                                   ? | 21 - org.apache.aries.blueprint.core - 1.4.2 | Unable to start blueprint container for bundle org.Fuse.Testing.WebsphereThroughput
    org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to instantiate components
            at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:686)[21:org.apache.aries.blueprint
    .core:1.4.2]
            at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:377)[21:org.apache.aries.blueprint.core:1.4.2]
            at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[21:org.apache.aries.blueprint.core:1.4.2]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_60]
            at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)[21:org.apache.aries.blueprint.core:1.4.2]
            at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[21:org.apache.aries.blueprint.core:1.4.2]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.JBossFuse:karaf@root> log:display
    2015-09-18 09:24:47,088 | INFO  | l Console Thread | BlueprintExtender
          | ?                                   ? | 21 - org.apache.aries.blueprint.core - 1.4.2 | Destroying BlueprintContainer for bundle org.Fuse.Testing.WebsphereThroughput
    2015-09-18 09:24:50,851 | WARN  | rint Extender: 3 | BeanRecipe
          | ?                                   ? | 21 - org.apache.aries.blueprint.core - 1.4.2 | Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null
    2015-09-18 09:24:50,851 | INFO  | rint Extender: 3 | BlueprintCamelContext
          | ?                                   ? | 198 - org.apache.camel.camel-cor
    e - 2.15.1.redhat-620133 | Apache Camel 2.15.1.redhat-620133 (CamelContext: came
    l-4) is shutting down
    2015-09-18 09:24:50,851 | INFO  | rint Extender: 3 | BlueprintCamelContext
          | ?                                   ? | 198 - org.apache.camel.camel-cor
    e - 2.15.1.redhat-620133 | Apache Camel 2.15.1.redhat-620133 (CamelContext: camel-4) uptime not started
    2015-09-18 09:24:50,851 | INFO  | rint Extender: 3 | BlueprintCamelContext
          | ?                                   ? | 198 - org.apache.camel.camel-cor
    e - 2.15.1.redhat-620133 | Apache Camel 2.15.1.redhat-620133 (CamelContext: camel-4) is shutdown in 0.000 seconds
    2015-09-18 09:24:50,851 | ERROR | rint Extender: 3 | BlueprintContainerImpl
          | ?                                   ? | 21 - org.apache.aries.blueprint.
    core - 1.4.2 | Unable to start blueprint container for bundle org.Fuse.Testing.WebsphereThroughput
    org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to instantiate components
            at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:686)[21:org.apache.aries.blueprint.core:1.4.2]
            at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:377)[21:org.apache.aries.blueprint.core:1.4.2]
            at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)[21:org.apache.aries.blueprint.core:1.4.2]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_60]
            at org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106)[21:org.apache.aries.blueprint.core:1.4.2]
            at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)[21:org.apache.aries.blueprint.core:1.4.2]
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)[:1.8.0_60]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)[:1.8.0_60]
            at java.lang.Thread.run(Unknown Source)[:1.8.0_60]
    Caused by: java.lang.NoClassDefFoundError: javax/jms/JMSRuntimeException
            at java.lang.Class.getDeclaredConstructors0(Native Method)[:1.8.0_60]
            at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)[:1.8.0_60]
            at java.lang.Class.getConstructors(Unknown Source)[:1.8.0_60]
            at org.apache.aries.blueprint.container.BeanRecipe.findMatchingConstructors(BeanRecipe.java:509)
            at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:327)
            at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806)
            at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)
            at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106)[21:org.apache.aries.blueprint.core:1.4.2]
            at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)
            at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)
            at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)
            at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)
            at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)
            at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
            at java.util.concurrent.FutureTask.run(Unknown Source)[:1.8.0_60]
            at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[21:org.apache.aries.blueprint.core:1.4.2]
            at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[21:org.apache.aries.blueprint.core:1.4.2]
            at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[21:org.apache.aries.blueprint.core:1.4.2]
            at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:682)[21:org.apache.aries.blueprint.core:1.4.2]
            ... 13 more
    Caused by: java.lang.ClassNotFoundException: javax.jms.JMSRuntimeException not found by org.apache.geronimo.specs.geronimo-jms_1.1_spec [177]
            at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1556)[org.apache.felix.framework-4.4.1.jar:]
            at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)[org.apache.felix.framework-4.4.1.jar:]
            at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)
            at java.lang.ClassLoader.loadClass(Unknown Source)[:1.8.0_60]
            at org.apache.felix.framework.BundleWiringImpl.getClassByDelegation(BundleWiringImpl.java:1397)[org.apache.felix.framework-4.4.1.jar:]
            at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1577)[org.apache.felix.framework-4.4.1.jar:]
            at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1507)[org.apache.felix.framework-4.4.1.jar:]
            at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)[org.apache.felix.framework-4.4.1.jar:]
            at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)
            at java.lang.ClassLoader.loadClass(Unknown Source)[:1.8.0_60]
            ... 32 more


    JBossFuse:karaf@root>
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
M. Swenson
  • 61
  • 8
  • Are you including the jms.jar in the runtime classpath. I dont know about fuse so cant tell where to set that exactly. Does the war deployed on the fuse instance has the jms.jar included or it is part of fuse loader's runtime configuration? – Umapathy Sep 18 '15 at 22:35
  • I have included jms.jar through maven and also have added the jms.jar to the classpath of the project. Fuse is just a wrapper around an OSGI container (Felix on Fabric8) that adds some specific functionality for the ESB. It deploys as a .jar bundle file that gets deployed into Fuse through OSGi install commands. – M. Swenson Sep 21 '15 at 13:01

1 Answers1

2

I found the solution at the following link: here

Apparently a feature called Geronimo exports javax.jms and the older version does not have the Exception that is missing. You can refresh the Geronimo feature and this issue goes away.

M. Swenson
  • 61
  • 8