-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning message when creating Session instance #25
Comments
@jbescos Looks like PR from jakartaee/mail-api#599 would have to be ported to Angus Mail. |
@jmehrens I think the fix is correctly placed in mail-api. If I recall, the issue was that mail-api module is trying to access angus-mail module, but mail-api module has no access to it. Then, the fix is about loading that resource from an angus-mail class (the stream provider implementation). I developed that fix some time ago and I don't remember all the details. @niabot are you able to test it with the attached jar (that contains the fix jakartaee/mail-api#599) and let us know if you still see the warning, please?. |
I was having same error. Tested attached jar and no error. However, IMAP is not being checked correctly but that is another issue. |
Thank you @PeteSL , your test confirms this PR jakartaee/mail-api#599 works. For the other IMAP issue that you have, you can open a new issue and we will take a look. |
I believe this is fixed |
Describe the bug
When creating a
jakarta.mail.Session
instance withSession.getInstance(...)
the following warning is logged:Looking inside the angus-mail-1.0.0.jar i see that the file
/META-INF/javamail.default.address.map
is present withrfc822=smtp
as the content, but it isn't found.The reason is that
jakarta.mail.Session
uses the passedAuthenticator
class instance or it's own class instance to lookup the resources. If i pass my own authenticator instance, then it searches within my own module, but not incom.sun.mail
. If i passnull
as the authenticator, then it searches inside the modulejakarta.mail
. Either way the resource is not found.If i place
/META-INF/javamail.default.address.map
in my own module, the resource is found and no warning is logged.Normal usage of the Session instance is not affected.
To Reproduce
Create a Session instance with Session.getInstance(props) or Session.getInstance(props, authenticator) within an own module and the warning message should be logged.
Expected behavior
No warning message should be logged.
The text was updated successfully, but these errors were encountered: