RTFJD (Read the freaking javadoc) ClassCastException - if this Properties object contains any keys or values that are not Strings.
Regards, Adrian On Thu, 2003-12-18 at 11:01, Muraly R wrote: > Hi Gurus, > I am trying a scenario, where in the home handle of the EJB plus the JNDI, > to be stored into a file using ObjectOutputStream. > But I am getting the following exception: > Exception : org.jboss.proxy.ejb.handle.HomeHandleImpl > java.lang.ClassCastException: org.jboss.proxy.ejb.handle.HomeHandleImpl > at java.util.Properties.store(Properties.java:444) > at SamLookup.main(SamLookup.java:61) > > Code Snippet: > Object ref = ic.lookup(name); > EJBHome result = > (EJBHome)PortableRemoteObject.narrow(ref,Class.forName(names.getProperty(name))); > HomeHandle home = result.getHomeHandle(); > ...... > FileOutputStream fos = new FileOutputStream(".\\handle.properties"); > ObjectOutputStream oos = new ObjectOutputStream(fos); > handle.store(fos,"Store the handle of remote home interface of QPM"); > ..... > > The point of exception is in the last line. > > The objective of this process is simple. Since there are 3 VM's involved in > our App. and all the VM's has to perform a lookup, if the handle is stored > in a file, all the VM's can read the handle form the file, thus reducing > the rmi lookup calss. > > TIA > Muraly > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills. Sign up for IBM's > Free Linux Tutorials. Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user -- xxxxxxxxxxxxxxxxxxxxxxxx Adrian Brock Director of Support Back Office JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user