简体   繁体   中英

OSGI Bundle Error - ojdbc6.jar

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 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>

您还可以尝试使用包装处理程序按原样安装JAR

install wrap:file:/path/myfile.jar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM