我遇到了一个问题,即 Camel Flow 在 Jboss Developer Studio 中正确运行,但无法正确部署到 Fuse 的独立实例。我附上了下面的应用程序。
我已将依赖项:com.ibm.mq.allclient、providerutil、fscontext 和 jms 添加到我的本地 mvn 存储库。Websphere MQ 版本为 8.0.0.2,Fuse 版本为 6.2
照原样(一旦将依赖项添加到本地 mvn 存储库)在 JBoss Developer Studio 内正常工作。
当我尝试将文件部署到我的独立 Fuse 实例上时,它不再成功启动。这是在部署 Websphere 中包含的 OSGI jar 之后。(在部署它们之前,错误是相同的,除了 com.ibm.mq.???? 替换 javax.jms.JMSException
我在 Fuse 日志中收到以下异常:
`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>