Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Application with MySQL db access throws Exception when sending POST Request #426

Closed
marpleg opened this issue Dec 22, 2020 · 1 comment
Closed
Labels
type: compatibility Native image compatibility issue

Comments

@marpleg
Copy link

marpleg commented Dec 22, 2020

Hi, I just tried spinning up my Spring Boot Application, which connects to a MYSQL database. The Native Image Build succeeds with spring-graalvm-native 0.8.5 with graalvm 20.3.0, but when running the application and trying a POST request it throws the following:

Dec 22, 2020 3:16:49 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Handler dispatch failed; nested exception is com.oracle.svm.core.jdk.UnsupportedFeatureError: ObjectOutputStream.writeObject()] with root cause
com.oracle.svm.core.jdk.UnsupportedFeatureError: ObjectOutputStream.writeObject()

The Stacktrace goes on afterwards.

Am I missing some reflect configurations or is it a compatibility issue?

The buildArgs in my graal profile are:
-Dspring.graal.remove-unused-autoconfig=true
--enable-all-security-services
-H:EnableURLProtocols=http
--no-fallback --allow-incomplete-classpath
--report-unsupported-elements-at-runtime
-H:+ReportExceptionStackTraces
-H:ReflectionConfigurationFiles=../src/main/resources/reflect.json
--initialize-at-build-time=org.springframework.core.SpringProperties
--initialize-at-build-time=org.springframework.boot.validation.MessageInterpolatorFactory 
--initialize-at-build-time=org.springframework.boot.logging.LoggingSystemFactory
 --initialize-at-build-time=org.hibernate.internal.util.ReflectHelper

Let me know if you need more details.

@sdeleuze
Copy link
Contributor

sdeleuze commented Jan 5, 2021

That probably relates to oracle/graal#460 and should be fixed as part of GraalVM 21.0.0.

@sdeleuze sdeleuze closed this as completed Jan 5, 2021
@sdeleuze sdeleuze added the type: compatibility Native image compatibility issue label Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: compatibility Native image compatibility issue
Development

No branches or pull requests

2 participants