The exception is thrown as part of scanning.
Although scanning should follow the same classloading rules, it might be easier to just exclude this resources from being scanned.
See this for more details on how to do that: http://java.dzone.com/articles/jboss-microcontainer-scanning