Repository navigation
Runtime Error: java.lang.NoSuchMethodException: org.springframework.web.servlet.handler.AbstractHandlerMethodMapping$EmptyHandler.handle()Β #1510
Description
Hi, I have runtime error when compile with arg --language:js
GraalVm version 22.0.0.2 graalvm-ce-java17-darwin-amd64
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping': Unexpected exception during bean creation; nested exception is java.lang.ExceptionInInitializerError at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:555) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[na:na] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[na:na] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[na:na] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[na:na] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[na:na] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[na:na] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[na:na] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) ~[api:2.6.1] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) ~[api:2.6.1] at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) ~[api:2.6.1] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[api:2.6.1] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) ~[api:2.6.1] at com.epipoli.HwApplication.main(HwApplication.java:55) ~[api:0.0.1] Caused by: java.lang.ExceptionInInitializerError: null at java.lang.Class.ensureInitialized(DynamicHub.java:549) ~[api:na] at java.lang.Class.ensureInitialized(DynamicHub.java:549) ~[api:na] at org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.createRequestMappingHandlerMapping(WebMvcConfigurationSupport.java:351) ~[api:5.3.13] at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.createRequestMappingHandlerMapping(WebMvcAutoConfiguration.java:543) ~[api:2.6.1] at org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.requestMappingHandlerMapping(WebMvcConfigurationSupport.java:311) ~[api:5.3.13] at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.requestMappingHandlerMapping(WebMvcAutoConfiguration.java:445) ~[api:2.6.1] at org.springframework.aot.ContextBootstrapInitializer.lambda$initialize$24(ContextBootstrapInitializer.java:244) ~[na:na] at org.springframework.aot.beans.factory.ThrowableFunction.apply(ThrowableFunction.java:18) ~[na:na] at org.springframework.aot.beans.factory.InjectedElementResolver.create(InjectedElementResolver.java:51) ~[na:na] at org.springframework.aot.beans.factory.BeanDefinitionRegistrar$InstanceSupplierContext.create(BeanDefinitionRegistrar.java:193) ~[na:na] at org.springframework.aot.ContextBootstrapInitializer.lambda$initialize$25(ContextBootstrapInitializer.java:244) ~[na:na] at org.springframework.aot.beans.factory.ThrowableFunction.apply(ThrowableFunction.java:18) ~[na:na] at org.springframework.aot.beans.factory.BeanDefinitionRegistrar.lambda$instanceSupplier$0(BeanDefinitionRegistrar.java:97) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1249) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[na:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[na:na] ... 14 common frames omitted Caused by: java.lang.IllegalStateException: Expected method not found: java.lang.NoSuchMethodException: org.springframework.web.servlet.handler.AbstractHandlerMethodMapping$EmptyHandler.handle() at org.springframework.util.ClassUtils.getMethod(ClassUtils.java:1141) ~[na:na] at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.<clinit>(AbstractHandlerMethodMapping.java:84) ~[na:na] ... 31 common frames omitted
Activity
sdeleuze commentedon Mar 3, 2022
Please share a repro project.
spring-projects-issues commentedon Mar 10, 2022
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.
LilPoppy commentedon Mar 15, 2022
I have a same issue with
OpenJDK Runtime Environment GraalVM CE 22.0.0.2 (build 17.0.2+8-jvmci-22.0-b05)Seen this exception is which method not found , I have attempt to add the below into my
reflect-config.json. But still it's not working.sdeleuze commentedon Mar 15, 2022
@LilPoppy Could you please provide a repro project?
LilPoppy commentedon Mar 16, 2022
Sure @sdeleuze , here is the repository with CI
sdeleuze commentedon Mar 18, 2022
Sorry the setup to reproduce is not obvious, I followed readme instructions and the build is broken due to the database. Could you please provide a more focused repro with complete instructions to reproduce?
19 remaining items
LilPoppy commentedon Mar 30, 2022
@sdeleuze , I have configured easy way to build as docker.
Pull newest from repository first:
git clone https://github.com/SpamanDev/StoreChain-Server.gitCheck if you have any Redis port opening:
sudo lsof -i :6379Kill the redis if you have any exists:
kill -9 [pid]Then run the following:
mvn -DskipTests -Dredis-host=redis -Ddb-host=db clean package -PdockerAfter done container run:
docker start -a cobnetsdeleuze commentedon Mar 31, 2022
Ok, I was able to reproduce after your latest comment and I can also reproduce with
@NativeHint(options = "--language:js")added to thewebmvc-tomcatsample. It seems--language:jsalso apply-H:-InlineBeforeAnalysissince this kind of error appear when inlining does not work. I will ping GraalVM team about that.LilPoppy commentedon Mar 31, 2022
Ok thank you
sdeleuze commentedon Apr 5, 2022
Should be fixed on GraalVM side, you can follow oracle/graal#4473.