Skip to Content
0
Dec 02, 2009 at 11:09 AM

Accessing EJB project from PAR project

31 Views

Hi,

I want to refer session bean's methods of a EJB project in my Portal Component project. (PAR project)

I have created following projects:-

- EAR project (contains EJB's jar)

- EJB project

- Portal Component project

This is how my portalapps.xml entry looks for private reference and sharing reference:-

Also I have added EJB project's jar file and EJB project into PAR project's java build path.

<?xml version="1.0" encoding="UTF-8"?>
<application>
  <application-config>
    <property name="SharingReference" value="com.sap.portal.pagebuilder"/>
    <property name="PrivateSharingReference" value="SAPJ2EE::service:p4,SAPJ2EE::sap.com/SalesForceEar,com.sap.portal.htmlb,com.sap.portal.ivs.connectorservice,com.sap.portal.pagebuilder"/>
  </application-config>

But while runtime, it gives

Full Message Text 
 
05:56_02/12/09_0012_6346251 
[EXCEPTION]
 java.lang.NoSuchMethodError: com.test.hr.salesforceintegration.SalesForce.getUserAccountId(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
 

This is the session bean's business method:-

	public String getUserAccountId(String pernr, String lastName) {
		setSessionId();
		
		String accId = "";

		QueryOptions qo = new QueryOptions();

Please help.

Thanks and regards,

Amey Mogare