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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -