gpt4 book ai didi

java - Grails 应用程序未部署在 tomcat 中

转载 作者:行者123 更新时间:2023-11-28 23:29:20 26 4
gpt4 key购买 nike

我已将我的 grails 应用程序转换为 maven 项目。在我的 pom.xml 中,我有以下依赖项

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.2.1.RELEASE</version>
</dependency>

我的应用程序以 grails run-app 开始,但是当我通过 ma​​ven compile install 构建 war 时,在 tomcat 中部署失败并出现以下错误

ERROR context.GrailsContextLoaderListener  - Error initializing Grails: class org.springframework.core.LocalVariableTableParameterNameDiscoverer$ParameterNameDiscoveringVisitor has interface org.springframework.asm.ClassVisitor as super class
java.lang.IncompatibleClassChangeError: class org.springframework.core.LocalVariableTableParameterNameDiscoverer$ParameterNameDiscoveringVisitor has interface org.springframework.asm.ClassVisitor as super class
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

最佳答案

如果您的应用程序使用 run-app 运行,您应该能够使用 grails war 构建并以这种方式部署,而不是使用 Maven。

https://grails.github.io/grails-doc/latest/ref/Command%20Line/war.html

By default the war command creates a web application archive (WAR) file using the application name and version number. The war command is different from most commands since it runs in the production environment by default instead of development, but like any script the environment can be specified using the standard convention:

关于java - Grails 应用程序未部署在 tomcat 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32717421/

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