Giter Site home page Giter Site logo

spring-tips / spring-and-graal-part-2 Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 1.0 98 KB

Hi Spring fans! In this installment we revisit using Graal to build native images with Spring. Things have gotten even easier.

License: Apache License 2.0

Shell 16.61% Java 83.39%

spring-and-graal-part-2's Introduction

spring-and-graal-part-2

Hi Spring fans! In this installment we revisit using Graal to build native images with Spring. Things have gotten even easier.

spring-and-graal-part-2's People

Contributors

joshlong avatar

Stargazers

 avatar Thor avatar

Watchers

 avatar James Cloos avatar Mingyuan Wu avatar  avatar

Forkers

ghifar

spring-and-graal-part-2's Issues

Unable to create native image using Java 11

Im using the compile.sh script to create a native image for "jpa" artifact but I cant create a native image using java 11. Below is my setup details and the errors

# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.2 LTS
Release:	18.04
Codename:	bionic
# java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02)
OpenJDK 64-Bit Server VM GraalVM CE 20.1.0 (build 11.0.7+10-jvmci-20.1-b02, mixed mode, sharing)
# native-image --version
GraalVM Version 20.1.0 (Java Version 11.0.7)
WARNING GR-10238: VarHandle for static field is currently not fully supported. Static field private static volatile java.lang.System$Logger jdk.internal.event.EventHelper.securityLogger is not properly marked for Unsafe access!
[spring-boot-graalvm:7111]     (clinit):   3,189.89 ms,  5.39 GB
[spring-boot-graalvm:7111]   (typeflow):  90,467.28 ms,  5.39 GB
[spring-boot-graalvm:7111]    (objects): 113,131.77 ms,  5.39 GB
[spring-boot-graalvm:7111]   (features):  23,402.76 ms,  5.39 GB
[spring-boot-graalvm:7111]     analysis: 234,764.30 ms,  5.39 GB
[spring-boot-graalvm:7111]     universe:   8,485.35 ms,  5.39 GB
Error: Image build request failed with exit status 137
com.oracle.svm.driver.NativeImage$NativeImageError: Image build request failed with exit status 137
	at com.oracle.svm.driver.NativeImage.showError(NativeImage.java:1541)
	at com.oracle.svm.driver.NativeImage.build(NativeImage.java:1299)
	at com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1260)
	at com.oracle.svm.driver.NativeImage.main(NativeImage.java:1219)
	at com.oracle.svm.driver.NativeImage$JDK9Plus.main(NativeImage.java:1722)

real	4m45.168s
user	17m16.383s
sys	0m34.748s

Error: Classes that should be initialized at run time got initialized during image building

I'm getting I'm getting the following error when I ran the compile script.

Error: Classes that should be initialized at run time got initialized during image building:
 java.sql.DriverManager was unintentionally initialized at build time. To see why java.sql.DriverManager got initialized use -H:+TraceClassInitialization

I'm using OS: Ubuntu-20.04
GraalVM: 20.2.0.r8 (Java8)

Complete error log is available in error.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.