sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohit Arora (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SLING-9068) Add more context to ParseException
Date Wed, 19 Feb 2020 12:59:00 GMT

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

Mohit Arora commented on SLING-9068:
------------------------------------

We also experienced a similar issue while trying out a new way of defining ACLs on user's
home path. The error looks something like - 

{noformat}19.02.2020 16:41:20.137 *ERROR* [Apache Sling Repository Startup Thread #1] com.adobe.granite.repository.impl.SlingRepositoryManager
Exception in a SlingRepositoryInitializer, SlingRepository service registration aborted
org.apache.sling.repoinit.parser.RepoInitParsingException: Encountered "" at line 526, column
29.
Was expecting one of:
	at org.apache.sling.repoinit.parser.impl.RepoInitParserService.parse(RepoInitParserService.java:54)
[org.apache.sling.repoinit.parser:1.4.0]
	at org.apache.sling.jcr.repoinit.impl.RepositoryInitializer.processRepository(RepositoryInitializer.java:97)
[org.apache.sling.jcr.repoinit:1.1.18]
	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.executeRepositoryInitializers(AbstractSlingRepositoryManager.java:590)
[org.apache.sling.jcr.base:3.1.0]
	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:534)
[org.apache.sling.jcr.base:3.1.0]
	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:92)
[org.apache.sling.jcr.base:3.1.0]
	at org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:496)
[org.apache.sling.jcr.base:3.1.0]
Caused by: org.apache.sling.repoinit.parser.impl.ParseException: Encountered "" at line 526,
column 29.
Was expecting one of:
	at org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.generateParseException(RepoInitParserImpl.java:3095)
[org.apache.sling.repoinit.parser:1.4.0]
	at org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.jj_consume_token(RepoInitParserImpl.java:2977)
[org.apache.sling.repoinit.parser:1.4.0]
	at org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.pathsList(RepoInitParserImpl.java:281)
[org.apache.sling.repoinit.parser:1.4.0]
	at org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.pathPrivilegesLine(RepoInitParserImpl.java:759)
[org.apache.sling.repoinit.parser:1.4.0]
	at org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.setAclPrincipals(RepoInitParserImpl.java:963)
[org.apache.sling.repoinit.parser:1.4.0]
	at org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.parse(RepoInitParserImpl.java:48)
[org.apache.sling.repoinit.parser:1.4.0]
	at org.apache.sling.repoinit.parser.impl.RepoInitParserService.parse(RepoInitParserService.java:50)
[org.apache.sling.repoinit.parser:1.4.0]
	... 5 common frames omitted{noformat}

A more detailed error would certainly help in debugging the underlying issue better.

> Add more context to ParseException
> ----------------------------------
>
>                 Key: SLING-9068
>                 URL: https://issues.apache.org/jira/browse/SLING-9068
>             Project: Sling
>          Issue Type: Improvement
>          Components: Repoinit
>            Reporter: Angela Schreiber
>            Priority: Minor
>
> today the repo init grammar doesn't come with dedicated exception handing and thus the
parser will fail with messages that can make it hard to spot actual problem... specially in
a lengthy repo-init as it is present with Adobe AEM. Example:
> {code}
> org.apache.sling.repoinit.parser.impl.ParseException: Encountered " "," ", "" at line
115, column 46.
> Was expecting:
>     ")" ...
>     
> 	at org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.generateParseException(RepoInitParserImpl.java:3095)
[org.apache.sling.repoinit.parser:1.3.2]
> {code}
> if i am not mistaken this should be doable be adding explicit exceptions to the grammar.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message