Date Created: Wed 24-Aug-2011


    Error

    Caught an unexpected exception!
    java.lang.ClassCastException: Unable to load class: com.zoo._TigerHome_Stub
    at com.ibm.rmi.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:372)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:148)
    at com.screv.JavaZooClient.main(JavaZooClient.java:29


    Reason

    The EJB you have created was most likely compiled using Eclipse and not RAD. What this means is that the RMI stubs for the remote or local interfaces etc have not been created and not referenced in the classpath of your project. Note: Not using IBM Rational Application Developer (RAD) makes this hard.

    One solution is you could export the EAR and run the WAS ejbdeply tool which will build another EAR file with the stubs, then you can copy this stubs into your project.

    Using RAD offers this to be dynamic as part of the IBM RAD tooling wizards.


Middleware Mentor - Steven Charles Robinson

About Me

Steve Robinson has been working in IT for over 15 years and has provided solutions for many large-enterprise corporate companies across the world. Steve specialises in Java and Middleware consulting. Steve comes from both an administration and development background.

Before moving to JEE, Steve was an accomplished developer and consultant for both IBM Lotus Notes and Microsoft .NET Technologies.

Follow Steve as @stevencrobinson on twitter.

Read my books?

IBM WebSphere Application Server 8.0 Administration Guide

IBM WebSphere Application Server 8.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Application Server 7.0 Administration Guide

WebSphere Categories

Oracle WebLogic Categories

JBoss Categories

Other Categories