简体   繁体   English

启动托管服务器 WebLogic 12.2.1.4 时尝试同步集群 JNDI 树时出错

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

I'm updating an application from WebLogic 12.1.3 to 12.2.1.4.我正在将应用程序从 WebLogic 12.1.3 更新到 12.2.1.4。 Our web application is on a cluster with 2 nodes.我们的 Web 应用程序位于具有 2 个节点的集群上。 When we start the 2 managed servers, whichever one finishes last throws the following exception:当我们启动 2 个托管服务器时,无论最后完成哪个都会引发以下异常:

<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摘要.java

package com.app.ejb;

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

SummaryRemote.java摘要Remote.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?为什么在第一个之后启动的集群节点上抛出 ClassLoaderNotFoundException 异常? I don't have weblogic-ejb-jar.xml or ejb-jar.xml set up for my project by the way.顺便说一下,我没有为我的项目设置 weblogic-ejb-jar.xml 或 ejb-jar.xml。

Looking at the JNDI tree in the weblogic console, I see the same classloader not found exception when I have only one server up.查看 weblogic 控制台中的 JNDI 树,当我只有一台服务器时,我看到相同的类加载器未找到异常。 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.我认为当我启动服务器 2 时,它试图从服务器 1 复制/下载 JNDI 树,但由于错误而无法复制。 See link for image of the JNDI tree exception有关 JNDI 树异常的图像,请参阅链接

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.在 WebLogic 管理控制台中将集群消息传递模式从更改为单播

Navigate to Environment -> Clusters -> -> 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.导航到 Environment -> Clusters -> -> Configuration tab -> Messaging tab -> Messaging Mode: Multicast,您需要按 Lock & Edit 并将 Multicast 更改为 Unicast 并保存然后释放 Lock。

  1. Updating weblogic-ejb-jar.xml to make the bean not clusterable.更新 weblogic-ejb-jar.xml 以使 bean 不可集群。

     <wls:weblogic-enterprise-bean> <wls:ejb-name>Summary</wls:ejb-name> <wls:stateless-session-descriptor> <wls:stateless-clustering> <wls:home-is-clusterable>false</wls:home-is-clusterable> <wls:stateless-bean-is-clusterable>false</wls:stateless-bean-is-clusterable> </wls:stateless-clustering> </wls:stateless-session-descriptor>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM