Hi Andy,

I agree that it looks like the grammar for parsing the namespace value is
too strict.  It should accept any string that is a valid URI.

Can you open up a bug report with your findings?

If you need a temporary workaround, you may also register a namespace using
the "register nodetypes" instruction with CND syntax that looks something
like this:

register nodetypes
<<===
    <stDim='http://ns.adobe.com/xap/1.0/sType/Dimensions#'>
===>>


Regards,
-Eric


On Mon, Jun 27, 2022 at 4:43 PM Andreas Schaefer <[email protected]>
wrote:

> Hi
>
> I wanted to register namespaces with the Repo-Init and it works except for
> namespaces with a trailing hashtag like:
>
> "register namespace (stDim) http://ns.adobe.com/xap/1.0/sType/Dimensions#
> ”,
>
> Fails with:
>
> 7.06.2022 16:12:41.019 *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 14, column 1._Was expecting one of:_
>         at
> org.apache.sling.repoinit.parser.impl.RepoInitParserService.parse(RepoInitParserService.java:45)
> [org.apache.sling.repoinit.parser:1.6.14]
>         at
> org.apache.sling.jcr.repoinit.impl.RepositoryInitializerFactory.processRepository(RepositoryInitializerFactory.java:127)
> [org.apache.sling.jcr.repoinit:1.1.39.T20220426093723-a4cd7db]
>         at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.executeRepositoryInitializers(AbstractSlingRepositoryManager.java:627)
> [org.apache.sling.jcr.base:3.1.10]
>         at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:575)
> [org.apache.sling.jcr.base:3.1.10]
>         at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:96)
> [org.apache.sling.jcr.base:3.1.10]
>         at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:544)
> [org.apache.sling.jcr.base:3.1.10]
> Caused by: org.apache.sling.repoinit.parser.impl.ParseException:
> Encountered "" at line 14, column 1._Was expecting one of:_
>         at
> org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.generateParseException(RepoInitParserImpl.java:4888)
> [org.apache.sling.repoinit.parser:1.6.14]
>         at
> org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.jj_consume_token(RepoInitParserImpl.java:4770)
> [org.apache.sling.repoinit.parser:1.6.14]
>         at
> org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.registerNamespaceStatement(RepoInitParserImpl.java:1590)
> [org.apache.sling.repoinit.parser:1.6.14]
>         at
> org.apache.sling.repoinit.parser.impl.RepoInitParserImpl.parse(RepoInitParserImpl.java:69)
> [org.apache.sling.repoinit.parser:1.6.14]
>         at
> org.apache.sling.repoinit.parser.impl.RepoInitParserService.parse(RepoInitParserService.java:43)
> [org.apache.sling.repoinit.parser:1.6.14]
>
> AEM has many of these namespaces registered out of the box so I should be
> able to add one of them.
>
> I tried to escape it with \ but that did not work either.
>
> - Andy

Reply via email to