Persistence not supported for this MBean
Posted Sat, 07 Jun 2008 22:04:00 GMT
I was getting an MBeanException with this message when I used jconsole to call a Spring exported MBean method called load(). Other methods (both attributes and operations) seemed to work fine. I may still be totally wrong, but I think that was because of the name of the method. I tried a lot of things for almost half a day, cleared the body of the method, changed attributes, changed the Spring config in many ways, changed names of beans and all sorts of other things - nothing worked. Eventually I stumbled upon this - piece of seemingly irrelevant code. It struck me though that the method that does nothing but throw an exception with a strangely matching message (this string yields only six matches in google) is called load(). I changed the method name and it worked.
So, what goes on inside is beyond me at this time, and I can’t be bothered to investigate right now, but if you’re going to export a @ManagedOperation through Spring do not call the method load().
