[jboss-user] [Installation, Configuration & DEPLOYMENT] - Standard MBean Deployment to JMX console problems

jmillet do-not-reply at jboss.com
Fri Aug 31 12:55:56 EDT 2007


Greetings,

Currently for development I'm using JBoss 3.2.2, and I am trying to deploy a very simple MBean to the JMX console.  Eventually, we will use it to view the log file of the JBoss server from the jmx console, but right now I am just trying to get a skeleton "Hello World" to work.  

Step 1: I wrote the MBean interface class

package mil.navy.erm;

public interface PlainViewerMBean {
	//the public interface for the Plain Viewer JMX plugin.  
	
	/**
	 * Returns a String that is the entirety of the JBoss logfile
	 */
	public String getLog();
}

Step 2: I wrote the implementing class skeleton "Hello World" version

package mil.navy.erm;

public class PlainViewer implements PlainViewerMBean {

	public String getLog() {
		return "Hello World";
	}

}

Step 3: After compiling into a jar file, I initially tried several things to attempt to get JBoss to recognize and deploy the MBean to the jmx console following the directions of many tutorials.  Some said to create and modify a file jboss-service.xml inside the META-INF directory of my jar file.  Others mentioned this, but said to use a .sar file instead.  Here is the content of my jboss-service.xml inside of the META-INF of my .sar file.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>

	
	


When starting JBoss I recieve the following error

Incompletely deployed packages:
[org.jboss.deployment.DeploymentInfo at 52cc391f { url=file:/C:/jboss-3.2.2/server/default/deploy/LogViewer.sar/ }
  deployer: org.jboss.deployment.SARDeployer at 1d6776d
  status: Deployment FAILED reason: create operation failed for package file:/C:/jboss-3.2.2/server/default/deploy/LogViewer.sar/; - nested throwable: (javax.management.InstanceNotFoundException:service.log.viewer:service=LogViewer is notregistered.)
  state: FAILED
  watch: file:/C:/jboss-3.2.2/server/default/deploy/LogViewer.sar/META-INF/jboss
-service.xml
  lastDeployed: 1188579116504
  lastModified: 1188578723827
  mbeans:
    service.log.viewer:service=LogViewer (state not available)
]MBeans waiting for classes:
  
MBeans waiting for other MBeans:
[ObjectName: service.log.viewer:service=LogViewer
 state: NOTYETINSTALLED
 I Depend On:
 Depends On Me: ]


So something is wrong with the registration of the MBean, but I can't figure out what it is.  Any help you guys can offer would be greatly appreciated.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080095#4080095

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080095



More information about the jboss-user mailing list