This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new dc75509 Update command lines and reflection dc75509 is described below commit dc75509eb87daa43413ca116fb79a23fac9b5dbb Author: remm <r...@apache.org> AuthorDate: Fri Jul 5 15:23:03 2019 +0200 Update command lines and reflection The Jasper static initializer is a problem. Bean info access and manipulation in JspRuntimeLibrary seems a bit too much compared to what Graal can do at the moment, so jsp:setProperty is. --- res/tomcat-maven/README.md | 4 ++-- res/tomcat-maven/tomcat-reflection.json | 18 +++++------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/res/tomcat-maven/README.md b/res/tomcat-maven/README.md index 170939a..f0448d7 100644 --- a/res/tomcat-maven/README.md +++ b/res/tomcat-maven/README.md @@ -94,7 +94,7 @@ in `/WEB-INF/classes` and `/WEB-INF/lib`, must be included as part of the tomcat Run Tomcat with the agent in full trace mode. ``` cd $TOMCAT_MAVEN -$JAVA_HOME/bin/java -agentlib:native-image-agent=trace-output=$TOMCAT_MAVEN/target/trace-file.json -jar target/tomcat-maven-1.0.jar +$JAVA_HOME/bin/java -agentlib:native-image-agent=trace-output=$TOMCAT_MAVEN/target/trace-file.json -Dcatalina.base=. -Djava.util.logging.config.file=conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -jar target/tomcat-maven-1.0.jar ``` Then exercise necessary paths of your service with the Tomcat configuration. Any changes to the Tomcat configuration requires running the substrate VM with the agent again. @@ -102,6 +102,6 @@ the substrate VM with the agent again. Generate the final json files using native-image-configuration then use native image using the generated reflection metadata: ``` $JAVA_HOME/bin/native-image-configure generate --trace-input=$TOMCAT_MAVEN/target/trace-file.json --output-dir=$TOMCAT_MAVEN/target -$JAVA_HOME/bin/native-image --allow-incomplete-classpath -H:+ReportUnsupportedElementsAtRuntime -H:EnableURLProtocols=jar -H:ConfigurationFileDirectories=$TOMCAT_MAVEN/target/ -H:ReflectionConfigurationFiles=$TOMCAT_MAVEN/tomcat-reflection.json -H:ResourceConfigurationFiles=$TOMCAT_MAVEN/tomcat-resource.json -H:ResourceConfigurationFiles=$TOMCAT_MAVEN/tomcat-resource.json -jar $TOMCAT_MAVEN/target/tomcat-maven-1.0.jar +$JAVA_HOME/bin/native-image --no-server --allow-incomplete-classpath --initialize-at-build-time=org.eclipse.jdt,org.apache.el.parser.SimpleNode,javax.servlet.jsp.JspFactory,org.apache.jasper.servlet.JasperInitializer,org.apache.jasper.runtime.JspFactoryImpl -H:+ReportUnsupportedElementsAtRuntime -H:+ReportExceptionStackTraces -H:EnableURLProtocols=jar -H:ConfigurationFileDirectories=$TOMCAT_MAVEN/target/ -H:ReflectionConfigurationFiles=$TOMCAT_MAVEN/tomcat-reflection.json -H:ResourceConf [...] ./tomcat-maven-1.0 -Dcatalina.base=. -Djava.util.logging.config.file=conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager ``` diff --git a/res/tomcat-maven/tomcat-reflection.json b/res/tomcat-maven/tomcat-reflection.json index 9d799d3..8885dac 100644 --- a/res/tomcat-maven/tomcat-reflection.json +++ b/res/tomcat-maven/tomcat-reflection.json @@ -1,16 +1,4 @@ [ -{ - "name" : "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", - "methods" : [{"name": "<init>","parameterTypes":[] }] -}, -{ - "name" : "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", - "methods" : [{"name": "<init>","parameterTypes":[] }] -}, -{ - "name" : "org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl", - "methods" : [{"name": "<init>","parameterTypes":[] }] -}, { "name":"java.lang.Object" }, { "name":"javax.servlet.http.HttpServlet" }, { "name":"org.apache.catalina.AccessLog" }, @@ -48,5 +36,9 @@ { "name":"org.apache.catalina.WebResourceRoot" }, { "name":"org.apache.catalina.WebResourceSet" }, { "name":"org.apache.catalina.Wrapper" }, -{ "name":"org.apache.coyote.UpgradeProtocol" } +{ "name":"org.apache.coyote.UpgradeProtocol" }, +{ "name":"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl", "methods" : [{"name": "<init>","parameterTypes":[]}] }, +{ "name":"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl", "methods" : [{"name": "<init>","parameterTypes":[]}] }, +{ "name":"org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl", "methods" : [{"name": "<init>","parameterTypes":[]}] }, +{ "name":"org.apache.el.ExpressionFactoryImpl", "methods" : [{"name":"<init>","parameterTypes":[]}] } ] --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org