0

我想将我的项目从 Wildfly 8.2 转移到更新的版本(即 11 版)。当然在 WF8.2 上一切正常。在使用 jboss-migration-tool 并尝试在更新版本上部署包后,我每次都得到:

12:55:36,838 错误 [org.jboss.as.controller.management-operation](控制器引导线程)​​WFLYCTL0013:操作(“部署”)失败 - 地址:([(“部署”=>“my-app.war ")]) - 故障描述:{“WFLYCTL0412:未安装的必需服务:”=> [“jboss.naming.context.java.jboss.infinispan.container.myapp”],“WFLYCTL0180:缺少/不可用的服务依赖项" => ["jboss.naming.context.java.module.myapp-core.myapp.env.\"com.myapp.core.midware.server.services.ws.services.SingletonEJB\"._embeddedCacheContainer 丢失] }

我不知道该怎么办。我试图从 8.2(版本 6.0.2-Final)移动 infinitspan,但整个 WF 应用程序无法启动。现在我更新 pom.xml 以获得更新版本(8.2.8-Final),制作包,但它仍然显示。

即使我试图从文件(com.myapp.core.midware.server.services.ws.services.SingletonEJB)评论:

//  @Resource(lookup="java:jboss/infinispan/container/nmarket")
//  private CacheContainer _embeddedCacheContainer;

并为其分配新的 DefaultCacheManager 以引用:

_cacheManager = new DefaultCacheManager();   //_embeddedCacheContainer.getCache().getCacheManager();

它出现了。

谢谢您的帮助

编辑:

这是standalone-full.xml 中的infinitspan 部分:

<subsystem xmlns="urn:jboss:domain:infinispan:4.0">
        <cache-container name="web" default-cache="passivation" module="org.wildfly.clustering.web.infinispan">
            <local-cache name="passivation">
                <transaction mode="BATCH"/>
                <file-store passivation="true" purge="false"/>
            </local-cache>
            <local-cache name="persistent">
                <transaction mode="BATCH"/>
                <file-store passivation="false" purge="false"/>
            </local-cache>
            <local-cache name="concurrent">
                <file-store passivation="true" purge="false"/>
            </local-cache>
        </cache-container>
        <cache-container name="ejb" aliases="sfsb" default-cache="passivation" module="org.wildfly.clustering.ejb.infinispan">
            <local-cache name="passivation">
                <transaction mode="BATCH"/>
                <file-store passivation="true" purge="false"/>
            </local-cache>
            <local-cache name="persistent">
                <transaction mode="BATCH"/>
                <file-store passivation="false" purge="false"/>
            </local-cache>
        </cache-container>
        <cache-container name="hibernate" default-cache="local-query" module="org.hibernate.infinispan">
            <local-cache name="entity">
                <transaction mode="NON_XA"/>
                <eviction strategy="LRU" max-entries="10000"/>
                <expiration max-idle="100000"/>
            </local-cache>
            <local-cache name="local-query">
                <transaction mode="NONE"/>
                <eviction strategy="LRU" max-entries="10000"/>
                <expiration max-idle="100000"/>
            </local-cache>
            <local-cache name="timestamps">
                <transaction mode="NONE"/>
                <eviction strategy="NONE"/>
            </local-cache>
        </cache-container>
        <cache-container name="server" default-cache="default" module="org.wildfly.clustering.server">
            <local-cache name="default">
                <transaction mode="BATCH"/>
            </local-cache>
        </cache-container>
    </subsystem>
4

1 回答 1

0

对于初学者,我会从更新的版本开始。目前最新版本是 WildFly 19.1.0。(https://wildfly.org/news/2020/05/04/WildFly-1910-Released/)。我每次发布 WildFly 都会对其进行升级。

当我在 2017 年升级到 WildFly 12 时,我也切换到了 Gradle(现在是 6.3)。IMO 这比 Maven 创建 JAR 和部署(JAR + WAR)你的 EAR 要容易得多。

于 2020-05-05T11:49:09.330 回答