• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

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

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
Faced the same problem... i uninstalled and got the j2eesdk 1.4 and installed that solved the problem
 
reply
    Bookmark Topic Watch Topic
  • New Topic