1 Reply Latest reply on Sep 23, 2002 3:52 PM by Ron Wilcom

    EAR file - jarred vs. unjarred?

    Ron Wilcom Newbie

      When I deploy an EAR file (jarred up) in JBoss 3.0.1, I get a number of IllegalAccessErrors between my web apps and my common jars when the methods are protected or package scoped. The common JARs are shared between the WARs and some EJB JARs - so I guess the EJB class loader is loading them first. Even running servlets that call proetected classes and methods in same JAR file/package gives me the IllegalAccessError(s).

      The confusing part to me is that if I simply unjar the EAR file (with no changes) and deploy the files in JBoss under a regular folder (naming the folder /myear.ear for example) EVERYTHING starts working great with no IllegalAccessError(s).

      So - what is the difference in the classloaders between a jarred and unjarred EAR? In the unjarred environment is each WAR and EJB JAR loading its own set of libraries (have separate class loaders), where in a jarred up environment the WAR starts to depend on the EJB classloader (use a parent/child class loader)?

      What is the approach to fix this problem, if any, without changing code? I don't want to make all of my methods public between classes that reside in the same package!

      Any answers here would be very helpful - thanks.