You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Vladislav Galas <ga...@apache.org> on 2019/01/06 11:42:44 UTC
mockito problem
Error Message
Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
Stacktrace
java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
..
Caused by: java.lang.NoSuchMethodError: net.bytebuddy.dynamic.loading.ClassInjector$UsingLookup.isAvailable()Z
May it be that the used versions mockito-core-2.21.0 and byte-buddy-1.7.9 are outdated and don't support java 11?
How do I configure build so that I can reproduce the error locally?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: mockito problem
Posted by Vladislav Galas <ga...@apache.org>.
Thanks Dominik but I develop on Windows :)
Updating Mockito and Bytebuddy seems to have fixed the problem.
However, I couldn't manage to build the project with Oracle JDK 11 @ Windows 10 x64.
I disabled failing tests (mostly ones with hssf file re-write operations and something in poifs) and then the project got built. This is the way I verified that updating mockito helps.
I'm new to ant, so it took me long.
Sorry to have broken the build.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: mockito problem
Posted by Dominik Stadler <do...@gmx.at>.
Hi,
I would start by running a normal build/test with JAVA_HOME and PATH
pointing to Java 11, I usually use the following to run tests against Java
11. You can also try to run the test with Java 11 via configuring the
run-configuration in your IDE.
Dominik.
. setJava11.sh
export FORREST_HOME=/opt/apache/forrest/apache-forrest-0.9
# requires Ant >= 1.9.5 due to
https://bz.apache.org/bugzilla/show_bug.cgi?id=58271
export ANT_HOME=/opt/apache/apache-ant/apache-ant-1.9.7
export PATH=$ANT_HOME/bin:$PATH
export ANT_OPTS="-Xmx1524m -XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=. --illegal-access=deny"
nice -n 19 ant \
-Duser.language=en \
-Duser.country=US \
-Djava9addopens1=--illegal-access=deny \
-Djava9addopens2=--add-opens=java.base/java.io=ALL-UNNAMED \
-Djava9addopens3=--add-opens=java.base/java.nio=ALL-UNNAMED \
-Djava9addopens4=--add-opens=java.base/java.lang=ALL-UNNAMED \
-Djava9addopens5=--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED \
-Djava.locale.providers=JRE,CLDR \
-Dcoverage.enabled=true \
-Dfile.leak.detector=-Dthis.is.a.dummy=true \
-Dorg.apache.poi.util.POILogger=org.apache.poi.util.NullLogger \
-Dhalt.on.test.failure=false \
On Sun, Jan 6, 2019 at 12:42 PM Vladislav Galas <ga...@apache.org> wrote:
> Error Message
> Could not initialize plugin: interface org.mockito.plugins.MockMaker
> (alternate: null)
> Stacktrace
> java.lang.IllegalStateException: Could not initialize plugin: interface
> org.mockito.plugins.MockMaker (alternate: null)
> ..
> Caused by: java.lang.NoSuchMethodError:
> net.bytebuddy.dynamic.loading.ClassInjector$UsingLookup.isAvailable()Z
>
> May it be that the used versions mockito-core-2.21.0 and byte-buddy-1.7.9
> are outdated and don't support java 11?
>
> How do I configure build so that I can reproduce the error locally?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
>
>