Skip to content

Incompatible with Eclipse Angus Mail 2 #8616

@Brummolix

Description

@Brummolix

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions