java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

    • java.lang.ClassCastException: com.domain.MasterNumberHistory I added VM arguments to OC4J to track the class and classloaders in use: -Dexecutor.concurrent.tasks=12 -XX:MaxPermSize=512m -Xms1024m -Xmx1024m -Dclass.load.trace=class-defined:com.domain.MasterNumberHistory+loader+stack -Dclass.load.log.level=finest -Dclass.load.log.file=C:/A/loader-trace.txt -Doc4j.start.query=LoaderTree My application is named foo-rmv , and I found out that OC4J is loading the application classloader twice, as foo-rmv.root:0.0.0 foo-rmv.root:0.0.1 Here are entries from the trace from when the class was loaded - notice the two copies of the OC4J application classloader being used: Class to be defined: com.domain.MasterNumberHistory (1594 bytes). Loader: foo-rmv.root:0.0.1 . Source: /C:/oracle/oc4j_extended_101340/j2ee/home/applications/foo-rmv/foo-rmv-domain.jar (from manifest of /C:/oracle/oc4j_extended_101340/j2ee/home/applications/foo-rmv/foo-rmv-services.jar) Class to be defined: com.domain.MasterNumberHistory (1594 bytes). Loader: foo-rmv.root:0.0.0 . Source: /C:/oracle/oc4j_extended_101340/j2ee/home/applications/foo-rmv/foo-rmv-domain.jar (from manifest of /C:/oracle/oc4j_extended_101340/j2ee/home/applications/foo-rmv/foo-rmv-services.jar) Below, I’m including - messages from the trace about the classloaders in question - the loader tree ClassLoader messages ClassLoader created: *foo-rmv.root:0.0.0( (instance 1189cbb) at oracle.classloader.util.ClassLoadTracing$LoaderListener.loaderCreated(ClassLoadTracing.java:712) at oracle.classloader.EventDispatcher.loaderCreated(EventDispatcher.java:200) at oracle.classloader.PolicyClassLoader.<init>(PolicyClassLoader.java:441) at oracle.oc4j.loader.config.ConfigurationConsumer.createApplicationLoader(ConfigurationConsumer.java:275) at com.evermind.server.ApplicationStateRunning.createClassLoader(ApplicationStateRunning.java:1207) at com.evermind.server.ApplicationStateRunning.initClassLoaders(ApplicationStateRunning.java:1215) at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:130) at com.evermind.server.Application.setConfig(Application.java:454) at com.evermind.server.Application.setConfig(Application.java:355) at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1895) at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1651) at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1034) at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131) at java.lang.Thread.run(Thread.java:595)
    No Bugmate found.