users@glassfish.java.net

Strange JMX problem w/GFv2r2

From: <glassfish_at_javadesktop.org>
Date: Tue, 11 Nov 2008 14:36:56 PST

We are encountering a very strange JMX problem against Glassfish.

Simply put, we're doing classic JMX client/server stuff.

The MBeans are being defined in a Web App, registered, etc.

For running against glassfish, we connect to my host (localhost) and port 8686 (default).

I have a test client that sends and receives data through JMX. Some of this data are serializable Java Beans that we have written.

So, here's the rub.

On my version of Glassfish, v2r2, this works a champ. Just peachy.

On my colleagues system, it does not. We downloaded a new GF jar, installed it, set it up, deployed, connected to it, and boom. No bueno. Most aggravating.

After messing around with it for 1 or 2 hours, we finally fired up the Netbeans bundled Tomcat, added the JMX properties for the JVM, and deployed our war.

On my colleagues machine, JMX works fine with Tomcat, but not Glassfish.

JMX seems to be having some problem serializing Beans for the RETURN trip from the server. The client can send beans TO the server, but when the server returns them as method return results, we get the exception on the client.

The exception is below, talking about a Malformed URL (and boy, is it). The question is why we would be getting this strange URL from our fresh Glassfish install, and why does this work just on my GF install, and just fine on a random Tomcat install.

Any thoughts appreciated, I'd rather not deploy to Tomcat long term.

Thanx!

Exception Stacktrace:

 java.lang.reflect.UndeclaredThrowableException
 
at $Proxy0.getAgentServer(Unknown Source)
 
at org.hosscollab.client_src.Shell.listAgentServer(Shell.java:953)
 
at org.hosscollab.client_src.Shell.commandListAll(Shell.java:908)
 
at org.hosscollab.client_src.Shell.executeCommand(Shell.java:540)
 
at org.hosscollab.client_src.Shell.runConsole(Shell.java:482)
 
at org.hosscollab.client_src.Shell.runShell(Shell.java:448)
 
at org.hosscollab.client_src.Shell.run(Shell.java:312)
 
at org.hosscollab.client_src.Shell.<init>(Shell.java:273)
 
at org.hosscollab.client_src.Shell.main(Shell.java:277)
 Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
 
java.net.MalformedURLException: no protocol: Files/glassfish-v2ur2/domains/domain1/generated/ejb/j2ee-modules/hossconfigserver/
 
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
 
at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
 
at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
 
at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(Unknown Source)
 
at javax.management.MBeanServerInvocationHandler.invoke(Unknown Source)
 
... 9 more
 Caused by: java.net.MalformedURLException: no protocol: Files/glassfish-v2ur2/domains/domain1/generated/ejb/j2ee-modules/hossconfigserver/
 
at java.net.URL.<init>(Unknown Source)
 
at java.net.URL.<init>(Unknown Source)
 
at java.net.URL.<init>(Unknown Source)
 
at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
 
at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
 
at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
 
at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
 
at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
 
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
 
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
 
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
 
at java.io.ObjectInputStream.readObject0(Unknown Source)
 
at java.io.ObjectInputStream.readObject(Unknown Source)
 
at sun.rmi.server.UnicastRef.unmarshalValue(Unknown Source)
 
... 14 more
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=316134