• Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 5.3.0.Final
    • Fix Version/s: 5.4.0.Final
    • Component/s: None
    • Labels:


      Modeshape login fails with the following RepositoryException when running with the default Locale language set to Turkish (tr):

      javax.jcr.RepositoryException: Error while starting 'simple' repository: null
      	at org.modeshape.jcr.JcrRepository.login(
      	at org.modeshape.jcr.JcrRepository.login(
      	at org.modeshape.jcr.JcrRepository.login(
      	at modeshape.TurkishLocaleBug.main(
      Caused by: java.lang.NullPointerException
      	at org.modeshape.jcr.NodeTypes.<init>(
      	at org.modeshape.jcr.NodeTypes.with(
      	at org.modeshape.jcr.RepositoryNodeTypeManager.registerNodeTypes(
      	at org.modeshape.jcr.JcrRepository$RunningState.<init>(
      	at org.modeshape.jcr.JcrRepository$RunningState.<init>(
      	at org.modeshape.jcr.JcrRepository.doStart(
      	at org.modeshape.jcr.JcrRepository.login(
      	... 3 more

      The NPE is caused by a missing ntUnstructuredType.

      The ntUnstructuredType is missing because the jsr_283_builtins.cnd is failing to parse.

      The parsing failure is getting masked by what looks like a recurrence of MODE-1400. Basically, in JcrRepository fails to check the reported problems of the previous call to importBuiltins at line 1131.

      The parsing failure itself is caused by an unknown token failure on the "multiple" token in the CND file. This is due to the "Turkish Locale Bug" ( The lowercase "i" (\u0069) in the Turkish locale does not map to the latin uppercase "I" (\u0049), but to \u0130.

      Hacking a local versions of TokenStream and CndImporter to use String.toLowerCase(Locale.ENGLISH) and String.toUpperCase(Locale.ENGLISH) seem to allow Modeshape to at least startup and seems to work.

      Probably a more thorough review of the Modeshape code base for use of these methods would need to be done to guarantee Modeshape truly works in the Turkish locale.

      Attached is a sample gradle project showing the problem.

        Gliffy Diagrams




              • Assignee:
                hchiorean Horia Chiorean
                mbachmann Matthew Bachmann
              • Votes:
                0 Vote for this issue
                2 Start watching this issue


                • Created: