It is perhaps a similar problem to the bug "[ 973565 ]
NPE when redeploying root context" in terms of class
loader.
This problem is reproductible on JBOSS 3.2.6RC1 with a
jdk 1.4.
The problem is that a NullPointerException is raised at
execution time when redeploying a SAR archive that uses
the scheduler plugin.
I did an example class that shows simply the problem.
In the attached zip there is both source (eclipse
project) and sar archive.
The problem appears on a standard installation of JBOSS
3.2.6RC1.
To reproduce it :
1) start JBOSS
2) deploy testsar.sar (it works without NPE)
3) undeploy testsar.sar
4) redeploy testsar.sar (exactly the same) : the
following exception is raised :
java.lang.NullPointerException
at
org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:143)
at
org.jboss.mx.loading.UnifiedClassLoader3.loadClassImpl(UnifiedClassLoader3.java:178)
at
org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.java:132)
at
java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:42)
at
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:119)
at
org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:96)
at testsar.TestSar.doWork(TestSar.java:50)
at testsar.TestSar.perform(TestSar.java:44)
at
org.jboss.varia.scheduler.Scheduler$Listener.handleNotification(Scheduler.java:1263)
at
sun.reflect.GeneratedMethodAccessor44.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:138)
at $Proxy8.handleNotification(Unknown Source)
at
javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:98)
at
javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:83)
at
javax.management.timer.Timer.sendNotifications(Timer.java:441)
at
javax.management.timer.Timer.access$000(Timer.java:31)
at
javax.management.timer.Timer$RegisteredNotification.doRun(Timer.java:612)
at
org.jboss.mx.util.SchedulableRunnable.run(SchedulableRunnable.java:164)
at
org.jboss.mx.util.ThreadPool$Worker.run(ThreadPool.java:240)
source and binary of one class that shows the bug.
Logged In: YES
user_id=175228
Fixed for 3.2.6RC2+
Logged In: YES
user_id=28462
Hello Mr Stark,
Could you please post whether the fix for this bug was
specific to the scheduler plugin.
I have an identical stack trace for my application deploying
under 3.2.5 but i do not use the scheduler plugin.
thanks.
rob.
Logged In: YES
user_id=175228
Yes, it was specific to the schduler plugin.