我想将我的项目从 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>