cancel
Showing results for 
Search instead for 
Did you mean: 

Access KM from EJB

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

I am facing similar problem. Please let me know how to get IUser in EJB to use it in ResourceContext. What are the JAR files required for the same.

Thanks in Advance.

Regards

Vasu

jochen_wilhelm
Explorer
0 Kudos

Hi, i have a similar problem.

Where you able to solve it?

Thank you very much for your answer!

Best regards

Jochen

Former Member
0 Kudos

I am having the same problem, any tips please.

Regards,

Orlando Covault

Former Member
0 Kudos

You may try to add a reference to sap KM in application-j2ee-engine of EAR:


<reference reference-type="weak">
  <reference-target provider-name="sap.com" 		target-type="application">com.sap.km.application</reference-target>
</reference>