3 Replies Latest reply on Aug 8, 2012 2:12 AM by j_ri

    java.lang.IllegalAccessError when invoking protected method from another class in the same package path but different jar.

    veitg

      I'm encountering the same problem as described here:

       

      https://issues.jboss.org/browse/AS7-3305

       

      Is there any way, to avoid repackaging the jar's classes into one to avoid the IllegalAccessError? Problem seems that JBoss7 has a separate Classloader for each .jar within the ear.

      So the EJB.jar has it's own and the foo.jar under /lib as well which leads to the error. Making the methods public is not an option for me.

       

      I tried the proposed solution with jboss-deployment-structure.xml but that didn't work out for me. Maybe someone could shed some light on this by showing a working example. Tried

      several combinations, but always ended up in two separate CLs.

       

      I'm using JBoss 7.1.0 final.

       

      Thanks.