gpt4 book ai didi

grails - 部署到Weblogic时出现SLF4J异常

转载 作者:行者123 更新时间:2023-12-02 14:52:24 24 4
gpt4 key购买 nike

部署到Weblogic时,我们开始遇到以下异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'alertService': Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mailService': Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mailMessageBuilderFactory': Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mailMessageContentRenderer': Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'groovyPagesTemplateEngine': Cannot resolve reference to bean 'gspTagLibraryLookup' while setting bean property 'tagLibraryLookup'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gspTagLibraryLookup': Invocation of init method failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grails.plugin.springsecurity.SecurityTagLib': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'webInvocationPrivilegeEvaluator': Cannot resolve reference to bean 'filterInvocationInterceptor' while setting constructor argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'filterInvocationInterceptor': Invocation of init method failed; nested exception is
java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.arrayFormat(Ljava/lang/String;
[Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple;

我尝试从耳朵上取下slf4j jar 。我还尝试将以下内容放入weblogic-appliction.xml中:
<prefer-application-packages>
<package-name>org.slf4j.*</package-name>
</prefer-application-packages>

<prefer-application-resources>
<resource-name>org/slf4j/impl/StaticLoggerBinder.class</resource-name>
</prefer-application-resources>

到目前为止,没有任何工作。基本上,我尝试了所有在线发现的不同东西。通常,当我与自己提供的jar和Weblogic也提供的jar发生冲突时,仅使用preferred-application-packages就可以解决问题。

我正在将Grails 2.3.6与Weblogic 10.3.6一起使用。

最佳答案

万一有人遇到这个问题,这就是我的问题了:

发生的事情是,我们包括了用于JMS的activemq-all Artifact ,并且该 Artifact 被他们称为“ super ” jar。它作为大量依赖而产生,无法通过maven排除,其中一个依赖是slf4j的旧版本。因此,即使我在Weblogic中为slf4j设置了“prefer-application-packages”,也没有使用Grails提供的版本,而是使用activemq版本。而不是使用activemq-all依赖性,我改用了activemq的各个组件,并能够在此时排除slf4j。这解决了我的问题。

关于grails - 部署到Weblogic时出现SLF4J异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23838214/

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