英文:
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."com.myapp.core.midware.server.services.ws.services.SingletonEJB"._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="java:jboss/infinispan/container/nmarket")
// 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:
<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>
答案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.
专注分享java语言的经验与见解,让所有开发者获益!
评论