You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Fabrizio Fortino (Jira)" <ji...@apache.org> on 2021/01/20 14:36:00 UTC

[jira] [Commented] (OAK-9329) upgrade to mockito-core 3.7.7

    [ https://issues.apache.org/jira/browse/OAK-9329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17268610#comment-17268610 ] 

Fabrizio Fortino commented on OAK-9329:
---------------------------------------

The current version (3.3.3) does not work with Java 15.


{code:java}
[ERROR] defaultMode(org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticBulkProcessorHandlerTest)  Time elapsed: 0.085 s  <<< ERROR!
org.mockito.exceptions.base.MockitoException:
Mockito cannot mock this class: class org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexDefinition.
If you're not sure why you're getting this error, please report to the mailing list.
Java               : 15
JVM vendor name    : Azul Systems, Inc.
JVM vendor version : 15.0.1+9
JVM name           : OpenJDK 64-Bit Server VM
JVM version        : 15.0.1+9
JVM info           : mixed mode, sharing
OS name            : Mac OS X
OS version         : 10.14.1
You are seeing this disclaimer because Mockito is configured to create inlined mocks.
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.
Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [class java.lang.Object, interface org.apache.jackrabbit.oak.plugins.index.search.Aggregate$AggregateMapper, class org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexDefinition, class org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition]
	at org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticBulkProcessorHandlerTest.setUp(ElasticBulkProcessorHandlerTest.java:58)
Caused by: org.mockito.exceptions.base.MockitoException: Could not modify all classes [class java.lang.Object, interface org.apache.jackrabbit.oak.plugins.index.search.Aggregate$AggregateMapper, class org.apache.jackrabbit.oak.plugins.index.elastic.ElasticIndexDefinition, class org.apache.jackrabbit.oak.plugins.index.search.IndexDefinition]
	at org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticBulkProcessorHandlerTest.setUp(ElasticBulkProcessorHandlerTest.java:58)
Caused by: java.lang.IllegalStateException:
Byte Buddy could not instrument all classes within the mock's type hierarchy
This problem should never occur for javac-compiled classes. This problem has been observed for classes that are:
 - Compiled by older versions of scalac
 - Classes that are part of the Android distribution
	at org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticBulkProcessorHandlerTest.setUp(ElasticBulkProcessorHandlerTest.java:58)
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 59
	at org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticBulkProcessorHandlerTest.setUp(ElasticBulkProcessorHandlerTest.java:58)
  [ERROR] closeBulkProcessor(org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexWriterTest)  Time elapsed: 0.038 s  <<< ERROR!
  org.mockito.exceptions.base.MockitoException:
  Mockito cannot mock this class: class org.apache.jackrabbit.oak.plugins.index.elastic.ElasticConnection.
  If you're not sure why you're getting this error, please report to the mailing list.
  Java               : 15
  JVM vendor name    : Azul Systems, Inc.
  JVM vendor version : 15.0.1+9
  JVM name           : OpenJDK 64-Bit Server VM
  JVM version        : 15.0.1+9
  JVM info           : mixed mode, sharing
  OS name            : Mac OS X
  OS version         : 10.14.1
  You are seeing this disclaimer because Mockito is configured to create inlined mocks.
  You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc.
  Underlying exception : org.mockito.exceptions.base.MockitoException: Could not modify all classes [class java.lang.Object, class org.apache.jackrabbit.oak.plugins.index.elastic.ElasticConnection, interface java.io.Closeable, interface java.lang.AutoCloseable]
  	at org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexWriterTest.setUp(ElasticIndexWriterTest.java:56)
  Caused by: org.mockito.exceptions.base.MockitoException: Could not modify all classes [class java.lang.Object, class org.apache.jackrabbit.oak.plugins.index.elastic.ElasticConnection, interface java.io.Closeable, interface java.lang.AutoCloseable]
  	at org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexWriterTest.setUp(ElasticIndexWriterTest.java:56)
  Caused by: java.lang.IllegalStateException:
  Byte Buddy could not instrument all classes within the mock's type hierarchy
  This problem should never occur for javac-compiled classes. This problem has been observed for classes that are:
   - Compiled by older versions of scalac
   - Classes that are part of the Android distribution
  	at org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexWriterTest.setUp(ElasticIndexWriterTest.java:56)
  Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 59
  	at org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticIndexWriterTest.setUp(ElasticIndexWriterTest.java:56)
{code}


> upgrade to mockito-core 3.7.7
> -----------------------------
>
>                 Key: OAK-9329
>                 URL: https://issues.apache.org/jira/browse/OAK-9329
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: parent
>            Reporter: Fabrizio Fortino
>            Assignee: Fabrizio Fortino
>            Priority: Major
>             Fix For: 1.36.0
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)