Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8889

Compilation of CXF fails due to a "jakarta..." vs. "javax..." issue.

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.2
    • 4.0.3
    • Build system
    • None
    • Unknown
    • Patch, Important

    Description

      Issue

      When cloning CXF fresh from Github and building it:

      • mvn clean package verify

      The following Error is signaled:

      • [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project cxf-rt-transports-http: Compilation failure: Compilation failure:
        [ERROR] /C:/Users/bleh/Documents/Projekte/cxf/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java:[55,60] cannot access javax.servlet.ServletContext
        [ERROR] class file for javax.servlet.ServletContext not found
        [ERROR] /C:/Users/bleh/Documents/Projekte/cxf/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/CXFServlet.java:[137,13] cannot access javax.servlet.ServletConfig
        [ERROR] class file for javax.servlet.ServletConfig not found

      Reason

      The reason is that in the method:

      • org.apache.cxf.transport.servlet/CXFServle#loadBus

      the call to:

      • WebApplicationContextUtils.            getWebApplicationContext(servletConfig.getServletContext());

      is required to return a:

      • jakarta.servlet.ServletContext

      however the method return value stems from:

      • org.springframework.web.context.support.WebApplicationContextUtils#getRequiredWebApplicationContext (spring-web-5.3.24)

      which delivers a:

      • javax.servlet.ServletContext

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            reta Andriy Redko
            agitatra Mark Kahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment