Error when installing bundle
kpagan Jun 19, 2013 12:10 PMHello all,
I am trying to make a bundle that reads from a queue that exists in HornetQ in JBoss AS 7.1.1 and puts the message in a queue inside ActiveMQ that resides in JBoss Fuse 6.0.0.
I have red the documentation "Deploying into the container" and "Using the JMS Binding Component" but I cannot make a working example.
The pom of the bundle is:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.intrasoft.sw</groupId> <artifactId>camel-spring-fab-test1</artifactId> <packaging>jar</packaging> <version>1.0</version> <name>A Camel Spring Route FAB Test1</name> <url>http://www.myorganization.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <camel.version>2.10.0.redhat-60024</camel.version> </properties> <dependencies> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-spring</artifactId> <version>${camel.version}</version> <scope>provided</scope> </dependency> <!-- logging --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.6</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.6.6</version> <scope>provided</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> <version>1.2.17</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.servicemix</groupId> <artifactId>servicemix-jms</artifactId> <version>2012.01.0.redhat-60024</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-osgi</artifactId> <version>5.8.0.redhat-60024</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-jms_1.1_spec</artifactId> <version>1.1.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.hornetq</groupId> <artifactId>hornetq-core-client</artifactId> <version>2.2.13.Final</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.hornetq</groupId> <artifactId>hornetq-jms-client</artifactId> <version>2.2.13.Final</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.1.3.RELEASE</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss</groupId> <artifactId>jboss-remote-naming</artifactId> <version>1.0.2.Final</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss.xnio</groupId> <artifactId>xnio-nio</artifactId> <version>3.0.0.GA</version> </dependency> <!-- testing --> <!-- <dependency> --> <!-- <groupId>org.apache.camel</groupId> --> <!-- <artifactId>camel-test-spring</artifactId> --> <!-- <version>${camel.version}</version> --> <!-- <scope>test</scope> --> <!-- </dependency> --> </dependencies> <build> <defaultGoal>install</defaultGoal> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>2.4.3</version> <configuration> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <!-- version 2.4 seems to break the deployment. JBoss Fuse complains that "Bundle-SymbolicName header missing, cannot install bundle" --> <version>2.3.2</version> <configuration> <archive> <index>true</index> <manifestEntries> <Import-Package> org.apache.servicemix.jms.endpoints, org.apache.activemq.camel.component, org.hornetq.jms.client, org.hornetq.api.core, org.hornetq.api.core.client, org.springframework.jndi, org.jboss.naming.remote.client, org.hornetq.core.client.impl, org.hornetq.core.cluster, org.hornetq.api.core.client.loadbalance, javax.jms, org.xnio.nio * </Import-Package> <FAB-Provided-Dependency> org.apache.camel:* org.apache.cxf:* org.apache.activemq:* org.springframework:* </FAB-Provided-Dependency> <FAB-Dependency-Require-Bundle> org.apache.geronimo.specs:geronimo-jms_1.1_spec org.apache.servicemix:servicemix-jms org.apache.activemq:activemq-osgi </FAB-Dependency-Require-Bundle> <FAB-Require-Feature-URL>file:///C:/Development/TAJIK-SW/single-window/samples/CamelBlueprintFab/Features/features.xml</FAB-Require-Feature-URL> <FAB-Require-Feature>sw-camel-spring-fab-test1</FAB-Require-Feature> <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName> <Bundle-Name>${project.name}</Bundle-Name> <Bundle-Version>${project.version}</Bundle-Version> </manifestEntries> </archive> </configuration> </plugin> <!-- upload the features.xml to repository in order to be accessible from the url: mvn:com.intrasoft.sw/camel-spring-fab-test1/1.0/xml/features --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>attach-artifacts</id> <phase>package</phase> <goals> <goal>attach-artifact</goal> </goals> <configuration> <artifacts> <artifact> <file>target/classes/features.xml</file> <type>xml</type> <classifier>features</classifier> </artifact> </artifacts> </configuration> </execution> </executions> </plugin> <!-- allows the route to be ran via 'mvn camel:run' --> <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-maven-plugin</artifactId> <version>${camel.version}</version> </plugin> </plugins> </build> <profiles> <profile> <id>create-osgi-bundles-from-dependencies</id> <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.0.1</version> <extensions>true</extensions> <executions> <execution> <id>wrap-my-dependency</id> <goals> <goal>wrap</goal> </goals> <configuration> <wrapImportPackage>;</wrapImportPackage> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>
I have created a features.xml with content:
<?xml version="1.0" encoding="UTF-8"?> <features name="SwCustomRepository"> <feature name="sw-camel-spring-fab-test1"> <bundle dependency="true">wrap:mvn:org.jboss.logging/jboss-logging/3.1.0.GA$Bundle-SymbolicName=jboss-logging-bundle&Bundle-Version=3.1.0.GA</bundle> <bundle dependency="true">wrap:mvn:org.jboss.xnio/xnio-api/3.0.0.GA$Bundle-SymbolicName=xnio-api-bundle&Bundle-Version=3.0.0.GA</bundle> <bundle dependency="true">wrap:mvn:org.jboss.xnio/xnio-nio/3.0.0.GA$Bundle-SymbolicName=xnio-nio-bundle&Bundle-Version=3.0.0.GA</bundle> <bundle dependency="true">wrap:mvn:org.jboss.remoting3/jboss-remoting/3.2.3.GA$Bundle-SymbolicName=jboss-remoting-bundle&Bundle-Version=3.2.3.GA</bundle> <bundle dependency="true">wrap:mvn:org.jboss.marshalling/jboss-marshalling/1.3.0.GA$Bundle-SymbolicName=jboss-marshalling-bundle&Bundle-Version=1.3.0.GA</bundle> <bundle dependency="true">wrap:mvn:org.jboss/jboss-ejb-client/1.0.0.Final$Bundle-SymbolicName=jboss-ejb-client-bundle&Bundle-Version=1.0.0.Final</bundle> <bundle dependency="true">wrap:mvn:org.jboss/jboss-remote-naming/1.0.2.Final$Bundle-SymbolicName=jboss-remote-naming-bundle&Bundle-Version=1.0.2.Final</bundle> <bundle dependency="true">wrap:mvn:org.hornetq/hornetq-core-client/2.2.13.Final$Bundle-SymbolicName=hornetq-core-client-bundle&Bundle-Version=2.2.13.Final</bundle> <bundle dependency="true">wrap:mvn:org.hornetq/hornetq-jms-client/2.2.13.Final$Bundle-SymbolicName=hornetq-jms-client-bundle&Bundle-Version=2.2.13.Final</bundle> </feature> </features>
The required jars are automatically converted to osgi bundles and deployed to JBoss Fuse.
Also the camel-context is defined as
<?xml version="1.0" encoding="UTF-8"?> <!-- Configures the Camel Context --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring" xmlns:jms="http://servicemix.apache.org/jms/1.0" xmlns:jee="http://www.springframework.org/schema/jee" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://servicemix.apache.org/jms/1.0 http://servicemix.apache.org/jms/1.0/servicemix-jms.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> <camel:camelContext id="testCamelContext" xmlns="http://camel.apache.org/schema/spring"> <!-- here is a sample which processes the input files (leaving them in place - see the 'noop' flag) then performs content based routing on the message using XPath --> <camel:route> <camel:from uri="file:src/data?noop=true" /> <camel:choice> <camel:when> <camel:xpath>/person/city = 'London'</camel:xpath> <camel:log message="UK message" /> <camel:to uri="file:target/messages/uk" /> </camel:when> <camel:otherwise> <camel:log message="Other message" /> <camel:to uri="file:target/messages/others" /> </camel:otherwise> </camel:choice> </camel:route> </camel:camelContext> <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="brokerURL" value="failover:tcp://localhost:61616" /> <property name="userName" value="admin" /> <property name="password" value="admin" /> </bean> <jms:consumer service="swTestService" endpoint="ag1JBossLocalQueue" connectionFactory="#hornetQConnectionFactory" destination="#ag2JBossLocalQueue" /> <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial"> org.jboss.naming.remote.client.InitialContextFactory </prop> <prop key="java.naming.provider.url"> remote://localhost:4447 </prop> <prop key="java.naming.security.principal"> kostas </prop> <prop key="java.naming.security.credentials"> kostas1 </prop> </props> </property> </bean> <bean id="hornetQConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate" ref="jndiTemplate" /> <property name="jndiName"> <value>jms/RemoteConnectionFactory</value> </property> </bean> <bean id="ag1JBossLocalQueue" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate" ref="jndiTemplate" /> <property name="jndiName"> <value>queue/agency1Q</value> </property> </bean> <bean id="ag2JBossLocalQueue" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiTemplate" ref="jndiTemplate" /> <property name="jndiName"> <value>queue/agency2Q</value> </property> </bean> </beans>
The camel routes are dummy but right now it is not important as the bundle fails to deploy.
If I try to install with command
install -s fab:mvn:com.intrasoft.sw/camel-spring-fab-test1
I get exception
2013-06-19 18:51:34,131 | INFO | Thread-209 | Console | 15 - org.apache.karaf.shell.console - 2.3.0.redhat-60024 | Exception caught while executing command org.apache.karaf.shell.console.MultiException: Error installing bundles: Unable to install bundle fab:mvn:com.intrasoft.sw/camel-spring-fab-test1 at org.apache.karaf.shell.console.MultiException.throwIf(MultiException.java:91)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:70) at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35) at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at org.apache.karaf.shell.console.jline.Console.run(Console.java:176)[15:org.apache.karaf.shell.console:2.3.0.redhat-60024] at java.lang.Thread.run(Thread.java:722)[:1.7.0_09] at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.doRun(ShellFactoryImpl.java:151)[26:org.apache.karaf.shell.ssh:2.3.0.redhat-60024] at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4$1.run(ShellFactoryImpl.java:142)[26:org.apache.karaf.shell.ssh:2.3.0.redhat-60024] at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_09] at org.apache.karaf.jaas.modules.JaasHelper.doAs(JaasHelper.java:47)[29:org.apache.karaf.jaas.modules:2.3.0.redhat-60024] at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.run(ShellFactoryImpl.java:140)[26:org.apache.karaf.shell.ssh:2.3.0.redhat-60024] Caused by: java.lang.Exception: Unable to install bundle fab:mvn:com.intrasoft.sw/camel-spring-fab-test1 at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:45) ... 16 more Caused by: org.osgi.framework.BundleException: Unable to cache bundle: fab:mvn:com.intrasoft.sw/camel-spring-fab-test1 at org.apache.felix.framework.Felix.installBundle(Felix.java:3051) at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165) at org.apache.karaf.shell.osgi.InstallBundle.doExecute(InstallBundle.java:43) ... 16 more Caused by: java.io.IOException: Could not transfer artifact junit:junit:jar:4.7 from/to repos0 (http://repo1.maven.org/maven2): Error transferring file: Connection timed out: connect at org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.getInfo(FabResolverFactoryImpl.java:260) at org.fusesource.fabric.fab.osgi.internal.FabConnection.getInputStream(FabConnection.java:93) at org.apache.felix.framework.util.SecureAction.getURLConnectionInputStream(SecureAction.java:524) at org.apache.felix.framework.cache.JarRevision.initialize(JarRevision.java:165) at org.apache.felix.framework.cache.JarRevision.(JarRevision.java:77) at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:878) at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550) at org.apache.felix.framework.cache.BundleArchive.(BundleArchive.java:153) at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277) at org.apache.felix.framework.Felix.installBundle(Felix.java:3047) ... 18 more Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not transfer artifact junit:junit:jar:4.7 from/to repos0 (http://repo1.maven.org/maven2): Error transferring file: Connection timed out: connect at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:197) at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:323) at org.fusesource.fabric.fab.MavenResolverImpl.resolveFile(MavenResolverImpl.java:187) at org.fusesource.fabric.fab.DependencyTree.newInstance(DependencyTree.java:139) at org.fusesource.fabric.fab.DependencyTree.newInstance(DependencyTree.java:131) at org.fusesource.fabric.fab.DependencyTree.newInstance(DependencyTree.java:131) at org.fusesource.fabric.fab.DependencyTree.newInstance(DependencyTree.java:131) at org.fusesource.fabric.fab.DependencyTree.newInstance(DependencyTree.java:131) at org.fusesource.fabric.fab.DependencyTree.newInstance(DependencyTree.java:131) at org.fusesource.fabric.fab.DependencyTreeResult.getTree(DependencyTreeResult.java:49) at org.fusesource.fabric.fab.MavenResolverImpl.collectDependencies(MavenResolverImpl.java:383) at org.fusesource.fabric.fab.MavenResolverImpl.collectDependenciesFromPom(MavenResolverImpl.java:291) at org.fusesource.fabric.fab.MavenResolverImpl.collectDependencies(MavenResolverImpl.java:263) at org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.collectDependencyTree(FabResolverFactoryImpl.java:149) at org.fusesource.fabric.fab.osgi.internal.FabClassPathResolver.resolve(FabClassPathResolver.java:136) at org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.configureInstructions(FabResolverFactoryImpl.java:283) at org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.createInstructions(FabResolverFactoryImpl.java:275) at org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.getInfo(FabResolverFactoryImpl.java:245) ... 27 more Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact junit:junit:jar:4.7 from/to repos0 (http://repo1.maven.org/maven2): Error transferring file: Connection timed out: connect at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:949) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:940) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:695) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:689) at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(WagonRepositoryConnector.java:445) at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:460) ... 46 more Caused by: org.apache.maven.wagon.TransferFailedException: Error transferring file: Connection timed out: connect at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:143)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-024] at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-024] at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-024] at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-024] at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.run(WagonRepositoryConnector.java:608)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-024] at org.sonatype.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:64)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-024] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)[:1.7.0_09] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)[:1.7.0_09] at java.lang.Thread.run(Thread.java:722)[:1.7.0_09] Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method)[:1.7.0_09] at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)[:1.7.0_09] at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)[:1.7.0_09] at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)[:1.7.0_09] at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)[:1.7.0_09] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)[:1.7.0_09] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)[:1.7.0_09] at java.net.Socket.connect(Socket.java:579)[:1.7.0_09] at java.net.Socket.connect(Socket.java:528)[:1.7.0_09] at sun.net.NetworkClient.doConnect(NetworkClient.java:180)[:1.7.0_09] at sun.net.www.http.HttpClient.openServer(HttpClient.java:378)[:1.7.0_09] at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)[:1.7.0_09] at sun.net.www.http.HttpClient.(HttpClient.java:203)[:1.7.0_09] at sun.net.www.http.HttpClient.New(HttpClient.java:290)[:1.7.0_09] at sun.net.www.http.HttpClient.New(HttpClient.java:306)[:1.7.0_09] at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:995)[:1.7.0_09] at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:931)[:1.7.0_09] at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:849)[:1.7.0_09] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)[:1.7.0_09] at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)[:1.7.0_09] at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)[71:org.fusesource.fabric.fab.fab-osgi:7.2.0.redhat-024] ... 8 more
But the dependency junit:junit:jar:4.7 doesn't exis in my pom neither it is a transitive dependency from another jar.
If I try to install as plain osgi (without the fab scheme) with the command:
osgi:install -s mvn:com.intrasoft.sw/camel-spring-fab-test1
I get the exception:
2013-06-19 18:59:31,883 | ERROR | ExtenderThread-6 | ContextLoaderListener | 132 - org.springframework.osgi.extender - 1.2.1 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=com.intrasoft.sw.camel-spring-fab-test1, config=osgibundle:/META-INF/spring/*.xml)) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.servicemix.jms.endpoints.JmsConsumerEndpoint#0' defined in URL [bundle://771.0:0/META-INF/spring/camel-context.xml]: Cannot resolve reference to bean 'hornetQConnectionFactory' while setting bean property 'connectionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hornetQConnectionFactory' defined in URL [bundle://771.0:0/META-INF/spring/camel-context.xml]: Invocation of init method failed; nested exception is javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.IllegalArgumentException: No matching XNIO provider found] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:329)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:107)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:605)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)[133:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)[133:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[133:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[133:org.springframework.osgi.core:1.2.1] at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)[132:org.springframework.osgi.extender:1.2.1] at java.lang.Thread.run(Thread.java:722)[:1.7.0_09] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hornetQConnectionFactory' defined in URL [bundle://771.0:0/META-INF/spring/camel-context.xml]: Invocation of init method failed; nested exception is javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.IllegalArgumentException: No matching XNIO provider found] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:323)[105:org.springframework.beans:3.1.3.RELEASE] ... 17 more Caused by: javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.IllegalArgumentException: No matching XNIO provider found] at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)[761:jboss-remote-naming-bundle:1.0.2.Final] at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:121)[761:jboss-remote-naming-bundle:1.0.2.Final] at org.apache.servicemix.naming.OSGiInitialContextFactoryBuilder.createContext(OSGiInitialContextFactoryBuilder.java:179)[261:org.apache.servicemix.naming:1.6.0.redhat-60024] at org.apache.servicemix.naming.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:92)[261:org.apache.servicemix.naming:1.6.0.redhat-60024] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)[:1.7.0_09] at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)[:1.7.0_09] at javax.naming.InitialContext.init(InitialContext.java:242)[:1.7.0_09] at javax.naming.InitialContext.(InitialContext.java:216)[:1.7.0_09] at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:136)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.jndi.JndiTemplate.getContext(JndiTemplate.java:103)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187)[106:org.springframework.context:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)[105:org.springframework.beans:3.1.3.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)[105:org.springframework.beans:3.1.3.RELEASE] ... 24 more Caused by: java.lang.IllegalArgumentException: No matching XNIO provider found at org.xnio.Xnio.doGetInstance(Xnio.java:192)[756:xnio-api-bundle:3.0.0.GA] at org.xnio.Xnio.getInstance(Xnio.java:146)[756:xnio-api-bundle:3.0.0.GA] at org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:73)[758:jboss-remoting-bundle:3.2.3.GA] at org.jboss.naming.remote.client.EndpointCache.get(EndpointCache.java:44)[761:jboss-remote-naming-bundle:1.0.2.Final] at org.jboss.naming.remote.client.InitialContextFactory.createEndpoint(InitialContextFactory.java:193)[761:jboss-remote-naming-bundle:1.0.2.Final] at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateEndpoint(InitialContextFactory.java:174)[761:jboss-remote-naming-bundle:1.0.2.Final] at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateNamingStore(InitialContextFactory.java:138)[761:jboss-remote-naming-bundle:1.0.2.Final] at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:104)[761:jboss-remote-naming-bundle:1.0.2.Final] ... 41 more
The line Caused by: java.lang.IllegalArgumentException: No matching XNIO provider found is very confusing because I add xnio-nio jar in the features and it is installed as a bundle.
Also when viewing the bundles in the karaf webconsole i can see that the xnio-api imports the bundle xnio-nio
Can someone give me a hint what am I doing wrong?