将 javax.smartcardio 打包为 OSGI 包
Package javax.smartcardio as an OSGI Bundle
我正在构建一个使用 javax.smartcardio 库的 Karaf OSGI 应用程序。当我部署它时,出现以下错误:
Unable to resolve 249.0: missing requirement [249.0] osgi.wiring.package; (osgi.wiring.package=javax.smartcardio)
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:488)[26:org.apache.karaf.features.core:2.3.2]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:402)[26:org.apache.karaf.features.core:2.3.2]
at Proxy532dee57_5493_41af_a3a1_bf689277fb5b.installFeature(Unknown Source)[:]
at org.apache.karaf.deployer.kar.KarArtifactInstaller.installFeatures(KarArtifactInstaller.java:189)[24:org.apache.karaf.deployer.kar:2.3.2]
at org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:134)[24:org.apache.karaf.deployer.kar:2.3.2]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:929)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:857)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:483)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)[6:org.apache.felix.fileinstall:3.2.6]
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.isirona.drivers.neuroptics-npi200.core [249]: Unable to resolve 249.0: missing requirement [249.0] osgi.wiring.package; (osgi.wiring.package=javax.smartcardio)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:485)[26:org.apache.karaf.features.core:2.3.2]
我想将 javax.smartcardio 库打包成一个包。有关于如何从 .jar 构建包的链接,但我在 JDK.
中找不到 javax.smartcardio 库
是在JDK里面吗?我是否必须做任何特别的事情才能访问它。谢谢。
如果它是 JDK 的一部分,请确保将其导出为系统包。
为此编辑 etc/jre.properties 文件。
您需要将相应的包添加到您使用的 JVM 部分。如果已知,通常最好使用正确的版本导出它。
我正在构建一个使用 javax.smartcardio 库的 Karaf OSGI 应用程序。当我部署它时,出现以下错误:
Unable to resolve 249.0: missing requirement [249.0] osgi.wiring.package; (osgi.wiring.package=javax.smartcardio)
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:488)[26:org.apache.karaf.features.core:2.3.2]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:402)[26:org.apache.karaf.features.core:2.3.2]
at Proxy532dee57_5493_41af_a3a1_bf689277fb5b.installFeature(Unknown Source)[:]
at org.apache.karaf.deployer.kar.KarArtifactInstaller.installFeatures(KarArtifactInstaller.java:189)[24:org.apache.karaf.deployer.kar:2.3.2]
at org.apache.karaf.deployer.kar.KarArtifactInstaller.install(KarArtifactInstaller.java:134)[24:org.apache.karaf.deployer.kar:2.3.2]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:929)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.install(DirectoryWatcher.java:857)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:483)[6:org.apache.felix.fileinstall:3.2.6]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:291)[6:org.apache.felix.fileinstall:3.2.6]
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.isirona.drivers.neuroptics-npi200.core [249]: Unable to resolve 249.0: missing requirement [249.0] osgi.wiring.package; (osgi.wiring.package=javax.smartcardio)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeatures(FeaturesServiceImpl.java:485)[26:org.apache.karaf.features.core:2.3.2]
我想将 javax.smartcardio 库打包成一个包。有关于如何从 .jar 构建包的链接,但我在 JDK.
中找不到 javax.smartcardio 库是在JDK里面吗?我是否必须做任何特别的事情才能访问它。谢谢。
如果它是 JDK 的一部分,请确保将其导出为系统包。 为此编辑 etc/jre.properties 文件。
您需要将相应的包添加到您使用的 JVM 部分。如果已知,通常最好使用正确的版本导出它。