Skip to content

Bug Report: Jakarta Activation Framework 2.1.4 appears to have broken MIME type detection #7741

@rdelaplante

Description

@rdelaplante

Brief Summary

My application works well on Payara 6.2025.9 but not on 6.2025.10. I use Jakarta Activation Framework to detect MIME types of files like this:

import jakarta.activation.MimetypesFileTypeMap;

File file = ...
String mimeType = new MimetypesFileTypeMap().getContentType(file);

It used to output correct values such as "text/css", "image/png", etc. but now outputs "application/octet-stream" for all files causing web browsers to not render my resources.

I noticed jakarta.activation-api was upgraded from 2.1.3 to 2.1.4 in the Payara 6.2025.10 release. They seem to have renamed "mailcap" to "jakarta.mailcap", though I have not investigated what that is or where it is located:

jakartaee/jaf-api@5f213b8

I think this broke Payara 6.2025.10 and I cannot upgrade to this release or future releases until this is resolved.

Expected Outcome

MimetypesFileTypeMap().getContentType(file) should return the correct MIME type instead of "application/octet-stream" for all files.

Current Outcome

MimetypesFileTypeMap().getContentType(file) returns "application/octet-stream" for all files.

Reproducer

import jakarta.activation.MimetypesFileTypeMap;

File file = ...
String mimeType = new MimetypesFileTypeMap().getContentType(file);

I'm using that in a servlet that outputs files to the browser.

Operating System

Windows 11 Pro

JDK Version

Eclipse Adoptium 17.0.15+6

Payara Distribution

Payara Server Full Profile

Metadata

Metadata

Assignees

Labels

Status: OpenIssue has been triaged by the front-line engineers and is being worked on verificationType: BugLabel issue as a bug defect

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions