OSGI Bundle Error - ojdbc6.jar

走远了吗. 提交于 2019-12-06 12:19:09

问题


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]


回答1:


I have enabled dynamic import in my bundle and it worked.




回答2:


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>



回答3:


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!