You are trying to load it from a different classloader.
Hmm, I'm getting something like it. How do you now that he is loading the inner class in a separate classloader? Is it something to do with it being inner?
I also have a class, which instantiates an inner.class, where the inner class is inner in the class instantiating it. It compiles fine, and the class and inner class is deployed in the same jarfile? But at runtime, I get the following exception:
java.lang.IllegalAccessError: tried to access class dk.nve.fibernet.nablegw.model.MetadataDB$CategoryCompareCategoryComparator from class dk.nve.fibernet.nablegw.model.MetadataDB
How can any of these two classes be loaded in another classloader?
If it really is the classloader that is the issue, what can I then do, to make them load from same classloader?