Skip to main content

Strange JMX problem w/GFv2r2

4 replies [Last post]
whartung
Offline
Joined: 2003-06-13

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.(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.(Unknown Source)

at java.net.URL.(Unknown Source)

at java.net.URL.(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

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
km
Offline
Joined: 2005-10-28

Hmmm. Something Fishy here :)

I see "Files/glassfish-v2ur2/domains/ ..." and assume that it is a substring of "C:/Program Files/...".

So, are you on Windows when it fails and on better platforms when it works?

-Kedar

tjquinn
Offline
Joined: 2005-03-30

Or perhaps both installations are on Windows but your installation is not in \Program Files\ while your colleague's is?

- Tim

whartung
Offline
Joined: 2003-06-13

Hot damn! That could well be it! I will get back to you in a bit...good find.

whartung
Offline
Joined: 2003-06-13

Yup, that was it.

Thanks a lot all!

In hindsight I've heard mumblings about this issue, and having the Unix chromosome, this has never been an issue for me. But my colleague is Different, so this was an obvious choice. Even when we resintalled GF, he moved it (before running setup) in to Program Files and, of course, that didn't work either.

No matter, all betta, just need to brand that one on my arm.

Thanx again!