[
https://issues.apache.org/jira/browse/AVRO-3883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17774352#comment-17774352
]
Christophe Le Saec commented on AVRO-3883:
------------------------------------------
Hello Giuliano
This issue seems to be more related to JVM policy parameters than to Avro. See
[this "old" doc|https://docs.oracle.com/cd/E19226-01/820-7699/abgjt/index.html]
from oracle.
Here an example [of policy
file|https://docs.oracle.com/javase/tutorial/security/tour2/examples/java.policy].
You should also check policy of Tomcat.
> java.security.AccessControlException
> ------------------------------------
>
> Key: AVRO-3883
> URL: https://issues.apache.org/jira/browse/AVRO-3883
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.11.1, 1.11.3
> Environment: Runtime:
> Apache Tomcat/9.0.74
> Java 11.0.19
> Reporter: Giuliano Forlini
> Priority: Major
>
> Hi,
> I am having a problem with one avro generated class. The problem is totally
> random and it's very hard to understand what is causing the issue.
> Here the stacktrace:
> _java.lang.ExceptionInInitializerError: null_
> _at
> com.ubs.dag.business.service.globalcrmmanagement.impl.TagServiceImpl.mapEnrichResponseToStoreRequest(TagServiceImpl.java:110)_
> _at
> com.ubs.dag.business.service.globalcrmmanagement.impl.TagServiceImpl.lambda$processTag$0(TagServiceImpl.java:76)_
> _at
> java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown
> Source)_
> _at
> java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(Unknown
> Source)_
> _at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)_
> _at
> java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown
> Source)_
> _at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)_
> _at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)_
> _at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown
> Source)_
> _Caused by: java.security.AccessControlException: access denied
> ("java.util.PropertyPermission" "org.apache.avro.fastread" "read")_
> _at java.base/java.security.AccessControlContext.checkPermission(Unknown
> Source)_
> _at java.base/java.security.AccessController.checkPermission(Unknown
> Source)_
> _at java.base/java.lang.SecurityManager.checkPermission(Unknown Source)_
> _at java.base/java.lang.SecurityManager.checkPropertyAccess(Unknown
> Source)_
> _at java.base/java.lang.System.getProperty(Unknown Source)_
> _at org.apache.avro.generic.GenericData.<init>(GenericData.java:195)_
> _at org.apache.avro.generic.GenericData.<init>(GenericData.java:111)_
> _at org.apache.avro.specific.SpecificData.<init>(SpecificData.java:123)_
> _at com.ubs.gtf.endpoints.store.StoreRequest.<clinit>(StoreRequest.java:23)_
>
>
> the problem seems to be triggered when, from the GenericData class, the code
> tries to lookup into the system property "org.apache.avro.fastread".
> The problem is hard to replicate but, once it happens, every attempt to
> instantiate the avro class ends up with this error and the application server
> must be restarted.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)