[ mx4j-Bugs-739789 ] BCEL error registering MBean

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.java.mx4j.devel
Message-ID <[email protected]>
Bugs item #739789, was opened at 2003-05-19 05:38
Message generated for change (Comment added) made by pbrant
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=739789&group_id=47745

Category: JMX implementation
Group: None
Status: Closed
Resolution: Works For Me
Priority: 5
Submitted By: Peter Brant (pbrant)
Assigned to: Simone Bordet (biorn_steedom)
Summary: BCEL error registering MBean

Initial Comment:
BCEL apparently generates invalid bytecode (stack 
trace is below).  The problem occurs quite rarely (but 
has happened more than once).  It would seem to be a 
multi-threading problem in mx4j or BCEL, but beyond 
that I don't have much information to offer.

java.lang.ClassFormatError: Invalid method signature: 
(Ljava/lang/Object;)Z
        at 
org.apache.bcel.generic.Type.getArgumentTypes
(Type.java:225)
        at 
org.apache.bcel.generic.InvokeInstruction.consumeStac
k(InvokeInstruction.java:99)
        at 
org.apache.bcel.generic.MethodGen.getMaxStack
(MethodGen.java:824)
        at 
org.apache.bcel.generic.MethodGen.setMaxStack
(MethodGen.java:717)
        at 
mx4j.server.BCELMBeanInvoker.createInvokeImpl
(BCELMBeanInvoker.java:187)
        at mx4j.server.BCELMBeanInvoker.create
(BCELMBeanInvoker.java:114)
        at mx4j.server.MBeanIntrospector.createInvoker
(MBeanIntrospector.java:537)
        at 
mx4j.server.MBeanIntrospector.introspectType11
(MBeanIntrospector.java:225)
        at mx4j.server.MBeanIntrospector.introspectType
(MBeanIntrospector.java:194)
        at mx4j.server.MBeanIntrospector.introspect
(MBeanIntrospector.java:94)
        at mx4j.server.MBeanServerImpl.registerImpl
(MBeanServerImpl.java:526)
        at mx4j.server.MBeanServerImpl.registerMBean
(MBeanServerImpl.java:519)
        at 
us.wi.state.courts.ccap.wcca2.cache.CacheManager.get
CacheManager(CacheManager.java:96)
        at 
us.wi.state.courts.ccap.wcca2.GlobalConstants.<clinit>
(GlobalConstants.java:25)


----------------------------------------------------------------------

>Comment By: Peter Brant (pbrant)
Date: 2003-11-05 08:06

Message:
Logged In: YES 
user_id=320675

I haven't looked at mx4j code in question, but the BCEL FAQ
(http://jakarta.apache.org/bcel/faq.html) explicitly notes
that BCEL is not threadsafe.  It looks like mx4j is assuming
that it is.

 

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2003-11-05 06:59

Message:
Logged In: NO 

Hello again,

i have managed to reproduce problem on single CPU platform

:)

easy steps to try if you want
start 100 threads in loop and set each of them to call:

MBeanServer.registerMBean(java.lang.Object mbean,
                                    ObjectName objectName)


----------------------------------------------------------------------

Comment By: Peter Brant (pbrant)
Date: 2003-11-04 09:06

Message:
Logged In: YES 
user_id=320675

Our machines were single processor (but they were Xeons
(with the two virtual CPUs mapping to a single physical CPU))

Dropping back to the reflected MBean invoker (by setting the
mx4j.mbean.invoker system property to
mx4j.server.ReflectedMBeanInvoker) has worked great for us.
 For our purposes whatever marginal performance hit there is
is irrelevant.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2003-11-04 07:16

Message:
Logged In: NO 

Hello,

we have same problem. 

It happens only on multiprocessor platform and never on 
standard single CPU.

Stacktrace is almost the same

----------------------------------------------------------------------

Comment By: Simone Bordet (biorn_steedom)
Date: 2003-08-26 08:03

Message:
Logged In: YES 
user_id=128193

Could not reproduce the bug.

----------------------------------------------------------------------

Comment By: Peter Brant (pbrant)
Date: 2003-05-19 11:49

Message:
Logged In: YES 
user_id=320675

It's a bit hard to generalize because it's only happened twice 
in the last 4-5 months (although both times on the same 
MBean).

I'm afraid the BCEL version isn't entirely clear.  We're using 
the one bundled with Xalan/XSLTC and there's no indication 
what version they're using in the source download.  Is there 
one you recommend? 5.1?

The management interface of said MBean is appended.  It 
doesn't have a method like the one you describe.

public interface CacheMonitorMBean
{
	public static final String OBJECT_NAME_BASE =
		"Monitor:type=cacheMonitor,cacheId=";
		
	public static final String MONITOR_TYPE 
= "cacheMonitor";

	public String getCacheId();
	public int getSize();
	public int getMigratedSize();
}

----------------------------------------------------------------------

Comment By: Simone Bordet (biorn_steedom)
Date: 2003-05-19 11:28

Message:
Logged In: YES 
user_id=128193

Does it always happen with MBeans that have a 

public boolean 
someMethod(Object[] arg)

in the management interface, or it 
seems to you that it does not depend on the management interface 
?

Which BCEL version do you use ?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=450647&aid=739789&group_id=47745


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.