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

ServletSecTestServlet imports org.slf4j.Logger but test war doesn't include sl4j #638

Closed
arjantijms opened this issue May 22, 2024 · 6 comments
Labels
TCK:accepted TCK challenge accepted TCK:challenge TCK challenge

Comments

@arjantijms
Copy link
Contributor

Source:

...
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@DeclareRoles({"Administrator"})
@ServletSecurity(value = @HttpConstraint(ServletSecurity.EmptyRoleSemantic.PERMIT), httpMethodConstraints = {@HttpMethodConstraint(value = "POST", rolesAllowed = {"Administrator"}, transportGuarantee = ServletSecurity.TransportGuarantee.CONFIDENTIAL), @HttpMethodConstraint(value = "GET", rolesAllowed = {"Administrator"}, transportGuarantee = ServletSecurity.TransportGuarantee.CONFIDENTIAL)})
@WebServlet({"/ServletSecTest"})
public class ServletSecTestServlet extends HttpServlet {
  private boolean fail = false;

  ...

War build by "ClientCertAnnoTests":

Screenshot 2024-05-22 at 17 51 33
@arjantijms arjantijms added the TCK:challenge TCK challenge label May 22, 2024
@arjantijms
Copy link
Contributor Author

Same problem for "servlet.tck.spec.servletresponse.servletResponseTests"

[INFO] Running servlet.tck.spec.servletresponse.servletResponseTests
...
servlet_spec_servletresponse_web.war:
/WEB-INF/
/WEB-INF/classes/
/WEB-INF/classes/servlet/
/WEB-INF/classes/servlet/tck/
/WEB-INF/classes/servlet/tck/spec/
/WEB-INF/classes/servlet/tck/spec/servletresponse/
/WEB-INF/classes/servlet/tck/spec/servletresponse/HttpTestServlet.class
/WEB-INF/classes/servlet/tck/spec/servletresponse/TestServlet.class
/WEB-INF/web.xml

Throws: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory on the server.

@markt-asf
Copy link
Contributor

Looks like we are going to need a 6.1.1 TCK.

For servlet.tck.spec.security.clientcertanno it looks like we can just remove the logger since it isn't used.

For servlet.tck.spec.servletresponse I think we need to add the JAR.

I have changes for the above that I'm testing locally. If that works I can stage an updated TCK for you to test.

@markt-asf
Copy link
Contributor

Hmm. Don't think the 6.1.0 TCK has been released yet. We might still have a chance to fix this for 6.1.0.

markt-asf added a commit to markt-asf/servlet-api that referenced this issue May 24, 2024
markt-asf added a commit to markt-asf/servlet-api that referenced this issue May 24, 2024
@markt-asf markt-asf added the TCK:accepted TCK challenge accepted label May 24, 2024
@markt-asf
Copy link
Contributor

Fixed by #640

markt-asf added a commit to apache/tomcat-tck that referenced this issue May 24, 2024
Addressed by the fix for jakartaee/servlet#638
@arjantijms
Copy link
Contributor Author

Hmm. Don't think the 6.1.0 TCK has been released yet. We might still have a chance to fix this for 6.1.0.

The ballot has already started, so unfortunately we can't change it for 6.1.0. It would have to be a 6.1.1 (service release). That's however relatively easy to do.

@markt-asf
Copy link
Contributor

The change made it before the ballot started. It is in 6.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TCK:accepted TCK challenge accepted TCK:challenge TCK challenge
Projects
None yet
Development

No branches or pull requests

2 participants