LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-21-2005, 09:27 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
Is it possible to do this with EJBs?


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?

Last edited by eantoranz; 04-21-2005 at 09:28 AM.
 
Old 04-23-2005, 11:16 PM   #2
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
I think I know what's going on. I have to extends from PortableRemoteObject instead of RemoteObject (for starters.... haven't tried it... but I know that was at least a part of the problem).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem deploying EJBs on JBoss eantoranz Programming 1 04-15-2005 01:46 PM
in what ocasions is it WRONG to use "this" en EJBs? eantoranz Programming 0 03-31-2005 08:05 AM
EJB: Problem with concurrent calls to EJBs (according to JBoss) eantoranz Programming 0 03-14-2005 11:10 AM
Where are EJBs classes defined? eantoranz Programming 2 04-25-2004 11:01 AM
Jboss hell with ejbs plz help juby Programming 0 12-15-2003 02:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration