(NOTE: Here is a link with the attachments)
我遇到的问题是,Camel Flow在Jboss Developer Studio中正确运行,但无法正确部署到独立的Fuse实例。我已附上以下申请表。
我已将依赖项:com.ibm.mq.allclient,providerutil,fscontext和jms添加到我的本地mvn存储库。 Websphere MQ的版本是8.0.0.2,Fuse的版本是6.2
这样(一旦依赖项添加到本地mvn repo)在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>
答案 0 :(得分:2)
我在以下链接找到了解决方案:here
显然,一个名为Geronimo的功能导出javax.jms,旧版本没有缺少的Exception。您可以刷新Geronimo功能,这个问题就会消失。