1
votes

thanks in advance. I'm having issue starting a osgi bundle it gives this error message: The packages/bundles will not install. It compiles, and builds ok, when deployed to Karaf it will not load and complains on missing wiring package that looks like it is being exported and imported. but missing a version id.

Error executing command: Could not start bundle mvn:com.ge.digital.passthru/passthrumt1.dataserviceimpl/1.0.1-SNAPSHOT in feature(s) passthru-mt1-application-1.0.1-SNAPSHOT: Unresolved constraint in bundle passthrumt1.dataserviceimpl [298]: Unable to resolve 298.0: missing requirement [298.0] osgi.wiring.package; (osgi.wiring.package=com.ge.digital.passthru.dataservice)

the Manifest shows it is importing the package, and it is being exported, the only think I can find is the import package doesn't have a version number. can this be my issue? any ideas how to solve?

Manifest-Version: 1.0
Bnd-LastModified: 1524070286656
Build-Jdk: 1.8.0_91
Built-By: 212555427
Bundle-ManifestVersion: 2
Bundle-Name: PassThru MT1 :: Data Service Impl
Bundle-SymbolicName: passthrumt1.dataserviceimpl
Bundle-Version: 1.0.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Service: com.ge.digital.passthru.dataservice.PDXDataService
Import-Package: com.ge.digital.passthru.dataservice,com.ge.digital.passt
 hru.entities;version="[1.0,2)",com.ge.digital.passtrhu.dataservice;vers
 ion="[1.0,2)",org.apache.camel;version="[2.17,3)",org.apache.camel.buil
 der;version="[2.17,3)",org.apache.camel.component.file;version="[2.17,3
 )",org.apache.camel.model;version="[2.17,3)",org.osgi.service.blueprint
 ;version="[1.0.0,2.0.0)",org.slf4j;version="[1.7,2)"
Tool: Bnd-1.50.0

here is my POM

<!-- GE Internal Dependencies -->
<dependency>
  <groupId>com.ge.digital.passthru</groupId>
  <artifactId>passthrumt1.dataservice</artifactId>
  <version>${project.version}</version>
</dependency>
<dependency>
  <groupId>com.ge.digital.passthru</groupId>
  <artifactId>passthrumt1.entities</artifactId>
  <version>${project.version}</version>
</dependency>

<!-- Fuse Dependencies -->
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-core</artifactId>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-blueprint</artifactId>
</dependency>
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-ftp</artifactId>
</dependency>

<!-- logging -->
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-log4j12</artifactId>
</dependency>
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
  <groupId>log4j</groupId>
  <artifactId>log4j</artifactId>
</dependency>

<plugins>

  <!-- to generate the MANIFEST-FILE of the bundle -->
  <plugin>
    <groupId>org.apache.felix</groupId>
    <artifactId>maven-bundle-plugin</artifactId>
    <version>${bundle-plugin-version}</version>
    <extensions>true</extensions>
    <configuration>
      <instructions>
        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
        <Private-Package>com.ge.digital.passthru.dataservice.impl.*</Private-Package>
        <Import-Package>
        com.ge.digital.passtrhu.dataservice,
        com.ge.digital.passthru.entities,
        *
        </Import-Package>
      </instructions>
    </configuration>
  </plugin>

</plugins>

1
You import the package com.ge.digital.passthru.dataservice. Which bundle exports this package? - Christian Schneider
thanks Christian, another package does ... Manifest-Version: 1.0 Bnd-LastModified: 1524171716592 Build-Jdk: 1.8.0_91 Built-By: 212555427 Bundle-ManifestVersion: 2 Bundle-Name: PassThru MT1 :: Data Service Bundle-SymbolicName: passthrumt1.dataservice Bundle-Version: 1.0.1.SNAPSHOT Created-By: Apache Maven Bundle Plugin Export-Package: com.ge.digital.passthru.dataservice;uses:="com.ge.digita l.passthru.entities";version="1.0.1.SNAPSHOT" Import-Package: com.ge.digital.passthru.entities;version="[1.0,2)" Tool: Bnd-1.50.0 - GLMills
this has been solved, thanks everyone! it turned out I had a typo in one of my packages, and maven didn't refresh everything on the next deployments, I deleted the .m2/repo/mystuff directory and the ./data under fuse and redeployed and ba la bing ba la boom magic. - GLMills

1 Answers

0
votes

I guess this goes back to the old maven repo refresh thing with fuse, you need to delete the .m2/repository/xxx directory and the fusehome/data directory contents and start fresh. this took my issue away. thanks everyone. hope this helps.

now all looks good.

    PassThru MT1 :: Data Service (297)
    ----------------------------------
    Created-By = Apache Maven Bundle Plugin
    Manifest-Version = 1.0
    Bnd-LastModified = 1524090455529
    Build-Jdk = 1.8.0_91
    Built-By = NSK1212555427A$
    Tool = Bnd-1.50.0

Bundle-ManifestVersion = 2
Bundle-SymbolicName = passthrumt1.dataservice
Bundle-Version = 1.0.1.SNAPSHOT
Bundle-Name = PassThru MT1 :: Data Service

Export-Package =
        com.ge.digital.passthru.dataservice;uses:=com.ge.digital.passthru.entities;version=1.0.1.SNAPSHOT
Import-Package =
        com.ge.digital.passthru.entities;version="[1.0,2)"


JBossFuse:admin@FLEET TEST ENV> headers 298

PassThru MT1 :: Data Service Impl (298)
---------------------------------------
Created-By = Apache Maven Bundle Plugin
Manifest-Version = 1.0
Bnd-LastModified = 1524090458281
Build-Jdk = 1.8.0_91
Built-By = NSK1212555427A$
Tool = Bnd-1.50.0

Bundle-ManifestVersion = 2
Bundle-SymbolicName = passthrumt1.dataserviceimpl
Bundle-Version = 1.0.1.SNAPSHOT
Bundle-Name = PassThru MT1 :: Data Service Impl

Export-Service =
        com.ge.digital.passthru.dataservice.PDXDataService

Import-Package =
        com.ge.digital.passthru.dataservice;version="[1.0,2)",
        com.ge.digital.passthru.entities;version="[1.0,2)",
        org.apache.camel;version="[2.17,3)",
        org.apache.camel.builder;version="[2.17,3)",
        org.apache.camel.component.file;version="[2.17,3)",
        org.apache.camel.model;version="[2.17,3)",
        org.osgi.service.blueprint;version="[1.0.0,2.0.0)",
        org.slf4j;version="[1.7,2)"