jenkinsci / stapler

Stapler web framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stapler not letting Jenkins deploy

JorgeCarousel opened this issue · comments

Hello,

I was told to create an issue because stapler.java is referencing javax.servlet when it should be using jakarta.servlet

Can this be fixed so jenkins can be deployed?

Thanks.

JENKINS-68698 describes some of the areas that are known to need changes in order to complete the Jakarta EE 9 migration (javax.servlet to jakarta.servlet). However, none of those things are required to deploy Jenkins today. Jenkins can be deployed today on:

I suspect that when you say that "Stapler is not letting Jenkins deploy", you actually mean that you are trying to deploy Jenkins into a location that is not one of the locations listed above. I would guess that you are trying to deploy to some form of web container like Tomcat or WildFly or Glassfish or ....

None of the Jenkins core developers deploy to those alternate web containers. None of the Jenkins test automation runs with those alternate web containers. The Jenkins project does not provide any standard documentation for installing or configuring Jenkins in an alternate web container.

The Winstone / Jetty container used by Jenkins is the most heavily tested and best documented container for use with Jenkins. The Jenkins project recommends that users deploy the Jenkins with its built-in container.

I am trying to deploy it on Windows with JDK 17, maven 3.8.6 and WildFly 27-Final and Tomcat 10.1.1 but all I get is: Dispatcher error: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit."jenkins.war".undertow-deployment.UndertowDeploymentInfoService" => "Failed to start service Caused by: java.lang.NoClassDefFoundError: Failed to link org/kohsuke/stapler/Stapler (Module "deployment.jenkins.war" from Service Module Loader): javax/servlet/http/HttpServlet"}}

Whether you fix it or not, I'm Thru with Java, so I'm not using any Java product anymore.

Whether you are through with Java or not, Jenkins will not (yet!) work with any servlet container that is using Jakarta EE 9 (jakartaee.servlet.* imports), including both Jetty 11 and WildFly 27. Jenkins should work with any servlet container that uses Jakarta EE 8 (javax.servlet.* imports). The officially supported servlet container is Jetty 10. I have not tested it myself, but I believe Jenkins should work fine in WildFly 26, which is based on Jakarta EE 8.