Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Websphere

 
Sumona Dev
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have the _Stub and _Tie classes of your EJB packaged within the Jar file.
(did you generate the RMI code)
 
Sumona Dev
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic