Hi Everyone, The Exception i got is as below: java.lang.ClassCastException: Unable to load class: org.omg.stub.com.newgen.omni.jts.txn._NGOClientS erviceHandlerHome_Stub My code is as follows: Object home = ctx.lookup("com.newgen.omni.jts.txn.NGOClientServiceHandlerHome"); NGOClientServiceHandlerHome clientServiceHandlerHome = (NGOClientServiceHandlerHome) PortableRemoteObject.narrow(home, NGOClientServiceHandlerHome.class); NGOClientServiceHandler clientServiceHandler = (NGOClientServiceHandler) PortableRemoteObject.narrow(clientServiceHandlerHome.create(),NGOClientServiceHandler.class); Our actual package structure is com.newgen.omni.jts.txn. But we dont understand, why our package structure is prefixed with omg.org.stub while trying to type cast.We have searched in many related web-sites where this problem is posted but no one has posted the solution for this problem. Help is needed urgently. Thanks Sumona
Do you have the _Stub and _Tie classes of your EJB packaged within the Jar file. (did you generate the RMI code)
/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
Joined: Oct 17, 2002
Originally posted by Bill Bailey: Do you have the _Stub and _Tie classes of your EJB packaged within the Jar file. (did you generate the RMI code)
Thanks for the reply Bill. I am using Websphere 4.0 and by AAT i created deployable jar.RMIC was invoked by AAT.I have the _Stub and _Tie in my jar file but in com.newgen.omni.jts.txn package. But while casting the object container is searching in org.omb.stub.com.newgen.omni.jts.txn package.
Joined: Nov 12, 2001
No idea Sumona. Maybe you should post here your exact configuration (was version + patch)to obtain some help from the ranchers. Don't forget to let use know which visibility you are using (module, server, application, J2EE etc..) Maybe you could also activate a classloader trace device to have further information about your problem. For instance : com.ibm.ws.classloader.*=all=enabled or com.ibm.ws.classloader.Compoundclassloader=debug=enabled may help By the way, don't forget to take a look at the JavaRanch Naming Policy before sheriffs catch you and lock you out [ October 21, 2002: Message edited by: Bill Bailey ]