You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Tim Allison (Jira)" <mi...@james.apache.org> on 2021/12/01 18:07:00 UTC

[jira] [Created] (MIME4J-313) Release artifact for 0.8.6 is built with java > 8 and breaks when run with java 8

Tim Allison created MIME4J-313:
----------------------------------

             Summary: Release artifact for 0.8.6 is built with java > 8 and breaks when run with java 8
                 Key: MIME4J-313
                 URL: https://issues.apache.org/jira/browse/MIME4J-313
             Project: James Mime4j
          Issue Type: Bug
            Reporter: Tim Allison


When I tried to upgrade to 0.8.6 over on Apache Tika, I noticed that the release artifacts are built with Java 11.  The maven compiler plugin does specify a {{target}} which works for JDK 8, but it does not specify {{release}}, which is required when building with >= JDK9.

PR incoming...


When I try to run Tika with 0.8.6, I get: 
{noformat}
java -jar tika-app/target/tika-app-2.1.1-SNAPSHOT.jar tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-mail-module/src/test/resources/test-documents/testRFC822_eml
Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;
	at org.apache.james.mime4j.io.TextInputStream.<init>(TextInputStream.java:49)
	at org.apache.james.mime4j.io.InputStreams.createAscii(InputStreams.java:70)
	at org.apache.james.mime4j.codec.DecoderUtil.decodeQuotedPrintable(DecoderUtil.java:46)
	at org.apache.james.mime4j.codec.DecoderUtil.decodeQ(DecoderUtil.java:121)
	at org.apache.james.mime4j.codec.DecoderUtil.tryDecodeEncodedWord(DecoderUtil.java:268)
	at org.apache.james.mime4j.codec.DecoderUtil.decodeEncodedWords(DecoderUtil.java:231)
	at org.apache.james.mime4j.codec.DecoderUtil.decodeEncodedWords(DecoderUtil.java:140)
	at org.apache.james.mime4j.field.address.LenientAddressParser.createMailbox(LenientAddressParser.java:132)
	at org.apache.james.mime4j.field.address.LenientAddressParser.parseMailboxAddress(LenientAddressParser.java:182)
	at org.apache.james.mime4j.field.address.LenientAddressParser.parseAddress(LenientAddressParser.java:282)
	at org.apache.james.mime4j.field.address.LenientAddressParser.parseAddressList(LenientAddressParser.java:319)
	at org.apache.james.mime4j.field.MailboxListFieldLenientImpl.parse(MailboxListFieldLenientImpl.java:71)
	at org.apache.james.mime4j.field.MailboxListFieldLenientImpl.getMailboxList(MailboxListFieldLenientImpl.java:51)
	at org.apache.tika.parser.mail.MailContentHandler.field(MailContentHandler.java:388)
	at org.apache.james.mime4j.parser.MimeStreamParser.parse(MimeStreamParser.java:153)
	at org.apache.tika.parser.mail.RFC822Parser.parse(RFC822Parser.java:98)

{noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)