Example

public class ClassA extends Exception{
public void methodA {

URL u = this.getClass.getResource();
//...
}

}
Solution Reconsider the use of the extension and the use of the getResource call.