You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Andreas Beeker <ki...@apache.org> on 2018/08/22 20:24:51 UTC

JAXB error in OpenJDK 10

Hi,

we seem to have a problem with JAXB in Java 9+.

I'm currently working on something else (OPOIFS removal) and I don't want to keep this info
longer unnoticed, so maybe someone else has time to validate/verify.

Andi


Le 26/07/2018 à 23:32, Andreas Beeker a écrit :

> Actually I would like to fix this before POI 4.0.0 gets out ... it will take another few months
> until we release 4.0.x.

I tried building POI 4.0 with OpenJDK 10.0.2 and I got some JAXB related
errors. I don't know if this error is already known to POI developers.
JAXB is not on the default classpath since Java 9, and it'll be
completely removed in Java 11. I added the following jars in the
lib directory and modified the classpath in build.xml to suppress
the errors:

lib/activation-1.1.1.jar
lib/jaxb-api-2.3.0.jar
lib/jaxb-core-2.3.0.1.jar
lib/jaxb-runtime-2.3.0.1.jar
lib/istack-commons-runtime-3.0.5.jar

Unfortunately I hit a test failure after that, I'm not sure
to understand what is causing it:

org.junit.ComparisonFailure: format "dddd-mmmm-yyyy" expected:<"Sat[urday-October]-1952"> but was:<"Sat[-Oct]-1952">
at org.junit.Assert.assertEquals(Assert.java:115)
at org.apache.poi.ss.format.CellFormatTestBase$CellValue.equivalent(CellFormatTestBase.java:94)
at org.apache.poi.ss.format.CellFormatTestBase.tryColor(CellFormatTestBase.java:246)
at org.apache.poi.ss.format.CellFormatTestBase.tryFormat(CellFormatTestBase.java:220)
at org.apache.poi.ss.format.CellFormatTestBase.runFormatTests(CellFormatTestBase.java:128)
at org.apache.poi.ss.format.TestCellFormatPart.testDateFormat(TestCellFormatPart.java:109)


Re: JAXB error in OpenJDK 10

Posted by Dominik Stadler <do...@gmx.at>.
Hi,

I have now updated the code to fetch JAXB via normal dependencies and thus
we do not rely any more on the JDK to provide it. This makes JDK 11 tests
actually succeed now with two minor changes to some tests.

I also saw the error about "expected:<"Sat[urday-October]-1952"> but
was:<"Sat[-Oct]-1952">" locally, but the CI runs on Jenkins succeed, not
sure what the difference is here, for JDK 11 there have been some related
problems introduced in recent ea-builds which are fixed in the next
ea-build, I'll revisit this then.

Dominik.


On Thu, Aug 23, 2018 at 10:41 AM, Dominik Stadler <do...@gmx.at>
wrote:

> For JDK 9 and JDK 10 we can use the --add-modules/--add-opens to
> compile/run, see https://poi.apache.org/help/faq.html#faq-N102B0 for
> details.
>
> I saw failures when trying JDK 11 because the code is now gone completely.
> I have changes prepared locally to add JAXB as normal classpath
> dependencies, however JDK 11 still has some other known bugs that cause
> failures in our test, see https://bugs.java.com/
> bugdatabase/view_bug.do?bug_id=JDK-8209682 so I did not push them yet,
> however I can try to commit them during the next few days if we think it is
> something that we want to include in 4.0.0. This will include jaxb via
> classpath for all versions of the JDK to have one build for all JDKs and
> thus will also make building/running on JDK 9/10 a bit easier.
>
> Dominik.
>
> On Thu, Aug 23, 2018 at 12:38 AM pj.fanning <fa...@yahoo.com> wrote:
>
>> Hi Andi,
>>
>> Would you be able to put the jaxb build changes in a patch file or in a
>> github branch?
>>
>>
>>
>> --
>> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
>> For additional commands, e-mail: dev-help@poi.apache.org
>>
>>

Re: JAXB error in OpenJDK 10

Posted by Dominik Stadler <do...@gmx.at>.
For JDK 9 and JDK 10 we can use the --add-modules/--add-opens to
compile/run, see https://poi.apache.org/help/faq.html#faq-N102B0 for
details.

I saw failures when trying JDK 11 because the code is now gone completely.
I have changes prepared locally to add JAXB as normal classpath
dependencies, however JDK 11 still has some other known bugs that cause
failures in our test, see
https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8209682 so I did
not push them yet, however I can try to commit them during the next few
days if we think it is something that we want to include in 4.0.0. This
will include jaxb via classpath for all versions of the JDK to have one
build for all JDKs and thus will also make building/running on JDK 9/10 a
bit easier.

Dominik.

On Thu, Aug 23, 2018 at 12:38 AM pj.fanning <fa...@yahoo.com> wrote:

> Hi Andi,
>
> Would you be able to put the jaxb build changes in a patch file or in a
> github branch?
>
>
>
> --
> Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>

Re: JAXB error in OpenJDK 10

Posted by "pj.fanning" <fa...@yahoo.com>.
Hi Andi,

Would you be able to put the jaxb build changes in a patch file or in a
github branch?



--
Sent from: http://apache-poi.1045710.n5.nabble.com/POI-Dev-f2312866.html

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org