I am trying to deploy a Fuse project which uses the Oracle JDBC driver. While I can run the source code successfully in the Jboss developer studio, I am unable to deploy into a Karaf container. Whenever I try doing that I get an error as follows:
JBossFuse:karaf@root> osgi:install -s file:D:/JBoss/Fuse-Workspace-900/NBN/ASN_CommonFramework/target/ASN_CommonFramework.jar
Bundle ID: 307
Error executing command: Error installing bundles:
Unable to start bundle file:D:/JBoss/Fuse-Workspace-900/NBN/ASN_CommonFramework/target/ASN_CommonFramework.jar: Unresolved constraint in bundle ASN_Comm
onFramework : Unable to resolve 307.0: missing requirement [307.0] osgi.wiring.package; (osgi.wiring.package=oracle.jdbc)
The pom.xml documents the dependency as follows (ojdbc6.version is set to 11.2.0):
Here is what I tried to fix this:
- Deploy this as a FAB but get the following error:
Caused by: java.lang.Exception: Unable to install bundle fab:mvn:au.com.nbnco/ASN_CommonFramework/1.0.0
... 18 more
Caused by: org.osgi.framework.BundleException: Unable to cache bundle: fab:mvn:au.com.nbnco/ASN_CommonFramework/1.0.0
... 18 more
Caused by: java.net.MalformedURLException: Unknown protocol: fab
- Modify the POM file (ref lines 358-359) to Oracle driver jar as an embedded dependency.
Changed the following from:
However this raises a new setof dependencies in
pi,javax.net,javax.net.ssl,javax.resource,...and many others.
None of these dependencies are used in the project.I am not sure if these are transitive dependencies originating from ojdbc6.jar.
- Why is the FAB deployment command marked incorrect? I took it from
- Any idea how to handle such a dependency? An example could would be really useful.
I have attached my source code. The details of the environment are:
Red Hat JBoss Developer Studio - Version: 9.0.0.GA
Boss Fuse 6.2.1.redhat-084
Thanks a lot for reading through this and any suggestions that you have.
Message was edited by: Prabal Rakshit
ASN_CommonFramework.zip 2.0 MB