Search code examples
jsfglassfish

WELD-001456 Argument bean must not be null


I got this exception Caused by: org.jboss.weld.exceptions.IllegalArgumentException: WELD-001456 Argument "resolvedBean" must not be null and found the following on the web here:

This is an ordering issue in GlassFish. What happens is that the loadFlows() method of http://java.net/projects/mojarra/sources/svn/content/trunk/jsf-ri/src/main/java/com/sun/faces/application/ApplicationAssociate.java

is being invoked before WeldBootstrap.endInitialization() has finished. It is necessary to fully initialize Weld before invoking producers (which loadFlows() does).

What is that ordering issue? I mean which libraries need to be on top and load earlier? I build a jsf 2.2 web application with glassfish 4.0.


Solution

  • I had two ocpsoft rewrite jar files in glassfish4.0/glassfish/lib and glassfish4.0/glassfish/domains/domain1/lib that initialized before weld. I deleted them both and got rid of that exception.