[jira] [Updated] (ATLAS-398) Delete trait that exists but not linked to entity results in "400 Bad request". It should result "404 not found"

2016-02-11 Thread Naima Djouhri (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Naima Djouhri updated ATLAS-398:

Attachment: ATLAS-356-ATLAS-398-V2.patch

> Delete trait that exists but not linked to entity results in "400 Bad 
> request". 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-V2.patch, 
> Atlas-356-Atlas-398-V0.patch
>
>
> Delete trait that exists but not linked to entity results in "400 Bad 
> request". It should result "404 not found"
> {noformat}
> curl -v -X DELETE 
> http://os-r6-atlas-erie-tp-testing-2.novalocal:21000/api/atlas/entities/c4d364e5-c5d0-4971-8b35-9a661128a5d9/traits/deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno?user.name=apathan
> * About to connect() to os-r6-atlas-erie-tp-testing-2.novalocal port 21000 
> (#0)
> *   Trying 172.22.100.121... connected
> * Connected to os-r6-atlas-erie-tp-testing-2.novalocal (172.22.100.121) port 
> 21000 (#0)
> > DELETE 
> > /api/atlas/entities/c4d364e5-c5d0-4971-8b35-9a661128a5d9/traits/deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno?user.name=apathan
> >  HTTP/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=UTF-8
> < Transfer-Encoding: chunked
> < Server: Jetty(9.2.12.v20150709)
> <
> {"error":"org.apache.atlas.typesystem.exception.EntityNotFoundException: 
> Could not find trait=deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno in 
> the repository for entity: 
> c4d364e5-c5d0-4971-8b35-9a661128a5d9","stackTrace":"org.apache.atlas.repository.RepositoryException:
>  org.apache.atlas.typesystem.exception.EntityNotFoundException: Could not 
> find trait=deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno in the 
> repository for entity: c4d364e5-c5d0-4971-8b35-9a661128a5d9\n\tat 
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository.deleteTrait(GraphBackedMetadataRepository.java:266)\n\tat
>  
> org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:42)\n\tat
>  
> org.apache.atlas.services.DefaultMetadataService.deleteTrait(DefaultMetadataService.java:607)\n\tat
>  
> org.apache.atlas.web.resources.EntityResource.deleteTrait(EntityResource.java:523)\n\tat
>  sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)\n\tat 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat
>  java.lang.reflect.Method.invoke(Method.java:497)\n\tat 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)\n\tat
>  
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)\n\tat
>  
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.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(RightHandPathRule.java:147)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.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._handleRequest(WebApplicationImpl.java:1400)\n\tat
>  
> com.sun.jersey.server.impl.application.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.WebComponent.service(WebComponent.java:409)\n\tat
>  
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)\n\tat
>  
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)\n\tat
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat 
> 

[jira] [Updated] (ATLAS-398) Delete trait that exists but not linked to entity results in "400 Bad request". It should result "404 not found"

2016-01-22 Thread Naima Djouhri (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Naima Djouhri updated ATLAS-398:

Attachment: Atlas-356-Atlas-398-V0.patch

> Delete trait that exists but not linked to entity results in "400 Bad 
> request". 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-Atlas-398-V0.patch
>
>
> Delete trait that exists but not linked to entity results in "400 Bad 
> request". It should result "404 not found"
> {noformat}
> curl -v -X DELETE 
> http://os-r6-atlas-erie-tp-testing-2.novalocal:21000/api/atlas/entities/c4d364e5-c5d0-4971-8b35-9a661128a5d9/traits/deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno?user.name=apathan
> * About to connect() to os-r6-atlas-erie-tp-testing-2.novalocal port 21000 
> (#0)
> *   Trying 172.22.100.121... connected
> * Connected to os-r6-atlas-erie-tp-testing-2.novalocal (172.22.100.121) port 
> 21000 (#0)
> > DELETE 
> > /api/atlas/entities/c4d364e5-c5d0-4971-8b35-9a661128a5d9/traits/deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno?user.name=apathan
> >  HTTP/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=UTF-8
> < Transfer-Encoding: chunked
> < Server: Jetty(9.2.12.v20150709)
> <
> {"error":"org.apache.atlas.typesystem.exception.EntityNotFoundException: 
> Could not find trait=deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno in 
> the repository for entity: 
> c4d364e5-c5d0-4971-8b35-9a661128a5d9","stackTrace":"org.apache.atlas.repository.RepositoryException:
>  org.apache.atlas.typesystem.exception.EntityNotFoundException: Could not 
> find trait=deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno in the 
> repository for entity: c4d364e5-c5d0-4971-8b35-9a661128a5d9\n\tat 
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository.deleteTrait(GraphBackedMetadataRepository.java:266)\n\tat
>  
> org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:42)\n\tat
>  
> org.apache.atlas.services.DefaultMetadataService.deleteTrait(DefaultMetadataService.java:607)\n\tat
>  
> org.apache.atlas.web.resources.EntityResource.deleteTrait(EntityResource.java:523)\n\tat
>  sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)\n\tat 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat
>  java.lang.reflect.Method.invoke(Method.java:497)\n\tat 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)\n\tat
>  
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)\n\tat
>  
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.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(RightHandPathRule.java:147)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.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._handleRequest(WebApplicationImpl.java:1400)\n\tat
>  
> com.sun.jersey.server.impl.application.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.WebComponent.service(WebComponent.java:409)\n\tat
>  
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)\n\tat
>  
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)\n\tat
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat 
> com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287)\n\tat
>  
> 

[jira] [Updated] (ATLAS-398) Delete trait that exists but not linked to entity results in "400 Bad request". It should result "404 not found"

2016-01-04 Thread Shwetha G S (JIRA)

 [ 
https://issues.apache.org/jira/browse/ATLAS-398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shwetha G S updated ATLAS-398:
--
Fix Version/s: (was: 0.6-incubating)
   trunk

> Delete trait that exists but not linked to entity results in "400 Bad 
> request". 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
> Fix For: trunk
>
>
> Delete trait that exists but not linked to entity results in "400 Bad 
> request". It should result "404 not found"
> {noformat}
> curl -v -X DELETE 
> http://os-r6-atlas-erie-tp-testing-2.novalocal:21000/api/atlas/entities/c4d364e5-c5d0-4971-8b35-9a661128a5d9/traits/deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno?user.name=apathan
> * About to connect() to os-r6-atlas-erie-tp-testing-2.novalocal port 21000 
> (#0)
> *   Trying 172.22.100.121... connected
> * Connected to os-r6-atlas-erie-tp-testing-2.novalocal (172.22.100.121) port 
> 21000 (#0)
> > DELETE 
> > /api/atlas/entities/c4d364e5-c5d0-4971-8b35-9a661128a5d9/traits/deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno?user.name=apathan
> >  HTTP/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=UTF-8
> < Transfer-Encoding: chunked
> < Server: Jetty(9.2.12.v20150709)
> <
> {"error":"org.apache.atlas.typesystem.exception.EntityNotFoundException: 
> Could not find trait=deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno in 
> the repository for entity: 
> c4d364e5-c5d0-4971-8b35-9a661128a5d9","stackTrace":"org.apache.atlas.repository.RepositoryException:
>  org.apache.atlas.typesystem.exception.EntityNotFoundException: Could not 
> find trait=deleteTraitThatExistsButNotLinkedToEntitywzrfuznlno in the 
> repository for entity: c4d364e5-c5d0-4971-8b35-9a661128a5d9\n\tat 
> org.apache.atlas.repository.graph.GraphBackedMetadataRepository.deleteTrait(GraphBackedMetadataRepository.java:266)\n\tat
>  
> org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:42)\n\tat
>  
> org.apache.atlas.services.DefaultMetadataService.deleteTrait(DefaultMetadataService.java:607)\n\tat
>  
> org.apache.atlas.web.resources.EntityResource.deleteTrait(EntityResource.java:523)\n\tat
>  sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)\n\tat 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat
>  java.lang.reflect.Method.invoke(Method.java:497)\n\tat 
> com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)\n\tat
>  
> com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)\n\tat
>  
> com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.RightHandPathRule.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(RightHandPathRule.java:147)\n\tat
>  
> com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.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._handleRequest(WebApplicationImpl.java:1400)\n\tat
>  
> com.sun.jersey.server.impl.application.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.WebComponent.service(WebComponent.java:409)\n\tat
>  
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558)\n\tat
>  
> com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733)\n\tat
>  javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat 
> com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:287)\n\tat
>  
> com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:277)\n\tat
>  
>