Skip to content
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

Incompatible with Eclipse Angus Mail 2 #8616

Closed
Brummolix opened this issue May 9, 2023 · 1 comment
Closed

Incompatible with Eclipse Angus Mail 2 #8616

Brummolix opened this issue May 9, 2023 · 1 comment

Comments

@Brummolix
Copy link

In what version(s) of Spring Integration are you seeing this issue?

6.0.0 but also 6.0.5

Describe the bug

org.springframework.integration.mail.ImapMailReceiver uses com.sun.mail.imap.IMAPFolder which is a implementation detail of the Jakarta Mail runtime.
When you use Spring integration in combination with Eclipse Angus Mail (which "is the direct successor of JavaMail/JakartaMail") with version 2 or above on the classpath it will not work.
Instead you get errors like:

java.lang.NoClassDefFoundError: com/sun/mail/imap/IMAPFolder

Angus Mail version 2 changes the "package name prefix from com.sun.mail to org.eclipse.angus.mail"

To Reproduce

see above or see example below

Expected behavior
spring integration should

  • either do not use any implementation details of the Jakarta Mail Runtime
  • or provide a version which is compatible with Eclipse Angus Mail 2 and above (use the new package names)
  • or provide a version which is compatible with Eclipse Angus Mail 1 and 2 (use either the old or the new package name, depending on what is available at runtime)

Sample

https://github.com/Brummolix/spring-integration-with-angus2

@Brummolix Brummolix added status: waiting-for-triage The issue need to be evaluated and its future decided type: bug labels May 9, 2023
@artembilan artembilan added this to the 6.2.x milestone May 9, 2023
@artembilan artembilan added type: enhancement in: mail and removed type: bug status: waiting-for-triage The issue need to be evaluated and its future decided labels May 9, 2023
@artembilan
Copy link
Member

Spring Portfolio of 6.0 generation wan never claimed to be compatible with Angus 2.0.
In fact it was release just recently January, when we had Spring Integration based on Angus 1.0 last Fall.

While they claim on their site to be compatible with Jakarta EE 10, in fact it is really a breaking change to rename packages within the same Jakarta base.

I really don't like a reflection kung-fu for such a critical code path around IMAPFolder.idle(true) call, so I only can suggest to stay with Angus 1.x and we will consider to upgrade to the latest 2.0.x in the next our minor version.
And that it exactly when Spring Boot 3.2 will bring us Angus Mail 2.0 dependency.

At least that's my feeling how we may deal with that breaking change.
More over we are already in a GA phase for current release train. Therefore we cannot introduce a breaking change anymore.

@artembilan artembilan modified the milestones: 6.2.x, 6.2.0-M1 Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants