choubuzhaole commented on issue #1243:
URL: https://github.com/apache/shiro/issues/1243#issuecomment-1868700064

   Currently I'm trying to use graalvm to compile my project into an executable
   ### version
   graalvm: graalvm-community-jdk-21.0.1
   spring-boot:3.2.0
   shiro:1.11.0
   
   It compiles fine and when I launch the executable I get the following problem
   
   ```
   org.springframework.context.ApplicationContextException: Unable to start web 
server
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:165)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:610)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753)
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:323)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1342)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1331)
        at com.nis.AdminApplication.main(AdminApplication.java:32)
        at 
[email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
   Caused by: org.springframework.boot.web.server.WebServerException: Unable to 
start embedded Tomcat
        at 
org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:142)
        at 
org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:104)
        at 
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:501)
        at 
org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:218)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:188)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162)
        ... 9 common frames omitted
   Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'shiroFilter': FactoryBean threw exception on object 
creation
        at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:188)
        at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:124)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1810)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1277)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:258)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
        at 
org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:210)
        at 
org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:173)
        at 
org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:168)
        at 
org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:153)
        at 
org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:86)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.getServletContextInitializerBeans(ServletWebServerApplicationContext.java:266)
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:240)
        at 
org.springframework.boot.web.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:52)
        at 
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4850)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
        at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
        at 
[email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        at 
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at 
[email protected]/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
        at 
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
        at 
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:845)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
        at 
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
        at 
[email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:317)
        at 
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at 
[email protected]/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
        at 
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:866)
        at 
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:240)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at 
org.apache.catalina.core.StandardService.startInternal(StandardService.java:433)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at 
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:917)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:171)
        at org.apache.catalina.startup.Tomcat.start(Tomcat.java:488)
        at 
org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:123)
        ... 14 common frames omitted
   Caused by: org.apache.shiro.util.InstantiationException: Unable to 
instantiate class [org.apache.shiro.web.filter.authz.HttpMethodPermissionFilter]
        at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:208)
        at 
org.apache.shiro.web.filter.mgt.DefaultFilter.newInstance(DefaultFilter.java:62)
        at 
org.apache.shiro.web.filter.mgt.DefaultFilterChainManager.addDefaultFilters(DefaultFilterChainManager.java:382)
        at 
org.apache.shiro.web.filter.mgt.DefaultFilterChainManager.<init>(DefaultFilterChainManager.java:65)
        at 
org.apache.shiro.spring.web.ShiroFilterFactoryBean.createFilterChainManager(ShiroFilterFactoryBean.java:407)
        at 
org.apache.shiro.spring.web.ShiroFilterFactoryBean.createInstance(ShiroFilterFactoryBean.java:482)
        at 
org.apache.shiro.spring.web.ShiroFilterFactoryBean.getObject(ShiroFilterFactoryBean.java:382)
        at 
org.apache.shiro.spring.web.ShiroFilterFactoryBean.getObject(ShiroFilterFactoryBean.java:122)
        at 
org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:182)
        ... 51 common frames omitted
   Caused by: java.lang.InstantiationException: 
org.apache.shiro.web.filter.authz.HttpMethodPermissionFilter
        at [email protected]/java.lang.Class.newInstance(DynamicHub.java:719)
        at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:206)
        ... 59 common frames omitted
   Caused by: java.lang.NoSuchMethodException: 
org.apache.shiro.web.filter.authz.HttpMethodPermissionFilter.<init>()
        at [email protected]/java.lang.Class.checkMethod(DynamicHub.java:1065)
        at 
[email protected]/java.lang.Class.getConstructor0(DynamicHub.java:1228)
        at [email protected]/java.lang.Class.newInstance(DynamicHub.java:706)
        ... 60 common frames omitted
   
   ``` 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to