DeltaSpike ambiguous relationship between DefaultWindowContextQuotaHandler and JsfWindowContextQuotaHandler

I am using DeltaSpike 1.7.1 and CDI 1.0 (Weld 1.1.5) deployed on JBoss 7.1.1. This is an old project, and I cannot change the technologies that we use.

The problem only occurs when deploying multiple WAR files (I know that CDI had a problem with multiple WAR files inside the EAR, but I did not find anything about multiple WAR files in the JBOSS instance outside the EAR file.

Please note that the problem does not occur every time you deploy a project, it usually happens when I ask Jenkins to create and deploy several projects at once, and I get this error message:

WELD-001318 Cannot resolve an ambiguous dependency between [Managed Bean [class org.apache.deltaspike.core.impl.scope.window.DefaultWindowContextQuotaHandler] with qualifiers [@Any @Default], Managed Bean [class org.apache.deltaspike.jsf.impl.scope.window.JsfWindowContextQuotaHandler] with qualifiers [@Any @Default]]

I tried to get rid of DeltaSpike, but the projects rely heavily on the @ViewAccessScoped annotation, and it will take a lot of time to change all this.

+8
java deltaspike cdi
source share
1 answer

Check out this page:

https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7

more specifically, see this parameter in the JBOSS 7 configuration:

 <subsystem xmlns="urn:jboss:domain:ee:1.0" > <ear-subdeployments-isolated>false</ear-subdeployments-isolated> </subsystem> 

It is likely that this variable is true, it will solve your problem.

+2
source share

All Articles