Where's my EAR file? - Websphere

This is a discussion on Where's my EAR file? - Websphere ; When I interrogate Thread.currentThread().getContextClassLoader().get Resources("") on Websphere 6.0.x it finds the EAR file of the current application. When I do the same on 6.1.x, the EAR file is nowhere to be seen. Where has it gone, and how do I ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Where's my EAR file?

  1. Where's my EAR file?

    When I interrogate Thread.currentThread().getContextClassLoader().get Resources("") on Websphere 6.0.x it finds the EAR file of the current application. When I do the same on 6.1.x, the EAR file is nowhere to be seen. Where has it gone, and how do I find it now?

    This is desperately urgent!

    Thanks in advance

  2. Re: Where's my EAR file?

    For desperate cases, place a call to IBM Support.

    Don't forget this is a newsgroup with gentle contributors, not an official
    support channel.

    Now for your problem, why are you looking into the Thread's classloader and
    not the current object's, i.e.
    this.getClass().getClassLoader().getResource() ?


  3. Re: Where's my EAR file?

    Thanks for your reply.

    It's a long, long time since I originally wrote this code so I can't remember exactly why I had to use the thread's ClassLoader, but I think it was because the method you suggest wasn't bringing back the desired results, but the thread's ContextClassLoader was. Anyway, since this problem reared it's head, I tried that method and no joy either.

  4. Re: Where's my EAR file?

    It's entirely possible that this technique just no longer works. WAS changed over to an OSGi-based classloader structure in 6.1, so code that relies on the internals of how WAS is implemented might no longer work on 6.1.

    alasdair.pea****@parkgroup.co.uk wrote:
    > Thanks for your reply.
    >
    > It's a long, long time since I originally wrote this code so I can't remember exactly why I had to use the thread's ClassLoader, but I think it was because the method you suggest wasn't bringing back the desired results, but the thread's ContextClassLoader was. Anyway, since this problem reared it's head, I tried that method and no joy either.


  5. Re: Where's my EAR file?

    Is there a technique that would work then, or am I doomed?

  6. Re: Where's my EAR file?

    Maybe.

    What resource are you trying to retrieve and where is it located ?

    You could also check if the Classloader Viewer find the resource.

    http://publib.boulder.ibm.com/infoce...ad_viewer.html


  7. Re: Where's my EAR file?

    Basically, what I'm after is the actual EAR file of the application (i.e. when I upload myapp.ear via the WAS console, a class within that EAR needs to know where it was installed to, so that it can open it up, look in all WARs and JARs contained within, and determine what classes are available).

    So, the ClassLoader in 6.0 would have /opt/IBM/Websphere/.../installedApps/xxxNodexCell/myapp.ear in its list of resources, but 6.1 doesn't.

  8. Re: Where's my EAR file?

    When I go to use the ClassLoader Viewer service on 6.1, the "WAS Module - Jar Class Loader" sees the JAR files contained within the EAR/WAR files I'm trying to get a handle to.

+ Reply to Thread