Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1978

NPE when moving a node

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 3.4.0.Final, 3.3.x-prod-ip6.0
    • 3.3.0.Final
    • None
    • None
    • Hide

      Checkout the s-ramp codebase, change the modeshape revision to 3.3.0.Final (in the parent pom.xml) and run mvn clean test.

      You should also be able to import it into your IDE without too much trouble and run the JCRPersistenceTest from there.

      Show
      Checkout the s-ramp codebase, change the modeshape revision to 3.3.0.Final (in the parent pom.xml) and run mvn clean test. You should also be able to import it into your IDE without too much trouble and run the JCRPersistenceTest from there.

    Description

      Tried upgrading from MS 3.2.0.Final to 3.3.0.Final and one of our (sramp) junit tests started failing with an NPE. The test in question is for deleting an artifact from the sramp repo:

      https://github.com/Governance/s-ramp/blob/master/s-ramp-repository-jcr/modeshape/src/test/java/org/overlord/sramp/repository/jcr/modeshape/JCRPersistenceTest.java#L518-544

      When we delete an artifact we do two things:

      1) Move the JCR node from /s-ramp/artifacts/UUID to /s-ramp-trash/artifacts/UUID
      2) Remove the primary s-ramp mixin and replace it with sramp:deletedArtifact

      The resulting exception is:

      java.lang.NullPointerException
      	at org.modeshape.jcr.cache.document.WritableSessionCache.persistChanges(WritableSessionCache.java:1125)
      	at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:544)
      	at org.modeshape.jcr.JcrSession.save(JcrSession.java:1022)
      	at org.overlord.sramp.repository.jcr.JCRPersistence.deleteArtifact(JCRPersistence.java:404)
      	at org.overlord.sramp.repository.jcr.modeshape.JCRPersistenceTest.testDeleteArtifact(JCRPersistenceTest.java:534)
      

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            ewittman@redhat.com Eric Wittmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: