spring-attic / spring-native

Spring Native is now superseded by Spring Boot 3 official native support
https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html
Apache License 2.0
2.74k stars 355 forks source link

Tomcat ParsingError HttpServlet.service()->FrameWorkServlet.doOptions() #1557

Closed enderwsp closed 2 years ago

enderwsp commented 2 years ago

env graalvm 21.3.1-jdk8 springboot 2.5.11-same to spring.start.io jdk 1.8 springcloud 2020.0.5 spring-native 0.10.6 native-buildtools 0.9.4

created from spring.start.io

include tomcat eureka bootstrap

key error msg

Fatal error:com.oracle.graal.pointsto.util.AnalysisError$ParsingError: Error encountered while parsing org.springframework.web.servlet.FrameworkServlet.doOptions(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

Parsing context:
   at org.springframework.web.servlet.FrameworkServlet.doOptions(FrameworkServlet.java:944)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
   at com.oracle.svm.core.reflect.ReflectionAccessorHolder.WsFilter_doFilter_f23728104f2f98d3170efe99f12da6cfdbf2aa23(generated:0)

NullPointerException
      at com.oracle.svm.hosted.snippets.ReflectionPlugins.lambda$null$4(ReflectionPlugins.java:385)

what can i do for fix it

enderwsp commented 2 years ago

exe command : mvn clean -Pnative -DskipTests package

mhalbritter commented 2 years ago

If you'd like us to spend some time investigating, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.

enderwsp commented 2 years ago

If you'd like us to spend some time investigating, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.

I upload to https://github.com/enderwsp/spring-native-graalvm

springboot 2.4.9 & springcloud 2020.0.3 , also will get same error

i set many args

in configuration。buildArgs。buildArg

so, i want get more details when compiled failed

maybe some of those is not avalibe

mhalbritter commented 2 years ago

Your sample uses Spring Boot 2.4.9, which is no longer supported (if you don't have commercial support). Please update it to a supported version of Spring Boot, and make sure that your sample runs in non-AOT mode.

enderwsp commented 2 years ago

Your sample uses Spring Boot 2.4.9, which is no longer supported (if you don't have commercial support). Please update it to a supported version of Spring Boot, and make sure that your sample runs in non-AOT mode.

u can change 2

springboot 2.5.11 springcloud 2020.0.5

&

recomplie the error will be printed

mhalbritter commented 2 years ago

The error message sounds like a bug in the GraalVM compiler. Can you try to recompile it with the latest spring-native (11.3), the latest native-build-tools (0.9.11) and with the newest available GraalVM (22.0.0.2)?

sdeleuze commented 2 years ago

FWIW Spring Native 0.11.x requires using Spring Boot 2.6.x, won't work with 2.5.x.

spring-projects-issues commented 2 years ago

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues commented 2 years ago

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.