java - 在unix环境下的jboss中部署应用程序时出现问题

标签 java spring spring-mvc jboss

在启动我的 jboss 应用程序服务器时,我收到以下错误:

0:27:03,456 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-5) Root WebApplicationContext: initialization started
10:27:03,479 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-5) Context initialization failed: java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:264) [org.springframework.web-3.0.3.RELEASE.jar:3.0.3.RELEASE]
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) [org.springframework.web-3.0.3.RELEASE.jar:3.0.3.RELEASE]
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [org.springframework.web-3.0.3.RELEASE.jar:3.0.3.RELEASE]
    at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.17.Final-redhat-1.jar:]
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.17.Final-redhat-1.jar:]
    at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:89) [jboss-as-web-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]

该应用程序在我的本地 Windows 计算机上运行良好,而我在 UNIX 计算机上有完全相同的服务器,但它无法运行。

任何指示都会非常有帮助。

最佳答案

这表明您的其中一个 Spring Jars 版本错误。 ConfigurableWebApplicationContextversion 2.0 中没有 setId 方法。但这个方法确实出现在3.x version of Spring版本中.

关于java - 在unix环境下的jboss中部署应用程序时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19291350/

相关文章:

java - 在请求范围内使用工厂方法 Autowiring

java - Java 服务器中每个游戏室的线程?

java - 如何将txt文件的内容读取到文本区域?

java - Android - Spinner 异步下载文件不保存

spring - 如何在没有开发 GET 方法的情况下测试 API PUT/POST 请求?

java - 关闭服务 - 结合 HandlerInterceptor 和 ServletContextListener

java - 使用 MSI 从本地运行的 java 应用程序连接到 Azure Keyvault 的方法

java - 通俗地说,Spring中的getBean是干什么的?

java - 为什么 Weblogic 工作管理器拒绝工作

java - 如何检查我的请求-响应是否已编码?