Hi
I'm trying to run a webapplication in AS7.3 but getting a strange Classcast exception:
>Cannot cast an instance of "class de.passd.database.PassdConfig (loaded by instance of org.jboss.modules.ModuleClassLoader(id=55))" to an instance of "class de.passd.database.PassdConfig (loaded by instance of org.jboss.modules.ModuleClassLoader(id=234))"<
Both classes are deployed in the same war archiv.
The code looks like:
package de.passd.svn;
import de.passd.database.PassdConfig;
....
Iterator<de.passd.database.PassdConfig> it = cfgList.iterator();
while (it.hasNext()) {
Object o=it.next();
de.passd.database.PassdConfig entry = (de.passd.database.PassdConfig) o;
.....
The same code is working fine in GF4.0
I read this Class Loading in AS7 - JBoss AS 7.1 - Project Documentation Editor, it says "The war is considered to be a single module, so classes defined in WEB-INF/lib are treated the same as classes in WEB-INF/classes. All classes packaged in the war will be loaded with the same class loader."
What's wrong ?