I am using jboss-4.0.0DR4. When I deploy my MBean I get the following error:
12:54:17,479 INFO [ServiceConfigurator] Problem configuring service HelloWorld:
name=helloWorld1
org.jboss.deployment.DeploymentException: No Attribute found with name: greeting
package com.areva.jmx.test; public interface HelloWorldMBean { public void setGreeting(String greeting); public String getGreeting(); public void printGreeting(); }
package com.areva.jmx.test; public class HelloWorld implements HelloWorldMBean { private String greeting = null; public HelloWorld() { this.greeting = "Hello World! I am a Standard MBean"; } public void HellowWorld(String greeting) { this.greeting = greeting; } public void setGreeting(String greeting) { this.greeting = greeting; } public String getGreeting() { return greeting; } public void printGreeting() { System.out.println(greeting); } }
<server> <mbean code="com.areva.jmx.test.HelloWorld" name="HelloWorld:name=helloWorld1 "> <attribute name="greeting">Hello World! I am a Standard MBean</attribute> </mbean> </server>
in the XML file change 'greeting' to 'Greeting'
I think it should be lowercase too, but I guess it's not.