2

I am migrating our JSF/Primefaces 3.5.x GF 3.1.1 app to GF 4.0. It is an EAR with a war and an EJB-jar and lib full of jars.

The WAR has WEB-INF/lib has:

'org.apache.myfaces.extensions.cdi.core:myfaces-extcdi-core-api:1.0.5', 'org.apache.myfaces.extensions.cdi.core:myfaces-extcdi-core-impl:1.0.5',
'org.apache.myfaces.extensions.cdi.modules:myfaces-extcdi-jsf20-module-api:1.0.5', 'org.apache.myfaces.extensions.cdi.modules:myfaces-extcdi-jsf20-module-impl:1.0.5',

in addition to PF stuff and Omnifaces and some other dependencies (codi messages api & impl gets included too -- must be a transitive dep). NOTE: no CODi Validation stuff is in the WAR nor is there any hibernate jars.

The EAR Lib has a bunch of jars too -- it doesn't duplicate the CODi stuff and omits PF it does include some spring and velocity stuff, apache commons and a few other things -- AGAIN no CODi validator stuff or hibernate stuff.

On deploy I get:

org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Validator] with qualifiers [@Default] at injection point [[UnbackedAnnotatedField] @Inject private org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validator]

I have seen the 2 other SO posts related to this:

WELD-001408 Unsatisfied dependencies for type [Validator]

&

CDI / Weld Unsatisfied dependencies proglem

Neither sheds any light as both suggest the CODI validator is behind the issue -- but I simply don't have that in my deployment unit (or EAR).

Is there anyway to work around this?

Switching to DeltaSpike (and/or the OS890 codi DS combo) is not a immediate option ; nor is using ee7. I need to try and get this to work with as few code changes as possible.

Any ideas?

Community
  • 1
  • 1
fwelland
  • 545
  • 5
  • 17
  • We are using http://os890.blogspot.com/2013/07/add-on-codi-scopes-for-deltaspike.html without issues. In this case you don't need to add anything related to Bean-Validation which could conflict. – Dar Whi Oct 16 '13 at 12:23
  • Well, just briefly scanning os890 it does seem like it will work. However if I have to crack open the code -- then I might as well switch up and use some of the JSF 2.2 (right now only using JSF 2.0) stuff in place of the CODI stuff (really just ViewAccessScope). Was really trying to avoid touching too much code. – fwelland Oct 18 '13 at 14:29
  • With that lib you just have to change the package names. – Dar Whi Oct 18 '13 at 14:41

2 Answers2

0

I found the following solution:

In the "myfaces-extcdi-jsf20-module-impl-1.0.5.jar" remove the package "org.apache.myfaces.extensions.cdi.jsf.impl.bv" completely.

Nothing perfect, but works for me so far...

msc1979
  • 51
  • 3
  • getting back to this....did you have your cdiext/codi jars in the EAR/lib or WAR/WEB_INF/lib? – fwelland Nov 15 '13 at 15:42
  • I have it in war/WEB-INF/lib – msc1979 Nov 16 '13 at 09:22
  • So in my case, if I have it in WEB-INF/lib I would get a CNF style issue related to some codi related security validator or interceptor. While the codi jars where clearly in WEB-INF/lib maybe something that it needed wasn't?? At any rate, moved them to containing EAR's lib dir and I finally got a deploy; however, app dismally crashes...more work to do... – fwelland Nov 18 '13 at 14:34
0

They just tweeted that the latest Snapshot can be used with EE7. I guess nobody reported the issue back (at least I haven't seen a JIRA-ticket until today).

Dar Whi
  • 822
  • 5
  • 14
  • Hmm...This is still on my radar; albeit I took a micro-step of getting to gf 3.1.2.2 first. Can you put a link to the JIRA or a link to the tweet or snapshot or something -- my very casual googling didn't locate anything. And/Or if I understand correctly, you mean CODI made a quick fixup to allow it to run on EE7/GF4 ? – fwelland Jan 14 '14 at 15:28
  • https://twitter.com/MyFacesTeam/status/422672426715975680 and https://issues.apache.org/jira/browse/EXTCDI-313 I have no idea when they will release it, but I would take the chance and test it quickly to provide feedback to them if there is still an issue. – Dar Whi Jan 20 '14 at 09:17
  • Thanks! I don't twitter and couldn't see how to search for tweets -- I vaguely recall some news about twitter getting rid of anonymous browsing and searching of tweets. At any rate, I messed around on their SVN site and began to see some comments about EE7 support. I am going to certainly try it out! – fwelland Jan 21 '14 at 18:02