https://bz.apache.org/bugzilla/show_bug.cgi?id=69623

            Bug ID: 69623
           Summary: regression between 9.0.27 and 9.0.29:
                    UnknownServiceException: no content-type
           Product: Tomcat 9
           Version: 9.0.29
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: cri...@kth.se
  Target Milestone: -----

something seems to have changed in the classloader available to webapps just
after version 9.0.27

We used to load files from WEB-INF/classes/fileName.mdd (i.e. a custom
extension) using:

this.getClass().getClassLoader().getResource(filePath).getContent();

This code used to work in versions <= 9.0.27 but it fails in 9.0.29 and later
(and a few late 8 versions)

java.net.UnknownServiceException: no content-type
        at java.net.URLConnection.getContentHandler(URLConnection.java:1241)
        at java.net.URLConnection.getContent(URLConnection.java:740)
        at java.net.URL.getContent(URL.java:1081)

Tested this regression with a number of Java runtimes from versions 8 to 23. 

Checked the Tomcat changelog and I cannot find any change at 9.0.28 or 9.0.29 
that looks related to the classloader. So I wonder what Tomcat change could
have lead to this, and whether the change is intended.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to