<?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 Re: MyBatisSystemException during .parallel(). execution in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123945#M33907</link>
    <description>&lt;P&gt;Cross-post in &lt;A href="https://stackoverflow.com/questions/66357500/why-mybatissystemexception-during-parallel-execution-in-alfresco-6-2" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/66357500/why-mybatissystemexception-during-parallel-execution-in-alfresco-6-2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;From the lock at the error stack so far it is quite clear that an issue with Java security manager and granted code permissions is the cause of this:&lt;/P&gt;
&lt;PRE&gt;ndfund-acs_1       | org.mybatis.spring.MyBatisSystemException: nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is 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")
ndfund-acs_1       |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
ndfund-acs_1       |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
ndfund-acs_1       |    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
ndfund-acs_1       |    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
ndfund-acs_1       |    at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:600)
ndfund-acs_1       |    at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:678)
ndfund-acs_1       |    at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:737)
ndfund-acs_1       |    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919)
ndfund-acs_1       |    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
ndfund-acs_1       |    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
ndfund-acs_1       |    at com.ecmc.alfresco.rst.nd.reports.data.Form11NSSEverything.generateBeanData(Form11NSSEverything.java:181)&lt;/PRE&gt;
&lt;P&gt;Specifically&lt;/P&gt;
&lt;PRE&gt;Cause: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")&lt;/PRE&gt;
&lt;P&gt;Configuration of policy files and mode of customisation deployment need to be checked. It must be ensured that both the Alfresco web application as well as any extensions deployed into it or on some classpath extension paths are covered by the typical AllPermission grant.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Feb 2021 15:43:01 GMT</pubDate>
    <dc:creator>afaust</dc:creator>
    <dc:date>2021-02-25T15:43:01Z</dc:date>
    <item>
      <title>MyBatisSystemException during .parallel(). execution</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123943#M33905</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;After an upgrade Alfresco form version 5.2 to version 6.2 it became unstable: sometimes we got :&lt;/P&gt;&lt;PRE&gt;org.mybatis.spring.MyBatisSystemException: nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Error instantiating class java.util.ArrayList with invalid types () or values &lt;/PRE&gt;&lt;P&gt;Usually during .parallel(). collection execution. There is full stack trace&amp;nbsp;&lt;A href="https://pastebin.com/0jcxFfc5" target="_blank" rel="noopener nofollow noreferrer"&gt;https://pastebin.com/0jcxFfc5&lt;/A&gt; and there is the code &lt;A href="https://pastebin.com/RyPt5d0g" target="_blank" rel="noopener nofollow noreferrer"&gt;https://pastebin.com/RyPt5d0g&lt;/A&gt; . Actually I even can not understand a flow of control, why MyBatis is involved ?&lt;/P&gt;&lt;P&gt;Please help me!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2021 18:40:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123943#M33905</guid>
      <dc:creator>iceja</dc:creator>
      <dc:date>2021-02-24T18:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: MyBatisSystemException during .parallel(). execution</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123944#M33906</link>
      <description>&lt;P&gt;Facing same problem +1&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 09:25:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123944#M33906</guid>
      <dc:creator>shadyuser</dc:creator>
      <dc:date>2021-02-25T09:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: MyBatisSystemException during .parallel(). execution</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123945#M33907</link>
      <description>&lt;P&gt;Cross-post in &lt;A href="https://stackoverflow.com/questions/66357500/why-mybatissystemexception-during-parallel-execution-in-alfresco-6-2" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/66357500/why-mybatissystemexception-during-parallel-execution-in-alfresco-6-2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;From the lock at the error stack so far it is quite clear that an issue with Java security manager and granted code permissions is the cause of this:&lt;/P&gt;
&lt;PRE&gt;ndfund-acs_1       | org.mybatis.spring.MyBatisSystemException: nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is 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")
ndfund-acs_1       |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
ndfund-acs_1       |    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
ndfund-acs_1       |    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
ndfund-acs_1       |    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
ndfund-acs_1       |    at java.base/java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:600)
ndfund-acs_1       |    at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:678)
ndfund-acs_1       |    at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:737)
ndfund-acs_1       |    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateParallel(ReduceOps.java:919)
ndfund-acs_1       |    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
ndfund-acs_1       |    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
ndfund-acs_1       |    at com.ecmc.alfresco.rst.nd.reports.data.Form11NSSEverything.generateBeanData(Form11NSSEverything.java:181)&lt;/PRE&gt;
&lt;P&gt;Specifically&lt;/P&gt;
&lt;PRE&gt;Cause: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessDeclaredMembers")&lt;/PRE&gt;
&lt;P&gt;Configuration of policy files and mode of customisation deployment need to be checked. It must be ensured that both the Alfresco web application as well as any extensions deployed into it or on some classpath extension paths are covered by the typical AllPermission grant.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 15:43:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123945#M33907</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2021-02-25T15:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: MyBatisSystemException during .parallel(). execution</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123946#M33908</link>
      <description>&lt;P&gt;&lt;SPAN class="comment-copy"&gt;I have checked permissions granted to all web applications in catalina.policy, Actually this error is not reproducible well. This exeception doesn't rise when I remove .parallel(). and use single thread stream&amp;nbsp;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b"&gt;&lt;SPAN&gt;processing&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="comment-copy"&gt;Can this issue be relevant &lt;A href="https://stackoverflow.com/a/64027627/1999752" target="_blank" rel="nofollow noopener noreferrer"&gt;stackoverflow.com/a/64027627/1999752&lt;/A&gt; ? &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 07:32:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123946#M33908</guid>
      <dc:creator>iceja</dc:creator>
      <dc:date>2021-02-26T07:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: MyBatisSystemException during .parallel(). execution</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123947#M33909</link>
      <description>&lt;P&gt;&lt;STRONG&gt;SOLUTION:&lt;/STRONG&gt; in Alfresco version 5.2 System.getSecurityManager() == NULL (!!!) but in version 6.2. it has been set up. That is the matter of different behavior (details in &lt;A href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html" rel="nofollow noreferrer noopener" target="_blank"&gt;https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html&lt;/A&gt;). Why v 6.2 set up the SecurityManager and v 5.2. doesn't I still do not know.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 07:06:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123947#M33909</guid>
      <dc:creator>iceja</dc:creator>
      <dc:date>2021-03-02T07:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: MyBatisSystemException during .parallel(). execution</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123948#M33910</link>
      <description>&lt;P&gt;My answer to your stackoverflow post explains why it might be different for you in 6.2 and how you can disable the security manager.&lt;/P&gt;&lt;P&gt;&lt;A href="https://stackoverflow.com/a/66430192/14407764" target="_blank" rel="noopener nofollow noreferrer"&gt;https://stackoverflow.com/a/66430192/14407764&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Copied here:&lt;/P&gt;&lt;P&gt;This exception comes from the Java Security manager. If you are using the Alfresco docker images, the security manager is enabled by default. If you have done a non-docker installation, you are launching tomcat using the "-security" switch. While the security manager is recommended because it makes your installation more secure, it is not required.&lt;/P&gt;&lt;P&gt;If you are using Alfresco's docker images, you will need to modify the docker-compose.yml file and specify a "command" argument for the "alfresco" service. Out of the box, the "command" argument is ["catalina.sh" "run" "-security"]. You need to remove the "-security" flag. For example:&lt;/P&gt;&lt;PRE&gt;...
services:
    alfresco:
        image: alfresco/alfresco-content-repository-community:6.2.0-ga
        command: ["catalina.sh" "run"]
...&lt;/PRE&gt;&lt;P&gt;If you have installed Alfresco manually, you simply need to change the way that you are starting it. Remove the "-security" flag.&lt;/P&gt;&lt;P&gt;According to:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/concurrent/ForkJoinPool.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Using parallel execution causes threads to spawn with no security configuration. This means that for this situation, you cannot use parallel execution unless you disable the security manager. So your choices are to disable the security manager using the above steps or to use serial execution.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 16:47:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123948#M33910</guid>
      <dc:creator>dougforrest</dc:creator>
      <dc:date>2021-03-02T16:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: MyBatisSystemException during .parallel(). execution</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123949#M33911</link>
      <description>&lt;P&gt;Sorry I can not locate&lt;/P&gt;&lt;PRE&gt;...
services:
    alfresco:
        image: alfresco/alfresco-content-repository-community:6.2.0-ga
        command: ["catalina.sh" "run"]
...&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;It looks like I have completely different deployment scheme.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Mar 2021 07:42:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/mybatissystemexception-during-parallel-execution/m-p/123949#M33911</guid>
      <dc:creator>iceja</dc:creator>
      <dc:date>2021-03-04T07:42:06Z</dc:date>
    </item>
  </channel>
</rss>

