You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Lin Liu (Jira)" <ji...@apache.org> on 2024/09/19 16:36:00 UTC

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

Lin Liu created HUDI-8217:
-----------------------------

             Summary: 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


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}
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)