glassfish
glassfish copied to clipboard
Integrate Woodstox 7.0.0
Changes: https://github.com/FasterXML/woodstox/blob/master/release-notes/VERSION
Needs to be investigated what's really failing here.
It fails because Metro is proteted against major version updates:
java.lang.IllegalStateException: Unable to resolve
org.glassfish.main.security.webservices.security [275]
missing requirement
&(package = com.sun.xml.ws.api.message) (version >= 4.0.0) (!(version >= 5.0.0))
caused by:
Unable to resolve
org.glassfish.metro.webservices-osgi [26]
missing requirement
&(package = com.ctc.wstx.stax) (version >= 6.5.0) (!(version >= 7.0.0)))]
@lukasj what shall we do to update metro? Widen the protection rules or just update Metro to Woodstox 7.0.0 (the major version change is due to JDK 8 support)
@arjantijms give me some final version of Grizzly which has fixed https://github.com/eclipse-ee4j/grizzly/issues/2205 so I can actually build metro with the latest jakarta APIs
give me some final version of Grizzly which has fixed
Can you try with 4.1.0-M1? If that works we can release a final.
@lukasj note that ideally the 7.0.0 upgrade of Woodstox would also be allowed for the Jakarta EE 10 version of Metro.
@arjantijms try metro 4.0.4 from staging
With WoodStox 7.0.0 and Metro / WebServices 4.0.4 and jakarta.xml.ws-api 4.0.2:
[ERROR] Failures:
[ERROR] ClusterITest.checkClusterTest:135->getURL:239
[ERROR] ClusterITest.checkDeploymentTest:147->getURL:239
[ERROR] ClusterITest.deleteClusterTest:218
Expected: asadmin succeeded
but: was <Command delete-cluster failed.
remote failure: Configuration com.sun.enterprise.config.serverbeans.Cluster not deleted. Cluster eec1 contains server instances eein1-with-a-very-very-very-long-name,eein2, and must not contain any instances
>
[ERROR] ApplicationITest.listSubComponents:125->RestTestBase.undeployApp:208
Expected: <200>
but: was <404>
[ERROR] ApplicationITest.testApplicationDeployment:67->RestTestBase.undeployApp:208
Expected: <200>
but: was <404>
[ERROR] ApplicationITest.testApplicationDeploymentWithDefaultContextRoot:80->RestTestBase.undeployApp:208
Expected: <200>
but: was <404>
[ERROR] ApplicationITest.testApplicationDisableEnable:86->RestTestBase.deployApp:190
Expected: <200>
but: was <400>
[ERROR] ApplicationITest.testCreatingAndDeletingApplicationRefs:155->RestTestBase.undeployApp:208
Expected: <200>
but: was <404>
[ERROR] ApplicationITest.testGetContextRoot:172->RestTestBase.undeployApp:208
Expected: <200>
but: was <404>
[ERROR] ApplicationITest.testUndeploySubActionWarnings:188->RestTestBase.deployApp:190
Expected: <200>
but: was <400>
[ERROR] ElementStarITest.testApplications:73->RestTestBase.deployApp:190
Expected: <200>
but: was <400>
[INFO]
[ERROR] Tests run: 148, Failures: 11, Errors: 0, Skipped: 5
Seems we still have some way to go. @dmatej any idea?
remote failure: Error occurred during deployment: Exception while preparing the app : A MultiException has 6 exceptions. They are:
1. com.sun.enterprise.module.ResolveError: Failed to start OSGiModuleImpl:: Bundle = [org.glassfish.main.security.webservices.security [274]], State = [NEW]
2. java.lang.IllegalStateException: Could not load descriptor SystemDescriptor(
implementation=com.sun.enterprise.security.webservices.WebServicesDelegateImpl
contracts={com.sun.enterprise.security.webservices.WebServicesDelegateImpl,com.sun.enterprise.security.ee.jmac.WebServicesDelegate}
scope=jakarta.inject.Singleton
qualifiers={}
descriptorType=CLASS
descriptorVisibility=NORMAL
metadata=Bundle-SymbolicName={org.glassfish.main.security.webservices.security},Bundle-Version={7.0.16.SNAPSHOT}
rank=0
loader=OsgiPopulatorPostProcessor.HK2Loader(OSGiModuleImpl:: Bundle = [org.glassfish.main.security.webservices.security [274]], State = [NEW],1879961136)
proxiable=null
proxyForSameScope=null
analysisName=null
id=234
locatorId=0
identityHashCode=2078949646
reified=false)
3. java.lang.IllegalStateException: Unable to resolve
org.glassfish.main.security.webservices.security [274]
missing requirement
&(package = com.sun.xml.ws.api.message) (version >= 4.0.0) (!(version >= 5.0.0))
caused by:
Unable to resolve
org.glassfish.metro.webservices-osgi [165]
missing requirement
&(package = com.ctc.wstx.stax) (version >= 6.5.0) (!(version >= 7.0.0)))]
And this is in server.log:
[2024-07-06T13:02:23.340222+02:00] [GF 7.0.16-SNAPSHOT] [SEVERE] [] [jakarta.enterprise.system.core] [tid: _ThreadID=87 _ThreadName=admin-listener(1)] [levelValue: 1000] [[
org.glassfish.jersey.jsonp.internal.JsonProcessingAutoDiscoverable
java.lang.ClassNotFoundException: org.glassfish.jersey.jsonp.internal.JsonProcessingAutoDiscoverable
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:2102)
at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:986)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$4$1.run(OSGiModuleImpl.java:467)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$4$1.run(OSGiModuleImpl.java:464)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
at org.jvnet.hk2.osgiadapter.OSGiModuleImpl$4.loadClass(OSGiModuleImpl.java:464)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at com.sun.enterprise.v3.server.APIClassLoaderServiceImpl$APIClassLoader.loadClass(APIClassLoaderServiceImpl.java:244)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:580)
at org.glassfish.common.util.GlassfishUrlClassLoader.loadClass(GlassfishUrlClassLoader.java:115)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:534)
at java.base/java.lang.Class.forName(Class.java:513)
at org.glassfish.jersey.internal.util.ReflectionHelper$7.run(ReflectionHelper.java:382)
at org.glassfish.jersey.internal.util.ReflectionHelper$7.run(ReflectionHelper.java:377)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
at org.glassfish.jersey.internal.ServiceFinder$AbstractLazyIterator.hasNext(ServiceFinder.java:556)
at org.glassfish.jersey.internal.ServiceFinder.toClassArray(ServiceFinder.java:397)
at org.glassfish.jersey.model.internal.CommonConfig.configureAutoDiscoverableProviders(CommonConfig.java:600)
at org.glassfish.jersey.server.ResourceConfig.configureAutoDiscoverableProviders(ResourceConfig.java:819)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:338)
at org.glassfish.jersey.server.ApplicationHandler.lambda$initialize$1(ApplicationHandler.java:309)
at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:232)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:308)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:273)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:260)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.<init>(GrizzlyHttpContainer.java:310)
at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainerProvider.createContainer(GrizzlyHttpContainerProvider.java:37)
at org.glassfish.jersey.server.ContainerFactory.createContainer(ContainerFactory.java:58)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService.getJerseyContainer(JerseyContainerCommandService.java:141)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService.exposeContext(JerseyContainerCommandService.java:129)
at org.glassfish.admin.rest.adapter.JerseyContainerCommandService.getJerseyContainer(JerseyContainerCommandService.java:96)
at org.glassfish.admin.rest.adapter.RestCommandAdapter.exposeContext(RestCommandAdapter.java:44)
at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:151)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:429)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:143)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:174)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:153)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:196)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:88)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:246)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:118)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:96)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:51)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:510)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:82)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:83)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:101)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:535)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:515)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.osgi.framework.BundleException: Unable to resolve org.glassfish.jersey.media.jersey-media-json-processing [164](R 164.0): missing requirement [org.glassfish.jersey.media.jersey-media-json-processing [164](R 164.0)] osgi.wiring.package; (&(osgi.wiring.package=org.eclipse.parsson.media)(version>=1.1.0)(!(version>=2.0.0))) [caused by: Unable to resolve org.eclipse.parsson.media [175](R 175.0): missing requirement [org.eclipse.parsson.media [175](R 175.0)] osgi.wiring.package; (&(osgi.wiring.package=jakarta.annotation)(version>=3.0.0)(!(version>=4.0.0)))] Unresolved requirements: [[org.glassfish.jersey.media.jersey-media-json-processing [164](R 164.0)] osgi.wiring.package; (&(osgi.wiring.package=org.eclipse.parsson.media)(version>=1.1.0)(!(version>=2.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4398)
at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:2095)
... 54 more
]]
Aha, and yet one ... bit weird it goes after the previous one. So it seems the problem is that GlassFish 7 depends on older jakarta annotation 2.1.1.:
Unable to resolve
org.glassfish.jersey.media.jersey-media-json-processing [164]
missing requirement
&(package = org.eclipse.parsson.media) (version >= 1.1.0) (!(version >= 2.0.0))
caused by:
Unable to resolve
org.eclipse.parsson.media [175]
missing requirement
&(package = jakarta.annotation) (version >= 3.0.0) (!(version >= 4.0.0)))]
]]
Rebased to master and removed the revert - and voila! Magic happened, both admin-tests and application-tests pased locally with JDK21 and JDK11. EDIT: But not on CI, hmmm ...
So it seems the problem is that GlassFish 7 depends on older jakarta annotation 2.1.1.:
That's not a problem. Annotations 2.1 is the right version for EE 10. Annotations 3.0 is for EE 11, which GlassFish 7 cannot support (Annotations removed @ManagedBean, which is required in EE 10).
The issue with Annotations seems resolved after the rebase (yasson?). Yeah, maybe the cache cleanup could help ... it was executed in December for the last time ... lets go for it now ...