Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CBA55200BD3 for ; Tue, 6 Dec 2016 20:49:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CA354160B29; Tue, 6 Dec 2016 19:49:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E94F3160B17 for ; Tue, 6 Dec 2016 20:49:02 +0100 (CET) Received: (qmail 61823 invoked by uid 500); 6 Dec 2016 19:49:02 -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 61807 invoked by uid 99); 6 Dec 2016 19:49:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2016 19:49:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id AD929180690 for ; Tue, 6 Dec 2016 19:49:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -6.219 X-Spam-Level: X-Spam-Status: No, score=-6.219 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=-2.999] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id m4FLljRtsQMq for ; Tue, 6 Dec 2016 19:49:00 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 5DFF35FD15 for ; Tue, 6 Dec 2016 19:48:59 +0000 (UTC) Received: (qmail 61752 invoked by uid 99); 6 Dec 2016 19:48:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2016 19:48:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 721432C03DE for ; Tue, 6 Dec 2016 19:48:58 +0000 (UTC) Date: Tue, 6 Dec 2016 19:48:58 +0000 (UTC) From: "Apoorv Naik (JIRA)" To: dev@atlas.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (ATLAS-1347) Creating a class with unknown supertype results in "409 Conflict", where as expected is "400 Bad Message" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 06 Dec 2016 19:49:04 -0000 [ https://issues.apache.org/jira/browse/ATLAS-1347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Apoorv Naik updated ATLAS-1347: ------------------------------- Attachment: ATLAS-1347.v1.patch > Creating a class with unknown supertype results in "409 Conflict", where as expected is "400 Bad Message" > --------------------------------------------------------------------------------------------------------- > > Key: ATLAS-1347 > URL: https://issues.apache.org/jira/browse/ATLAS-1347 > Project: Atlas > Issue Type: Bug > Affects Versions: 0.8-incubating > Reporter: Ayub Khan > Assignee: Apoorv Naik > Fix For: 0.8-incubating > > Attachments: ATLAS-1347.patch, ATLAS-1347.v1.patch > > > Creating a class with unknown supertype results in "409 Conflict", where as expected is "400 Bad Message" > {noformat} > { > "enumTypes":[ > ], > "structTypes":[ > ], > "traitTypes":[ > ], > "classTypes":[ > { > "superTypes":[ > "superClassw4ny4wbeck" > ], > "hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.ClassType", > "typeName":"classw4ny4wbeck", > "typeDescription":null, > "typeVersion":"1.0", > "attributeDefinitions":null > } > ] > } > {noformat} > {noformat} > 2016-12-01 08:52:00,087 ERROR - [pool-2-thread-9 - 9ae5cce3-0634-423d-b648-d01e81674750:] ~ graph rollback due to exception (GraphTransactionInterceptor:57) > org.apache.atlas.exception.AtlasBaseException: superClassw4ny4wbeck: Unknown typename > at org.apache.atlas.type.AtlasTypeRegistry.getType(AtlasTypeRegistry.java:94) > at org.apache.atlas.type.AtlasEntityType.collectTypeHierarchyInfo(AtlasEntityType.java:267) > at org.apache.atlas.type.AtlasEntityType.getTypeHierarchyInfo(AtlasEntityType.java:248) > at org.apache.atlas.type.AtlasEntityType.resolveReferences(AtlasEntityType.java:76) > at org.apache.atlas.type.AtlasTypeRegistry$AtlasTransientTypeRegistry.resolveReferences(AtlasTypeRegistry.java:285) > at org.apache.atlas.type.AtlasTypeRegistry$AtlasTransientTypeRegistry.addTypes(AtlasTypeRegistry.java:344) > at org.apache.atlas.repository.store.graph.AtlasTypeDefGraphStore.createTypesDef(AtlasTypeDefGraphStore.java:577) > at org.apache.atlas.GraphTransactionInterceptor.invoke(GraphTransactionInterceptor.java:50) > at org.apache.atlas.web.rest.TypesREST.createAtlasTypeDefs(TypesREST.java:438) > at org.apache.atlas.web.resources.TypesResource.submit(TypesResource.java:109) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) > at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) > at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) > at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) > at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) > at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) > at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) > at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) > at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) > at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) > at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) > at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) > at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) > at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) > at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286) > at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276) > at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181) > at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) > at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85) > at org.apache.atlas.web.filters.AuditFilter.doFilter(AuditFilter.java:71) > at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82) > at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120) > at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135) > {noformat} > {noformat} > 2016-12-01 08:52:00,244 INFO - [main:] ~ java.lang.AssertionError: The following asserts failed: > Status code mismatch expected [400] but found [409], Status Message mismatch expected [Bad Request] but found [Conflict], Error message mismatch. expected [Unknown datatype: superClassw4ny4wbeck] but found [superClassw4ny4wbeck: Unknown typename] > at org.testng.asserts.SoftAssert.assertAll(SoftAssert.java:38) > at org.apache.atlas.regression.tests.TypeResourceTest.createClassSuperTypeThatDoesNotExistTest(TypeResourceTest.java:330) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) > at org.testng.internal.Invoker.invokeMethod(Invoker.java:659) > at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:845) > at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1153) > at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) > at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) > at org.testng.TestRunner.privateRun(TestRunner.java:771) > at org.testng.TestRunner.run(TestRunner.java:621) > at org.testng.SuiteRunner.runTest(SuiteRunner.java:357) > at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:352) > at org.testng.SuiteRunner.privateRun(SuiteRunner.java:310) > at org.testng.SuiteRunner.run(SuiteRunner.java:259) > at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) > at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) > at org.testng.TestNG.runSuitesSequentially(TestNG.java:1199) > at org.testng.TestNG.runSuitesLocally(TestNG.java:1124) > at org.testng.TestNG.run(TestNG.java:1032) > at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:295) > at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84) > at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:90) > at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) > at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) > at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) > (TestNGListener:57) > 2016-12-01 08:52:00,245 INFO - [main:] ~ -------------------------------------------------------------------------------- (TestNGListener:58) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)