• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AdviceClient Example - ClassCastException, no stub files in client JAR file

 
Stella Lok
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I encounter a ClassCastException:

java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Porta
bleRemoteObject.java:293)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
at AdviceClient.go(AdviceClient.java:26)
at AdviceClient.main(AdviceClient.java:12)

when I run AdviceClient. The line producing the error is:
AdviceHome home=(AdviceHome)PortableRemoteObject.narrow(o,AdviceHome.class);

I found out that the client jar produced by Sun AppServer 8 after deployment does not contain the stub classes for AdviceHome and Advice, and I think that may be the cause of the problem. Can anyone advise on how to solve this? Thanks a lot!
 
Balaji Anand
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
Faced the same problem... i uninstalled and got the j2eesdk 1.4 and installed that solved the problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic