0 Replies Latest reply on Sep 26, 2018 4:19 AM by Michael Hansen

    Wildfly 13 EAR Class Loader problem

    Michael Hansen Newbie

      I have a multi ear file problem.


      - sf-api.jar

      - sf-impl.jar

      - sf-persistence.jar

      - lib/sf2-api.jar



      - sf2-api.jar

      - sf2-impl.jar

      - sf2-persistence.jar


      A Session EJB runs the following code:


      EJB2RemoteInterface ejb2 = lookup.....// remote lookup on ear2.ear
      List<MyClass> returnedMyClass = ejb2.returnList(); //this is working
      for (MyClass mc : returnedMyClass.get(0)) { // this gives ClassCastException



      Exception looks like:

      Caused by: java.lang.ClassCastException: some.package.MyClass cannot be cast to some.package.MyClass


      It worked on Wildfly 10.1, but not in Wildfly 13.0


      Anyone has a solution besides combining the 2 ear-files into one?