sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Lietz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-6777) ValidationServiceImpl breaks when hitting closed resolver for resource bundles (i18n)
Date Wed, 12 Apr 2017 08:32:41 GMT

    [ https://issues.apache.org/jira/browse/SLING-6777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15965552#comment-15965552
] 

Oliver Lietz commented on SLING-6777:
-------------------------------------

The error was reported by a client and I don't have much more information other than {{ValidationService}}
is used in a (Sling-) POST-Servlet.
Whatever the root issue is (suspecting _i18n_ also), we should handle closed resolvers in
Validation gracefully.

I never had good experience with long running resource resolvers and try to avoid whenever
possible. Should we switch to short running resolver in _i18n_ (opening/closing when used
or per thread)? WDYT, [~cziegeler]?

> ValidationServiceImpl breaks when hitting closed resolver for resource bundles (i18n)
> -------------------------------------------------------------------------------------
>
>                 Key: SLING-6777
>                 URL: https://issues.apache.org/jira/browse/SLING-6777
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions, Validation
>            Reporter: Oliver Lietz
>
> {noformat}
> java.lang.IllegalStateException: Resource resolver is already closed.
> 	at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.checkClosed(ResourceResolverImpl.java:186)
> 	at org.apache.sling.resourceresolver.impl.ResourceResolverImpl.findResources(ResourceResolverImpl.java:731)
> 	at org.apache.sling.i18n.impl.JcrResourceBundle.loadPotentialLanguageRoots(JcrResourceBundle.java:328)
> 	at org.apache.sling.i18n.impl.JcrResourceBundle.<init>(JcrResourceBundle.java:85)
> 	at org.apache.sling.i18n.impl.JcrResourceBundleProvider.createResourceBundle(JcrResourceBundleProvider.java:452)
> 	at org.apache.sling.i18n.impl.JcrResourceBundleProvider.getResourceBundleInternal(JcrResourceBundleProvider.java:411)
> 	at org.apache.sling.i18n.impl.JcrResourceBundleProvider.getResourceBundle(JcrResourceBundleProvider.java:180)
> 	at org.apache.sling.i18n.impl.JcrResourceBundleProvider.getResourceBundle(JcrResourceBundleProvider.java:171)
> 	at org.apache.sling.validation.impl.ValidationServiceImpl.getDefaultResourceBundle(ValidationServiceImpl.java:196)
> 	at org.apache.sling.validation.impl.ValidationServiceImpl.validate(ValidationServiceImpl.java:292)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message