Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to create native image for Spring Boot application #1476

Closed
4ntoine opened this issue Jul 6, 2019 · 5 comments
Closed

Failed to create native image for Spring Boot application #1476

4ntoine opened this issue Jul 6, 2019 · 5 comments
Assignees

Comments

@4ntoine
Copy link

4ntoine commented Jul 6, 2019

Hey, guys.

I've tried to build native image for a simple Spring Boot application using just released 19.1.0-ce:
https://github.com/4ntoine/NotesServerApp

During building i've got an exception:

$~/Documents/dev/src/graalvm-ce-19.1.0/Contents/Home/bin/native-image  -jar app-1.0.jar 
Build on Server(pid: 68849, port: 64448)
[app-1.0:68849]    classlist:     217.36 ms
[app-1.0:68849]        (cap):   1,125.84 ms
[app-1.0:68849]        setup:   6,511.03 ms
[app-1.0:68849]     analysis:   4,591.06 ms
Warning: Aborting stand-alone image build. com.oracle.svm.hosted.substitute.DeletedElementException: Unsupported field java.net.URL.handlers is reachable
To diagnose the issue, you can add the option --report-unsupported-elements-at-runtime. The unsupported element is then reported at run time when it is accessed the first time.
Detailed message:
Trace: 
	at parsing java.net.URL.setURLStreamHandlerFactory(URL.java:1118)
Call path from entry point to java.net.URL.setURLStreamHandlerFactory(URLStreamHandlerFactory): 
	at java.net.URL.setURLStreamHandlerFactory(URL.java:1110)
	at org.springframework.boot.loader.jar.JarFile.resetCachedUrlHandlers(JarFile.java:401)
	at org.springframework.boot.loader.jar.JarFile.registerUrlProtocolHandler(JarFile.java:391)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:48)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
	at com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:147)
	at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)

Warning: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Build on Server(pid: 68849, port: 64448)
[app-1.0:68849]    classlist:     164.22 ms
[app-1.0:68849]        (cap):     962.05 ms
[app-1.0:68849]        setup:   6,264.28 ms
[app-1.0:68849]   (typeflow):   1,647.69 ms
[app-1.0:68849]    (objects):   1,486.86 ms
[app-1.0:68849]   (features):     262.92 ms
[app-1.0:68849]     analysis:  18,466.57 ms
[app-1.0:68849]     (clinit):      81.82 ms
[app-1.0:68849]     universe:   5,271.27 ms
[app-1.0:68849]      (parse):     425.51 ms
[app-1.0:68849]     (inline):     752.25 ms
[app-1.0:68849]    (compile):   2,876.59 ms
[app-1.0:68849]      compile:  19,305.67 ms
[app-1.0:68849]        image:     300.65 ms
[app-1.0:68849]        write:     154.20 ms
[app-1.0:68849]      [total]:  85,020.63 ms
Warning: Image 'app-1.0' is a fallback image that requires a JDK for execution (use --no-fallback to suppress fallback image generation).

After quick googling i've found few 1 year-old issues #348 and #405. Since the output looks similar but a bit different, i wonder if it's the same issue or not. Feel free to mark as duplicate jic.

@4ntoine
Copy link
Author

4ntoine commented Jul 6, 2019

Let me know if i can assist you in any way.

@4ntoine
Copy link
Author

4ntoine commented Jul 6, 2019

As far as i understand this was meant to be merged into 19.1.0: https://github.com/aclement/spring-boot-graal-feature

@UFOXD
Copy link

UFOXD commented Jul 7, 2019

I do the same. Image needs a JDK to run !

@cstancu cstancu self-assigned this Jul 16, 2019
@sdeleuze
Copy link
Collaborator

sdeleuze commented Oct 1, 2019

Since Spring native image is WIP and already works for various Spring Boot projects via @aclement project, I think this issue can be closed.

@cstancu
Copy link
Member

cstancu commented Oct 1, 2019

@sdeleuze thanks for the update, I'll close this issue.

@cstancu cstancu closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants