Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8950

Why is ResourceContext.getInstance(anonymous) using UserManagementException

$
0
0

First of all, I looked at many many disscusions and other places in the internet. I've found no answer

 

I have to develop a JEE applicaiton which should read the content of a .properties file in the KM-content of the portal.

My NWDS is on version 7.3.

 

My problem:

I implemented following code and it doesn't show any errors during developing but ends when deployed and opened on the browser in an 500 Internal Server Error with this error message:

[EXCEPTION]

java.lang.NoClassDefFoundError: com/sapportals/portal/security/usermanagement/UserManagementException

at com.siemens.bt.rolemanager.utils.ConfigurationLoader.getKMContent(ConfigurationLoader.java:89)

 

/******************************************************************************************************/

private InputStream getKMContent(String file) throws UMException, ContentException{

     IUser anon = UMFactory.getAnonymousUserFactory().getAnonymousUser();

 

     IResourceContext resourceContext = ResourceContext.getInstance(anon);

     RID sugg_html = RID.getRID("/documents/" + file);

     com.sapportals.wcm.repository.IResource resource = ResourceFactory.getInstance().getResource(sugg_html,resourceContext);

 

     return resource.getContent().getInputStream();

}

/******************************************************************************************************/

 

I included these 3 libraries:

  • bc.rf.framework_api.jar
  • bc.util.public_api.jar
  • com.sap.security.api.jar
  • prtapi.jar

 

I tried it also with including these in addition:

  • bc.rf.global.service.urlgenerator_api.jar
  • bc.sf.framework_api.jar
  • com.sap.portal.usermanagementapi.jar
  • km.appl.servlet.webdav_core.jar

 

As far as I know. the used methods are all available for version 7.3 but the Exception UserManagementException was replaced by UMException with version 7.1. Why is it showing this message though the method throwing it appears to be a 7.3 method?

 

 

I appreciate fast answer because the application needs to be finished quickly.

regards

Daniel


Viewing all articles
Browse latest Browse all 8950

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>