<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic permission not set in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119378#M32867</link>
    <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I'm use java api when set permission to nodeRef:&lt;/P&gt;&lt;PRE&gt;permissionService.setPermission(nodeRef, userName, PermissionService.CONTRIBUTOR, true);&lt;/PRE&gt;&lt;P&gt;but when I see nodeRef in my node browser I don't see &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;the assigned rights for this user. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;All what I see in my alfresco log is this(I think this is a consequence): &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;2021-05-19T14:28:21.816860615Z Caused by: org.apache.ibatis.reflection.ReflectionException: Error instantiating class java.util.ArrayList with invalid types () or values (). Cause: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
2021-05-19T14:28:21.816865845Z 	at org.apache.ibatis.reflection.factory.DefaultObjectFactory.instantiateClass(DefaultObjectFactory.java:90)
2021-05-19T14:28:21.816870724Z 	at org.apache.ibatis.reflection.factory.DefaultObjectFactory.create(DefaultObjectFactory.java:50)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;why its not work? &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 May 2021 14:50:16 GMT</pubDate>
    <dc:creator>sergus_dev</dc:creator>
    <dc:date>2021-05-19T14:50:16Z</dc:date>
    <item>
      <title>permission not set</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119378#M32867</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I'm use java api when set permission to nodeRef:&lt;/P&gt;&lt;PRE&gt;permissionService.setPermission(nodeRef, userName, PermissionService.CONTRIBUTOR, true);&lt;/PRE&gt;&lt;P&gt;but when I see nodeRef in my node browser I don't see &lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;the assigned rights for this user. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;All what I see in my alfresco log is this(I think this is a consequence): &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;2021-05-19T14:28:21.816860615Z Caused by: org.apache.ibatis.reflection.ReflectionException: Error instantiating class java.util.ArrayList with invalid types () or values (). Cause: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
2021-05-19T14:28:21.816865845Z 	at org.apache.ibatis.reflection.factory.DefaultObjectFactory.instantiateClass(DefaultObjectFactory.java:90)
2021-05-19T14:28:21.816870724Z 	at org.apache.ibatis.reflection.factory.DefaultObjectFactory.create(DefaultObjectFactory.java:50)&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;why its not work? &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 14:50:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119378#M32867</guid>
      <dc:creator>sergus_dev</dc:creator>
      <dc:date>2021-05-19T14:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: permission not set</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119379#M32868</link>
      <description>&lt;P&gt;There is nothing wrong with that line. Could you please share with us the complete code? So, we can check what is hapening.&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 08:42:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119379#M32868</guid>
      <dc:creator>cristinamr</dc:creator>
      <dc:date>2021-05-20T08:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: permission not set</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119380#M32869</link>
      <description>&lt;P&gt;Are you executing that line as Alfresco Administrator?&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 08:48:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119380#M32869</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2021-05-20T08:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: permission not set</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119381#M32870</link>
      <description>&lt;P&gt;Class from activiti:&lt;/P&gt;&lt;PRE&gt;    &amp;lt;scriptTask id="initializeNextStep" name="Initialize next step" scriptFormat="javascript" activiti:autoStoreVariables="false"&amp;gt;
      &amp;lt;extensionElements&amp;gt;
        &amp;lt;activiti:executionListener event="start" class="ru.customorg.repo.workflow.planning.StartStepExecutionListener"&amp;gt;&amp;lt;/activiti:executionListener&amp;gt;
      &amp;lt;/extensionElements&amp;gt;
      &amp;lt;script&amp;gt;&amp;lt;![CDATA[execution.setVariable('cowf_isRejected', false);]]&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;/scriptTask&amp;gt;&lt;/PRE&gt;&lt;P&gt;Part of code from that class:&lt;/P&gt;&lt;PRE&gt;						AuthenticationUtil.runAs(new AuthenticationUtil.RunAsWork&amp;lt;Void&amp;gt;() {
							@Override
							public Void doWork() {
								try {
									FilePermissionServiceImpl filePermissionService = (FilePermissionServiceImpl) WorkflowUtils
											.getServiceRegistry()
											.getService(QName.createQName(null, FilePermissionServiceImpl.BEAN));
									filePermissionService.addPermissions(docRef, userName);
								} catch (Exception e) {
									LOGGER.error("StartStepExecution permission error ", e);
								}

								return null;
							}
						}, AuthenticationUtil.getSystemUserName());&lt;/PRE&gt;&lt;P&gt;here my full stack trace:&lt;/P&gt;&lt;PRE&gt;2021-05-20T14:19:01.465071292Z Warning: Nashorn engine is planned to be removed from a future JDK release
2021-05-20T14:19:01.521319176Z  2021-05-20 14:19:01,508  ERROR [impl.interceptor.CommandContext] [http-nio-8080-exec-6] Error while closing command context
2021-05-20T14:19:01.521370262Z  org.apache.ibatis.exceptions.PersistenceException: 
2021-05-20T14:19:01.521377505Z ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class java.util.ArrayList with invalid types () or values (). Cause: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
2021-05-20T14:19:01.521384078Z ### The error may exist in org/activiti/db/mapping/entity/HistoricVariableInstance.xml
2021-05-20T14:19:01.521410577Z ### The error may involve org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.selectHistoricVariableInstanceByVariableInstanceId
2021-05-20T14:19:01.521417821Z ### The error occurred while handling results
2021-05-20T14:19:01.521422039Z ### SQL: select * from ACT_HI_VARINST where ID_ = ?
2021-05-20T14:19:01.521426327Z ### Cause: org.apache.ibatis.reflection.ReflectionException: Error instantiating class java.util.ArrayList with invalid types () or values (). Cause: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
2021-05-20T14:19:01.521430855Z 	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
2021-05-20T14:19:01.521435464Z 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:122)
2021-05-20T14:19:01.521440473Z 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)
2021-05-20T14:19:01.521444972Z 	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:73)
2021-05-20T14:19:01.521448689Z 	at org.activiti.engine.impl.db.DbSqlSession.selectOne(DbSqlSession.java:455)
2021-05-20T14:19:01.521453337Z 	at org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntityManager.findHistoricVariableInstanceByVariableInstanceId(HistoricVariableInstanceEntityManager.java:67)
2021-05-20T14:19:01.521458136Z 	at org.activiti.engine.impl.history.DefaultHistoryManager.recordVariableUpdate(DefaultHistoryManager.java:692)
2021-05-20T14:19:01.521462975Z 	at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.updateVariableInstance(VariableScopeImpl.java:829)
2021-05-20T14:19:01.521468135Z 	at org.activiti.engine.impl.persistence.entity.ExecutionEntity.updateVariableInstance(ExecutionEntity.java:1208)
2021-05-20T14:19:01.521473685Z 	at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariableLocal(VariableScopeImpl.java:710)
2021-05-20T14:19:01.521478304Z 	at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:617)
2021-05-20T14:19:01.521482953Z 	at org.activiti.engine.impl.persistence.entity.VariableScopeImpl.setVariable(VariableScopeImpl.java:590)
2021-05-20T14:19:01.521487721Z 	at jdk.scripting.nashorn.scripts/jdk.nashorn.internal.scripts.Script$Recompilation$5$\^eval\_/0x00000008013a4440.:program(&amp;lt;eval&amp;gt;:1)
2021-05-20T14:19:01.523356955Z 	... 368 more
2021-05-20T14:19:01.523361324Z Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")
2021-05-20T14:19:01.523366203Z 	at java.base/java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
2021-05-20T14:19:01.523370871Z 	at java.base/java.security.AccessController.checkPermission(AccessController.java:895)
2021-05-20T14:19:01.523375530Z 	at java.base/java.lang.SecurityManager.checkPermission(SecurityManager.java:322)
2021-05-20T14:19:01.523386521Z 	at java.base/java.lang.Class.checkMemberAccess(Class.java:2848)
2021-05-20T14:19:01.523392111Z 	at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2550)
2021-05-20T14:19:01.523396830Z 	at org.apache.ibatis.reflection.factory.DefaultObjectFactory.instantiateClass(DefaultObjectFactory.java:62)
2021-05-20T14:19:01.523401459Z 	... 381 more&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 May 2021 14:32:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119381#M32870</guid>
      <dc:creator>sergus_dev</dc:creator>
      <dc:date>2021-05-20T14:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: permission not set</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119382#M32871</link>
      <description>&lt;P&gt;I found problem, that was in my script task variable.&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 18:45:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119382#M32871</guid>
      <dc:creator>sergus_dev</dc:creator>
      <dc:date>2021-05-20T18:45:21Z</dc:date>
    </item>
    <item>
      <title>Re: permission not set</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119383#M32872</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/9334"&gt;@sergus_dev&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for updating your thread.&lt;/P&gt;
&lt;P&gt;Best wishes,&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 09:40:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/permission-not-set/m-p/119383#M32872</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2021-05-21T09:40:58Z</dc:date>
    </item>
  </channel>
</rss>

