0

I have a Strange problem When I am trying to inject a bean to a Facesvalidator class. As I have seen in other posts it should not be possible because Facesvalidator is not created by CDI. However this works for us in our developer and production env. However in our integration test environment it is not working. Any idea what could cause this strange behaviour? The application is running on a weblogic server.

erik.c
  • 1,342
  • 2
  • 15
  • 27
  • 1
    Is this acceptable as dupe? http://stackoverflow.com/questions/7572335/how-to-inject-in-facesvalidator-with-ejb-persistencecontext-inject-autow – BalusC Mar 24 '15 at 19:43
  • My problem is that it works in some cases but it should'nt and I wanted to find out why. – erik.c Mar 26 '15 at 07:04
  • As answered in the dupe, it works when you treat and access it as a managed bean instead of as a "plain" validator. Perhaps you've an additional `@ManagedBean` or `@Named` on the class without actually understanding what you were doing. – BalusC Mar 26 '15 at 07:17
  • But I dont have any additional annotiation on the class except Facesvalidator. Is it possible that it is is some kind of setting of the weblogic server? – erik.c Mar 26 '15 at 08:11

0 Answers0