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

Tomcat-jdbc causes problem with graalvm #722

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

MartinLei
Copy link

@MartinLei MartinLei commented Apr 19, 2024

Using the Tomcat-JDBC library inside a Spring Native project causes the compilation step of a GraalVM native image to crash with the given error.

Exception in thread "main" org.springframework.boot.context.properties.bind.MissingParametersCompilerArgumentException: Constructor binding in a native image requires compilation with -parameters but the following classes were compiled without it:
org.apache.tomcat.jdbc.pool.PoolProperties$InterceptorProperty

See this little demo project to reproduce the problem.

It seems this error could be easily fixed by adding the -params flag at the compile step, as suggested by the error.

Used Version:
JDK GrallVM 21.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant