[Bug 69623] regression between 9.0.27 and 9.0.29: UnknownServiceException: no content-type
https://bz.apache.org/bugzilla/show_bug.cgi?id=69623 --- Comment #4 from cri...@kth.se --- Thank you for your response! Yes the issue exists in all versions older than 9.0.27. I could not find 9.0.28 to test it, but 9.0.29 has the issue, and all subsequent versions that I tested. This is the complete list of versions I tested with (a binary search basically) drwxr-xr-x 12 cristi staff 384 Mar 22 00:29 apache-tomcat-9.0.10 drwxr-xr-x 17 cristi staff 544 Mar 22 02:05 apache-tomcat-9.0.102 drwxr-xr-x 16 cristi staff 512 Mar 22 02:11 apache-tomcat-9.0.11 drwxr-xr-x 16 cristi staff 512 Mar 22 02:17 apache-tomcat-9.0.59 drwxr-xr-x 16 cristi staff 512 Mar 22 02:20 apache-tomcat-9.0.33 drwxr-xr-x 16 cristi staff 512 Mar 22 02:22 apache-tomcat-9.0.24 drwxr-xr-x 16 cristi staff 512 Mar 22 02:24 apache-tomcat-9.0.29 drwxr-xr-x 16 cristi staff 512 Mar 22 02:26 apache-tomcat-9.0.26 drwxr-xr-x 16 cristi staff 512 Mar 22 02:29 apache-tomcat-9.0.27 lrwxr-xr-x 1 cristi staff20 Mar 22 03:54 tomcat -> apache-tomcat-9.0.27 Since the tomcat9 docker image(s) did not work due to this issue, I resorted to running exactly the same webapp (in ./webapps/ROOT) using a docker-compose configuration with a jvm docker image: tomcat: container_name: tomcat image: arm64v8/eclipse-temurin:23 volumes: - "./tomcat:/usr/local/tomcat/" - "./webapps:/usr/local/tomcat/webapps/" command: sh /usr/local/tomcat/bin/start.sh ports: - '8080:8080' I simply symlink the ./tomcat folder to different tomcat downloads, and copy a simplified start.sh script in the downloaded apache-tomcat-VERSION/bin. The script is: java \ -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties \ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \ -Djava.protocol.handler.pkgs=org.apache.catalina.webresources \ -Dignore.endorsed.dirs= \ -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar \ -Dcatalina.base=/usr/local/tomcat \ -Dcatalina.home=/usr/local/tomcat \ -Djava.io.tmpdir=/usr/local/tomcat/temp \ org.apache.catalina.startup.Bootstrap start I've never used custom mime mappings. Maybe that could be the solution to my problem (apart from changing my decade-old webapp to not use getContent for .mdd files). But I reported here since I could not see any mention of webapp classloader changes in the CHANGELOG. -- 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
[Bug 69623] regression between 9.0.27 and 9.0.29: UnknownServiceException: no content-type
https://bz.apache.org/bugzilla/show_bug.cgi?id=69623 cri...@kth.se changed: What|Removed |Added Version|9.0.29 |9.0.102 --- Comment #5 from cri...@kth.se --- Switched version to 9.0.102 as the most advanced one where this occurs. I am not sure a custom mime mapping can help here, as this is not a file served by tomcat, but a file loaded by the webapp from WEB-INF/classes using the webapp classloader -- 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
[Bug 69623] regression between 9.0.27 and 9.0.29: UnknownServiceException: no content-type
https://bz.apache.org/bugzilla/show_bug.cgi?id=69623 --- Comment #6 from cri...@kth.se --- The issue occurs also with tomcat 10, ran the old webapp using -- 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
[Bug 69623] regression between 9.0.27 and 9.0.29: UnknownServiceException: no content-type
https://bz.apache.org/bugzilla/show_bug.cgi?id=69623 --- Comment #1 from cri...@kth.se --- A few people noticed this earlier, for example: https://stackoverflow.com/questions/64645338/java-net-url-getcontent-unknownserviceexception-no-content-type -- 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
[Bug 69623] New: regression between 9.0.27 and 9.0.29: UnknownServiceException: no content-type
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
[Bug 69623] regression between 9.0.27 and 9.0.29: UnknownServiceException: no content-type
https://bz.apache.org/bugzilla/show_bug.cgi?id=69623 --- Comment #2 from cri...@kth.se --- getContent() used to return an input stream. which we were using to read the text file with the .mdd extension. Now it throws instead -- 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
[Bug 69623] regression between 9.0.27 and 9.0.29: UnknownServiceException: no content-type
https://bz.apache.org/bugzilla/show_bug.cgi?id=69623 --- Comment #3 from Chuck Caldarale --- The cited version (9.0.29) is over 4 years old; does this issue still exist on the current level (9.0.102)? Are you sure you didn't lose a custom mime-mapping when you tried the newer Tomcat version? -- 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