problem while running client program which is a statelesssession

Discussions

EJB design: problem while running client program which is a statelesssession

  1. hi,
       i written a stateless session bean.while running client pgm it is giving error like this.

    D:\weblogic\profile2>java profile2.ProfileClient
    the class nameprofile2.ProfileBeanEOImpl_ServiceStub
    Exception : java.rmi.RemoteException: Exception thrown in ejbCreate(); nested exception is:
            java.lang.NullPointerException:
    Start server side stack trace:
    java.lang.NullPointerException
            at profile2.ProfileBean.ejbCreate(ProfileBean.java:156)
            at java.lang.reflect.Method.invoke(Native Method)
            at weblogic.ejb.internal.SessionEJBContext.createBeanIfNecessary(SessionEJBContext.java:82)
            at weblogic.ejb.internal.SessionEJBContext.afterBegin(SessionEJBContext.java:272)
            at weblogic.ejb.internal.StatelessEJBObject.getContextForInvoke(StatelessEJBObject.java:69)
            at weblogic.ejb.internal.BaseEJBObject.preInvoke(BaseEJBObject.java:421)
            at profile2.ProfileBeanEOImpl.retrieveBusinessid(ProfileBeanEOImpl.java:94)
            at profile2.ProfileBeanEOImpl_WLSkel.invoke(ProfileBeanEOImpl_WLSkel.java:83)
            at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java, Compiled Code)
            at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java:69)
            at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:15)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    End server side stack trace

    could u please tell what is the errorif u want i will send my code also

    advance thanks

  2. mr rao,
    please make sure that your bean method ejbcreate is returning a null or a primary key as per your version of the WS that you are using
    thanks
  3. Mr rao,
      can u send me u'r code pls to shkk@rediffmail.com