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

Integrate Woodstox 7.0.0 #25003

Merged
merged 2 commits into from
Jul 8, 2024
Merged

Conversation

arjantijms
Copy link
Contributor

@arjantijms arjantijms added the component upgrade A component dependency has been upgraded label Jun 24, 2024
@arjantijms arjantijms added this to the 7.0.16 milestone Jun 24, 2024
@arjantijms arjantijms self-assigned this Jun 24, 2024
@arjantijms
Copy link
Contributor Author

Needs to be investigated what's really failing here.

@arjantijms arjantijms marked this pull request as draft June 24, 2024 15:58
@arjantijms arjantijms removed this from the 7.0.16 milestone Jun 24, 2024
@arjantijms
Copy link
Contributor Author

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)

@lukasj
Copy link
Member

lukasj commented Jun 24, 2024

@arjantijms give me some final version of Grizzly which has fixed eclipse-ee4j/grizzly#2205 so I can actually build metro with the latest jakarta APIs

@arjantijms
Copy link
Contributor Author

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.

@arjantijms
Copy link
Contributor Author

@lukasj note that ideally the 7.0.0 upgrade of Woodstox would also be allowed for the Jakarta EE 10 version of Metro.

@lukasj
Copy link
Member

lukasj commented Jun 27, 2024

@arjantijms try metro 4.0.4 from staging

@@ -88,7 +88,7 @@
<!-- Jakarta SOAP (with Attachments)
<jakarta.xml.soap-api.version>3.0.0-RC2</jakarta.xml.soap-api.version>
-->
<webservices.version>4.0.3</webservices.version>
<webservices.version>4.0.4</webservices.version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, looking at other deps, it will probably fail again unless EL-API gets updated to 6.0.0 and Servlet-API to 6.1.0; XML-WS related APIs should be updated to their latest versions too, but should not cause any troubles if not given their updates are fully backward compatible

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't update those in GF 7 to those versions, since they are Jakarta EE 11 dependencies.

GlassFish 8 is for Jakarta EE 11, GlassFish 7 is for Jakarta EE 10.

What we really need is a Metro / WebServices with Jakarta EE 10 dependencies (so no Expression Language 6 and no Servlet 6.1), but with WoodStox 7.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukasj Can you do a Metro / Webservices 4.0.4 with only WoodStox updated to 7 (or, even better, just widen the protection in OSGi to include 6 and 7). Then do a Metro / Webservices 4.1.x for Jakarta EE 11?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. Try 4.0.4 again. It should be ok for use in EE 10 as well as 11 now. Given EE 10 requires SE 11, I see no point in keeping woodstox 6.x allowed.

anyway XML-WS related APIs should be updated to their latest versions note remains valid; <jakarta.xml.soap-api.version>3.0.0-RC2</jakarta.xml.soap-api.version> is definitely wrong even for EE 10 final

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 3.0.0-RC2 only seems to occur in a comment:

   <!-- Jakarta SOAP (with Attachments)
       <jakarta.xml.soap-api.version>3.0.0-RC2</jakarta.xml.soap-api.version>
        -->

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in server.log of the clustered instance. I have no idea why the test passed locally. Some cached dependency on CI from staging repo ?

Caused by: java.lang.ClassNotFoundException: jakarta.servlet.ServletContainerInitializer not found by org.glassfish.metro.webservices-osgi [299]
	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591)
	at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79)
	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
	... 96 more
]]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.glassfish.* is being cached on the CI indeed. If Metro uses that and Lukas re-staged 4.0.4, that might be the issue.

There is a job to clear the cache.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukasj can we release metro / webservices 4.0.4 to Maven Central?

@arjantijms
Copy link
Contributor Author

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?

@dmatej
Copy link
Contributor

dmatej commented Jul 6, 2024

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)))]

@dmatej
Copy link
Contributor

dmatej commented Jul 6, 2024

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
]]

@dmatej
Copy link
Contributor

dmatej commented Jul 6, 2024

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)))]

]]

@dmatej
Copy link
Contributor

dmatej commented Jul 6, 2024

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 ...

@dmatej dmatej marked this pull request as ready for review July 6, 2024 18:46
@dmatej dmatej requested a review from lukasj July 6, 2024 18:46
@arjantijms
Copy link
Contributor Author

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).

@dmatej
Copy link
Contributor

dmatej commented Jul 7, 2024

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 ...

@dmatej dmatej added this to the 7.0.16 milestone Jul 8, 2024
@arjantijms arjantijms merged commit a3faa17 into eclipse-ee4j:master Jul 8, 2024
2 checks passed
@arjantijms arjantijms deleted the woodstox_700 branch July 8, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component upgrade A component dependency has been upgraded
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants