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/sap.com/sabbir/calculatorJNDI");
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/sap.com/sabbir/calculatorJNDI.
Can you please advise.