Ошибка при попытке синхронизировать дерево JNDI кластера при запуске управляемого сервера WebLogi c 12.2.1.4 - PullRequest
0 голосов
/ 04 марта 2020

Я обновляю приложение с WebLogi c 12.1.3 на 12.2.1.4. Наше веб-приложение находится в кластере с 2 узлами. Когда мы запускаем 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

Сервер, который первым завершает работу, показывает следующее без проблем:

<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.>

Сводка. 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 на узле кластера, который запускается после первого? У меня нет weblogi c -ejb-jar. xml или ejb-jar. xml Кстати, для моего проекта.

Просмотр дерева JNDI в weblogi c console, я вижу, что тот же загрузчик классов не обнаружил исключение, когда у меня работает только один сервер. Я думаю, что когда я запускаю сервер 2, он пытается реплицировать / загрузить дерево JNDI с сервера 1 и не может из-за ошибки. См. Ссылку для изображения исключения из дерева JNDI

1 Ответ

0 голосов
/ 12 марта 2020

Несколько обходных путей, которые работали для меня, но каждый из них избавился от исключения:

  1. Измените режим обмена сообщениями кластера с Multicast на Unicast в консоли администратора WebLogi c.

Перейдите в Среда -> Кластеры -> -> вкладка Конфигурация -> вкладка Сообщения -> Режим обмена сообщениями: Многоадресная рассылка, вам нужно нажать Lock & Edit и измените Multicast на Unicast и сохраните, а затем снимите блокировку.

Обновление weblogi c -ejb-jar. xml, чтобы компонент не мог быть сгруппирован.

<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>

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...