Fuse unable to resolve dependency on FAB bundle

Solution Verified - Updated -

Issue

  • We deployed two FAB bundles (A & B) into Fuse use the file hot-deployment method.
    A is installed an started correctly.
    B has a dependency on A set in the maven POM using using the "provided" scope.
    B is installed after A has been started.

  • Installation of B fails complaining that it cannot find artifact A "in repos0 (http://repo1.maven.org/maven2)"

  • Shouldn't Fuse be able to load dependencies from hot-deployed FAB bundles directly via the container?

The exception like:

11:45:33,318 | WARN  | .fuse-047/deploy | MavenResolverImpl                | 74 - org.fusesource.fabric.fab.fab-osgi - 7.1.0.fuse-047 | Missing artifact descriptor: com.test:test1:jar:1.0-SNAPSHOT null
11:45:39,579 | WARN  | .fuse-047/deploy | MavenResolverImpl                | 74 - org.fusesource.fabric.fab.fab-osgi - 7.1.0.fuse-047 | Failed to resolve dependency of com.test:test1:jar:1.0-SNAPSHOT. Could not find artifact com.test:test1:jar:1.0-SNAPSHOT in repos0 (http://repo1.maven.org/maven2)
org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact com.test:test1:jar:1.0-SNAPSHOT in repos0 (http://repo1.maven.org/maven2)
    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:488)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveArtifacts(DefaultRepositorySystem.java:258)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:288)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.MavenResolverImpl.resolveDepedencies(MavenResolverImpl.java:396)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.MavenResolverImpl.collectDependencies(MavenResolverImpl.java:349)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.MavenResolverImpl.collectDependenciesFromPom(MavenResolverImpl.java:291)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.MavenResolverImpl.collectDependencies(MavenResolverImpl.java:263)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.collectDependencyTree(FabResolverFactoryImpl.java:149)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.osgi.internal.FabClassPathResolver.resolve(FabClassPathResolver.java:136)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.configureInstructions(FabResolverFactoryImpl.java:283)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.createInstructions(FabResolverFactoryImpl.java:275)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.osgi.internal.FabResolverFactoryImpl$FabResolverImpl.getInfo(FabResolverFactoryImpl.java:245)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.fusesource.fabric.fab.osgi.internal.FabConnection.getInputStream(FabConnection.java:93)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at java.net.URL.openStream(URL.java:1037)[:1.7.0_25]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:941)[7:org.apache.felix.fileinstall:3.3.11.fuse-71-047]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:857)[7:org.apache.felix.fileinstall:3.3.11.fuse-71-047]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:483)[7:org.apache.felix.fileinstall:3.3.11.fuse-71-047]
    at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)[7:org.apache.felix.fileinstall:3.3.11.fuse-71-047]
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact com.test:test1:jar:1.0-SNAPSHOT in repos0 (http://repo1.maven.org/maven2)
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:854)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap(WagonRepositoryConnector.java:849)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:602)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector$GetTask.flush(WagonRepositoryConnector.java:596)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.sonatype.aether.connector.wagon.WagonRepositoryConnector.get(WagonRepositoryConnector.java:355)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:407)[74:org.fusesource.fabric.fab.fab-osgi:7.1.0.fuse-047]
    ... 17 more
11:45:45,930 | ERROR | .fuse-047/deploy | FabResolver                      | 74 - org.fusesource.fabric.fab.fab-osgi - 7.1.0.fuse-047 | Could not find artifact com.test:test1:jar:1.0-SNAPSHOT in repos0 (http://repo1.maven.org/maven2)

Environment

  • Red Hat JBoss Fuse
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.