Skip to Content
Former Member
Apr 16, 2007 at 02:55 AM

Call J2EE application from Portal Application


Hey experts,

I am trying to call a J2EE application from a Portal application.

I am using the BonusCalculationEjb and BonusCalculationEAR downloaded from the web.

I have added a JNDI name sabbir/calculatorJNDI in BonusCalculationBean

Then, I have deployed BonusCalculationEAR and it deploys OK.

In the Portal application I have added the following PrivateSharingReference"/>

I am using the following code to call it

InitialContext ctx = new InitialContext();

BonusCalculatorLocalHome home = (BonusCalculatorLocalHome) ctx.lookup("localejbs/");

BonusCalculatorLocal theCalculator = home.create();

double result = theCalculator.calculateBonus(6);

out.println("The bonus is " + result);

But, I am getting the following error

Path to object does not exist at sabbir, the whole lookup name is localejbs/

Can you please advise.

Thank you.