OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.15k stars 590 forks source link

JavaMail Session Logs Warning for Missing javamail.default.address.map #25018

Open gcw-it opened 1 year ago

gcw-it commented 1 year ago

Describe the bug
When injecting a jakarta.mail.Session resource the following warning is logged:

expected resource not found: /META-INF/javamail.default.address.map

Steps to Reproduce
Simply injecting

@Resource(name = "mail/mailSession")
private Session mailSession;

in a REST resource and calling any endpoint, e.g.:

@POST
@Path("mail")
public Response sendMail() {
    return Response.accepted().build();
}

causes the warning to be logged;

Expected behavior
No warning is logged.

Diagnostic information:

Additional context
Maybe related to issue #17666

neuwerk commented 1 year ago

@gcw-it thank you for opening this issue, and providing some great background information! I'm currently working a fix for this #24912 which is nearly ready to go. It should clear these warnings in both Jakarta EE 9 and Jakarta EE 10. The fix should make it into the 23.0.0.5 release.