0 Replies Latest reply on Jun 25, 2007 8:32 AM by charl naude

    Nullpointer when injecting hibernate session

    charl naude Newbie


      I'm getting a nullpointer when I try to inject a hibernate managed session into one of my classes.

      I am able to inject the session into all of my action classes but nowhere else.

      Am I missing something..?

      here is some of my code:

      public class HocasService {

      private Session agriCardDatabase;

      public Element submitRequest(Param request){

      AgriSetup setup = (AgriSetup)agriCardDatabase.createQuery ("select s from AgriSetup s where s.currentEnvironment = :current ")