You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Anderson Nielson <an...@gmail.com> on 2008/11/08 23:42:37 UTC

Camel Route and ActiveMQ (OSGI) not working "Not found from bundle"?

Could someone send some example with a POM and a beans.xml that works?

Fuse ESB version used is 4.0.0.2

The error I am getting is: java.lang.ClassNotFoundException:
org.apache.activemq.camel.component.ActiveMQComponent not found from bundle
[camel-osgi-amq]


Mine is not working. The files are:

BEANS.XML

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:osgi="http://activemq.apache.org/camel/schema/osgi"
       xmlns:osgix="http://www.springframework.org/schema/osgi-compendium"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://activemq.apache.org/camel/schema/spring
http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
       http://activemq.apache.org/camel/schema/osgi
http://activemq.apache.org/camel/schema/osgi/camel-osgi.xsd
       http://www.springframework.org/schema/osgi-compendium
http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd
">

  <osgi:camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
    <route>
      <from uri="file:///tmp/ecm/in"/>
      <to uri="activemq:queue:ecm"/>
    </route>
  </osgi:camelContext>

  <bean id="activemq"
class="org.apache.activemq.camel.component.ActiveMQComponent">
    <property name="brokerURL" value="tcp://somehost:61616"/>
  </bean>

</beans>



POM.XML [dependencies sub set]

    <dependencies>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>${commons.logging.version}</version>
            <scope>provided</scope>
        </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-core</artifactId>
    <version>5.1.0.0-fuse</version>

    </dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-jms</artifactId>
<version>1.4.5.0-fuse</version>

</dependency>
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-spring</artifactId>
            <scope>provided</scope>
</dependency>
    </dependencies>

POM.XML  [felix osgi instructions]

                    <instructions>

<Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>

<Import-Package>*,org.apache.camel.osgi</Import-Package>

<Private-Package>org.apache.servicemix.examples.camel</Private-Package>
                    </instructions>

Re: Camel Route and ActiveMQ (OSGI) not working "Not found from bundle"?

Posted by Wim Verreydt <wi...@anova.be>.
Hi,

The bundel not finding the class can have a few causes:

The bundle is not loaded/installed: 
You can do a "packages:exports | grep -i org.apache.activemq.camel.component” in the console to find out if there is a bundle installed that provides the class you are looking for. If is respods something like "107 org.apache.activemq.camel.component; version=x.x.x”, bundle 107 is exporting this so you should be fine here. Otherwise you can install the feature “activemq-camel” of “camel-activemq” depending on your product version.

If the previous step is ok and you still get the same error, probably the package is not imported by your bundle. Old versions of the bundle plugin do not check de spring/blueprint xml files for the necessary imports. You can check this by using the “osgi:headers  (bundle number)” command in the console. If the package is not present at the "Import-Package” section, you’ll have to add this import manually.

Regards,

Wim Verreydt

On 24 Apr 2014, at 03:01, lyonn <cr...@gmail.com> wrote:

> Hello
> 
> Im getting the same error. Could you fix it?
> 
> Regards
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/Camel-Route-and-ActiveMQ-OSGI-not-working-Not-found-from-bundle-tp415174p5720064.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Camel Route and ActiveMQ (OSGI) not working "Not found from bundle"?

Posted by lyonn <cr...@gmail.com>.
Hello

Im getting the same error. Could you fix it?

Regards



--
View this message in context: http://servicemix.396122.n5.nabble.com/Camel-Route-and-ActiveMQ-OSGI-not-working-Not-found-from-bundle-tp415174p5720064.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.