-
1. Re: JBoss 3.0 JMX java.lang.NoSuchMethodException
sgturner Jul 23, 2002 7:39 PM (in response to dfunkt)This happened to me. It turned out that the method is being looked up by not only the name, but the signature. Your code indicates that the signature of the method is empty by the fact that your code uses newObject[0], new String [0]. I suggest you try passing null for both those values in the invoke method. If it worked in 2.2, but not in 3.0, I would chalk that up to JBoss having a better implementation of JMX in 3.0.
-
2. Re: JBoss 3.0 JMX java.lang.NoSuchMethodException
dfunkt Jul 24, 2002 10:50 AM (in response to dfunkt)thanks for the help senor turner!
unfortunately, that didn't work for me. i tried changing the parameters passed in to null, as well as setting their values to null. neither tactic worked. ??? i am using JBoss 3.0.0 (current when i started this little migration journey...) if that info is any help.
thanks again for any help/advice!... -
3. Re: JBoss 3.0 JMX java.lang.NoSuchMethodException
sgturner Jul 24, 2002 12:25 PM (in response to dfunkt)<i tried changing the parameters passed in to null, as well as setting their values to null>
I'm confused what the difference is.
The code should be:
server().invoke("DefaultDomain:service=Register,jndiName=CFRegistry","getManagedTypes",null, null);
Does your MBean and method appear in 8082?
The only other thing I know to do is take the bitter pill and go in there with the debugger and see whats happening. -
4. Re: JBoss 3.0 JMX java.lang.NoSuchMethodException
dfunkt Jul 24, 2002 1:11 PM (in response to dfunkt)a little sleight of hand there, sorry! i condensed and 'paraphrased' the code... in actuality, the code declares 2 local array variables, which are the parameters passed in, and then calls invoke( ) with the references. i tried commenting out the original invoke( ) call, and replaced it with an invoke( ) with nulls as parameters and not the variables. didn't work... so i then tried setting the references to null (instead of the empty arrays) when they are declared, and then using the original method call. LONG shot, and again no dice.
the MBean does indeed appear in the agent view, but when i click on it to view it, only a small subset of the methods appear. it shows the MBean lifecycle callback methods, and a single business method. everything else is nowhere to be seen. (evidently the root of the problem...)
i assume you mean getting in the JBoss code with the debugger... sounds interesting, if a bit scary. thanks for the excellent and prompt help and advice! =) i am new to this project, as well as JBoss, and it has really been quite a learning process.
i am also going to try casting the MBean reference, and calling the method explicity rather than with reflection. someone in our meeting this morning suggested that we could do this. well, at leaast i have a couple different options now...
peace, doug -
5. Re: JBoss 3.0 JMX java.lang.NoSuchMethodException
sgturner Jul 24, 2002 2:21 PM (in response to dfunkt)< going to try casting the MBean reference>
If you mean casting the ObjectInstance, that won't work since ObjectInstance is not in the class hierarchy of your MBean.
If things don't look right in the agent view, then fix that first. Go method by method, making sure correct pattern is followed for setters and getters, and method name in interface matches method name in class. Shut down JBoss and delete tmp directory. -
6. Re: JBoss 3.0 JMX java.lang.NoSuchMethodException
dfunkt Jul 24, 2002 2:53 PM (in response to dfunkt)i just figured that out...i was thinking objectInstance was an instance of Object. doh! =(
ok. will try your suggestions. gracias! -
7. Re: JBoss 3.0 JMX java.lang.NoSuchMethodException
juha Jul 26, 2002 1:52 PM (in response to dfunkt)You need to use server.getAttribute("AttributeName") to read an attribute value rather than server.invoke() which only works for operations.
-- Juha -
8. Re: JBoss 3.0 JMX java.lang.NoSuchMethodException
sgturner Jul 30, 2002 1:14 AM (in response to dfunkt)Nothing like getting the right answer from the master !! Thanks Juha.