I am trying to convert my ojdbc6.jar into a bundle as mentioned in the steps here
http://fusesource.com/docs/esb/4.2/deploy_osgi/DeployJar-Convert.html
Unfortunately I am getting an error as below. Kindly help
One error
1 : Unresolved references to [com.sun.security.auth.module, javax.resource, java x.resource.spi, javax.resource.spi.endpoint, javax.resource.spi.security, oracle .i18n.text, oracle.i18n.text.converter, oracle.ons, oracle.security.pki] by clas s(es) on the Bundle-Classpath[Jar:OJDBC_PLUGIIN_1.0.0.jar]: [oracle/jdbc/connect or/OracleResourceAdapter.class, oracle/jdbc/pool/OracleConnectionCacheManager$1. class, oracle/net/ano/AuthenticationService.class, oracle/jdbc/pool/OracleRuntim eLoadBalancingEventHandlerThread$1.class, oracle/sql/converter/CharacterSetMetaD ata.class, oracle/jdbc/connector/OracleManagedConnection.class, oracle/jdbc/conn ector/OracleManagedConnectionMetaData.class, oracle/jdbc/connector/OracleConnect ionRequestInfo.class, oracle/jdbc/connector/OracleManagedConnectionFactory.class , oracle/jdbc/pool/OracleFailoverEventHandlerThread$1.class, oracle/sql/converte r/CharacterConverterFactoryOGS.class, oracle/sql/converter/Orai18nCharacterSetMe taData.class, oracle/jdbc/connector/OracleConnectionManager.class, oracle/jdbc/c onnector/OracleLocalTransaction.class, oracle/jdbc/driver/PhysicalConnection.cla ss, oracle/jdbc/pool/OracleFailoverEventHandlerThread.class, oracle/jdbc/pool/Or acleRuntimeLoadBalancingEventHandlerThread.class, oracle/sql/converter/I18Charac terConvertersWrapper.class]
I have enabled dynamic import in my bundle and it worked.
I have fixed that with the folowing methods:
1) Wrap oracle jdbc library into local maven repository
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0.2.0 -Dpackaging=jar -Dfile=/home/mike/ojdbc7.jar -DgeneratePom=true
2) Wrap oracle jdbc library from local maven to OSGi bundle
osgi:install -s wrap:mvn:com.oracle/ojdbc7/12.1.0.2.0
3) In the pom.xml of my own OSGi bundle:
<Import-Package>oracle.jdbc.driver,*</Import-Package>
You can also try installing the JAR as-is using the wrap handler
install wrap:file:/path/myfile.jar
来源:https://stackoverflow.com/questions/22015281/osgi-bundle-error-ojdbc6-jar