[
https://issues.apache.org/jira/browse/AVRO-3883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17774357#comment-17774357
]
Giuliano Forlini commented on AVRO-3883:
----------------------------------------
Hello Christophe,
thanks for your reply. Yes, this is what I am checking at the moment. It's
weird because it does not happen immediately. Only after some time, like if the
policy changes over time.
I was wondering if this can be somehow also enhanced in the
_org.apache.avro.generic.GenericData_ class, it seems the lookup of that system
property is made at every object instantiation:
{{public GenericData(ClassLoader classLoader) {}}
{{ this.conversions = new HashMap();}}
{{ this.conversionsByClass = new IdentityHashMap();}}
{{ *this.fastReaderEnabled =
"true".equalsIgnoreCase(System.getProperty("org.apache.avro.fastread"));*}}
{{ this.fastReaderBuilder = null;}}
{{ this.defaultValueCache = new ConcurrentReferenceHashMap(128,
ReferenceType.WEAK);}}
{{ this.classLoader = classLoader != null ? classLoader :
this.getClass().getClassLoader();}}
{{ this.loadConversions();}}
{{ }}}
> 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)