Finally found out what I needed to change: I just needed to use Thread.currentThread().getContextClassLoader()...
I don't know if that's going to be perfect, but it seems to have solved my problems for now. Bloody Classloading stuff. Thanks for your help. Now I can have the joy of converting a WAR to an EAR. Is there any particular reason I can't have an exploded WAR inside an unexploded EAR file?