1 Reply Latest reply on Jul 6, 2004 4:03 PM by John Hethcox

    Atribute not found

    jugma Newbie

      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


      My HelloWorldMBean.java is as follows:
      package com.areva.jmx.test;
      
      public interface HelloWorldMBean {
      
       public void setGreeting(String greeting);
       public String getGreeting();
       public void printGreeting();
      }
      


      My HelloWorld.java is as follows:
      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);
       }
      }
      


      My jboss-service.xml is as follows:
      <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>
      


      I have deployed my MBean in the testJMX.sar directory under server/default/deploy. My testJMX.sar directory has the following files:
      testJMX.jar (which has HelloWorld.class and HelloWorldMBean.class)
      META-INF/jboss-service.xml

      Any help will be much appreciated.

      Thank you,
      Jugma