错误:尝试在启动托管服务器 WebLogic 12.2.1.4 时同步集群 JNDI 树时出现问题。

huangapple 未分类评论65阅读模式
标题翻译

Error trying to synchronize cluster JNDI tree when starting managed server WebLogic 12.2.1.4

问题

我正在将一个应用程序从WebLogic 12.1.3升级到12.2.1.4。我们的Web应用程序位于具有2个节点的群集上。当我们启动这两个托管服务器时,无论哪一个最后完成,都会抛出以下异常:

第一个托管服务器在没有问题的情况下显示以下内容:

Summary.java

package com.app.ejb;

@Stateless(mappedName = "Summary")
public class Summary implements SummaryRemote {
    @Inject
    private SummaryLocal summaryLocalBean;

SummaryRemote.java

package com.app.ejb;

@Remote
public interface SummaryRemote {

Lookup

private void getSummaryFacade() throws NamingException {
    Context context = new InitialContext();
    summaryRemote = (SummaryRemote) context.lookup("Summary#com.app.ejb.SummaryRemote");
}

为什么在第一个启动之后启动的群集节点上会抛出ClassLoaderNotFoundException?顺便说一下,我没有为我的项目设置weblogic-ejb-jar.xml或ejb-jar.xml。

查看weblogic控制台中的JNDI树时,我发现只有一个服务器运行时会出现相同的类加载器找不到异常。我认为当我启动第二个服务器时,它会尝试从服务器1复制/下载JNDI树,但由于错误而无法完成。
请参见JNDI树异常的图像链接

英文翻译

I'm updating an application from WebLogic 12.1.3 to 12.2.1.4. Our web application is on a cluster with 2 nodes. When we start the 2 managed servers, whichever one finishes last throws the following exception:

<Notice> <Cluster> <BEA-000138> <Listening for announcements from cluster WEBCluster on 239.255.0.102:10034.>
<Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of WEBCluster.>
<Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.>
<Notice> <Cluster> <BEA-000142> <Trying to download cluster JNDI tree from server web-dev01.>
<Error> <Cluster> <BEA-000140> <Failed to deserialize statedump from server web-dev01 with
weblogic.application.ClassLoaderNotFoundException: com.app.ejb.SummaryRemote is not found due to missing GenericClassLoader.annotation:app-ejb@.
weblogic.application.ClassLoaderNotFoundException: com.app.ejb.SummaryRemote is not found due to missing GenericClassLoader.annotation:app-ejb@
    at weblogic.application.internal.AppClassLoaderManagerImpl.loadApplicationClass(AppClassLoaderManagerImpl.java:229)
    at weblogic.common.internal.ProxyClassResolver.resolveProxyClass(ProxyClassResolver.java:77)
    at weblogic.common.internal.WLObjectInputStream.resolveProxyClass(WLObjectInputStream.java:88)
    at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1854)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1802)
    Truncated. see log file for complete stacktrace

The server that finishes first shows the following with no issues:

<Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.>
<Notice> <Cluster> <BEA-000138> <Listening for announcements from cluster WEBCluster on 123.123.0.102:10034.>
<Notice> <Cluster> <BEA-000133> <Waiting to synchronize with other running members of WEBCluster.>
<Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.>
<Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.>
<Notice> <Cluster> <BEA-000162> <Starting "async" replication service with remote cluster address "null">
<Notice> <WebLogicServer> <BEA-000330> <Started the WebLogic Server Managed Server "web-dev01" for domain "domain" running in production mode.>

Summary.java

package com.app.ejb;

@Stateless(mappedName = "Summary")
public class Summary implements SummaryRemote {
	@Inject
	private SummaryLocal summaryLocalBean;

SummaryRemote.java

package com.app.ejb;

@Remote
public interface SummaryRemote {

Lookup

private void getSummaryFacade() throws NamingException {
    Context context = new InitialContext();
    summaryRemote = (SummaryRemote) context
            .lookup("Summary#com.app.ejb.SummaryRemote");
}

Why is it throwing the ClassLoaderNotFoundException on the node of the cluster that starts up after the first one? I don't have weblogic-ejb-jar.xml or ejb-jar.xml set up for my project by the way.

Looking at the JNDI tree in the weblogic console, I see the same classloader not found exception when I have only one server up. I think when I bring server 2 up, it's trying to replicate/download the JNDI tree from server 1 and is unable to because of the error.
See link for image of the JNDI tree exception

答案1

得分: 0

以下是已翻译的内容:

一些对我有效的解决方法,只需执行其中之一即可消除异常:

  1. 在WebLogic管理控制台中将集群消息模式从多播更改为单播

导航至 环境 -> 集群 -> <ejbnodename> -> 配置选项卡 -> 消息选项卡 -> 消息模式:多播,需要点击“锁定并编辑”并将多播更改为单播,然后保存并释放锁定。

  1. 更新 weblogic-ejb-jar.xml 以使 bean 不可集群。

     &lt;wls:weblogic-enterprise-bean&gt;
         &lt;wls:ejb-name&gt;Summary&lt;/wls:ejb-name&gt;
         &lt;wls:stateless-session-descriptor&gt;
             &lt;wls:stateless-clustering&gt;
                 &lt;wls:home-is-clusterable&gt;false&lt;/wls:home-is-clusterable&gt;
                 &lt;wls:stateless-bean-is-clusterable&gt;false&lt;/wls:stateless-bean-is-clusterable&gt;
         &lt;/wls:stateless-clustering&gt;
     &lt;/wls:stateless-session-descriptor&gt;
    

    </wls:weblogic-enterprise-bean>

英文翻译

A couple of work arounds that worked for me, doing either one got rid of the exception:

  1. Change the cluster messaging mode from Multicast to Unicast in the WebLogic admin console.

Navigate to Environment -> Clusters -> <ejbnodename> -> Configuration tab -> Messaging tab -> Messaging Mode: Multicast, you need to press Lock & Edit and make changes from Multicast to Unicast and save and then release the Lock.

  1. Updating weblogic-ejb-jar.xml to make the bean not clusterable.

     &lt;wls:weblogic-enterprise-bean&gt;
         &lt;wls:ejb-name&gt;Summary&lt;/wls:ejb-name&gt;
         &lt;wls:stateless-session-descriptor&gt;
             &lt;wls:stateless-clustering&gt;
                 &lt;wls:home-is-clusterable&gt;false&lt;/wls:home-is-clusterable&gt;
                 &lt;wls:stateless-bean-is-clusterable&gt;false&lt;/wls:stateless-bean-is-clusterable&gt;
         &lt;/wls:stateless-clustering&gt;
     &lt;/wls:stateless-session-descriptor&gt;
    

    </wls:weblogic-enterprise-bean>

答案2

得分: 0

这可能会影响WebLogic中的bug 30295025。遇到类似问题,应用了补丁30295025后,问题消失了。

文档编号:2689913.1

英文翻译

this might bug 30295025 in weblogic. Had a similar issue and after patch 30295025 was applied the issue went away.

Doc ID 2689913.1

huangapple
  • 本文由 发表于 2020年3月4日 06:11:48
  • 转载请务必保留本文链接:https://java.coder-hub.com/60516289.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定