java.lang.IllegalArgumentException: Unable to build OBR representation for bundle mvn:org.apache.camel.test/my-camel-test/1.0.12

Solution Verified - Updated -

Environment

  • JBoss Fuse 6.0

Issue

Getting the following error when trying to deploy a feature using OBR resolver:

java.lang.IllegalArgumentException: Unable to build OBR representation for bundle 
mvn:org.apache.camel.test/my-camel-test/1.0.12

Resolution

If the root cause of the problem is as described below, you need to either

  • turn your Maven artifact into a proper OSGi bundle (using the maven-bundle-plugin), or
  • deploy this artifact using wrap:mvn:org.apache.camel.test/my-camel-test/1.0.12

Root Cause

You would get such errorr if the Maven artifact to be deployed is not a proper OSGi bundle, i.e. it misses the OSGi headers in META-INF/MANIFEST.MF.
To confirm, extract META-INF/MANIFEST.MF and check if it contains OSGi headers like Bundle-Name, as well as Import-Package and Export-Package properties.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments