Hello all,

Does anyone have experience of implementation of AOT/GraalVM by
following official documentation as below?
https://tomcat.apache.org/tomcat-9.0-doc/graal.html

I created a simple spring framework application(deployed as a war
file) which is working well under Tomcat10.x, GraalVM21 with JDK21.
Then I'm trying to transform the application into native image based
on the documentation.
I download the Tomcat Stuffed module and started to do packaging and building.
However, I encountered some issues by following the steps from the
documentation.

(1) Guidance is not so clear about following points:
Should I copy the deployed application(with or without war file?) from
existing Tomcat server webapps directory, to webapps directory of
$TOMCAT_STUFFED?
Should I copy all the files from conf directory of existing Tomcat
server, to conf directory of $TOMCAT_STUFFED?

(2) On the step of execution of "$JAVA_HOME/bin/java -Dcatalina.base=.
-Djava.util.logging.config.file=conf/logging.properties -jar
target/tomcat-stuffed-1.0.jar --catalina -generateCode src/main/java",
errors messages show as below:
...................................................
Can't load log handler "1catalina.org.apache.juli.AsyncFileHandler"
java.lang.ClassNotFoundException: 1catalina.org.apache.juli.AsyncFileHandler
java.lang.ClassNotFoundException: 1catalina.org.apache.juli.AsyncFileHandler
        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
...................................................

(3) When using JDK17, the first step of maven build failed with following error:
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile
(default-compile) on project tomcat-stuffed: Fatal error compiling:
error: release version 21 not supported.
After I switched to JDK21, build completed successfully. Is the
approach only support JDK21?

Please kindly provide any insights on this.
Thank you

Jun

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to