Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildcard(*) in DynamicImport-Package causes OSGi error #373

Closed
hs536 opened this issue Apr 17, 2022 · 0 comments
Closed

Wildcard(*) in DynamicImport-Package causes OSGi error #373

hs536 opened this issue Apr 17, 2022 · 0 comments

Comments

@hs536
Copy link

hs536 commented Apr 17, 2022

Environment Details

  • jakarta.json-api version: 2.1.0

Problem Description

Here is the error in GlassFish when both jakarta.json-api and org.eclipse.parsson are set to HK2-Import-Bundles in admingui/war/pom.xml ( relates eclipse-ee4j/glassfish#23782 ).
This OSGi interdependence appears to be caused by a wildcard(*) being set in the DynamicImport-Package.

[2022-04-17T17:34:27.763+0900] [glassfish 7.0] [SEVERE] [NCLS-CORE-00026] [jakarta.enterprise.system.core] [tid: _ThreadID=119 _ThreadName=Thread-25] [timeMillis: 1650184467763] [levelValue: 1000] [[
  Exception during lifecycle processing
com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [jakarta.json-api [233]], State = [NEW]
        at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.makeModuleFor(AbstractModulesRegistryImpl.java:319)
        at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.makeModuleFor(AbstractModulesRegistryImpl.java:290)
        at org.jvnet.hk2.osgiadapter.AbstractOSGiModulesRegistryImpl.getModulesClassLoader(AbstractOSGiModulesRegistryImpl.java:178)
        at org.jvnet.hk2.osgiadapter.AbstractOSGiModulesRegistryImpl.getModulesClassLoader(AbstractOSGiModulesRegistryImpl.java:268)
        at com.sun.enterprise.v3.server.ClassLoaderHierarchyImpl.createApplicationParentCL(ClassLoaderHierarchyImpl.java:192)
        at org.glassfish.deployment.common.DeploymentContextImpl.createClassLoader(DeploymentContextImpl.java:222)
        at org.glassfish.deployment.common.DeploymentContextImpl.createDeploymentClassLoader(DeploymentContextImpl.java:205)
        at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:345)
        at com.sun.enterprise.v3.server.ApplicationLoaderService.processApplication(ApplicationLoaderService.java:382)
        at com.sun.enterprise.v3.admin.adapter.InstallerThread.load(InstallerThread.java:188)
        at com.sun.enterprise.v3.admin.adapter.InstallerThread.run(InstallerThread.java:77)
Caused by: com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [jakarta.json-api [233]], State = [NEW]
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:193)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.resolve(OSGiModuleImpl.java:148)
        at com.sun.enterprise.module.common_impl.AbstractModulesRegistryImpl.makeModuleFor(AbstractModulesRegistryImpl.java:316)
        ... 10 more
Caused by: org.osgi.framework.BundleException: Unable to resolve jakarta.json-api [233](R 233.0): missing requirement [jakarta.json-api [233](R 233.0)] osgi.wiring.package; (osgi.wiring.package=org.eclipse.parsson) Unresolved requirements: [[jakarta.json-api [233](R 233.0)] osgi.wiring.package; (osgi.wiring.package=org.eclipse.parsson)]
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2308)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:1006)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.startBundle(OSGiModuleImpl.java:224)
        at org.jvnet.hk2.osgiadapter.OSGiModuleImpl.start(OSGiModuleImpl.java:185)
        ... 12 more
]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant