micronaut-projects / micronaut-core

Micronaut Application Framework
http://micronaut.io
Apache License 2.0
6k stars 1.04k forks source link

Error generating native-image with graalvm rc11 with redis #1136

Open karlazzam opened 5 years ago

karlazzam commented 5 years ago

Task List

Steps to Reproduce

  1. mn create-app com.micronaut.poc --build maven --features=graal-native-image
  2. add this dependency to the pom file
    <dependency>
      <groupId>io.micronaut.configuration</groupId>
      <artifactId>micronaut-redis-lettuce</artifactId>
      <scope>compile</scope>
    </dependency>
  3. Modify the docker file to add the --allow-incomplete-classpath \ flag https://github.com/karlazzam/graalvm-redis-issue/blob/master/Dockerfile#L16
  4. run the docker-build.sh script which has these two instructions
    ./mvnw package
    docker build . -t poc

    https://github.com/karlazzam/graalvm-redis-issue/blob/master/docker-build.sh#L1-L2

    Expected Behaviour

    Should build the docker image.

Actual Behaviour

Throws this error Caused by: java.lang.NoClassDefFoundError: org/HdrHistogram/Histogram more here: https://github.com/karlazzam/graalvm-redis-issue/blob/master/errorstacktrace.txt

Environment Information

Example Application

ilopmar commented 5 years ago

Tried with latest version and open a Graal issue: https://github.com/oracle/graal/issues/1036