Hi Kapi (?) -
How did you deploy the client application? Was it deployed in Tomcat? If so, did you check for the situation where the bean class is stored in more than one place in Tomcat? That's the problem generally associated with this error.
Regards,
Lajos
kapi59ttp wrote:
Hi all!!!
I am new at the list, so..hi all first of all :-)
I have deployed an ejb on j2ee for windows and it worked perfectly.
I have deployed the same ejb (wih is really basic) on and it seems to
work aswell.
The problem comes thru the client app. In windows it works well but in
Linux,
when i execute it, it returns an exception:
Caught an exception.
java.lang.ClassCastException
at
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
at
javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at OpossumPackage.OpossumClient.main(OpossumClient.java:20)
The narrow method doesnt work fine i think. I have read about
classLoaders, and tried lots of
things but i cant make it work.
The code for de client app is:
InitialContext initial = new InitialContext(env); Object objref = initial.lookup("OpossumEJB");
System.out.println (objref);
OpossumHome home = (OpossumHome)PortableRemoteObject.narrow
(objref, OpossumHome.class);
Opossum ops = home.create();
System.out.println (ops.ejecutar());
I have read this same code in hundreds of sites. It works on Windows,
but i cant make
it do on my debian. Any idea?
thanks for all :-)
kapi59ttp
--
Lajos Moczar
----------------------------------------
Open Source Support, Consulting and Training
----------------------------------------
"The Open Source Monopoly"
www.galatea.com/opensource.htmlTomcat Unleashed (www.amazon.com/exec/obidos/tg/detail/-/0672326361)
Cocoon Developer's Handbook (www.amazon.com/exec/obidos/tg/detail/-/0672322579)
_ _____
/ \ /
/___\ /
/ \ /____http://www.galatea.com -- powered by AzSSL
