[ https://issues.apache.org/jira/browse/SLING-7234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284348#comment-16284348 ]
Karl Pauls commented on SLING-7234: ----------------------------------- [~olli], that looks like a bug. However, I'm not sure that this is related to this bug because that is about a cycle while in your case it is about a none existing config that doesn't get handled correctly. I think for now (i.e., until the bug is fixed) you have two options namely, a) create a ScriptCache configuration similar to the one in the sling starter [0] (it needs to have at least one value for the additionalExtensions) or b) update to the latest R7 SCR SNAPSHOT (2.1.0-SNAPSHOT) which might fix this (but will not be released for at least another month or two). [~radu.cotescu], if you call a property method on a config object that returns an array it will return null if there is no config (regardless of whether you set a default of {} or not). Thats one spec oddity of the old DS spec (it will be changed for the new DS). As a consequence, it looks like [1] is blowing up because there is no config (or it doesn't have a value for addtionalExtensions) and hence, additionalExtensions is set to null in [2]. [0] https://github.com/apache/sling-org-apache-sling-starter/blob/master/src/main/provisioning/scripting.txt#L54 [1] https://github.com/apache/sling-org-apache-sling-scripting-core/blob/master/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java#L251 [2] https://github.com/apache/sling-org-apache-sling-scripting-core/blob/master/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java#L219 > ServiceFactory.getService() resulted in a cycle in sling karaf > --------------------------------------------------------------- > > Key: SLING-7234 > URL: https://issues.apache.org/jira/browse/SLING-7234 > Project: Sling > Issue Type: Bug > Components: Karaf, Scripting > Affects Versions: Scripting Core 2.0.50 > Environment: Debian linux, jdk 1.8.0_151-b12 > Reporter: Ivo Leitão > Assignee: Oliver Lietz > Attachments: clean.log.1, grep-errors.log, sample.log.1 > > > Hello, > Once in a while on the first startup of Sling on Karaf I'm seeing the > exception ServiceFactory.getService() resulted in a cycle. This does not > happen every time only on some startups. > After the first startup on the next restart this exception does not appear > anymore. > I've picked a sample of the exception. Unfortunately this seems like a > concurrency issue and therefore much harder to find a pattern but it happens > mostly with sling scripting. I've seen other exceptions also with sling > scripting but this one is the most common > I've uploaded two log files: > clean.log.1 with a clean startup and > sample.log.1 with the aforementioned exception -- This message was sent by Atlassian JIRA (v6.4.14#64029)