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

Neeru Gupta updated ATLAS-396:
------------------------------
    Attachment:     (was: atlas-396-patch)

> Creating an entity with non-existing type results in "Unable to deserialize 
> json" error
> ---------------------------------------------------------------------------------------
>
>                 Key: ATLAS-396
>                 URL: https://issues.apache.org/jira/browse/ATLAS-396
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: 0.6-incubating
>            Reporter: Ayub Khan
>            Assignee: Neeru Gupta
>            Priority: Minor
>              Labels: regression
>             Fix For: trunk
>
>         Attachments: atlas-396-patch-v4, rb42967.patch
>
>
> Creating an entity with non-existing type results in "Unable to deserialize 
> json" error. This error message should have been "Unknown datatype: ".  
> This is a regression issue..
> Logs
> {noformat}
> Configuring TestNG with: TestNG652Configurator
> 2015-12-17 14:21:59,381 INFO  - [main:] ~ Request Url: 
> http://os-r6-atlas-erie-tp-testing-2.novalocal:21000/api/atlas/types?user.name=apathan
>  (BaseRequest:164)
> 2015-12-17 14:21:59,383 INFO  - [main:] ~ Request Method: POST 
> (BaseRequest:165)
> 2015-12-17 14:21:59,384 INFO  - [main:] ~ Request Header: Name=Content-Type 
> Value=application/json; charset=UTF-8 (BaseRequest:168)
> 2015-12-17 14:22:00,238 INFO  - [main:] ~ Response Status: HTTP/1.1 201 
> Created (BaseRequest:195)
> 2015-12-17 14:22:00,238 INFO  - [main:] ~ Response Header: Name=Date 
> Value=Thu, 17 Dec 2015 08:51:59 GMT (BaseRequest:197)
> 2015-12-17 14:22:00,238 INFO  - [main:] ~ Response Header: Name=Content-Type 
> Value=application/json; charset=UTF-8 (BaseRequest:197)
> 2015-12-17 14:22:00,238 INFO  - [main:] ~ Response Header: 
> Name=Transfer-Encoding Value=chunked (BaseRequest:197)
> 2015-12-17 14:22:00,238 INFO  - [main:] ~ Response Header: Name=Server 
> Value=Jetty(9.2.12.v20150709) (BaseRequest:197)
> 2015-12-17 14:22:00,254 INFO  - [main:] ~ 
> --------------------------------------------------------------------------------
>  (TestNGListener:36)
> 2015-12-17 14:22:00,254 INFO  - [main:] ~ Testing going to start for: 
> org.apache.atlas.regression.tests.EntityResourceTest.createEntityForNonExistantType([])
>  (TestNGListener:37)
> 2015-12-17 14:22:00,678 INFO  - [main:createEntityForNonExistantType] ~ 
> Request body is :{
>   
> "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Reference",
>   "id":{
>     "jsonClass":"org.apache.atlas.typesystem.json.InstanceSerialization$_Id",
>     "id":"-1450342320255790000",
>     "version":0,
>     "typeName":"createEntityForNonExistantTypeo88sflmm7k"
>   },
>   "typeName":"createEntityForNonExistantTypeo88sflmm7k",
>   "values":{
>     
>   },
>   "traitNames":[
>     
>   ],
>   "traits":{
>     
>   }
> } (EntityResourceTest:394)
> 2015-12-17 14:22:00,680 INFO  - [main:createEntityForNonExistantType] ~ 
> Request Url: 
> http://os-r6-atlas-erie-tp-testing-2.novalocal:21000/api/atlas/entities?user.name=apathan
>  (BaseRequest:164)
> 2015-12-17 14:22:00,681 INFO  - [main:createEntityForNonExistantType] ~ 
> Request Method: POST (BaseRequest:165)
> 2015-12-17 14:22:00,681 INFO  - [main:createEntityForNonExistantType] ~ 
> Request Header: Name=Content-Type Value=application/json; charset=UTF-8 
> (BaseRequest:168)
> 2015-12-17 14:22:01,309 INFO  - [main:createEntityForNonExistantType] ~ 
> Response Status: HTTP/1.1 400 Bad Request (BaseRequest:195)
> 2015-12-17 14:22:01,310 INFO  - [main:createEntityForNonExistantType] ~ 
> Response Header: Name=Date Value=Thu, 17 Dec 2015 08:52:01 GMT 
> (BaseRequest:197)
> 2015-12-17 14:22:01,312 INFO  - [main:createEntityForNonExistantType] ~ 
> Response Header: Name=Content-Type Value=application/json; charset=UTF-8 
> (BaseRequest:197)
> 2015-12-17 14:22:01,312 INFO  - [main:createEntityForNonExistantType] ~ 
> Response Header: Name=Transfer-Encoding Value=chunked (BaseRequest:197)
> 2015-12-17 14:22:01,312 INFO  - [main:createEntityForNonExistantType] ~ 
> Response Header: Name=Server Value=Jetty(9.2.12.v20150709) (BaseRequest:197)
> 2015-12-17 14:22:01,314 INFO  - [main:createEntityForNonExistantType] ~ 
> Response is: {"error":"Unable to deserialize 
> json","stackTrace":"java.lang.IllegalArgumentException: Unable to deserialize 
> json\n\tat 
> org.apache.atlas.services.DefaultMetadataService.deserializeClassInstances(DefaultMetadataService.java:315)\n\tat
>  
> org.apache.atlas.services.DefaultMetadataService.createEntities(DefaultMetadataService.java:280)\n\tat
>  
> org.apache.atlas.web.resources.EntityResource.submit(EntityResource.java:114)\n\tat
>  sun.reflect.GeneratedMethodAccessor29.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.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
>  
> com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:182)\n\tat
>  
> com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)\n\tat
>  
> com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)\n\tat
>  org.apache.atlas.web.filters.AuditFilter.doFilter(AuditFilter.java:67)\n\tat 
> com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)\n\tat
>  
> com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:119)\n\tat
>  com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:133)\n\tat 
> com.google.inject.servlet.GuiceFilter$1.call(GuiceFilter.java:130)\n\tat 
> com.google.inject.servlet.GuiceFilter$Context.call(GuiceFilter.java:203)\n\tat
>  com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:130)\n\tat 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat
>  
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
>  
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\n\tat
>  
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\n\tat
>  
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\n\tat
>  
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat
>  
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
>  
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.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\tat 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\n\tat
>  
> org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\n\tat
>  java.lang.Thread.run(Thread.java:745)\n"} (EntityResourceTest:397)
> 2015-12-17 14:22:01,369 INFO  - [main:createEntityForNonExistantType] ~ 
> Testing going to end for: 
> org.apache.atlas.regression.tests.EntityResourceTest.createEntityForNonExistantType([])
>  ----- Status: FAILED (TestNGListener:72)
> 2015-12-17 14:22:01,369 INFO  - [main:createEntityForNonExistantType] ~ 
> ################################################################################
>  (TestNGListener:76)
> {noformat} 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to