Fix for Deprecated methods to get ResourceContext

So I'm rolling some of my own KM API based JSP pages and AbstractPortalComponents and I found the following code to gain access to the KM:
com.sap.security.api.IUser user=(com.sap.security.api.IUser)request.getUser();
com.sapportals.portal.security.usermanagement.IUser epUser = WPUMFactory.getUserFactory().getEP5User(user);
ResourceContext ctx= new ResourceContext(epUser);
The problem is, WPUMFactory.getUserFactory().getEP5User() is deprecated.  Surely there's a non-deprecated way to achieve getting a ResourceContext object.  Unfortunately I've not found a good guide on how to use the KM API that's not over 2 years old. 
Any thoughts?

Check this:
-Using the KMC Platform in Standalone Web Applications-
I developed a multiple upload files in KM web application and I used the KM repository.
To access without nullPointerException you need to reference KM in the web project.
see: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/58013557-0701-0010-2c96-cdaed53ba065
With that reference it works fine :):)
Don't worry about that warning when build the DC.
WARNING: No component dependency exists for reference to "com.sap.km.application" (vendor "sap.com", type "application")
code:
com.sap.security.api.IUser user;
com.sap.security.api.IUser iUser = (com.sap.security.api.IUser) user;
com.sapportals.portal.security.usermanagement.IUser epUser = WPUMFactory.getUserFactory().getEP5User(iUser);
ResourceContext ctx = new ResourceContext(epUser);

Similar Messages

  • [svn:bz-trunk] 21394: bug fix for watson 2887837 Not getting duplicate session detected error when same flex client id is used from two different HTTP sessions in CRX .

    Revision: 21394
    Revision: 21394
    Author:   [email protected]
    Date:     2011-06-16 12:34:13 -0700 (Thu, 16 Jun 2011)
    Log Message:
    bug fix for watson 2887837 Not getting duplicate session detected error when same flex client id is used from two different HTTP sessions in CRX.
    get the sessions id before we invalidate the duplicate session.
    Checkintests pass
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/endpoints/BaseHTTPEndpoint.java

    For our profect I think this issue was caused as follows:
    Believing that remoting was full asynchronous we fired a 2 or 3 remote calls to the server at the same time ( within the same function ) - usually when the users goes to a new section of the app.
    This seemed to trigger the duplicate http session error since according to http://blogs.adobe.com/lin/2011/05/duplication-session-error.html  two remote calls arriving before a session is created will cause 2 sessions to be created.
    Our current solution ( too early to say it works ) is to daisy chain the multiple calls together .
    Also there seemed to be an issue where mobile apps that never quit ( thanks Apple! )  caused the error when activated after a few hours.
    I guess the session expires on the server and the error above occurs on activation.
    So the mobile apps now ping the server with a remote call when activated after sleeping for more than one hour.
    All duplicate http errors are silently caught and reported.
    Fingers crossed we won't get any more!

  • My macbook fell off the couch and now everything on the display is double and slightly transparent. Is there a fix for this other than getting it replaced?

    My macbook fell off the couch and now everything on the display is double and slightly transparent. Is there a fix for this other than getting it replaced?

    Only an Apple Store or an authorized Apple Service Provider can determine if a repair is economically justifiable. It may be as simple as a dislodged display cable.

  • FInding the Replacements for deprecated methods

    I am new to using the Java environment, having been mostly a VB/VB .NET and web developer...so please forgive me if this is a dumb question:
    I inherited some java code that is an extension to a 3rd party app. It was originally written under JDK 1.2.2 (I think), and I am now trying to recompile under JDK 1.4.2, using the Borland JBuilder X IDE.
    Everything seems to be OK, except that I get two warning messages about deprecated methods:
    getFormComponent().setFormProperties()
    getFormComponent().getAllFormProperties()
    I probably should have checked more, but these names would appear to be standard java classes. What methods should I be using instead? And more importantly, how do I go about looking up the current methods?
    Thanks in advance.

    I was coming to that conclusion as well...unfortunately, the 3rd party SW vendor does not appear to have updated their supplied documentation - all of the code examples still use the deprecated methods, and their HTML help doesn't return anything when I search for the method names.
    Looks like a call to their technical support line...
    THANKS for the prompt reply.

  • Fix for when Compressor suddenly gets slow?

    Hi all,
    Apologies if I'm the millionth person to ask this, or something similar here! I have searched all over before asking, including the archives here.
    Until today my compressor rendered out fine.. i'm converting 1080p ProRes to 720p MP4 for use on the web. For a project running a few mins long, Compressor took roughly 45 mins to produce the file.
    Now, it's saying it will take 40 hours. I haven't changed -anything- except I made a small re-cut in my video (but rendered it before exporting in FCP) and I've bumped up the audio bitrate a little bit.
    this happened once before, but I attributed it to the fact I was trying to render out from a USB 2 scratch disk (which I knew wasn't recommended).
    anyway, there are lots of threads in this forum in which people mentioned slow compressor times, what fixes are there?
    Best,
    Chris

    Nick, thank you, good idea to keep things clean. apps in the final cut studio often seem to benefit from trashing prefs, too.

  • Adobe Flash Player 10 Fix for Vista & XP

    A possible fix for users wanting to get Flash Player 10 fixed
    and running on Windows XP and Vista.
    See here for details:
    www.thetechangel.com/blogberry/2008/10/adobe-flash-player-10-fix-for-vista-xp/

    (This is a possible solution for most users) I have found that inside the folder C:\WINDOWS\system32\Macromed\Flash (WinXP Home/Pro) (Computer > C: Drive > Windows > System32 > Macromed > Flash for Vista) there should be a file named FlashUtil10b.exe (IF NOT YOU SHOULD UPDATE AS SPECIFIED!) (or FlashUtil10a.exe or for older versions something similar depending on your version), which is the update utility for flash player. Click on this and if it updates, you will have to restart your computer. This should fix any missing files, and update you to the latest version.
    On a side note to all those who read this, I downloaded and installed 5 different times, the same version, from different websites, all for the "new" flash version, and they didn't work (this also included trying to update Shockwave player itself). Apparently, going directly to the website and downloading a new version of Adobe Flash Player, and installing, doesn't uninstall the older version, (though it says it does) nor fixes the problem. I assume they are aware of this problem, because they included this bug fix in revision 10b. This fix should work for those of you whom cannot view/see flash images as well. There also appears to be a bug/reference problem with the installation of IE8 giving the error "Missing Shockwave Decompression XTRA", when trying to play a Shockwave/Flash file, which seems also to affect Firefox and other browsers. It doesn't recognize that the folder or files that it needs in it, exist. I never had his problem before, until IE8 was installed. I checked which version I had in the system32 folder and found this updater built in to Adobe. Version 10a does NOT automatically update, but version 10b includes this fix. I currently had version 10a when I received this error, and began digging for a solution. Doing the update as described above fixed the problem, and updated it to version 10b.
    The new flash version 10b has some new features, such as volume control, auto-updating, and several rendering options for those who may have a faster or slower computer/video card.
    I found this works great for XP users but unsure of the Vista users. The process is the same  for Vista and the update should still work the same, as long as you run it as Administrator, I assume. I have this also posted on wwwdslreports.com at http://www.dslreports.com/forum/r22115254-IE-IE8-and-Adobe-Flash-Question and here http://www.dslreports.com/forum/r22361930-Adobe-Flash-Player-10-Fix-for-WinXP-IE8-Firefox- ect. It appears to work for everyone so far. I have not heard of any problems from users with this problem running the RC (Release Canidate) for Windows 7 yet.
    I hope this works to your benefit.

  • [svn:osmf:] 13042: Fix for FM-287, reinstating the main sample ( that uses serial and parallel composition), and making another pass at  getting all the changed trait methods mapped correctly back- and forth between JS and Flash .

    Revision: 13042
    Revision: 13042
    Author:   [email protected]
    Date:     2009-12-17 03:45:27 -0800 (Thu, 17 Dec 2009)
    Log Message:
    Fix for FM-287, reinstating the main sample (that uses serial and parallel composition), and making another pass at  getting all the changed trait methods mapped correctly back- and forth between JS and Flash.
    Ticket Links:
        http://bugs.adobe.com/jira/browse/FM-287
    Modified Paths:
        osmf/trunk/apps/samples/framework/HTMLGatewaySample/HTMLGatewaySample.as
        osmf/trunk/apps/samples/framework/HTMLGatewaySample/html-template/index.template.html
        osmf/trunk/framework/MediaFramework/org/osmf/external/HTMLElement.as
        osmf/trunk/framework/MediaFramework/org/osmf/gateways/HTMLGateway.as

    Perre wrote:I'm used to being able to pick one or a couple of songs and then adding it a specified playlist. Is this impossible in sonata?
    It's clearly not impossible, just different than you expect. Create your playlist as you want it to appear in the Current tab (meaning don't dump every single song from your library in there, just the ones you want) and then save the playlist.
    Perre wrote:And if I try to play the m3u file created (the one with every song listed) through freevo I get a message that the directory is empty. What am I doing wrong??
    Look at save_absolute_paths_in_playlists in your mpd.conf.

  • [svn:fx-trunk] 10891: Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants

    Revision: 10891
    Author:   [email protected]
    Date:     2009-10-06 09:46:47 -0700 (Tue, 06 Oct 2009)
    Log Message:
    Fix for ASDoc throws error when using getter methods for pseudo-inheritance of static constants
    QE notes: None.
    Doc notes: None
    Bugs: SDK-22676
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22676
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/AsDocUtil.java

    Have you tried using com.adobe.air.crypto.EncryptionKeyGenerator instead?

  • Java.util.Date deprecated methods, looking for new ones

    Hi,
    I can't find anywhere.
    I'm looking for Date methods, exactly like
    getYear();
    getDay();
    but i don't want them being deprecated.
    I want to get an INT out of a Date (Year, Day, ...)
    please give me a link, name of a fucntion or something.
    Thanks

    Look at the API docs. It says that you have to use the methods in java.util.Calendar instead.

  • [svn] 3570: Fix for SDK-17109 - Incorrect deprecation text when generating ASDoc for a deprecated AS or MXML class .

    Revision: 3570
    Author: [email protected]
    Date: 2008-10-10 10:08:53 -0700 (Fri, 10 Oct 2008)
    Log Message:
    Fix for SDK-17109 - Incorrect deprecation text when generating ASDoc for a deprecated AS or MXML class.
    QA: Yes
    Doc:
    Reviewed By: Paul
    Tests: checkintests
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17109
    Modified Paths:
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/ClassTable.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/DocComment.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelGenerator.java

    shadowlurker wrote:
    It's problem in pam configuration files. You need to create files useradd, userdel, groupadd and groupdel in /etc/pam.d/ directory with following content:
    auth sufficient pam_rootok.so
    auth required pam_unix.so
    account required pam_unix.so
    session required pam_unix.so
    password required pam_permit.so
    You da man! I also had to add grpconv and chage to get filesystem working but all seems well now thanks!
    Doug piston had me try something that I think will help anyone else who has this problem.  Try re-installing pambase and shadow.  It generated back most of any I was missing.
    Last edited by shauder (2012-11-03 00:55:19)

  • I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.

    I've only had my iphone 5s for a week. I keep getting an error message of "Server has stopped responding."  I need the server to work. Does anyone know if there is a "fix" for the problem? Other wise, I probably best return for a refund and get a Samsung.  Thanks

    sandyzotz wrote:
    Other wise, I probably best return for a refund and get a Samsung.
    Unlikely.  Based on the complete lack of detail of the issue provided it is entirely possible the same issue would occur.
    Unless and until the user provides some actual details of the problem, there is nothing the indicate that the issue is with the iPhone.

  • Updated to new 2014 cc. In bridge when I go to tools/Photoshop/Image Processor....I get this message "adobe photoshop 2014 CC has quit working" Anyone have a fix for this??

    updated to new 2014 cc. In bridge when I go to tools/Photoshop/Image Processor....I get this message "adobe photoshop 2014 CC has quit working" Anyone have a fix for this??

    I use a  windows 7 pro and have no problem like that from bridge cc when I select a thumbnail then use menu Tools>Photoshop>Image Processor..  I see Adobe Photoshop CC 2014 start up then I see the Image processor dialog and that one file is selected in the bridge I the complete the dialog and click run.  The image files are created. Photoshop remains open after the image files are create with no open documents. I need to click on the bridge in the task bar to bring bridge back into focus.
    What does you system configuration?

  • I am using an iPad and iPhone and have exchange as my email. Both will only collect mails when I am in the wifi of the office, and not when I am out and about. I can't seem to get a fix for it.

    I am using an iPad and iPhone and have exchange as my email. Both will only collect mails when I am in the wifi of the office, and not when I am out and about. I can't seem to get a fix for it.

    This - https://support.mozilla.org/en-US/kb/how-make-web-links-open-firefox-default - didn't work?

  • Can you get your ipod touch screen fixed for free if its the first time that is broke?

    my friend broke her ipod screen and she took it into apple and they fixed it for free so can i get my fixed for free.

    If someone breaks part of their device (intentionally or otherwise) it is not covered by the 1 year warranty so I'm not sure why she would have had it fixed for free.
    If you are interested in finding out repair pricing make an appointment with a Mac Genius at an Apple store or contact AppleCare via phone.
    Cheers.

  • I recently upgraded to Mac OS X.  I hadn't try to access anything in iWorks 09 since the upgrade, until now.  I get an error message when trying to open any of the iWorks 09 applications.  What's the fix for this?

    I recently upgraded to Mac OS X.  I haven't tried to access anything in iWorks 09 since the upgrade, until now.  I get an error message when trying to open any of the iWorks 09 applications.  What's the fix for this?

    Follow Sonicray's advice and when you post try to give as much info about your Mac, your OS, etc... Fill out your Profile info.

Maybe you are looking for

  • How can I change iTunes 11 default view?

    I really DO NOT LIKE th new iTunes, but I guess I'm stuck with it since I was dumb enough to download it.  At least I hope I can change the default view from Albums (totally useless to me) to Songs so I don't have to go through manually changing it e

  • Transfering music not bought from ipod to itunes

    so i recently got another laptop cause my other laptop broke and i want to know how to transfer my music on my ipod that was NOT bought from itunes to my new itunes library

  • RMAN Configuration in DG  Environment

    Hi, I have planned a backup strategy for my Oracle 10g Database using RMAN . Physical standby is used for DG . I wanted to know how can I create a physically seperate catalog server for the above purpose. OS Version- Windows Server 2003 Regards Vinit

  • Consuming Web Services in 11.2 does not work ??

    Hello, Did anyone manage to call a Web Service from Oracle 11.2 database? We wanted to call a web service from Oracle, so for example if I execute: SELECT add_numbers(1, 5) FROM dual; from my database, I get the result 6. Cool thing is that the add_n

  • Multiple places for one event

    Hi, does anybody know if it is possible to add multiple locations to one event in iPhoto? Thanks in advance.