1 Reply Latest reply on Sep 29, 2010 9:17 PM by Stuart Douglas

    Cannot access outjected objects in entity listener

    kamal perera Newbie


      I wrote an entity listener which is responsible for updating the metadata like created by, created time in entities. I tried to access the Seam logger and the outjected User object inside my entity listener but got a null  pointer exception at runtime. when I removed those it worked fine. Is there anything wrong. The code is as below.

      public class MetaDataListener {

         private Log log;

         User currentUser;

          public void setCreatedBy(SystemMetaData metaData) {
              metaData.setCreatedDate(new Date());
              log.debug(metaData updated);