[jboss-user] [Remoting] - Newbie Remoting Problem (Class does not expose a management

gottad do-not-reply at jboss.com
Fri Jun 8 14:52:34 EDT 2007


Hi,

I'm new at remoting with JBoss. I Use JBoss 4.2.0GA, Remoting 2.0.0 and Java JDK 1.5.0_12. I'm not possible to deploy the 2.0.0 Remoting-Server-Example. I get the Exception "Class does not expose a management interface".
This is my Server:
package rem;
  | 
  | import javax.management.MBeanServer;
  | import org.jboss.remoting.InvocationRequest;
  | import org.jboss.remoting.InvokerLocator;
  | import org.jboss.remoting.ServerInvocationHandler;
  | import org.jboss.remoting.ServerInvoker;
  | import org.jboss.remoting.callback.InvokerCallbackHandler;
  | import org.jboss.remoting.transport.Connector;
  | 
  | public class SampleInvocationHandler implements ServerInvocationHandler
  | {
  |       public Object invoke(InvocationRequest invocation) throws Throwable{
  |          System.out.println("Invocation request is: " + invocation.getParameter());
  |          return "ich Server, dein Request ("+invocation.getParameter()+") meine Antwort";
  |       }
  |       public void addListener(InvokerCallbackHandler callbackHandler){}
  | 
  |       public void removeListener(InvokerCallbackHandler callbackHandler)      {}
  |      public void setMBeanServer(MBeanServer server){}
  | 
  |       public void setInvoker(ServerInvoker invoker){}
  | }
I compiled this File and placed it in a folder called "rem" (because of its package) and this folder would be included into an file called rem_test.jar. I have placed this rem_test.jar File in the JBOSS/server/default/lib directory.

I created then a META-INF Folder and placed there 2 XML-Files. The First one is "jboss-app.xml" with this content:
<!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd"> 
  | <jboss-app>
  |   <module>
  |     <service>rem.sar</service>
  |   </module>
  | </jboss-app>
The second one is "jboss-service.xml" with this content:
<?xml version="1.0" encoding="UTF-8"?>
  | <!DOCTYPE server>
  | 
  | <server>
  | 	<!-- <classpath codebase="../" archives="*"/> -->
  | 	<mbean	code="org.jboss.remoting.transport.Connector"
  | 			name="jboss.remoting:service=Connector,transport=Socket"
  | 			display-name="Socket transport Connector">
  | 		<attribute name="Configuration">
  | 			<config>
  | 				<invoker transport="socket">
  | 					<attribute name="numAcceptThreads">1</attribute>
  | 					<attribute name="maxPoolSize">303</attribute>
  | 					<attribute name="clientMaxPoolSize" isParam="true">304</attribute>
  | 					<attribute name="socketTimeout">60000</attribute>
  | 					<attribute name="serverBindAddress">${jboss.bind.address}</attribute>
  | 					<attribute name="serverBindPort">6666</attribute>
  | 					<!-- <attribute name="clientConnectAddress">127.0.0.1</attribute>
  | 					<attribute name="clientConnectPort">7777</attribute> -->
  | 					<attribute name="enableTcpNoDelay" isParam="true">false</attribute>
  | 					<attribute name="backlog">200</attribute>
  | 				</invoker>
  | 				<handlers>
  | 					<handler subsystem="remSample">
  | 						rem.SampleInvocationHandler</handler>
  | 				</handlers>
  | 			</config>
  | 		</attribute>
  | 	</mbean>
  | </server>
I created a Folder called "rem.sar" in the JBoss/server/default/deploy Folder and placed there the "META-INF" Folder with both xml files.

If I start JBoss, i get the Exception that JBoss need a management Interface. But i thought this was the "ServerInvocationHandler"? Here is part from the Log-File:
...
  | 2007-06-08 18:23:17,113 DEBUG [org.jboss.deployment.SARDeployer] create operation failed for package file:/C:/schulung/jboss-4.2.0.GA/server/default/deploy/rem.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.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.server.Invocation.invoke(Invocation.java:86)
  | 	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 $Proxy4.install(Unknown Source)
  | 	at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
  | ...
I hope i make a stupid mistake, but i can't find my fault (and i still have no client). I'm trying since 12 hours about this problem, i hope someone can help me.
Thanks a lot!

Thomas (gottad)

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

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



More information about the jboss-user mailing list