java ee - CDI event is always null -


cdi event null below exception. wondering whether can use cdi in general static methods. class should managed bean, in order make cdi event work?

public class util {         @inject         @yellow         static         event<documentmessageevent> documentevent;          public static list<atp> convertiball(string filename) throws resourceexception {                   .....                  fireevent(page)      }         private synchronized static void fireevent(apvo page){             try {                 documentevent.fire(new documentmessageevent(page));             } catch (exception e) {                 log.error(                         "exception caught while firing documentmessageevent ["                                 + page.getpagenumber() + "] - " + e.getmessage(), e);              }      } } 

error

exception caught while firing documentmessageevent [2] - null: java.lang.nullpointerexception 


Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -