question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build on s390x architecture- could not get native definition for type: POINTER: java.lang.UnsatisfiedLinkError

See original GitHub issue

Description

I’m using the plugin to build Docker images on x86_64, ppc64le & s390x architectures. Plugin is working fine on x86_64, ppc64le but is failing as following on s390x:

[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.29.0:build (build) on project ci.docker: Execution build of goal io.fabric8:docker-maven-plugin:0.29.0:build failed: An API incompatibility was encountered while executing io.fabric8:docker-maven-plugin:0.29.0:build: java.lang.UnsatisfiedLinkError: could not load FFI provider jnr.ffi.provider.jffi.Provider

[ERROR] : could not get native definition for type: POINTER: java.lang.UnsatisfiedLinkError: could not locate stub library in jar file. Tried [jni/s390x-Linux/libjffi-1.2.so, /jni/s390x-Linux/libjffi-1.2.so] [ERROR] at com.kenai.jffi.internal.StubLoader.getStubLibraryStream(StubLoader.java:412) [ERROR] at com.kenai.jffi.internal.StubLoader.loadFromJar(StubLoader.java:355) [ERROR] at com.kenai.jffi.internal.StubLoader.load(StubLoader.java:258) [ERROR] at com.kenai.jffi.internal.StubLoader.<clinit>(StubLoader.java:449) [ERROR] at java.lang.Class.forNameImpl(Native Method) [ERROR] at java.lang.Class.forName(Class.java:403) [ERROR] at com.kenai.jffi.Init.load(Init.java:68) [ERROR] at com.kenai.jffi.Foreign$InstanceHolder.getInstanceHolder(Foreign.java:49) [ERROR] at com.kenai.jffi.Foreign$InstanceHolder.<clinit>(Foreign.java:45) [ERROR] at com.kenai.jffi.Foreign.getInstance(Foreign.java:103) [ERROR] at com.kenai.jffi.Type$Builtin.lookupTypeInfo(Type.java:242) [ERROR] at com.kenai.jffi.Type$Builtin.getTypeInfo(Type.java:237) [ERROR] at com.kenai.jffi.Type.resolveSize(Type.java:155) [ERROR] at com.kenai.jffi.Type.size(Type.java:138) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime$TypeDelegate.size(NativeRuntime.java:178) [ERROR] at jnr.ffi.provider.AbstractRuntime.<init>(AbstractRuntime.java:48) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:57) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime.<init>(NativeRuntime.java:41) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime$SingletonHolder.<clinit>(NativeRuntime.java:53) [ERROR] at jnr.ffi.provider.jffi.NativeRuntime.getInstance(NativeRuntime.java:49) [ERROR] at jnr.ffi.provider.jffi.Provider.<init>(Provider.java:29) [ERROR] at java.lang.J9VMInternals.newInstanceImpl(Native Method) [ERROR] at java.lang.Class.newInstance(Class.java:1848) [ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.getInstance(FFIProvider.java:68) [ERROR] at jnr.ffi.provider.FFIProvider$SystemProviderSingletonHolder.<clinit>(FFIProvider.java:57) [ERROR] at jnr.ffi.provider.FFIProvider.getSystemProvider(FFIProvider.java:35) [ERROR] at jnr.ffi.LibraryLoader.create(LibraryLoader.java:73) [ERROR] at jnr.unixsocket.Native.<clinit>(Native.java:76) [ERROR] at jnr.unixsocket.UnixSocketChannel.<init>(UnixSocketChannel.java:101) [ERROR] at jnr.unixsocket.UnixSocketChannel.open(UnixSocketChannel.java:60) [ERROR] at io.fabric8.maven.docker.access.util.LocalSocketUtil.canConnectUnixSocket(LocalSocketUtil.java:38) [ERROR] at io.fabric8.maven.docker.access.DockerConnectionDetector$UnixSocketDockerHostProvider.getConnectionParameter(DockerConnectionDetector.java:109) [ERROR] at io.fabric8.maven.docker.access.DockerConnectionDetector.detectConnectionParameter(DockerConnectionDetector.java:78) [ERROR] at io.fabric8.maven.docker.service.DockerAccessFactory.createDockerAccess(DockerAccessFactory.java:34) [ERROR] at io.fabric8.maven.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:222) [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194) [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107) [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993) [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345) [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:191) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90) [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) [ERROR] at java.lang.reflect.Method.invoke(Method.java:508) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <goals> -rf :ci.docker

Info

  • d-m-p version : 0.29.0
  • Maven version (mvn -v) : 3.5.0
  • Tested on Xenial & Trusty Ubuntu (s390x arch) with libjffi-jni libjffi-java modules installed
  • JDK: IBM JDK8

  • Docker version : 18.06.3-ce
  • If it’s a bug, how to reproduce :
  • If it’s a feature request, what is your use case :
  • Sample project : [GitHub Clone URL] (private repository)

Thanks a lot, any help would be appreciated. (also tried the skip.docker.machine option without success)

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:7

github_iconTop GitHub Comments

1reaction
rhusscommented, Nov 16, 2021

@saschpe thanks for bringing this up. I’d propose to monitor https://github.com/jnr/jnr-unixsocket/issues/95 and soon as this is fixed and released, we can update the dependencies.

0reactions
saschpecommented, Nov 2, 2021

The same issue occurs on Apple M1 machines.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fabric8:docker-maven-plugin cannot load the ffi provider when ...
I get the following error [ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.31.0:build (default) on project reference-service: ...
Read more >
Maven + Mac M1 (aarch64) + Fabric8 docker-maven-plugin
ERROR] : could not get native definition for type `POINTER`, original error message follows: java.lang.UnsatisfiedLinkError: Unable to execute ...
Read more >
920588a1acdc4721abb713d816...
public static void initApplicationContextForNative() { - if (sApplicationContext == null) { - throw new RuntimeException("Cannot have native global ...
Read more >
other.xml.gz - Linux @ CERN
Build pycups with -fno-strict-aliasing compiler option to avoid compiler ... Fix "dereferencing type-punned pointer will break strict-aliasing rules" GCC ...
Read more >
z/OS Connect Enterprise Edition 3.0 - IBM
Defining your APIs with the z/OS Connect EE API toolkit. ... contain POINTER types, the import wizard does not tolerate POINTER types.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found