Where's my EAR file?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > WebSphere > WebSphere Application Server > Where's my EAR file?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Where's my EAR file?  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-22-07 06:30 PM

When I interrogate Thread.currentThread().getContextClassLoader().getResourc
es("") 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





[ Post a follow-up to this message ]



    Re: Where's my EAR file?  
Ben_


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-22-07 06:30 PM

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() ?






[ Post a follow-up to this message ]



    Re: Where's my EAR file?  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-22-07 06:30 PM

Thanks for your reply.

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





[ Post a follow-up to this message ]



    Re: Where's my EAR file?  
Randy Schnier


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-23-07 12:26 AM

It's entirely possible that this technique just no longer works.  WAS change
d 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.peacock@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 exac
tly 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 ContextClass
Loa
der was.  Anyway, since this problem reared it's head, I tried that method a
nd no joy either.





[ Post a follow-up to this message ]



    Re: Where's my EAR file?  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-23-07 12:28 PM

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





[ Post a follow-up to this message ]



    Re: Where's my EAR file?  
Ben_


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-23-07 12:28 PM

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/infoc...oad_viewer.html






[ Post a follow-up to this message ]



    Re: Where's my EAR file?  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-23-07 12:28 PM

Basically, what I'm after is the actual EAR file of the application (i.e. wh
en 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/x
xxNodexCell/myapp.ear in its list of resources, but 6.1 doesn't.





[ Post a follow-up to this message ]



    Re: Where's my EAR file?  


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-23-07 06:23 PM

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





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:02 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register