cancel
Showing results for 
Search instead for 
Did you mean: 

Accesss an EJB from a portal component

Former Member
0 Kudos

I have a problem. I can't access EJB's from the portal.

I downloaded the tutorial "How to Access an EJB from a Portal component". The result was the following error

Can someone tell my how to access EJB's from a portal component. It is not needed to do this all in one EAR.

One PAR and a other EAR is also fine.

I use the WAS 6.4 SP9

Starting Deployment of MyEJBPackage

Aborted: development component 'MyEJBPackage'/'sap.com'/'localhost'/'2005.01.28.09.32.48':

Caught exception during application deployment from SAP J2EE Engine's deploy service:

com.sap.engine.services.rmi_p4.MarshalException: Exception when trying to read the original exception.; nested exception is: java.lang.ClassNotFoundException: com.sapportals.portal.prt.runtime.PortalException

(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)

Deployment of MyEJBPackage finished with Error (Duration 612133 ms)

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Edward,

You can find the original error in the defaultTrace.trc file in /usr/sap/<SID>/<INSTANCE>/j2ee/cluster/server<N>/log.

Hope this helps.

Best regards,

Vladimir

Answers (2)

Answers (2)

Former Member
0 Kudos

Ivaylo Ivanov,

Thanx again for helping me solving my problem. This time the solution was in the application referance. You can referance the object in only this way.

SAPJ2EE::<provider prefix/application name>. All other ways don't work.

The provide prefix is normally sap.com.

The application name is the name of the ear.

In the end i put my jar file into the lib directory of my par file and deployed the enterprise application and the portal application.

It works this way.

I also think this is a nice way to develop Portals and or EJB's

Former Member
0 Kudos

Hi Edward/Ivaylo,

I have added this reference in PortalApp.xml

SAPJ2EE::<provider prefix>/application name>.

but still getting this error.

Do we have to deploy both enterprise application and the portal application.

regards

Santosh

detlev_beutner
Active Contributor
0 Kudos

Hi Edward,

could you describe what steps you have performed?

Of course the portal part has to be implemented within a PAR project (that's why the question of how to access arises in fact).

From the exception (ClassNotFoundException: com.sapportals.portal.prt.runtime.PortalException) I've got the feeling that you try to implement portal stuff within your EAR project. That would be wrong.

If you create a Portal Application project, the portal runtime stuff get's referenced. Deployment of PAR into the portal does not need anything special.

But your EJB does not know that there is something like a "portal" in the world. If this is guaranteed, no server will search for PortalException...

Hope it helps

Detlev

Former Member
0 Kudos

Thanx Detlev,

For your response. The steps I performed are the following.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how to access an ejb from a portal component.mht

you have to download this MHT in order to see the steps.

I hope this describes the steps I took to get it working.

Please help me out

detlev_beutner
Active Contributor
0 Kudos

Hi Edward,

the link you gave gives another link to some strange http://localhost/Documents and Settings/i024527/Desktop/Linda/tutorial/ch01_010.htm -- seems you have access to Lindas Desktop ?!

There are different threads on SDN concerning the use of EJBs from portal, e.g.: /thread/25161 [original link is broken] or /thread/21069 [original link is broken] or

Hope it helps

Detlev

Former Member
0 Kudos

Hi,

in case you haven't seen it yet - there are a few pages in the PRT documentation describing how to access J2EE app components from a portal app: http://help.sap.com/saphelp_nw04/helpdata/en/88/bdfc3f48ecc742e10000000a1550b0/frameset.htm

Hope that this will be of help!