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

Need version of metro-wsit / metro.webservices-api-osgi supporting jakarta.servlet 6 #148

Closed
arjantijms opened this issue Dec 17, 2021 · 7 comments · Fixed by #154
Closed

Comments

@arjantijms
Copy link
Contributor

Integrating metro 4.0.0-M1 in GF 7 leads to several exceptions such as

 java.lang.NoClassDefFoundError: jakarta/servlet/ServletContainerInitializer.

Upon investigation of the MANIFEST.MF, it seems a number of Jakarta dependencies are restricted to their EE 9.1 versions:

      jakarta.security.auth.message.callback;resolution:=optional;version="[2.0,3)"
      jakarta.security.auth.message.config;resolution:=optional;version="[2.0,3)"
      jakarta.security.auth.message.module;resolution:=optional;version="[2.0,3)"
      jakarta.security.auth.message;resolution:=optional;version="[2.0,3)"
      jakarta.servlet.annotation;resolution:=optional;version="[5.0,6)"
      jakarta.servlet.http;resolution:=optional;version="[5.0,6)"
      jakarta.servlet;resolution:=optional;version="[5.0,6)"

GlassFish 7 bundles Jakarta Authentication 3 and Jakarta Servlet 6 among others.

I think a new version of "org.glassfish.metro.webservices-api-osgi" is needed?

@lukasj
Copy link
Member

lukasj commented Dec 17, 2021

GF master is still on servlet 5. Other than that, I cannot use Servlet 6 because I've found no version of Grizzly implementing/supporting Servlet 6 and without that, Metro fails to build.

@arjantijms
Copy link
Contributor Author

GF master is still on servlet 5.

Yes, but that is because I'm preparing the PR with Servlet 6 to be merged in without (too many) errors. But Metro (among others) is blocking that merge.

I cannot use Servlet 6 because I've found no version of Grizzly implementing/supporting Servlet 6

The Servlet 6 bits are implemented in Catalina in GF, not in Grizzly. I do know Grizzly, perhaps somewhat confusingly, implements parts of Servlet too. I can look at whether that can be updated first then.

@lukasj
Copy link
Member

lukasj commented Dec 17, 2021

I was hoping to see incremental changes directly in master to allow better co-operation as well as testing (...test early, test often...).

@lukasj
Copy link
Member

lukasj commented Dec 17, 2021

wrt issue in grizzly:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project webservices-extra: Compilation failure: Compilation failure: 
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpServletRequestImpl.java:[83,8] org.glassfish.grizzly.servlet.HttpServletRequestImpl is not abstract and does not override abstract method getServletConnection() in jakarta.servlet.ServletRequest
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpServletRequestImpl.java:[696,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpServletRequestImpl.java:[1040,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpServletResponseImpl.java:[447,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpServletResponseImpl.java:[455,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpServletResponseImpl.java:[633,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpSessionImpl.java:[161,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpSessionImpl.java:[177,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpSessionImpl.java:[193,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpSessionImpl.java:[274,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/HttpSessionImpl.java:[323,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/WebappContext.java:[1250,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/WebappContext.java:[1261,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/WebappContext.java:[1273,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/WebappContext.java:[1292,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/SessionCookieConfig.java:[22,8] org.glassfish.grizzly.servlet.SessionCookieConfig is not abstract and does not override abstract method getAttributes() in jakarta.servlet.SessionCookieConfig
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/DispatchedHttpServletResponse.java:[183,5] method does not override or implement a method from a supertype
[ERROR] /Users/lukas/development/github/eclipse-ee4j/metro-wsit/wsit/bundles/webservices-extra/target/generated-sources/dependencies/org/glassfish/grizzly/servlet/DispatchedHttpServletResponse.java:[188,14] method setStatus in class jakarta.servlet.http.HttpServletResponseWrapper cannot be applied to given types;
[ERROR]   required: int
[ERROR]   found: int,java.lang.String
[ERROR]   reason: actual and formal argument lists differ in length
[ERROR] -> [Help 1]

@arjantijms
Copy link
Contributor Author

I was hoping to see incremental changes directly in master to allow better co-operation as well as testing (...test early, test often...).

Yes, I was hoping for that too. But almost everything depends on other things.

So I add one updated dependency, but it then wants another dependency to be updated. So I update that, and then it wants yet something else, etc. It keeps branching out.

If you look at the PR you see I start small hoping to merge in just these, but the build keeps failing.

The dependency problems go 2 way.

Either updated artefact A depends on B and C, and it wants updated versions of these, OR artefact A is depended upon by B and C and after updating A, B and C won't find the non-updated A anymore.

Maybe if very carefully looking at the dependency graph a small handful of dependencies could have been added incrementally, but they seem far and few between.

@arjantijms
Copy link
Contributor Author

wrt issue in grizzly:

Thanks, I'm on it.

@lukasj lukasj linked a pull request Jan 7, 2022 that will close this issue
@lukasj
Copy link
Member

lukasj commented Jan 7, 2022

4.0.0-M2 should appear in staging in a while. It would be great to provide updated grizzly so I can fix #155

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.

2 participants