Hi, Guys!
I'm trying to make a "oversight" application. I want to make an visual application that will be used by the EJB application administrators to "take a look" at what's going on in the application server. Connections by clients, Exceptions, logging messages and so on.
What I thought of doing is make a Class that will be used by the EJBs to notify about events in the application. I would "publish" it thorugh JNDI. Let's call it "Logger".
The visual application would have to "present" itself to the "Logger". I set a EJB to do that job. The visual application has a class that implements a Remote interface with the methods that will be used by the Logger to tell the client about the events that go on in the Application.
I'm getting this exception when I try to tell teh server about this client:
Code:
java.rmi.MarshalException: error marshalling arguments; nested exception is:
java.rmi.MarshalException: Invalid remote object
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown Source)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:118)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:163)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:103)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:91)
at $Proxy0.create(Unknown Source)
at smile.ejb.admin.LoginFrame.btnOKClicked(LoginFrame.java:156)
at smile.ejb.admin.LoginFrame$3.actionPerformed(LoginFrame.java:100)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Caused by: java.rmi.MarshalException: Invalid remote object
at java.rmi.server.RemoteObject.writeObject(RemoteObject.java:342)
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:324)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1224)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1050)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at org.jboss.invocation.MarshalledValue.<init>(MarshalledValue.java:57)
at org.jboss.invocation.MarshalledInvocation.writeExternal(MarshalledInvocation.java:477)
at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1264)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:265)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:124)
... 34 more
What's going on?