我按照pentaho官网https://help.hitachivantara.com/Documentation/Pentaho/9.4/Developer_center/Embed_Pentaho_Data_Integration中的说明,集成OSGI插件一直报错
org.apache.felix.resolver.reason.ReasonException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=pentaho-osgi-utils; type=karaf.feature; version=0; filter:="(&(osgi.identity=pentaho-osgi-utils)(type=karaf.feature)(version>=0.0.0))" [caused by: Unable to resolve pentaho-osgi-utils/9.0.0.0-423: missing requirement [pentaho-osgi-utils/9.0.0.0-423] osgi.identity; osgi.identity=pentaho-osgi-utils-impl; type=osgi.bundle; version="[9.0.0.0-423,9.0.0.0-423]"; resolution:=mandatory [caused by: Unable to resolve pentaho-osgi-utils-impl/9.0.0.0-423: missing requirement [pentaho-osgi-utils-impl/9.0.0.0-423] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.pentaho.capabilities.api)(version>=9.0.0)(!(version>=10.0.0)))"]]
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:392)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:378)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:332)
at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:257)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:393)
at org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1116)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
at org.apache.karaf.features.internal.service.Deployer.handlePrerequisites(Deployer.java:1116)
at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:388)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1062)
at org.apache.karaf.features.internal.service.FeaturesServiceImpl.lambda$doProvisionInThread$13(FeaturesServiceImpl.java:998)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve pentaho-osgi-utils/9.0.0.0-423: missing requirement [pentaho-osgi-utils/9.0.0.0-423] osgi.identity; osgi.identity=pentaho-osgi-utils-impl; type=osgi.bundle; version="[9.0.0.0-423,9.0.0.0-423]"; resolution:=mandatory [caused by: Unable to resolve pentaho-osgi-utils-impl/9.0.0.0-423: missing requirement [pentaho-osgi-utils-impl/9.0.0.0-423] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.pentaho.capabilities.api)(version>=9.0.0)(!(version>=10.0.0)))"]
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
... 16 more
Caused by: org.apache.felix.resolver.reason.ReasonException: Unable to resolve pentaho-osgi-utils-impl/9.0.0.0-423: missing requirement [pentaho-osgi-utils-impl/9.0.0.0-423] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.pentaho.capabilities.api)(version>=9.0.0)(!(version>=10.0.0)))"
at org.apache.felix.resolver.Candidates$MissingRequirementError.toException(Candidates.java:1343)
... 17 more
15:48:02,710 ERROR [KarafLifecycleListener] The Kettle Karaf Lifecycle Listener failed to execute properly after waiting for 100 seconds. Releasing lifecycle hold, but some services may be unavailable.
这个错误表明无法解决OSGI插件之间的依赖关系。 错误消息指出,无法解析“pentaho-osgi-utils”和“pentaho-osgi-utils-impl”插件,并且缺少必需的软件包“org.pentaho.capabilities.api”,其版本必须大于或等于9.0.0,但小于10.0.0。
建议您检查插件之间的依赖关系,并确保所有必需的软件包都可用且版本正确。您还可以尝试使用OSGi调试器来定位问题。