Hi guys,
I'm facing an issue with myfaces test and omnifaces, as soon i add
omnifaces 2.0 dependency I got the error when running tests (driven by ds
test control):
java.lang.NoClassDefFoundError: Could not initialize class
org.omnifaces.config.BeanManager
at
org.omnifaces.application.OmniApplication.<init>(OmniApplication.java:69)
at
org.omnifaces.application.OmniApplicationFactory.createOmniApplication(OmniApplicationFactory.java:88)
at
org.omnifaces.application.OmniApplicationFactory.getApplication(OmniApplicationFactory.java:54)
at
org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:172)
at
org.apache.myfaces.webapp.AbstractFacesInitializer._dispatchApplicationEvent(AbstractFacesInitializer.java:329)
at
org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:364)
I've cloned Gerhard ee6-ds-demo to show the issue:
https://github.com/rmpestano/ee6-ds-demo
just run any test to reproduce.
*If i comment
src/test/resources/META-INF/services/org.apache.deltaspike.testcontrol.spi.ExternalContainer*
the tests passes, it also work with omnifaces 1.x and myfaces test enabled.
this is the code which throws the exception:
https://github.com/omnifaces/omnifaces/blob/master/src/main/java/org/omnifaces/application/OmniApplication.java#L69
and here is how BeanManager is obtained:
https://github.com/omnifaces/omnifaces/blob/master/src/main/java/org/omnifaces/config/BeanManager.java#L79
Do you think there is a problem in Omnifaces code?
--
<http://www.advancedit.com.br/>Att,
Rafael M. Pestano
Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
http://rpestano.wordpress.com/
@realpestano <https://twitter.com/realpestano>