Hi, I have an application that I moved from WAS 5 to WAS 6.
I am using this command to get access to an xml file :
InputStream in = DefaultXMLBuilder.class.getClassLoader().getResourceAsStream("filename.xml");
The only difference between the 2 inzstallations is that in the earlier WAS 5 set up I was ungin PARENT_LAST class loader policy while in the new WAS 6 set up I am using PARENT_FIRST class loader policy.
Originally posted by Karthik Krishnamurthy: The only difference between the 2 inzstallations is that in the earlier WAS 5 set up I was ungin PARENT_LAST class loader policy while in the new WAS 6 set up I am using PARENT_FIRST class loader policy.
Thats a non-trivial change when you are reading files from the class path. It's probable you are retrieving the wrong class loader, either one too high on the food chain (like the server's bootstrap loader) or too low.
ClassLoader's in J2EE, WebSphere in particular, are extremely complicated. If I were you I would grab the classloader object and view it in a debugger (or call toString() on it) to try to determine where on the food chain the class loader you have is, and where you need to be (up or down).
If I had to guess I'd say you are loading the "DefaultXMLBuilder" on the server (in the server's lib directory) therefore when you call getClassLoader() you are actually retrieving the server class loader which has no knowledge of files inside the EAR.