Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-4842

Don't fail with an obscure NPE when the version's repository isn't configured propertly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Outdated
    • Major
    • None
    • 4.5.7
    • core
    • None

    Description

      When configuring Jackrabbit, users sometimes make the mistake of not configuring the schemaObjectPrefix properly for the Versioning PM. They might for example copy paste a snippet for the regular PM which includes <param name="schemaObjectPrefix" value="${wsp.name}_"/>.

      When this happens, startup fails miserably - it should still fail, but a more specific and explicit message would help !

      com.google.inject.CreationException: Guice creation errors:
       
      1) Error injecting constructor, java.lang.NullPointerException
        at info.magnolia.cms.core.version.VersionManager.<init>(VersionManager.java:65)
        at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindImplementation(GuiceComponentConfigurationModule.java:155)
        while locating info.magnolia.cms.core.version.VersionManager
      Caused by: java.lang.NullPointerException
              at info.magnolia.cms.core.version.BaseVersionManager$1.exec(BaseVersionManager.java:126)
              at info.magnolia.cms.core.version.BaseVersionManager$1.exec(BaseVersionManager.java:121)
              at info.magnolia.cms.security.JCRSessionOp.exec(JCRSessionOp.java:69)
              at info.magnolia.context.MgnlContext.doInSystemContext(MgnlContext.java:403)

      (see complete stacktrace in attachement)

      When resolving, please investigate and report any finding regarding the second startup failure in the attached log - is it related in any way ?

      2) Error injecting constructor, java.lang.NullPointerException
        at info.magnolia.freemarker.FreemarkerHelper.<init>(FreemarkerHelper.java:91)
        at info.magnolia.objectfactory.guice.GuiceComponentConfigurationModule.bindImplementation(GuiceComponentConfigurationModule.java:155)
        while locating info.magnolia.freemarker.FreemarkerHelper
      Caused by: java.lang.NullPointerException
              at info.magnolia.freemarker.FreemarkerHelper.<init>(FreemarkerHelper.java:113)
      

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              gjoseph Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD