Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-721

Removing links between the entities throws exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • V2 2.0.4
    • V2 2.0.5
    • odata2-jpa
    • None

    Description

      Consider 2 entities A and B, there is a bidirectional association between these entities(A to B and B to A).

      Created an association between these entities via $links refer the below URI
      <root-url>/B(5001L)/$links/ADetails with the request payload as

      { "uri":"A(4901L)" }

      and the association gets created able to retrieve this data via $expand

      Now tried to remove this association via $links with the HTTP DELETE request refer to the following URI
      <root-url>/A(4901L)/$links/BDetails(5001L)
      Get an exception "Object: null is not a known Entity type."

      here is the excerpt stack trace
      stacktrace": [

      { "class": "org.eclipse.persistence.internal.jpa.EntityManagerImpl", "method": "contains", "line": 1077 }

      ,

      { "class": "org.apache.olingo.odata2.jpa.processor.core.access.data.JPALink", "method": "save", "line": 164 }

      ,

      { "class": "org.apache.olingo.odata2.jpa.processor.core.access.data.JPAProcessorImpl", "method": "deleteLink", "line": 525 }

      ,

      { "class": "org.apache.olingo.odata2.jpa.processor.core.access.data.JPAProcessorImpl", "method": "process", "line": 336 }

      ,

      { "class": "org.apache.olingo.odata2.jpa.processor.core.ODataJPAProcessorDefault", "method": "deleteEntityLink", "line": 237 }

      ,

      { "class": "org.apache.olingo.odata2.core.Dispatcher", "method": "dispatch", "line": 165 }

      ,

      { "class": "org.apache.olingo.odata2.core.ODataRequestHandler", "method": "handle", "line": 129 }

      ,

      { "class": "org.apache.olingo.odata2.core.rest.ODataSubLocator", "method": "handle", "line": 167 }

      ,

      { "class": "org.apache.olingo.odata2.core.rest.ODataSubLocator", "method": "handleDelete", "line": 78 }

      ,

      { "class": "sun.reflect.NativeMethodAccessorImpl", "method": "invoke0", "line": -2 }

      ,

      { "class": "sun.reflect.NativeMethodAccessorImpl", "method": "invoke", "line": -1 }

      ,
      {}.....]

      Attachments

        Activity

          People

            chandan.v.a Chandan V.A
            Madhuri Muthyalu Madhuri Muthyalu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: