Hey, finally one I can answer. You are incorrect in that it is the same loader. You are seeing the classloader class name, not the actual instance ref. I believe every bean, etc is loaded by its own instance of a UnifiedClassLoader. What you need to do is print out the reference and see that they are different.
I am not exactly sure the cure, but you might try the Thread.currentThread().setContextLoader(loader1) before having the bean loaded by loader2 trying to access the bean in loader1. That may do the trick. Just be sure to save the old loader, then restore it after the call. --- Muraly R <[EMAIL PROTECTED]> wrote: > HI Gurus, > I have a problem with the classloader and I am not > able to understand the > exact cause of the ERROR. Please find the error > output from the server logs > attached. > > Here the Class JobGetPollerData tries to Access a > 'protected' method from > TimerManager and the exception is thrown. As Scott > suggested I read the > class loader docs. From my understanding, if two > different class loaders > are used to load classes and if on tries to access > the other this exception > is thrown. So tried to print the Classloader for > both the classes, and it > is loaded by the same class > "org.jboss.mx.loading.UnifiedClassLoader". > > So could you please explain, what is the issue here? > > Thanks > Muraly > > [JobGetPollerData] Reading historical task data from > the collector. > 13:01:00,036 INFO [JobGetPollerData] ClassLoader = > [EMAIL PROTECTED] > url=file:/C:/Program > Files/CSCOpx/MDC/jboss/server/default/tmp/deploy/server/default/deploy/qpm.jar/28.qpm.jar > ,addedOrder=27} > 13:01:00,489 INFO [String] ClassLoader for > TimerManager = > [EMAIL PROTECTED] > url=file:/C:/Program > Files/CSCOpx/MDC/jboss/server/default/tmp/deploy/server/default/deploy/qpmBaseDb-service.xml/17.qpmBaseDb-service.xml > ,addedOrder=16} > 13:01:00,489 ERROR [String] JobTask:run() - > Throwble. > try to access method > com.cisco.nm.qpm.server.util.scheduler.TimerManager.removeOnceSchedule(Ljava/util/TimerTask;)V > from class > com.cisco.nm.qpm.server.util.scheduler.JobTask > 13:01:00,489 ERROR [STDERR] > java.lang.IllegalAccessError: try to access method > com.cisco.nm.qpm.server.util.scheduler.TimerManager.removeOnceSchedule(Ljava/util/TimerTask;)V > from class > com.cisco.nm.qpm.server.util.scheduler.JobTask > 13:01:00,489 ERROR [STDERR] at > com.cisco.nm.qpm.server.util.scheduler.JobTask.run(JobTask.java:52) > 13:01:00,489 ERROR [STDERR] at > java.util.TimerThread.mainLoop(Unknown Source) > 13:01:00,489 ERROR [STDERR] at > java.util.TimerThread.run(Unknown Source) > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user