You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Y Ethan Guo (Jira)" <ji...@apache.org> on 2024/10/30 01:18:00 UTC

[jira] [Updated] (HUDI-8217) Mockito-inline has conflict with docker Image

     [ https://issues.apache.org/jira/browse/HUDI-8217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Y Ethan Guo updated HUDI-8217:
------------------------------
    Fix Version/s: 1.1.0

> Mockito-inline has conflict with docker Image
> ---------------------------------------------
>
>                 Key: HUDI-8217
>                 URL: https://issues.apache.org/jira/browse/HUDI-8217
>             Project: Apache Hudi
>          Issue Type: Bug
>            Reporter: Lin Liu
>            Assignee: Lin Liu
>            Priority: Major
>             Fix For: 1.1.0
>
>
> When Mockito-inline is added to `hudi-tests-common`, this library will be included to tests that run in our docker image in Azure CI, and the underlying library ByteBuddy will have conflicts with the docker image.
>  
> Currently solution is to avoid adding `mockito-inline` to `hudi-tests-common` to avoid the conflicts. But if some tests that run in docker image have to use mockito-inline, we will need to solve the problem.
>  
> {code:java}
> Caused by: java.lang.IllegalStateException: Failed to load interface org.mockito.plugins.MockMaker implementation declared in sun.misc.CompoundEnumeration@138f0661
> 	at org.mockito.internal.configuration.plugins.PluginInitializer.loadImpl(PluginInitializer.java:58)
> 	at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:69)
> 	at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
> 	at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:29)
> 	at org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:20)
> 	at org.mockito.internal.util.MockUtil.<clinit>(MockUtil.java:28)
> 	... 76 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> 	at org.mockito.internal.configuration.plugins.PluginInitializer.loadImpl(PluginInitializer.java:53)
> 	... 81 more
> Caused by: org.mockito.exceptions.base.MockitoInitializationException: 
> Could not initialize inline Byte Buddy mock maker.
> It appears as if your JDK does not supply a working agent attachment mechanism.
> Java               : 1.8
> JVM vendor name    : Temurin
> JVM vendor version : 25.402-b06
> JVM name           : OpenJDK 64-Bit Server VM
> JVM version        : 1.8.0_402-b06
> JVM info           : mixed mode
> OS name            : Linux
> OS version         : 6.8.0-1014-azure
>    at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.<init>(InlineDelegateByteBuddyMockMaker.java:246)
> 	at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.<init>(InlineByteBuddyMockMaker.java:25)
> 	... 86 more
> Caused by: java.lang.IllegalStateException: Error during attachment using: net.bytebuddy.agent.ByteBuddyAgent$AttachmentProvider$Compound@6459f4ea
> 	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:636)
> 	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:609)
> 	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:561)
> 	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:538)
> 	at org.mockito.internal.creation.bytebuddy.InlineDelegateByteBuddyMockMaker.<clinit>(InlineDelegateByteBuddyMockMaker.java:117)
> 	... 87 more
> Caused by: java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at net.bytebuddy.agent.Attacher.install(Attacher.java:106)
> 	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:631)
> 	... 91 more
> Caused by: java.lang.UnsatisfiedLinkError: Native Library /opt/java/openjdk/jre/lib/amd64/libattach.so already loaded in another classloader
> 	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1900)
> 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1838)
> 	at java.lang.Runtime.loadLibrary0(Runtime.java:843)
> 	at java.lang.System.loadLibrary(System.java:1136)
> 	at sun.tools.attach.LinuxVirtualMachine.<clinit>(LinuxVirtualMachine.java:343)
> 	at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
> 	at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
> 	... 97 more
>  {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)