Skip to Content
0
Former Member
Jan 11, 2006 at 04:36 AM

Access KM from EJB

26 Views

Hi,

I am trying to write a session bean that accesses the KM.

Normally when we access the KM thorough a portal component or web dynpro we can put a sharing reference to the KM in the portalapp.xml.

How do I refer to the KM from within an EJB. I have inlcluded all the KM jar files in my project, but still I am facing problems.

My Code is as follows.

SessionBean

IUser ep5User = WPUMFactory().getUserFactory().getEP5User(user);

IResourceContext ctx = new ResourceContext(ep5User);

RID rid = RID.getRID("/documents/supply_files");

IResource = ResourceFactory.getInstance().getResource(rid, ctx);

Now this code works fine from a PortalComponent and Web DynPro. But when I try it from an EJB I get the following error.

Cannot get Usermanagement Factory class: java.lang.ClassNotFoundException:

com.sapportals.portal.security.usermanagement.UMFactory

-


Loader Info -


ClassLoader name: [sap.com/KMDocumentTreeEAR]

Parent loader name: [Frame ClassLoader]

References:

common:service:http;service:servlet_jsp

service:ejb

common:service:iiop;service:naming;service:p4;service:ts

service:jmsconnector

library:jsse

library:servlet

common:library:IAIKSecurity;library:activation;library:mail;library:tcsecs

sl

library:ejb20

library:j2eeca

library:jms

library:opensql

common:library:com.sap.security.api.sda;library:com.sap.security.core.sda;li

brary:security.class;library:webservices_lib;service:adminadapter;service:ba

sicadmin;service:com.sap.security.core.ume.service;service:configuration;ser

vice:connector;service:dbpool;service:deploy;service:jmx;service:jmx_notific

ation;service:keystore;service:security;service:userstore

interface:resourcecontext_api

interface:webservices

interface:ejbserialization

Any Help is greatly appriciated.