DeltaSpike ambiguous dependency between DefaultWindowContextQuotaHandler and JsfWindowContextQuotaHandler
Asked Answered
A

1

8

I am using DeltaSpike 1.7.1 and CDI 1.0 (Weld 1.1.5) deployed on JBoss 7.1.1. It's a legacy project and I can't change the technologies we're using.

The problem happens only when I deploy multiple WAR files (I am aware that CDI has/had a problem with multiple WAR files inside an EAR, but I didn't find anything about multiple WAR files in a JBOSS instance outside an EAR file.

Note that the problem doesn't happen everytime a project is deployed, it happens, usually, when I ask Jenkins to build and deploy more than one project 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 would waste a lot of time to change it all.

Avan answered 23/8, 2016 at 13:13 Comment(0)
R
2

Check out this page:

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

more specifically, look at this setting in the JBOSS 7 Config:

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

It is likely setting this variable to true will solve your problem.

Revolting answered 31/8, 2016 at 13:36 Comment(2)
Unfortunately, looks like it didn't work out for me. I think that would work if I were using EAR, which is not the case. Thanks anyway.Avan
I would report the issue to the JBoss-AS7 team or upgrade to a newer version.Retractile

© 2022 - 2024 — McMap. All rights reserved.