Search code examples
jakarta-eeglassfishejb

How to use Predicate in EJB and fix the used engine to ejb but not appclient?


I'm deploying an EJB application inside glassfish, and want it to use the ejb engine for my application. However, when I add Predicate to my remote class it changes the engine to appclient instead of ejb.

    @Override
    public int getNombreAjourne(String filiere, String classe) throws 
    Exception {
          List<Student> allStudents = Parser.getStudents();

          // Deleting this line fix the problem
          Predicate<Student> byFiliereAndClasse = student -> 
          student.getFiliere().equals(filiere)
          && student.getClasse().equals(classe) 
          && student.getMoyenne() < 10;

          return allStudents.size();
    }

Solution

  • I managed to solve it by downgrading my jdk from jdk11 to 1.8. I hope this will help someone :)