org.osgi.framework.BundleException:捆绑包[2]中未解决的约束:无法解决2.0:缺少要求;未解决。 (package = android.dalvik)

时间:2019-09-30 15:36:58

标签: java build osgi-bundle

我有一个项目,其中包含多个模块。我被要求在其中一个模块中发送电子邮件。另一个模块具有使用javax.mail的emailer类。因此,我将包从另一个模块导入到我需要从中发送电子邮件的模块中。它可以成功构建,但是当我部署并安装耳塞和罐子时,它会引发关于org.osgi.framework.BundleException: Unresolved constraint in bundle AFWALDAPModule [2]: Unable to resolve 2.0: missing requirement [2.0] package; (package=android.dalvik)的错误。每次我尝试导入不同的依赖项时,它都会附带一个找不到的新缺少的需求包。 部署并安装ear和jar文件时,我会收到此错误。

<Sep 30, 2019 1:59:52 PM UTC> <Error> <oracle.oam.plugin> <BEA-000000> <Failed to start the bundle for plugin again.  AFWALDAPModule
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at oracle.security.am.plugin.internal.OSGIPluginService.installAndStartBundle(OSGIPluginService.java:179)
        at oracle.security.am.plugin.internal.OSGIPluginService.reloadFailedPlugins(OSGIPluginService.java:244)
        at oracle.security.am.plugin.internal.OSGIPluginService.loadActivatedBundles(OSGIPluginService.java:162)
        at oracle.security.am.plugin.internal.OSGIPluginService.start(OSGIPluginService.java:97)
        at oracle.security.am.pbl.transport.http.AMInitServlet.startOSGIPluginService(AMInitServlet.java:194)
        at oracle.security.am.pbl.transport.http.AMInitServlet.initializeAmServer(AMInitServlet.java:123)
        at oracle.security.am.pbl.transport.http.AMInitServlet.init(AMInitServlet.java:82)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
        at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
        at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
        at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
        at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1984)
        at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1958)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1877)
        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3173)
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1529)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:488)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:671)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
        at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:59)
        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
        at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:187)
        at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:379)
        at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
        at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
        at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
        at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261)
        at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:220)
        at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
        at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
        at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
        at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused By: org.osgi.framework.BundleException: Unresolved constraint in bundle AFWALDAPModule [2]: Unable to resolve 2.0: missing requirement [2.0] package; (package=android.dalvik)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3404)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1714)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:909)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at oracle.security.am.plugin.internal.OSGIPluginService.installAndStartBundle(OSGIPluginService.java:179)
        at oracle.security.am.plugin.internal.OSGIPluginService.reloadFailedPlugins(OSGIPluginService.java:244)
        at oracle.security.am.plugin.internal.OSGIPluginService.loadActivatedBundles(OSGIPluginService.java:162)
        at oracle.security.am.plugin.internal.OSGIPluginService.start(OSGIPluginService.java:97)
        at oracle.security.am.pbl.transport.http.AMInitServlet.startOSGIPluginService(AMInitServlet.java:194)
        at oracle.security.am.pbl.transport.http.AMInitServlet.initializeAmServer(AMInitServlet.java:123)
        at oracle.security.am.pbl.transport.http.AMInitServlet.init(AMInitServlet.java:82)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
        at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
        at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
        at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:539)
        at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1984)
        at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1958)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1877)
        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3173)
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1529)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:488)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:671)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
        at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:59)
        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
        at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:187)
        at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:379)
        at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
        at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
        at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
        at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:261)
        at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:220)
        at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
        at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
        at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
        at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

我尝试导入不同的软件包。 我还尝试将*嵌入在<Embed-Transitive>文件内的构建捆绑包部分的pom.xml部分上,该文件从另一个模块导入软件包。

仅提供一些上下文,这一切都是在我使用/从另一个模块中导入包含Emailer类的软件包到我想从中发送电子邮件的模块中时发生的。

0 个答案:

没有答案