Tuesday, September 17, 2013

JSF Errors: JSF1017: ''..' was thrown while handling the PreDestroy annotation(s) for bean ''..'' in scope ''..''. Message: ..

JSF Error 1017 could be found in application server logs in form:

INFO: JSF1017: 'java.lang.NullPointerException' was thrown while handling the PreDestroy annotation(s) for bean 'ajaxBean' in scope 'REQUEST'

The exception can be raised in Mojarra method com.sun.faces.application.WebappLifecycleListener.handleAttributeEvent if an error occured when BeanManager tries to destroy specified Bean, as shown below:

private void handleAttributeEvent(String beanName, Object bean, ELUtils.Scope scope)
   {

     ApplicationAssociate associate = getAssociate();

     try {
      if (associate != null) {
         BeanManager beanManager = associate.getBeanManager();
         if ((beanManager != null) && (beanManager.isManaged(beanName)))
           beanManager.destroy(beanName, bean);
           // Thr error will be rised HERE
       }
     } 

     ...

No comments:

Post a Comment