Permissions denied when trying to get a BCC project programatically...

Hi,
I wrote a servlet that extends atg.servlet.GenericServletService and in the service method, I am resolving the ATG component that is trying to query a BCC project with the given project Id.
The control is getting passed successfully to the ATG component but when it is trying to query, its throwing the following error:
14:46:02,741 ERROR [STDERR] javax.ejb.EJBException: QUERY_EXCEPTION_MESSAGE: RQL query: id = ?0, Args: ?0=prj2130001
14:46:02,743 ERROR [STDERR]      at atg.repository.tojava.runtime.RJSupport.executeRqlStatementForOne(RJSupport.java:1110)
14:46:02,744 ERROR [STDERR]      at atg.epub.project._ProjectHome_ReposImpl.findById(_ProjectHome_ReposImpl.java:70)
*14:46:02,761 ERROR [STDERR] Caused by: CONTAINER:atg.repository.RepositorySecurityException; SOURCE:atg.security.PermissionDeniedException: You do not have read access to the project item descriptor.*
14:46:02,762 ERROR [STDERR]      at atg.adapter.secure.GenericSecuredRepository.checkAccess(GenericSecuredRepository.java:381)
14:46:02,763 ERROR [STDERR]      at atg.adapter.secure.GenericSecuredRepositoryView.executeQuery(GenericSecuredRepositoryView.java:292)
14:46:02,763 ERROR [STDERR]      at atg.repository.rql.RqlStatement.executeQuery(RqlStatement.java:205)
14:46:02,764 ERROR [STDERR]      at atg.repository.tojava.runtime.RJSupport.executeRqlStatementForOne(RJSupport.java:1099)
I am using the following API:
     final ProjectHome projectHome = ProjectConstants.getPersistentHomes()
          .getProjectHome();
     Project project = projectHome.findById(projectId);
I am invoking this servlet from the web browser by passing the project ID as the parameter.
However, if I try to invoke the same component's method using a scheduler, its working fine.
Any help/pointers regarding this is greatly appreciated.
Thanks in advance.

Have the below functionality in your method before executing logic.
personaPrefix and userName should be set as said by Gurvinder.
protected boolean assumeUserIdentity() {
if (getUserAuthority() == null)
return false;
User newUser = new User();
Persona persona = (Persona) getUserAuthority().getPersona(getPersonaPrefix() + getUserName());
if (persona == null)
return false;
newUser.addPersona(persona);
ThreadSecurityManager.setThreadUser(newUser);
return true;
HTH.
-karthik
Edited by: karthik.chopperla on Jul 20, 2011 2:52 AM

Similar Messages

  • Consistent crash when trying to get into my project library

    Just upgraded to iLife '09 and when I opened iMovie for the first time. When I go to my project library and click on my hard drive, I get a iMovie crash. Happens every time. Any ideas?

    Don't really know what any of this means, but here's the console output.
    1/30/09 11:10:38 PM com.apple.launchd[76] ([0x0-0x53053].com.apple.iMovie8[548]) Exited abnormally: Segmentation fault
    1/30/09 11:11:43 PM com.apple.launchd[76] ([0x0-0x56056].com.apple.iMovie8[568]) Exited abnormally: Segmentation fault
    1/30/09 11:16:54 PM com.apple.launchd[76] ([0x0-0x58058].com.apple.iMovie8[574]) Exited abnormally: Segmentation fault
    1/30/09 11:18:44 PM com.apple.launchd[76] ([0x0-0x5e05e].com.apple.iMovie8[598]) Exited abnormally: Segmentation fault
    1/30/09 11:23:42 PM com.apple.launchd[76] ([0x0-0x61061].com.apple.iMovie8[611]) Exited abnormally: Segmentation fault
    1/30/09 11:41:13 PM com.apple.launchd[76] ([0x0-0x64064].com.apple.iMovie8[626]) Exited abnormally: Segmentation fault
    1/30/09 11:46:22 PM com.apple.launchd[804] ([0x0-0x90090].com.apple.iMovie8[836]) Exited abnormally: Segmentation fault
    1/30/09 11:46:44 PM com.apple.launchd[804] ([0x0-0x95095].com.apple.iMovie8[851]) Exited abnormally: Segmentation fault
    1/30/09 11:46:58 PM com.apple.launchd[804] ([0x0-0x97097].com.apple.iMovie8[855]) Exited abnormally: Segmentation fault
    1/30/09 11:49:58 PM com.apple.launchd[68] ([0x0-0x10010].com.apple.iMovie8[114]) Exited abnormally: Segmentation fault
    1/30/09 11:53:29 PM com.apple.launchd[68] ([0x0-0x17017].com.apple.iMovie8[136]) Exited abnormally: Segmentation fault
    1/31/09 12:19:10 AM com.apple.launchd[77] ([0x0-0x11011].com.apple.iMovie8[139]) Exited abnormally: Segmentation fault
    1/31/09 12:19:41 AM com.apple.launchd[77] ([0x0-0x16016].com.apple.iMovie8[158]) Exited abnormally: Segmentation fault
    1/31/09 12:19:55 AM com.apple.launchd[77] ([0x0-0x18018].com.apple.iMovie8[164]) Exited abnormally: Segmentation fault
    1/31/09 12:20:21 AM com.apple.launchd[77] ([0x0-0x19019].com.apple.iMovie8[168]) Exited abnormally: Segmentation fault
    1/31/09 10:09:10 AM com.apple.launchd[68] ([0x0-0x63063].com.apple.iMovie8[773]) Exited abnormally: Segmentation fault
    1/31/09 10:09:44 AM com.apple.launchd[68] ([0x0-0x68068].com.apple.iMovie8[789]) Exited abnormally: Segmentation fault
    1/31/09 10:10:01 AM com.apple.launchd[68] ([0x0-0x69069].com.apple.iMovie8[792]) Exited abnormally: Segmentation fault

  • I am running Lion 10.7.2 and I have an external drive hooked to my time machine. I can't rename folders and when trying, I get an error code 8076. The checkbox "ignore permissions for this device" does not show on volume info. Help please???

    I am running Lion 10.7.2 and I have an external drive hooked to my time machine. I can't rename folders and when trying, I get an error code 8076. The checkbox "ignore permissions for this device" does not show on volume info. Help please???

    The TIme Machine volume does not have that checkbox.
    I think the issue is with your Finder...
    Go to Finder "Go" menu hold the option key and choose Library. Then go to Preferences trash these files:
    com.apple.finder.plist
    com.apple.sidebarlists.plist
    Then, restart, or log out and in again.
    (You will have to reset a few finder prefs the way you like them.)

  • Mail unexpectedly quits when trying to get mail

    Please help me, the person at the genius bar was useless. My mail unexpectedly quits only when trying to get mail. I have repaired permissions, and I did an archive reinstall (at the recommendation of the genius). Nothing I seem to do works, even when I removed the envelop index and started mail after getting re setup it just crashed again.

    Hi CurtRK, and a warm welcome to the forums!
    You mention the envelope, but how about the Cache, and doing it like this...
    Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move the following folder & file to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.

  • Photoshop cs4 access denied when trying to install from disc in Windows 7 64bit.

    Photoshop cs4 access denied when trying to install from disc in Windows 7 64bit. I tried it in
    safe mode and it starts to install but get an error there as well.
    What do I do?

    So when you put the disk in it won't run correctly? When the disk is inserted you should have a window pop up with 2 options. 1 to install and the other to see what is on the disk. Choose to explore or open the disk. Go to the CS4 folder where the photoshop .exe file is (that will run the setup), right click on the .exe file and choose run as Admin and it should start. See if it will install. If not then read below.
    I am not sure how far you got in the install before so chances are you will have to run the CS4 cleanup utility. 2 levels to run at but don't use 1 or 2 just type in the number 3.
    http://www.adobe.com/support/contact/cs4clean.html
    You may need to run the windows installer cleanup utility too
    http://support.microsoft.com/kb/290301
    Before you try to reinstall the software ensure that adobe reader is not installed. If it is remove it. It has caused issues in the past with vista and CS4 installs.
    Also turn off windows Defender and any anti-virus software. You can keep UAC on in Windows 7.
    During the CS4 install at 90 percent it will almost stop and may take 5 to 10 mins to finish. This is normal. What a pain huh......
    After install is finished, reboot
    After reboot, go to the CS4 64 bit or 32 bit icon (depends on 32 or 64 bit Windows 7) in start area, right click on CS4 64 bit (if you have windows 7 64 bit) and choose properties, compatibility tab and then check run as Admin at the bottom area. Hit apply, ok to close out.
    Now start CS4 and run the updater.

  • I receive "Database access denied" when trying to add component 4543BD

    I receive "Database access denied" when trying to add component 4543BD to my schematic. This component was added from a previous version. I'm using Multisim version 12.0.0  Student edition.
    Solved!
    Go to Solution.

    Hi Diarra,
    I checked my database and  the  4543 is not in the Student Edition. If you opened a schematic that was created in a higher version such as the Educaiton Edition and copied the part to your database, when you place this part you will get the access denied message. 
    Attached is a schematic with the part, you can open it and build you circuit around it.
    Tien P.
    National Instruments
    Attachments:
    4543.ms12 ‏62 KB

  • When trying to get updates it says that I am not conntected and to check my network.  How do I fix this?

    When trying to get an update, a message reads that it cannot connect and to check the network setting.  I can get the internet, so I dont know how the fix this. 

    Temporarily turn off the anti-virus and firewall software on your PC before attempting to get the update

  • When trying to get new messages, keep getting asked for password and then get "operation couldn't be completed. (MFMessager error domain error 1032)-Why?

    When trying to get new messages, keep getting asked for password and then get "operation couldn't be completed. (MFMessager error domain error 1032)-Why?

    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    iOS 6 and OS X Mountain Lion: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • When trying to export an iMovie project I get the following error message (-108).

    When trying to export an iMovie project I get the following error message (-108)

    Hi
    Error -108 memFullErr  Ran out of memory [not enough room in heap zone]
    Turn off - TimeMachine usually works - re-try.
    (the Application down in the Dock - not the Device)
    But this can mean many thing's - My first thought is
    • Free Space on Start-Up hard disk. How much ? (other disks do not count)
    Yours Bengt W

  • HT204266 cannot connect to itunes store when trying to get app updates

    Why do I get this message...."cannot connect to itunes store" when trying to get app updates.  I have no trouble connecting to store in other area.

    Try this http://support.apple.com/kb/TS1702

  • Why do I keep getting a Network time out message when trying to get current update on my 3GS?

    Why do I keep getting, "Network timed out error", when trying to get latest update to my IPhone 3GS? Have never had trouble before.

    Disable your firewall and any antivirus and similar software.

  • Sorry the answer to my previous question did not help....when trying to get app message tells me I do not have acc or its been disabled. Is this because of joint usage of email as my partner has account with iTunes using same email?

    Sorry the answer to my previous question did not help....when trying to get new app installed on iPad  message tells me I do not have acc or its been disabled. Is this because of joint usage of email as my partner has account with iTunes using same email?

    Whatever the reasons are that you think the problem exists, you will not be able to resolve it on your own. Did you see this at the bottom of the support article that I suggested that you read?
    Additional Information
    If the issue persists, you can visit iCloud Support, iTunes Support, Apple Print Products, or contact AppleCare for further assistance.
    You should probably contact iTunes Support.

  • Not connecting when trying to get email

    I have just got a problem when trying to get email. The account is Ok and connected, but next to the button Get new email (under button email) my account is grey.
    Mail program is getting mail when starting the computer. I have marked that program should get mail every five minutes, but it is not working. Neither when I am trying to get it manual.
    Tried to make a new identical account (IMAP instead of POP) and then it worked. I am though afraid of deleting my old account and lose all my old emails.
    Have repaired authorities.
    What has gone wrong?

    Please clarify -- the Get New Mail button in the toolbar of the Mail window is gray, or also if you click on Mailbox in the menubar, and choose Get New Mail, then this account is not available? But there are no symbols beside the Inbox for this account?
    Ernie
    Message was edited by: Ernie Stamper

  • My old Mac book pro won't startup. When tried I get an argyle colored apple and the clock spins until it stops, then nothing. Tried the cmd, alt, p,r but that gets a different designed apple?

    My old MacBook Pro won't start up. When tried I get an argyle apple and the clock spins, then nothing. I tried cmd,alt,p,r 3 x before gong and now I get a striped apple but still not startup.

    Whcih model MacBook Pro do you have (e.g., "15-inch Late 2011")?
    Which version of OS X are you running?
    Clinton

  • TS1424 When trying to get into apps I keep getting a error message the "cannot verify identity of server" and it's not accepting my Apple ID password. I found something that said I have to accept the new terms and conditions for iCloud  but can't get in

    Getting a verification error when trying to get into the apps,

    I also have Jolly's problem. I found the iMovie 9.0.9 folder and tried to launch the older version of iMove. It would not launch. I removed all of the iMovie preferences from the Preferences folder, removed iMove 10 from the applications folder, and restarted my Mac. iMove 9.0.9 still won't launch and I can't access my videos created with the older version of iMovie. Is there a way to uninstall iMovie 10 and reinstall iMovie 9.0.9?
    I am running Yosemitie on a  iMac.
    Paul

Maybe you are looking for

  • How can I load a .TXT file into a dynamic text box?

    I am sure that many people know how to load a .txt file into a dynamic text box. But I do not. I want to be able to reference a txt file from the server into the text box. So that when I change the text file it changes in the flash movie without even

  • Materialized View Logs Query

    Hi All, I had some problem with my Materialized views, that's why Dropped all of the Logs + Materialized Views from my Production Database. Kindly tell me that, Is there any Query, which I can run and make Materialized View Logs from my Existing Tabl

  • Can anyone show me how to create a scheduled app to run

    hi i have a application that needs to be run at certain time daily. i was wondering if anyone here can show me how to do that? thanks

  • Can't find my sent mail

    I typed a long detailed e-mail a couple of hours ago and sent it. Later I went back to check for a reply and noticed that it didn't seem like Mail was "Getting Mail". There were no new mails, whereas on my iPhone there were new mails. I looked in the

  • SATA-SATA II

    Hi, was wondering if some one could shed a bit of light on this for me . I'm looking to put a 500g HD in my new mac book pro . but some sites list them as SATA and some as SATA II . can i use both , or do i have have to stick to one or the other . so