Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-787

NPE in EntityRepositoryHandler for persistent methods of DTO EntityRepository

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.0
    • None
    • Data-Module
    • None
    • Wildfly 8.1.0.Final/8.2.0.Final, Win7

    Description

      NPE when trying to save object (or any other persistent operation) using DTO Repository. QueryInvocationContext in EntityRepositoryHandler is not injected.
      Non-persistent operations, like finBy or findAll, work fine. Non-dto entity repository persists data correct.

      Piece of stacktrace:
      Caused by: java.lang.NullPointerException
      at org.apache.deltaspike.data.impl.handler.EntityRepositoryHandler.save(EntityRepositoryHandler.java:66) [deltaspike-data-module-impl-1.1.0.jar:1.1.0]

      Debugger shows that entity provided to the method is correct, that means another Repository, used for dto to entity mapping in the same thread, works fine.

      Attachments

        1. dto-repository-test.zip
          34 kB
          Wojciech Żaboklicki

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            thomashug Thomas Hug
            zabian Wojciech Żaboklicki
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment