Hi,

You always want to narrow your objects:

Object ref = ctx.lookup("inmemory/maps/MapTest");
            
HashMap map = (HashMap)
                PortableRemoteObject.narrow(ref, HashMap.class);

This is because implementations of corba are not required to give you
the object reference directly.

Hope this helps,

Joost.

-----Original Message-----
From: Sitepark [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 28, 2001 1:02 PM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] JNDIMapMBean - ClassCastException


Hi,

I follow the HOWTO to integrate a Custom Service via MBeans.
It work's

But my Client dont't work.

I get this exception:
Exception in thread "main" java.lang.ClassCastException:
javax.naming.Reference

I use this:
InitialContext ctx = new InitialContext();
HashMap map = (HashMap) ctx.lookup("inmemory/maps/MapTest");

Can anyone help?

Many thanks

Holger

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to