[Management, JMX/JBoss] - NotCompliantMBeanException: Class does not expose a manageme
by moviolone
Hi All,
I'm trying to deploy a .sar containing an MBean on JBoss 4.2.3.GA, but I keep on getting the following exception:
2008-09-24 15:02:38,250 DEBUG [org.jboss.deployment.SARDeployer] create operation failed for package file:/D:/workspace/TestBench/JBossESB/jboss-4.2.3.GA/server/myserver/deploy/my_sar.sar
| org.jboss.deployment.DeploymentException: Class does not expose a management interface: java.lang.Object; - nested throwable: (javax.management.NotCompliantMBeanException: Class does not expose a management interface: java.lang.Object)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:196)
| at org.jboss.system.ServiceController.install(ServiceController.java:226)
| at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
| ...
| Caused by: javax.management.NotCompliantMBeanException: Class does not expose a management interface: java.lang.Object
| at org.jboss.mx.metadata.MBeanCapability.of(MBeanCapability.java:102)
| at org.jboss.mx.metadata.MBeanCapability.of(MBeanCapability.java:100)
| at org.jboss.mx.metadata.MBeanCapability.of(MBeanCapability.java:100)
| at org.jboss.mx.metadata.MBeanCapability.of(MBeanCapability.java:100)
| at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:182)
| ... 33 more
This is my jboss-service.xml, that is placed in a META-INF folder inside the sar
<server>
|
| <mbean code="my.package.ServerInitializationService" name="my.package:service=ServerInitialization"/>
|
| </server>
And these are the MBean interface and class
package mypackage.interfaces;
|
| import org.jboss.system.ServiceMBean;
|
| public interface ServerInitializationServiceMBean extends ServiceMBean
| {
| public void init();
| }
|
package my.package;
|
| import java.util.logging.Logger;
|
| import org.jboss.annotation.ejb.Management;
| import org.jboss.annotation.ejb.Service;
| import org.jboss.system.ServiceMBeanSupport;
|
| import my.package.interfaces.ServerInitializationServiceMBean;
|
|
| @Service(objectName = "my.package:service=ServerInitialization")
| @Management(ServerInitializationServiceMBean.class)
| public class ServerInitializationService extends ServiceMBeanSupport implements ServerInitializationServiceMBean
| {
| private static final String BEAN_NAME = "Server Initialization";
|
| private final Logger LOGGER = Logger.getLogger(ServerInitializationService.class.getName());
|
| public ServerInitializationService()
| {
| super();
| }
|
| public void init()
| {
| ...
| }
|
| public void createService()
| {
| ...
| }
|
| public void destroyService()
| {
| ...
| }
|
| public String getName()
| {
| return BEAN_NAME;
| }
|
| public int getState() {
| // TODO Auto-generated method stub
| return 0;
| }
|
| public String getStateString() {
| // TODO Auto-generated method stub
| return null;
| }
|
| public void jbossInternalLifecycle(String arg0) throws Exception {
| // TODO Auto-generated method stub
|
| }
|
| public void startService() throws Exception
| {
| init();
| }
|
| public void stopService() {
| // TODO Auto-generated method stub
| ...
| }
| }
|
I've searched the net and the JBoss wiki and doc, but couldn't find anything wrong with the code (see http://wiki.jboss.org/wiki/ExampleHelloWorldService)
Is there something I'm doing wrong?
Thanks for your help
Daniele
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178570#4178570
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178570
17 years, 7 months
[JBoss Getting Started Documentation] - Re: run.sh giving trouble
by lonetwins
Thanks Kevin. That solved the problem. however this is the error that i am getting now . Would be great if someone can point me to the issue :
18:32:25,505 INFO [Server] Core system initialized
18:32:25,531 ERROR [MainDeployer] Could not make local copy for file:/home/jboss-as/server/production/conf/jboss-service.xml
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1345)
at java.io.File.createTempFile(File.java:1434)
at org.jboss.deployment.MainDeployer.makeLocalCopy(MainDeployer.java:1185)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:851)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:809)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:595)
18:32:25,542 ERROR [MainDeployer] Could not initialise deployment: file:/home/jboss-as/server/production/conf/jboss-service.xml
org.jboss.deployment.DeploymentException: Failed to find META-INF/jboss-service.xml for archive jboss-service.xml
at org.jboss.deployment.SARDeployer.parseDocument(SARDeployer.java:616)
at org.jboss.deployment.SARDeployer.init(SARDeployer.java:181)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178565#4178565
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178565
17 years, 7 months