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

Tests fail on Java 11 #184

Closed
sideeffffect opened this issue Apr 2, 2021 · 5 comments
Closed

Tests fail on Java 11 #184

sideeffffect opened this issue Apr 2, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@sideeffffect
Copy link
Collaborator

It seems like tests fail on Java 11.
Try adding adopt@1.11 to the .github/workflows/ci.yml matrix. Possibly even adopt@1.16 to test on the newest version of Java.

[info] - insert complete mail *** FAILED ***
[info]   ClassCastException: class com.sun.mail.handlers.text_plain cannot be cast to class javax.activation.DataContentHandler (com.sun.mail.handlers.text_plain is in unnamed module of loader sbt.internal.LayeredClassLoader @4d924b5f; javax.activation.DataContentHandler is in unnamed module of loader sbt.internal.LayeredClassLoader @795978fc)
[info]     javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:601)
[info]     javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:555)
[info]     javax.activation.DataHandler.getDataContentHandler(DataHandler.java:600)
[info]     javax.activation.DataHandler.writeTo(DataHandler.java:299)
[info]     javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:316)
[info]     javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1551)
[info]     javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1148)
[info]     javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:498)
[info]     javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1509)
[info]     javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1148)
[info]     javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:498)
[info]     javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1509)
[info]     javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2247)
[info]     javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2207)
[info]     emil.javamail.conv.BasicEncode.assemble$1(BasicEncode.scala:148)
[info]     emil.javamail.conv.BasicEncode.$anonfun$mailEncode$10(BasicEncode.scala:156)
[info]     map @ emil.javamail.conv.BasicEncode.$anonfun$bodyEncode$4(BasicEncode.scala:83)
[info]     flatMap @ emil.javamail.conv.BasicEncode.$anonfun$bodyEncode$1(BasicEncode.scala:82)
[info]     map @ emil.javamail.conv.BasicEncode.$anonfun$mailEncode$9(BasicEncode.scala:154)
[info]     map @ emil.javamail.conv.BasicEncode.$anonfun$mailEncode$9(BasicEncode.scala:154)
[info]     map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:246)
[info]     flatMap @ fs2.internal.CompileScope.$anonfun$close$6(CompileScope.scala:245)
[info]     map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:222)
[info]     flatMap @ fs2.internal.CompileScope.$anonfun$close$4(CompileScope.scala:244)
[info]     map @ fs2.internal.CompileScope.fs2$internal$CompileScope$$traverseError(CompileScope.scala:222)
[info]     flatMap @ fs2.internal.CompileScope.$anonfun$close$2(CompileScope.scala:242)
[info]     flatMap @ fs2.internal.CompileScope.close(CompileScope.scala:241)
[info]     rethrow$extension @ fs2.Stream$Compiler$.$anonfun$compile$2(Stream.scala:4220)
[info]     flatMap @ fs2.internal.CompileScope.$anonfun$openAncestor$2(CompileScope.scala:261)
[info]     flatMap @ fs2.internal.FreeC$.$anonfun$compile$17(Algebra.scala:545)
[info]     map @ fs2.internal.CompileScope.$anonfun$close$9(CompileScope.scala:246)
@eikek
Copy link
Owner

eikek commented Apr 2, 2021

That's interesting; can't reproduce it with openjdk11.

@sideeffffect
Copy link
Collaborator Author

Maybe if tried to re-run in?? Could you open a PR that adds Java 11 and 16 to the matrix?

@eikek
Copy link
Owner

eikek commented Apr 2, 2021

Maybe if tried to re-run in??

Oops, correct! Running +test again without reloading sbt triggers this 😮

Could you open a PR that adds Java 11 and 16 to the matrix?

Yes, I'm going to have a deeper look on all of this later. Then I will add more jdks to the matrix.

@eikek eikek added the bug Something isn't working label Apr 2, 2021
@eikek
Copy link
Owner

eikek commented Apr 6, 2021

A strange thing. Since upgrade to jakarta mail 2.0.1, I can't reproduce it on my machine. Travis ci is also fine. But on github actions, it is triggered for jdk11 and sometimes for jdk8.

@eikek
Copy link
Owner

eikek commented Apr 6, 2021

Fixed by #188

Another try could be to use sbt's ClassLoaderLayeringStrategy.Flat for javamail tests.

@eikek eikek closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants