EJB on Weblogic7 : accessing Ejb thru *Local interface* fails due to JNDI lookup

Discussion in 'Java' started by Mumbai Joe, Jul 29, 2003.

  1. Mumbai Joe

    Mumbai Joe Guest

    We are facing a problem while accessing an EJB deployed as a 'Local'
    EJB. (ejb2.0)

    There is an entity bean X which is working perfectly.
    Now I tried creating an similar EJB for "Local" access. I created
    LocalHome & Local interfaces and the bean class itself was copied from
    bean X.

    In descriptors, the local EJB was specified as ...
    ------------------------------------------------------------
    <ejb-jar>
    <enterprise-beans>

    ................
    <entity>
    <ejb-name> SiteUserEjbLocal </ejb-name>
    <local-home> SiteUserLocalHome </local-home>
    <local> SiteUserLocal </local>
    <ejb-class> SiteUserEjb2 </ejb-class>
    <persistence-type>Bean</persistence-type>
    <prim-key-class> SiteUserPK </prim-key-class>
    <reentrant> False </reentrant>
    </entity>

    .....
    </enterprise-beans>
    <assembly-descriptor />
    </ejb-jar>

    ------------------------------------------------------------
    <weblogic-ejb-jar>
    ..........
    <weblogic-enterprise-bean>
    <ejb-name>SiteUserEjbLocal</ejb-name>
    <local-jndi-name>SiteUserEjb2</local-jndi-name>
    </weblogic-enterprise-bean>

    .........
    </weblogic-ejb-jar>

    ------------------------------------------------------------

    Both bean X and new bean Y are packaged in same EJB jar and deployed
    through weblogic console. The deployment is successful & console shows
    EJB successful activated on target server.

    However, on client side, the JNDI lookup for name 'SiteUserEjb2' fails
    ....
    The error reported is
    ---------
    Root exception is javax.naming.NameNotFoundException: Unable to
    resolve 'app/ejb/WebUtils.jar#SiteUserEjb2/local-home' Resolved:
    'app/ejb' Unresolved:'WebUtils.jar#SiteUserEjb2' ; remaining name
    'WebUtils.jar#SiteUserEjb2/local-home'
    <<no stack trace available>>
    ---------
    I found another interesting thing :

    We did a direct JNDI lookup using some other utility jndi program. The
    program showed the JNDI name 'SiteUserEjb2' present in Weblogic's JNDI
    tree -- but class of object bound was reported as
    'javax.naming.LinkRef' whereas for all other EJBs, the class is
    reported as 'weblogic.rmi.cluster.ClusterableRemoteObject'.

    Any pointers ??

    Thanks,
    MJ
     
    Mumbai Joe, Jul 29, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike S
    Replies:
    0
    Views:
    23,103
    Mike S
    Sep 16, 2004
  2. Mick
    Replies:
    2
    Views:
    9,665
    Marcin Grunwald
    Feb 23, 2005
  3. quintesv via DotNetMonster.com

    Accessing a network resource/file fails thru asp.net and interop dll

    quintesv via DotNetMonster.com, Oct 24, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    364
    xAvailx
    Oct 24, 2006
  4. Fresh
    Replies:
    2
    Views:
    659
    Bo Persson
    Apr 22, 2008
  5. Raymond Schanks
    Replies:
    0
    Views:
    697
    Raymond Schanks
    Aug 3, 2010
Loading...

Share This Page