[teiid-issues] [JBoss JIRA] (TEIID-3597) OData PUT call returns "NotFoundException"

Ramesh Reddy (JIRA) issues at jboss.org
Wed Jul 29 10:06:02 EDT 2015


    [ https://issues.jboss.org/browse/TEIID-3597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13093938#comment-13093938 ] 

Ramesh Reddy commented on TEIID-3597:
-------------------------------------

Debbie,

In OData, when you referencing an entity, you can only reference by its identity key (PK), you can not (yet.. this is coming may be v4.1) query for entity collectiion and apply update on it. For example, if in your example "AUTHOR_REV_ID" is PK, it needs to be like

{code}
 curl -H 'Content-Type: application/json' -d '
{"SUBMISSION_ID":"77772"}
' -X PUT http://127.0.0.1:8080/odata/CompleteSubVDB/V1.patch_SUBMISSION(895) -u teiidUser:datavirt_
{code}

Which identifies a single entity. Your previous query refers to as collection of entities even though it results in single entity.

> OData PUT call returns "NotFoundException"
> ------------------------------------------
>
>                 Key: TEIID-3597
>                 URL: https://issues.jboss.org/browse/TEIID-3597
>             Project: Teiid
>          Issue Type: Bug
>          Components: OData
>    Affects Versions: 8.7.1, 8.11
>            Reporter: Debbie Steigner
>            Assignee: Ramesh Reddy
>         Attachments: CompleteSubvdb.vdb
>
>
> Unable to PUT via Odata , I am able to GET and POST and JDBC Select, Insert and update on the same table so the transformations are correct:
> {code}
> $ curl -H 'Content-Type: application/json' \
>              -X PUT http://127.0.0.1:8080/odata/CompleteSubVDB/V1.patch_SUBMISSION \
>              -d '{"SUBMISSION_ID": "15232", "AUTHOR_REV_ID":"3"}' -u teiidUser:datavirt_61
> {code}
> <?xml version='1.0' encoding='utf-8'?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>NotFoundException</code><message lang="en-US">V1.patch_SUBMISSION</message></error>
> Full stacktrace from server.log:
> {code}
> 08:04:27,441 DEBUG [org.jboss.resteasy.core.SynchronousDispatcher] (http-/127.0.0.1:8080-1) PathInfo: /V1.patch_SUBMISSION
> 08:04:27,443 WARN  [org.teiid.ODATA] (http-/127.0.0.1:8080-1) TEIID16012 Could not produce a successful OData response.  Returning status NotFoundException with message V1.patch_SUBMISSION.: org.odata4j.exceptions.NotFoundException: V1.patch_SUBMISSION
> 	at org.odata4j.producer.resources.EntitiesRequestResource.functionCallPut(EntitiesRequestResource.java:192) [odata4j-core-0.8.0.redhat-2.jar:]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
> 	at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
> 	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167) [resteasy-jaxrs-2.3.8.SP4-redhat-2.jar:]
> 	at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:269) [resteasy-jaxrs-2.3.8.SP4-redhat-2.jar:]
> 	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:227) [resteasy-jaxrs-2.3.8.SP4-redhat-2.jar:]
> 	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:216) [resteasy-jaxrs-2.3.8.SP4-redhat-2.jar:]
> 	at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542) [resteasy-jaxrs-2.3.8.SP4-redhat-2.jar:]
> 	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524) [resteasy-jaxrs-2.3.8.SP4-redhat-2.jar:]
> 	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126) [resteasy-jaxrs-2.3.8.SP4-redhat-2.jar:]
> 	at org.teiid.odata.ODataServletContainerDispatcher.service(ODataServletContainerDispatcher.java:118) [classes:]
> 	at org.teiid.odata.ODataServlet.service(ODataServlet.java:65) [classes:]
> 	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.8.SP4-redhat-2.jar:]
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.4.3.Final-redhat-2.jar:7.4.3.Final-redhat-2]
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.4.10.Final-redhat-1.jar:7.4.10.Final-redhat-1]
> 	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the teiid-issues mailing list