Skip to Content
author's profile photo Former Member
Former Member

cannot access javax.ejb.EJBHome

Hi All,

I created a EJB DC project and trying to invoke through Webdynpro DC Project. I am using NWDS CE 7.11.

1. Entity Forwarding was enabled in EJB in Development Infrastructure.

2. Public part was added to ear

3. In webdynpro Dc project - the ear was added as the Dependency.

4. Add the ejb20 jar files to the DC Project External Libraries.

Context Initial_Context = new InitialContext();

InitialContext ctx = new InitialContext();

String Look_Up_String = "demo.sap.com/empname_ear/Empname_ejbBean";

obj = ctx.lookup(Look_Up_String);

Empname_ejbHome home = (Empname_ejbHome)javax.rmi.PortableRemoteObject.narrow(obj,Empname_ejbHome.class);

But when i write the code to get the Bean methods, i am unable to see the EJB Name.

empname_ejb localobject = home.create();

In the above line, i am unable to see "employeename_ejb" .

The Look Up string is correct as i got the JNDI Name from SAP NWA.

What else i required? Please do help me in this.

Thanks and Regards,

Divya

Plw

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Sep 27, 2010 at 07:17 AM

    Hi Divya,

    It seems that your EJB is not exposed as a public part.

    Go to your ejbmodule.

    Click on Windows->Show View->Development Infrastructure->Component Properties->Public Parts->Add the EJBs which you

    want to expose to the other DC.

    Hope this helps to solve the problem.

    Regards,

    Radhika

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2010 at 08:56 AM

    Used JPA and solved the issue.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.