So, my first stab would be to check very carefully that you have
followed the "a place for everything ang everything in its place"
rule. In particular check that you don't have any old copies of
classes or jars lurking in lib/app or other such places. I think
version skew might also be a contributory factor.
I have been using Application visibility. In that mode it is (I believe)
sufficient to have your WAR files refer only to the EJB jar manifest
and have the EJB jar refer to all utility jars. [The rules are different
for Module visibility]
Servlet Error: trying to refine class com/../DomainClass (bad class
loader?): java.lang.LinkageError: trying to refine class
com/../DomainClass (bad class loader?)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at
com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled
Code))
at
com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled
Code))
at
com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled
Code))
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled
Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at com.sgrant.dcweb.mediator.Mediator.registerMediator(Mediator.java:54)
at com.sgrant.dcweb.mediator.Mediator.getMediator(Mediator.java:35)
at com.sgrant.dcweb.actions.LoginAction.perform(LoginAction.java:37)
at com.sgrant.dcweb.actions.ActionServlet.service(ActionServlet.java:100)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:159)
at
com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:286)
at
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:106)
at
com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at
com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at
com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:499)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:278)
at
com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:105)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:67)
at
com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:123)
at
com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
at
com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
at
com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
at
com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)
[Did you resolve your problem?]
WAR file manifest => myEjbs.jar
myEjbs.jar manifest => util1.jar util2.jar
Isolation set application
No duplicate classes in any other locations (lib/app or lib/ext or lib)
No doubt that all the classes in all the jars were compiled against the same version of the code (I'm pretty sure
that version skew accounted for one of my problems)
Bounce server after any changes.
One diagnostic trick -> add a
static { yourDebugPrint(myclass.getClassloader().toString());}
to all the classes that do get loaded. this will show you the sequence of what's being loaded and from where.
Also I think you can enable trace on some of the classloaders, can't remember the trace
mask right now. I think the static print above will indicate some plausible classes to trace.
In the infocenter the doc recommends that you point to the utilities from both the EJB jar and the War manifest. Does
this conflict with your advice?
Do the various versions 4.0.0 through 4.0.2 do any better with these problems. I have 4.0.1.
So, which class tries to load the property file? Consider which classloader
loaded that class, and hence which class path was searched to load it.
[Printing out the toString() of the classloader as I suggested will let you
see the answer to this.]
Having determined that path you are now set to find a location for the
property files. [No doubt there are other approaches, but I've seen folks
follow this analysis with success - but all that depends upon how you
are reading the property files.]
The other point though, is that in a distributed environment does it make
sense to read property files? How many copies will there be of that
property file? How readily will they stay in step? A database (or JNDI, or ...)
may better.
You probably should move up to 4.0.2, but I don't think it will help you with
this problem. We're not dealing with a bug here, more a tricky to
understand config feature.
The advice in the Info Centre does not distinguish Model and Applcation
visibility. What works best in one does not work best in the other.