1 Reply Latest reply on Oct 31, 2017 1:53 AM by Fredrik Andersson

    Is it different classloaders in a EAR?

    Fredrik Andersson Newbie



      I use a JBoss eap 6.4 and tries to create a test EAR with a WAR and a JAR with ejb's inside.

      My problem is that Servlets in my WAR can not make local calls (@EJB) to the ejb's inside the JAR even though they are packed inside the same JAR.

      I red that for local clients: It must run in the same application as the enterprise bean it accesses.

      at: Accessing Enterprise Beans - The Java EE 6 Tutorial


      In the image below the red arrow is where I got the problem. The LocalSessionBean get not injected with a Bean from the JAR.


      Could it be that the WAR and EJB-JAR have different classloaders and there fore can not communicate "local".

      If so, isn't that a contradiction to the sentence from the link above?


      Best regards