Discussions

EJB programming & troubleshooting: Entity Bean on Weblogic 5.1: Stub Problems on Client

  1. I have succcessfully deployed the "Cabin Bean" found in book "Enterprise JavaBeans" (2nd Edition covering EJB 1.1) by Richard Monson-Haefel.

    When I try to use the "Client_1" class (really application) to test the "Cabin" entity bean I get a stub-related exception.

    Command Line
    ------------
    C:\jdk1.2.2\com\titan\cabin>c:\jdk1.2.2\bin\java -classpath C:\weblogic\myserver\serverclasses;C:\weblogic\jre1_2\lib\tools.jar;C:\weblogic\jre1_2\jre\lib\rt.jar;C:\weblogic\jre1_2\jre\libi18n.jar;C:\weblogic\license;C:\weblogic\classes\boot;C:\weblogic\classes;C:\weblogic\lib\weblogicaux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar;C:\jdk1.2.2 com.titan.cabin.Client_1

    Exception (top part only)
    -------------------------
    javax.naming.ConfigurationException. Root exception is weblogic.rmi.server.ExportException: A description for com.titan.cabin.CabinBeanHomeImpl was found but it could not be read due to: [Failed to find a stub for [class com.titan.cabin.CabinBeanHomeImpl] implements at least one interface [interface com.titan.cabin.CabinHome] which extends Remote.]
    weblogic.rmi.StubNotFoundException: Failed to find a stub for [class com.titan.cabin.CabinBeanHomeImpl] implements at least one interface [interface com.titan.cabin.CabinHome] which extends Remote.

    Running this program is supposed to add a row to the Cabin table. No rows are added after running this program and getting the above exception.

    Thanks,

    Gary

  2. hello
     i do not know how you deployed. But if you deploy your bean with EJB deployer which comes with Web logic then you won't get any errors.
    I deployed EJB using Web logic EJB Deployment tool and i even executed the Client_1.java file of Richard Monson-Haefel.

    Bye
    satish.
  3. Hi Satish,

    I did the same (used the GUI deployer and ran Client_1.java). Obviously, the book example does not contain xml descriptors specific to WebLogic. I added this information using the GUI deployer. Maybe that is where I went wrong. However, I was able to check EJB 1.1 compliance, create a container, and deploy the EJB all using the GUI deployer successfully (on NT).

    I have done some research into this problem. It seems that WebLogic has a "dual classpath". Some aspects of WebLogic will see classes that other parts can't. There are 'weblogic.class.path' and 'java.class.path' system properties. This can lead to 'ClassNotFound' and 'ClassCast' exceptions.

    The error I received states that stub was registered but not found. Even after applying service pack 4, I still received this problem.

    My email address is garysteinmetz at yahoo dot com. Please send me:

    1. your bean (with weblogic xml docs included)
    2. Client_1.java (including classpath used to execute)
    3. classpath and classpath prefix (use wlconfig)
    4. tell me what database you used (I used Oracle).

    Thanks for all of your help.

    Gary