[jboss-jira] [JBoss JIRA] (WFLY-6971) MDB cannot be deployed after migration due to invalid cache configuration. Log a message in order to detect and reject any invalid configuration.

Panagiotis Sotiropoulos (JIRA) issues at jboss.org
Fri Aug 19 03:19:00 EDT 2016


    [ https://issues.jboss.org/browse/WFLY-6971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281174#comment-13281174 ] 

Panagiotis Sotiropoulos commented on WFLY-6971:
-----------------------------------------------

I have changed the title in order to describe better the proposed fix.
I have made some changes in order to log an error message about invalid cache configuration, while in parallel this invalid configuration is ignored (as the service is not registered).
I would appreciate any help for fixing this using the right approach.

> MDB cannot be deployed after migration due to invalid cache configuration. Log a message in order to detect and reject any invalid configuration.
> -------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-6971
>                 URL: https://issues.jboss.org/browse/WFLY-6971
>             Project: WildFly
>          Issue Type: Bug
>          Components: EJB, JMS
>    Affects Versions: 10.1.0.CR1
>            Reporter: Panagiotis Sotiropoulos
>            Assignee: Panagiotis Sotiropoulos
>            Priority: Critical
>         Attachments: mdb-1.0-SNAPSHOT.jar, standalone-full-ha.xml_eap6
>
>   Original Estimate: 2 days
>  Remaining Estimate: 2 days
>
> If EAP 7 with (manually) migrated configuration from EAP 6.4.7.CP server is started then MDB deployment fails with:
> {code}
> 14:17:09,432 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."mdb-1.0-SNAPSHOT.jar".cache-dependencies-installer: org.jboss.msc.service.StartException in service jboss.deployment.unit."mdb-1.0-SNAPSHOT.jar".cache-dependencies-installer: Failed to start service
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_71]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_71]
> 	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_71]
> Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.infinispan.ejb."mdb-1.0-SNAPSHOT.jar".config is already registered
> 	at org.jboss.msc.service.ServiceRegistrationImpl.setInstance(ServiceRegistrationImpl.java:158) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at org.jboss.msc.service.ServiceControllerImpl.startInstallation(ServiceControllerImpl.java:235) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at org.jboss.msc.service.ServiceContainerImpl.install(ServiceContainerImpl.java:768) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at org.jboss.msc.service.ServiceTargetImpl.install(ServiceTargetImpl.java:223) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at org.jboss.msc.service.ServiceControllerImpl$ChildServiceTarget.install(ServiceControllerImpl.java:2401) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at org.jboss.msc.service.ServiceBuilderImpl.install(ServiceBuilderImpl.java:317) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at org.jboss.as.ejb3.cache.distributable.DistributableCacheFactoryBuilderService.installDeploymentUnitDependencies(DistributableCacheFactoryBuilderService.java:93)
> 	at org.jboss.as.ejb3.deployment.processors.CacheDependenciesProcessor$1.start(CacheDependenciesProcessor.java:50)
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.6.Final-redhat-1.jar:1.2.6.Final-redhat-1]
> 	... 3 more
> {code}
> Problem seems to be configuration of caches in ejb subsystem which looks like:
> {code}
>    <subsystem xmlns="urn:jboss:domain:ejb3:4.0">
> ...
>             <caches>
>                 <cache name="simple" aliases="NoPassivationCache"/>
>                 <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
>                 <cache name="clustered" passivation-store-ref="infinispan" aliases="StatefulTreeCache"/>
>             </caches>
> ...
>         </subsystem>
> {code}
> If any of lines:
> {code}
> <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
> <cache name="clustered" passivation-store-ref="infinispan" 
> {code}
> is removed or I take default configuration from EAP 7:
> {code}
> <caches>
>         <cache name="simple"/>
>         <cache name="distributable" passivation-store-ref="infinispan" aliases="passivating clustered"/>
> </caches>
> {code}
> then MDB is deployed. 



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list