Return-Path: X-Original-To: apmail-atlas-dev-archive@minotaur.apache.org Delivered-To: apmail-atlas-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ACE30185D7 for ; Mon, 8 Feb 2016 17:26:42 +0000 (UTC) Received: (qmail 13429 invoked by uid 500); 8 Feb 2016 17:26:42 -0000 Delivered-To: apmail-atlas-dev-archive@atlas.apache.org Received: (qmail 13381 invoked by uid 500); 8 Feb 2016 17:26:42 -0000 Mailing-List: contact dev-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list dev@atlas.incubator.apache.org Received: (qmail 13370 invoked by uid 99); 8 Feb 2016 17:26:42 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2016 17:26:42 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2AD51C04C4 for ; Mon, 8 Feb 2016 17:26:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.492 X-Spam-Level: X-Spam-Status: No, score=-3.492 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.272] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id YZldMdqy2ekI for ; Mon, 8 Feb 2016 17:26:41 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with SMTP id 9170C42A54 for ; Mon, 8 Feb 2016 17:26:40 +0000 (UTC) Received: (qmail 13058 invoked by uid 99); 8 Feb 2016 17:26:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2016 17:26:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D09202C14F4 for ; Mon, 8 Feb 2016 17:26:39 +0000 (UTC) Date: Mon, 8 Feb 2016 17:26:39 +0000 (UTC) From: "Naima Djouhri (JIRA)" To: dev@atlas.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ATLAS-398) Delete trait that exists but not linked to entity results in "400 Bad request". It should result "404 not found" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ATLAS-398?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15137= 284#comment-15137284 ]=20 Naima Djouhri commented on ATLAS-398: ------------------------------------- [~atlasqa] Atlas-356-398-V0.patch was the first patch that has been reviewe= d but was not in synch with the new changes since the last Atlas files upda= te. Atlas-356-398-V1.patch is the new patch for this issue. Thanks > Delete trait that exists but not linked to entity results in "400 Bad req= uest". It should result "404 not found" > -------------------------------------------------------------------------= --------------------------------------- > > Key: ATLAS-398 > URL: https://issues.apache.org/jira/browse/ATLAS-398 > Project: Atlas > Issue Type: Bug > Affects Versions: 0.6-incubating > Reporter: Ayub Khan > Assignee: Naima Djouhri > Fix For: trunk > > Attachments: ATLAS-356-398-V1.patch, Atlas-356-Atlas-398-V0.patch > > > Delete trait that exists but not linked to entity results in "400 Bad req= uest". It should result "404 not found" > {noformat} > curl -v -X DELETE http://os-r6-atlas-erie-tp-testing-2.novalocal:21000/ap= i/atlas/entities/c4d364e5-c5d0-4971-8b35-9a661128a5d9/traits/deleteTraitTha= tExistsButNotLinkedToEntitywzrfuznlno?user.name=3Dapathan > * About to connect() to os-r6-atlas-erie-tp-testing-2.novalocal port 2100= 0 (#0) > * Trying 172.22.100.121... connected > * Connected to os-r6-atlas-erie-tp-testing-2.novalocal (172.22.100.121) p= ort 21000 (#0) > > DELETE /api/atlas/entities/c4d364e5-c5d0-4971-8b35-9a661128a5d9/traits/= deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno?user.name=3Dapathan HTT= P/1.1 > > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.= 19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > > Host: os-r6-atlas-erie-tp-testing-2.novalocal:21000 > > Accept: */* > > > < HTTP/1.1 400 Bad Request > < Date: Thu, 17 Dec 2015 17:57:02 GMT > < Content-Type: application/json; charset=3DUTF-8 > < Transfer-Encoding: chunked > < Server: Jetty(9.2.12.v20150709) > < > {"error":"org.apache.atlas.typesystem.exception.EntityNotFoundException: = Could not find trait=3DdeleteTraitThatExistsButNotLinkedToEntitywzrfuznlno = in the repository for entity: c4d364e5-c5d0-4971-8b35-9a661128a5d9","stackT= race":"org.apache.atlas.repository.RepositoryException: org.apache.atlas.ty= pesystem.exception.EntityNotFoundException: Could not find trait=3DdeleteTr= aitThatExistsButNotLinkedToEntitywzrfuznlno in the repository for entity: c= 4d364e5-c5d0-4971-8b35-9a661128a5d9\n\tat org.apache.atlas.repository.graph= .GraphBackedMetadataRepository.deleteTrait(GraphBackedMetadataRepository.ja= va:266)\n\tat org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTran= sactionInterceptor.java:42)\n\tat org.apache.atlas.services.DefaultMetadata= Service.deleteTrait(DefaultMetadataService.java:607)\n\tat org.apache.atlas= .web.resources.EntityResource.deleteTrait(EntityResource.java:523)\n\tat su= n.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)\n\tat sun.reflec= t.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)= \n\tat java.lang.reflect.Method.invoke(Method.java:497)\n\tat com.sun.jerse= y.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.= java:60)\n\tat com.sun.jersey.server.impl.model.method.dispatch.AbstractRes= ourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMe= thodDispatchProvider.java:205)\n\tat com.sun.jersey.server.impl.model.metho= d.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatch= er.java:75)\n\tat com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accep= t(HttpMethodRule.java:288)\n\tat com.sun.jersey.server.impl.uri.rules.Right= HandPathRule.accept(RightHandPathRule.java:147)\n\tat com.sun.jersey.server= .impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)\n\tat = com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPath= Rule.java:147)\n\tat com.sun.jersey.server.impl.uri.rules.RootResourceClass= esRule.accept(RootResourceClassesRule.java:84)\n\tat com.sun.jersey.server.= impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:= 1469)\n\tat com.sun.jersey.server.impl.application.WebApplicationImpl._hand= leRequest(WebApplicationImpl.java:1400)\n\tat com.sun.jersey.server.impl.ap= plication.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)\n\= tat com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest= (WebApplicationImpl.java:1339)\n\tat com.sun.jersey.spi.container.servlet.W= ebComponent.service(WebComponent.java:409)\n\tat com.sun.jersey.spi.contain= er.servlet.ServletContainer.service(ServletContainer.java:558)\n\tat com.su= n.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.ja= va:733)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\= n\tat com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefi= nition.java:287)\n\tat com.google.inject.servlet.ServletDefinition.doServic= e(ServletDefinition.java:277)\n\tat com.google.inject.servlet.ServletDefini= tion.service(ServletDefinition.java:182)\n\tat com.google.inject.servlet.Ma= nagedServletPipeline.service(ManagedServletPipeline.java:91)\n\tat com.goog= le.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java= :85)\n\tat org.apache.atlas.web.filters.AuditFilter.doFilter(AuditFilter.ja= va:67)\n\tat com.google.inject.servlet.FilterChainInvocation.doFilter(Filte= rChainInvocation.java:82)\n\tat com.google.inject.servlet.ManagedFilterPipe= line.dispatch(ManagedFilterPipeline.java:119)\n\tat com.google.inject.servl= et.GuiceFilter$1.call(GuiceFilter.java:133)\n\tat com.google.inject.servlet= .GuiceFilter$1.call(GuiceFilter.java:130)\n\tat com.google.inject.servlet.G= uiceFilter$Context.call(GuiceFilter.java:203)\n\tat com.google.inject.servl= et.GuiceFilter.doFilter(GuiceFilter.java:130)\n\tat org.eclipse.jetty.servl= et.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat org.= eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\n\ta= t org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:= 143)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandle= r.java:577)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(= SessionHandler.java:223)\n\tat org.eclipse.jetty.server.handler.ContextHand= ler.doHandle(ContextHandler.java:1127)\n\tat org.eclipse.jetty.servlet.Serv= letHandler.doScope(ServletHandler.java:515)\n\tat org.eclipse.jetty.server.= session.SessionHandler.doScope(SessionHandler.java:185)\n\tat org.eclipse.j= etty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\n\tat = org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:14= 1)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrap= per.java:97)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:499)\= n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\n\t= at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:2= 57)\n\tat org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.= java:540)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(Queue= dThreadPool.java:635)\n\ta* Connection #0 to host os-r6-atlas-erie-tp-testi= ng-2.novalocal left intact > * Closing connection #0 > t org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.j= ava:555)\n\tat java.lang.Thread.run(Thread.java:745)\nCaused by: org.apache= .atlas.typesystem.exception.EntityNotFoundException: Could not find trait= =3DdeleteTraitThatExistsButNotLinkedToEntitywzrfuznlno in the repository fo= r entity: c4d364e5-c5d0-4971-8b35-9a661128a5d9\n\tat org.apache.atlas.repos= itory.graph.GraphBackedMetadataRepository.deleteTrait(GraphBackedMetadataRe= pository.java:243)\n\t... 52 more\n"} > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)