获取java.lang.RuntimeException:javax.servlet.ServletException:无法实例化WebApplicationInitializer类

时间:2019-04-15 14:28:58

标签: java spring spring-mvc

我有一个反应堆spring-mvc项目,当我尝试将其部署到Wildfly时会抛出Run异常

  

javax.servlet.ServletException:无法实例化WebApplicationInitializer类

我尝试按照此处在StackOverflow上的回答重新配置bean,以选择数据模型和JNDI连接,但无济于事。 最初,已修复了具有无效属性的persistence.xml文件,该文件正在获得上述异常。

堆栈跟踪

  

java.lang.RuntimeException:javax.servlet.ServletException:无法实例化WebApplicationInitializer类       在org.wildfly.extension.undertow.deployment.UndertowDeploymentService $ 1.run(UndertowDeploymentService.java:85)       在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)       在java.util.concurrent.FutureTask.run(FutureTask.java:266)       在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)       在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)       在java.lang.Thread.run(Thread.java:745)       在org.jboss.threads.JBossThread.run(JBossThread.java:320)   造成原因:java.lang.RuntimeException:javax.servlet.ServletException:无法实例化WebApplicationInitializer类       在io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:224)       在org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)       在org.wildfly.extension.undertow.deployment.UndertowDeploymentService $ 1.run(UndertowDeploymentService.java:82)       ...另外6个   原因:javax.servlet.ServletException:无法实例化WebApplicationInitializer类       在org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:158)       在io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:184)       ...另外8个   由以下原因引起:java.lang.NoSuchMethodError:org.springframework.util.ReflectionUtils.accessibleConstructor(Ljava / lang / Class; [Ljava / lang / Class;)Ljava / lang / reflect / Constructor;       在org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:155)       ...还有9个

在wildfly上部署的战争文件

0 个答案:

没有答案