com.ibm.team.repository.common.PermissionDeniedException: CRRTC5039E: User TestJazzAdmin1 is not allowed to access content T2NdHO3CICH6F9Y6x4y-VG5QAGwMifH1Yn3JX9Lxnzc
at com.ibm.team.scm.service.internal.content.VersionedContentService.validateUploadedContentBatch(VersionedContentService.java:3961)
at com.ibm.team.scm.service.internal.content.VersionedContentService.validateNewlyUploadedContent(VersionedContentService.java:3901)
at com.ibm.team.scm.service.internal.content.VersionedContentService.checkAndFinalizeContentReferences(VersionedContentService.java:3855)
at com.ibm.team.scm.service.internal.ScmServiceInternal.internalSaveVersionables(ScmServiceInternal.java:1695)
at com.ibm.team.scm.service.internal.operations.commit.CommitOperation.saveVersionables(CommitOperation.java:556)
at com.ibm.team.scm.service.internal.operations.commit.CommitOperation.initializeSaves(CommitOperation.java:1520)
at com.ibm.team.scm.service.internal.operations.commit.CommitOperation.initialize(CommitOperation.java:617)
at com.ibm.team.scm.service.internal.operations.commit.CommitOperation.run(CommitOperation.java:295)
at com.ibm.team.scm.service.internal.ScmService$22.run(ScmService.java:1206)
at com.ibm.team.scm.service.internal.AbstractScmService$3.run(AbstractScmService.java:596)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runTransaction(RepositoryDatabase.java:347)
at com.ibm.team.repository.service.internal.rdb.RepositoryDatabase.runInTransaction(RepositoryDatabase.java:271)
at com.ibm.team.repository.service.internal.PrimitiveTransactionService.runInTransaction(PrimitiveTransactionService.java:96)
at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy126.runInTransaction(Unknown Source)
at com.ibm.team.repository.service.internal.TransactionService.runInTransaction(TransactionService.java:45)
at sun.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy380.runInTransaction(Unknown Source)
at com.ibm.team.scm.service.internal.AbstractScmService.runInTransaction(AbstractScmService.java:346)
at com.ibm.team.scm.service.internal.AbstractScmService.runInTransaction(AbstractScmService.java:587)
at com.ibm.team.scm.service.internal.ScmService.batchCommit(ScmService.java:1128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.invoke(ExportProxyServiceRecord.java:361)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord.access$0(ExportProxyServiceRecord.java:347)
at org.eclipse.soda.sat.core.internal.record.ExportProxyServiceRecord$ExportedServiceInvocationHandler.invoke(ExportProxyServiceRecord.java:56)
at com.sun.proxy.$Proxy768.batchCommit(Unknown Source)
at net.jazz.rtcext.workitem.extensions.service.MyPlugin.deliverVersionedSqlScriptOnWorkItemSave(MyPlugin.java:415)
at net.jazz.rtcext.workitem.extensions.service.MyPlugin.run(MyPlugin.java:157)
Comments
What's the full stacktrace of your error?
no stacktrace. simply he does not complete the commit, infact if I try to print something in the console it just not appear.
Just on the rtc client, that have configured the follow up actions, appears
Problem
Permission denied during "newplugin".
CRRTC5039E: User TestJazzAdmin1 is not allowed to access content IyPRg4lYKg8uNO9Rv6B3OVAAg6ofLs4rkg6HrQveW6g
and the save operation is not completed
yes I'm using jetty, where i can find my ccm log file?
If you're launching Jetty then why don't you just put a breakpoint in VersionedContentService's two checkPermissions(*) methods and wait for it to get hit and debug that way?
i will do it, i'll let you know, thanks
I found that the problem is in OperationAdviceManager.runParticipant(...)
he catch the exception after this try
try {
monitor.subTask(NLS.bind(Messages.getCommonString("OperationAdviceManager.40"), participantReport.getName())); //$NON-NLS-1$
participant.run(operation, participantConfig, problemCollector, monitor);
} catch (PermissionDeniedException e) {
appendError(participantReport, Messages.getCommonString("OperationAdviceManager.41"), NLS.bind(Messages.getCommonString("OperationAdviceManager.42"), participantReport.getName(), getExceptionMessage(e)), null, IParticipantInfoCollector.ID_EXCEPTION_PROBLEM, e); //$NON-NLS-1$ //$NON-NLS-2$
}
But unfortunately this behavior give me no clue about how to solve the problem.
Do you have any idea?
Did you climb backwards up the stack trace to see where the exception is coming from? I thought you were going to put breakpoints in the two checkPermissions(*) methods in VersionedContentService?
There isn't any stacktrace shown in the eclipse console. I've put the breakpoints in the checkpermission methods but the debugger run through the checkpermission step by step without finding any problem. Now i've put a breakpoint in the PermissionDeniedException class to access the stacktrace through the class variable but the stacktrace is null.
Pheraps something happens in the participant.run(...), i will try to get a spot there.
Put a breakpoint where the 'catch' block is and when the exception is caught force the stack trace to be printed then.
Alternatively, put breakpoints in PermissionDeniedException's constructors as you seem to have done already and see when and how it is created. You could just walk up the thread stack that way.
Also, how did you store the content?
i store the content using ServerVersionedContentService.storeContentNoProperties.
Then I create The file content through FilesystemFactory and use it set methods to set hash, size, encoding and delimiter.
then i get a workingcopy of the file that i want to modify and do
modifiedFile.setContent(myContent)
Reading around on the internet i'm beginning to believe that the problem is that the content is unclaimed for a too long time. But i'm wondering, when a content is claimed? It isn't when I do fileitem.setcontent(filecontent)?
I think you should continue trying to figure out the complete stack trace. We will not know for sure that we are looking at the right things until we have a stack trace that shows the source of the PermissionDeniedException.
I would have expected the content to be claimed when it was uploaded. There should be an entry in the SCM.CONTENT_CLAIMER (the exact name may differ on your system) for your hash.