从Wildfly 8.2迁移到WildFly 11后的Infinitspan问题。

huangapple 未分类评论53阅读模式
英文:

Infinitspan problem after moving from Wildfly 8.2 to WildFly11

问题

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

12:55:36.838 错误 [org.jboss.as.controller.management-operation]
(Controller Boot Thread) WFLYCTL0013:操作("deploy")失败 -
地址:([("deployment" => "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
is missing" ]

我不知道该怎么办。我尝试将Infinispan从8.2(版本6.0.2-Final)迁移,但整个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中Infinispan部分的内容:

<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>
英文:

I want to move my project from Wildfly 8.2 into newer version (i.e ver 11).
Of course on WF8.2 everything works ok.
After using jboss-migration-tool and trying deploy package on newer version I got everytime:

> 12:55:36,838 ERROR [org.jboss.as.controller.management-operation]
> (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed -
> address: ([("deployment" => "my-app.war")]) - failure
> description: {
> "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.infinispan.container.myapp"],
> "WFLYCTL0180: Services with missing/unavailable dependencies" => [
> "jboss.naming.context.java.module.myapp-core.myapp.env.&quot;com.myapp.core.midware.server.services.ws.services.SingletonEJB&quot;._embeddedCacheContainer
> is missing ] }

I don't know what to do. I tried to move infinitspan from 8.2 (version 6.0.2-Final) but entire WF application wont start. Now I update pom.xml to get newer version of that (8.2.8-Final), made package, but still it shows up.

Even i tried to comment from file (com.myapp.core.midware.server.services.ws.services.SingletonEJB):

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

and assigned against it new DefaultCacheManager to reference:

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

it shows up.

Thank you for your help

EDIT:

This is section for infinitspan in standalone-full.xml:

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

答案1

得分: 0

以下是翻译好的内容:

首先,我会从更新的版本开始。目前最新的发布版本是 WildFly 19.1.0(https://wildfly.org/news/2020/05/04/WildFly-1910-Released/)。每次有新版本发布时,我都会升级 WildFly。

我还在大约2017年升级到WildFly 12时转向使用了Gradle(现在是6.3)。在我看来,它比Maven更容易创建JAR并部署(JAR + WAR)你的EAR。

英文:

For starters I'd start with a more recent version. The latest release is currently WildFly 19.1.0. (https://wildfly.org/news/2020/05/04/WildFly-1910-Released/). I upgrade WildFly every time it's released.

I also switched to Gradle (now 6.3) when I upgraded to WildFly 12 in ~2017. IMO It's a lot easier than Maven creating JARs and deploying (JAR + WAR) your EAR.

huangapple
  • 本文由 发表于 2020年5月4日 20:00:31
  • 转载请务必保留本文链接:https://java.coder-hub.com/61591767.html
匿名

发表评论

匿名网友

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

确定