You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2014/05/02 07:52:15 UTC

[jira] [Updated] (CAMEL-7405) SQS endpoint - HttpRoute class not found at route startup

     [ https://issues.apache.org/jira/browse/CAMEL-7405?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-7405:
-------------------------------

    Component/s: karaf

> SQS endpoint - HttpRoute class not found at route startup
> ---------------------------------------------------------
>
>                 Key: CAMEL-7405
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7405
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws, karaf
>    Affects Versions: 2.13.0
>         Environment: Windows 7 Ent SP1 AND GNU/Linux 2.6.18-274.17.1.0.1.el5
> JDK: 1.7.0_51
> Apache Karaf (2.3.5)
> camel-core (2.13.0)
> camel-karaf-commands (2.13.0)
> camel-blueprint (2.13.0)
> Apache Apache HttpCore OSGi bundle (4.3.2)
> Apache Apache HttpClient OSGi bundle (4.3.3)
> Commons Codec (1.8.0)
> Jackson JSON processor (1.9.12)
> Data mapper for Jackson JSON processor (1.9.12)
> Apache ServiceMix :: Bundles :: aws-java-sdk (1.7.1.1)
> camel-aws (2.13.0)
>            Reporter: Jeff Eltgroth
>             Fix For: 2.13.1, 2.14.0
>
>
> I have a bundle using aws-sqs endpoint that works in Karaf 2.3.3 and Camel 2.12.1.  We have to upgrade Karaf 2.3.5 and Camel to 2.13.0 for required improvements, and now my bundle fails to load because of missing classes.  I would be satisfied to know which packages to include in my imports or which feature I may be missing,  I have run the below steps in two versions of Camel.  The bundle works in 2.12.1 and fails in 2.13.0.  Here are the steps for version 2.13.0:
> $ mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-blueprint -DarchetypeVersion=2.13.0 -DgroupId=com.example.aws -DartifactId=example-aws -Dpackage=com.example.aws -Dversion=2.13.0
> $ mvn package
> $ mvn camel:run
> (verifies archetype runs)
> Add dependency to pom.xml
> 	<dependency>    
> 	  <groupId>org.apache.camel</groupId>    
> 	  <artifactId>camel-aws</artifactId>    
> 	  <version>2.13.0</version>
> 	</dependency>
> Add following to maven-bundle-plugin in pom.xml
>     <Import-Package>
>       org.apache.http.conn.routing;version="[4.3.3,5)",
>       *
>     </Import-Package>
> Change endpoint in blueprint.xml
>     <to uri="aws-sqs://test-queue?accessKey=yourkey&amp;secretKey=yourkey" />
> (need to change or skip test to package)
> $ mvn -Dmaven.test.skip=true package
> $ mvn camel:run
> (above works, so maven is including all classes)
> Install Karaf 2.3.5
> Set JAVA_HOME to JDK 1.7.0_51
> karaf@root> features:chooseurl camel 2.13.0
> karaf@root> features:install camel-core
> karaf@root> features:install camel-blueprint
> karaf@root> features:install camel-aws
> Drop bundle into deploy folder and observe the following stack trace in the Karaf console:
> karaf@root> ERROR: Bundle example-aws [70] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org.apache.http.conn.routing.HttpRoute not found by org.apache.servicemix.bundles.aws-java-sdk [68])
> java.lang.NoClassDefFoundError: org.apache.http.conn.routing.HttpRoute not found by org.apache.servicemix.bundles.aws-java-sdk [68]
>         at com.amazonaws.http.conn.$Proxy36.<clinit>(Unknown Source)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>         at java.lang.reflect.Proxy.newInstance(Proxy.java:748)
>         at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:739)
>         at com.amazonaws.http.conn.ClientConnectionManagerFactory.wrap(ClientConnectionManagerFactory.java:42)
>         at com.amazonaws.http.impl.client.SdkHttpClient.<init>(SdkHttpClient.java:29)
>         at com.amazonaws.http.HttpClientFactory.createHttpClient(HttpClientFactory.java:98)
>         at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:155)
>         at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:118)
>         at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:102)
>         at com.amazonaws.services.sqs.AmazonSQSClient.<init>(AmazonSQSClient.java:166)
>         at com.amazonaws.services.sqs.AmazonSQSClient.<init>(AmazonSQSClient.java:147)
>         at org.apache.camel.component.aws.sqs.SqsEndpoint.createClient(SqsEndpoint.java:219)
>         at org.apache.camel.component.aws.sqs.SqsEndpoint.getClient(SqsEndpoint.java:204)
>         at org.apache.camel.component.aws.sqs.SqsEndpoint.doStart(SqsEndpoint.java:81)
>         at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
> (remaining stack omitted)



--
This message was sent by Atlassian JIRA
(v6.2#6252)