gpt4 book ai didi

tomcat - 将应用程序升级到 Grails 2 后 JBoss 部署错误

转载 作者:行者123 更新时间:2023-11-28 22:31:54 24 4
gpt4 key购买 nike

我已将 Grails 应用程序从 1.3.6 升级到 2.1.1。经过一些修复和整理后,run-app 可以运行(在大多数情况下,仍然有一些已弃用的问题需要处理)。 grails war 也可以毫无错误地构建。

然而,当我部署到 JBoss (4.2.2) 时,与为 grails 1.3.6 war 所做的相同,我得到这个错误:

Caused by: javax.management.ReflectionException: Cannot find setter method setLoader StandardContext[null]
at org.apache.tomcat.util.modeler.ManagedBean.getSetter(ManagedBean.java:560)
at org.apache.tomcat.util.modeler.BaseModelMBean.setAttribute(BaseModelMBean.java:407)
at org.jboss.mx.server.RawDynamicInvoker.setAttribute(RawDynamicInvoker.java:70)
at org.jboss.mx.server.MBeanServerImpl.setAttribute(MBeanServerImpl.java:608)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:212)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
... 112 more
Caused by: java.lang.NoSuchMethodException: org.apache.catalina.core.StandardContext.setLoader(org.apache.catalina.Loader)
at java.lang.Class.getMethod(Class.java:1605)
at org.apache.tomcat.util.modeler.ManagedBean.getSetter(ManagedBean.java:553)
... 118 more
2012-11-08 16:09:51,604 INFO [org.jboss.web.tomcat.service.TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
2012-11-08 16:09:51,664 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] Incomplete Deployment listing:

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@5cc18807 { url=file:/usr/local/JBoss/jboss-4.2.2.GA/server/default/deploy/xxxxx-1.0.war }
deployer: MBeanProxyExt[jboss.web:service=WebServer]
status: Deployment FAILED reason: Error during deploy; - nested throwable: (javax.management.ReflectionException: Cannot find setter method setLoader StandardContext[null])
state: FAILED
watch: file:/usr/local/JBoss/jboss-4.2.2.GA/server/default/deploy/xxxxx-1.0.war
altDD: null
lastDeployed: 1352390987263
lastModified: 1352390987000
mbeans:

--- MBeans waiting for other MBeans ---
ObjectName: jboss.web.deployment:war=xxxxx-1.0.war,id=1556187143
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.management.ReflectionException: Cannot find setter method setLoader StandardContext[null])

--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.web.deployment:war=xxxxx-1.0.war,id=1556187143
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.management.ReflectionException: Cannot find setter method setLoader StandardContext[null])

所以我认为这是 war 中 lib 中的 catalina 类与已经在 jboss 中的类之间的冲突?因为它在 1.3.6 时工作正常,它是否已添加到 2.1.1 grails tomcat 插件中,是否可以从 grails 插件中排除子依赖项?

谢谢。

最佳答案

找到“解决方案”,以防其他人正在寻找。

如果我将插件的声明从 application.properties 移动到 BuildConfig.groovy,错误就会消失。我不确定它是否真的“修复”了它,或者它是否导致清理/重新安装可能已经清除它的 tomcat 插件,但它消除了部署时的错误。

在此之后我遇到了另一个错误,JBoss hibernate 库比 Grails 2.1.1 依赖项中的库旧:

Caused by: java.lang.NoSuchMethodException: org.hibernate.validator.ClassValidator.   
(java.lang.Class, java.util.ResourceBundle, org.hibernate.validator.MessageInterpolator,
java.util.Map, org.hibernate.annotations.common.reflection.ReflectionManager)

已按照说明修复 here告诉 JBoss 使用应用程序的库而不是它自己的库。

关于tomcat - 将应用程序升级到 Grails 2 后 JBoss 部署错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13294348/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com