答复: Camel-Activemq Depoly in ServiceMix Error: class ActiveMQComponent not found

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

答复: Camel-Activemq Depoly in ServiceMix Error: class ActiveMQComponent not found

Wang Song
hi every one, i sloved the problem, accrording the stackoverflow question:

  1.  https://stackoverflow.com/questions/24645890/java-lang-classnotfoundexception-org-apache-activemq-camel-component-activemqco

[https://cdn.sstatic.net/Sites/stackoverflow/img/apple-touch-icon@...?v=73d79a89bded]<https://stackoverflow.com/questions/24645890/java-lang-classnotfoundexception-org-apache-activemq-camel-component-activemqco>

java.lang.ClassNotFoundException: org.apache.activemq ...<https://stackoverflow.com/questions/24645890/java-lang-classnotfoundexception-org-apache-activemq-camel-component-activemqco>
stackoverflow.com
I tried to deploy a sample activemq application into karaf.While deploying and starting the bundle i got this error.please help me to solve this. I have installed all ...


  1.   change <packaging>pom</packaging> to

<packaging>bundle</packaging>

      2.  add plugin config:

<plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <extensions>true</extensions>
    <version>3.3.0</version>
    <configuration>
        <instructions>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Description>${project.description}</Bundle-Description>
            <Import-Package>org.apache.activemq.camel.component,
                *
            </Import-Package>
            <Private-Package>com.charlot.camel.activemq.example</Private-Package>
        </instructions>
    </configuration>
</plugin>


thank you!


________________________________
发件人: Wang Song <[hidden email]>
发送时间: 2017年8月16日 6:45:46
收件人: [hidden email]
主题: Camel-Activemq Depoly in ServiceMix Error: class ActiveMQComponent not found

Hi:
When I deploy a camel-activemq demo to servicemix, it show the Error:
“Cannot find class [org.apache.activemq.camel.component.ActiveMQComponent] for bean…”

>> ServiceMix INFO
OS: windows 10
Version: servicemix-7.0.1
>Bundle list:
  9 | Active   |  50 | 5.14.5                             | activemq-karaf
10 | Active   |  50 | 2.6.3                              | Jackson-annotations
11 | Active   |  50 | 2.6.3                              | Jackson-core
12 | Active   |  50 | 2.6.3                              | jackson-databind
22 | Active   |  50 | 3.1.4                              | activeio-core
23 | Resolved |  50 | 5.14.5                             | activemq-blueprint, Hosts: 25
24 | Active   |  50 | 5.14.5                             | activemq-camel
25 | Active   |  50 | 5.14.5                             | activemq-osgi, Fragments: 23
38 | Active   |  50 | 1.1.1                              | Apache Aries Transaction Manager
40 | Active   |  50 | 2.16.5                             | camel-blueprint
41 | Active   |  50 | 2.16.5                             | camel-catalog
42 | Active   |  80 | 2.16.5                             | camel-commands-core
43 | Active   |  50 | 2.16.5                             | camel-core
44 | Active   |  50 | 2.16.5                             | camel-cxf
45 | Active   |  50 | 2.16.5                             | camel-cxf-transport
46 | Active   |  50 | 2.16.5                             | camel-jms
47 | Active   |  50 | 2.16.5                             | camel-spring
48 | Active   |  50 | 2.16.5                             | camel-xstream
49 | Active   |  80 | 2.16.5                             | camel-karaf-commands
51 | Active   |  50 | 3.2.2                              | Apache Commons Collections
52 | Active   |  50 | 2.0.1                              | Commons JEXL
54 | Active   |  50 | 3.5.0                              | Apache Commons Net
55 | Active   |  50 | 1.6.0                              | Commons Pool
56 | Active   |  50 | 2.4.2                              | Apache Commons Pool
94 | Active   |  50 | 2.0.0                              | geronimo-j2ee-connector_1.5_spec
95 | Active   |  50 | 1.0.1                              | geronimo-j2ee-management_1.1_spec
99 | Active   |  50 | 3.4.6                              | ZooKeeper Bundle
129 | Active   |  80 | 2.0.13                             | Apache MINA Core
132 | Active   |  50 | 7.0.1                              | Apache ServiceMix :: ActiveMQ :: Camel
133 | Active   |  50 | 7.0.1                              | Apache ServiceMix :: ActiveMQ :: Service
136 | Active   |  50 | 1.6.1.5                            | Apache ServiceMix :: Bundles :: dom4j
138 | Active   |  50 | 1.9.2.1                            | Apache ServiceMix :: Bundles :: jasypt
142 | Active   |  50 | 1.1.0.4                            | Apache ServiceMix :: Bundles :: jdom
143 | Active   |  50 | 2.3.0.2                            | Apache ServiceMix :: Bundles :: kxml2
156 | Active   |  50 | 1.7.0.6                            | Apache ServiceMix :: Bundles :: velocity
160 | Active   |  50 | 1.1.4.c                            | Apache ServiceMix :: Bundles :: xpp3
161 | Active   |  50 | 1.4.8.1                            | Apache ServiceMix :: Bundles :: xstream
171 | Active   |  50 | 4.2.0                              | Apache XBean :: OSGI Blueprint Namespace Handler
202 | Active   |  50 | 0.6.4                              | JAXB2 Basics - Runtime
215 | Active   |  50 | 2.11.0.v20140415-163722-cac6383e66 | Scala Standard Library
227 | Active   |  50 | 5.14.5                             | activemq-web-console
268 | Active   |  50 | 2.16.5                             | camel-netty
269 | Active   |  50 | 3.10.5.Final                       | Netty
270 | Active   |  50 | 2.16.5                             | camel-netty-http
271 | Active   |  50 | 4.0.34.Final                       | Netty/Buffer
272 | Active   |  50 | 4.0.34.Final                       | Netty/Codec
273 | Active   |  50 | 4.0.34.Final                       | Netty/Common
274 | Active   |  50 | 4.0.34.Final                       | Netty/Handler
275 | Active   |  50 | 4.0.34.Final                       | Netty/Transport
276 | Active   |  50 | 2.16.5                             | camel-netty4
277 | Active   |  50 | 4.0.34.Final                       | Netty/Codec/HTTP
278 | Active   |  50 | 2.16.5                             | camel-netty4-http
285 | Active   |  50 | 2.16.5                             | camel-jmx
339 | Active   |  50 | 5.14.5                             | activemq-cf
360 | Failure  |  80 | 1.0.0.SNAPSHOT                     | camel-http-test

>Feature list:
activemq-client                         | 5.14.5           |          | Started     | activemq-core-5.14.5
activemq-cf                             | 5.14.5           | x        | Started     | activemq-core-5.14.5
activemq                                | 5.14.5           |          | Started     | activemq-core-5.14.5
examples-activemq-camel-blueprint       | 7.0.1            |          | Uninstalled | servicemix-examples-7.0.1
activemq-broker-noweb                   | 5.14.5           | x        | Started     | activemq-5.14.5
activemq-broker                         | 5.14.5           | x        | Started     | activemq-5.14.5
activemq-camel                          | 5.14.5           | x        | Started     | activemq-5.14.5
activemq-web-console                    | 5.14.5           | x        | Started     | activemq-5.14.5
activemq-blueprint                      | 5.14.5           | x        | Started     | activemq-5.14.5
activemq-amqp-client                    | 5.14.5           |          | Uninstalled | activemq-5.14.5

camel-jms                               | 2.16.5           | x        | Started     | camel-2.16.5
camel-jmx                               | 2.16.5           | x        | Started     | camel-2.16.5
camel-core                              | 2.16.5           |          | Started     | camel-2.16.5
camel-catalog                           | 2.16.5           |          | Uninstalled | camel-2.16.5
camel-spring                            | 2.16.5           |          | Started     | camel-2.16.5


>> CODE INFO
[plz check the attached files]
-techsharesmx/
--camelhttptest/[the error source]
--camelosgitest/
--src/
--deploy.bat
--pom.xml
--techsharesmx.iml

jar:
camel-http-test-1.0-SNAPSHOT.jar

>>ERROR
2017-08-16 14:16:12,024 | ERROR | xtenderThread-54 | ContextLoaderListener            | 217 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=camel-http-test, config=osgibundle:/META-INF/spring/*.xml))
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'camel': Invocation of init method failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.apache.activemq.camel.component.ActiveMQComponent] for bean with name 'activemq' defined in URL [bundle://360.0:0/META-INF/spring/camel-context.xml]; nested exception is java.lang.ClassNotFoundException: org.apache.activemq.camel.component.ActiveMQComponent not found from bundle [camel-http-test]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1514)[149:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)[149:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[149:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)[149:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[149:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)[149:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)[149:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:620)[149:org.apache.servicemix.bundles.spring-beans:3.2.18.RELEASE_1]
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)[150:org.apache.servicemix.bundles.spring-context:3.2.18.RELEASE_1]
      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[216:org.springframework.osgi.core:1.2.1]
      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[216:org.springframework.osgi.core:1.2.1]
      at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[216:org.springframework.osgi.core:1.2.1]
      at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[216:org.springframework.osgi.core:1.2.1]
      at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[217:org.springframework.osgi.extender:1.2.1]
      at java.lang.Thread.run(Thread.java:745)[:1.8.0_05]


thank you!

发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用