I am having the same problem in JBoss but not in GlassFish as mentioned here in an earlier question.
classLoader.getResource doesn't work in jar file
But my problem is that I can not use getResourceAsStream(). It returns a stream object and I need a URL object as returned by getResource(). I am using that URL in a quite huge product. If I use stream I have to make a very big change.
Is there any way to get a URL instead of a stream?