Re: AtlasClient API v2

2018-03-13 Thread Nigel Jones

On 2018/03/13 14:08:31, David Radley  wrote: 
> Hi Nigel,
> I think you are saying this is a regression. 
> I notice "Add jackson.core dependency in intg module" has just been 
> committed. Could this make a difference?
> Does it work if you recompile? 
>all the best, David. 

I wonder if that was just one recent module that needed a change for Jackson.. 
I think the core change was a while ago? Not tried recompiling yet

However I am NOT saying this is a regression since it's my first time using the 
client API, 


Re: AtlasClient API v2

2018-03-13 Thread David Radley
Hi Nigel,
I think you are saying this is a regression. 
I notice "Add jackson.core dependency in intg module" has just been 
committed. Could this make a difference?
Does it work if you recompile? 
   all the best, David. 



From:   Nigel Jones <nigel.l.jo...@gmail.com>
To: <dev@atlas.apache.org>
Date:   13/03/2018 13:02
Subject:    AtlasClient API v2



I'm trying to use the AtlasClientV2 api but hitting an exception when 
trying to create entities.

This is using code from master (client and server) built in the last few 
days.

I'm able to send REST APIs directly, also my type creation worked fine.

What do I need to look at to resolve this error? Is it an error I've made 
in my types? Could it be a Jackson version issue (I did try updating some 
dependencies for my client code to 2.x)

Creating sample entities:Â 
2018-03-13 12:43:12 INFO Â AtlasBaseClient:330 - 
--
2018-03-13 12:43:12 INFO  AtlasBaseClient:331 - Call         : POST 
api/atlas/v2/entity/
2018-03-13 12:43:12 INFO Â AtlasBaseClient:332 - Content-type : 
application/json; charset=UTF-8Â 
2018-03-13 12:43:12 INFO  AtlasBaseClient:333 - Accept       : 
application/json 
2018-03-13 12:43:12 INFO  AtlasBaseClient:335 - Request      : 
AtlasEntityWithExtInfo{entity=AtlasEntity{AtlasStruct{typeName='gaianSchema', 
attributes=[qualifiedName:GAIAN, name:GAIAN, comment:Gaian Database 
Schema]}guid='-24212680184574', status=null, createdBy='null', 
updatedBy='null', createTime=null, updateTime=null, version=0, 
relationshipAttributes=[], classifications=[], 
},AtlasEntityExtInfo{referredEntities={}}}
Exception in thread "main" java.lang.AbstractMethodError
    at 
org.codehaus.jackson.map.AnnotationIntrospector$Pair.findSerializer(AnnotationIntrospector.java:1153)
    at 
org.codehaus.jackson.map.ser.BasicSerializerFactory.findSerializerFromAnnotation(BasicSerializerFactory.java:366)
    at 
org.codehaus.jackson.map.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:252)
    at 
org.codehaus.jackson.map.ser.StdSerializerProvider._createUntypedSerializer(StdSerializerProvider.java:782)
    at 
org.codehaus.jackson.map.ser.StdSerializerProvider._createAndCacheUntypedSerializer(StdSerializerProvider.java:735)
    at 
org.codehaus.jackson.map.ser.StdSerializerProvider.findValueSerializer(StdSerializerProvider.java:344)
    at 
org.codehaus.jackson.map.ser.StdSerializerProvider.findTypedValueSerializer(StdSerializerProvider.java:420)
    at 
org.codehaus.jackson.map.ser.StdSerializerProvider._serializeValue(StdSerializerProvider.java:601)
    at 
org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:256)
    at 
org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1613)
    at 
org.codehaus.jackson.jaxrs.JacksonJsonProvider.writeTo(JacksonJsonProvider.java:559)
    at 
com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy.writeTo(JacksonProviderProxy.java:160)
    at 
com.sun.jersey.api.client.RequestWriter.writeRequestEntity(RequestWriter.java:300)
    at 
com.sun.jersey.client.urlconnection.URLConnectionClientHandler._invoke(URLConnectionClientHandler.java:217)
    at 
com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:153)
    at 
com.sun.jersey.api.client.filter.HTTPBasicAuthFilter.handle(HTTPBasicAuthFilter.java:105)
    at com.sun.jersey.api.client.Client.handle(Client.java:652)
    at 
com.sun.jersey.api.client.WebResource.handle(WebResource.java:682)
    at 
com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
    at 
com.sun.jersey.api.client.WebResource$Builder.method(WebResource.java:634)
    at 
org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:350)
    at 
org.apache.atlas.AtlasBaseClient.callAPIWithResource(AtlasBaseClient.java:323)
    at 
org.apache.atlas.AtlasBaseClient.callAPI(AtlasBaseClient.java:211)
    at 
org.apache.atlas.AtlasClientV2.createEntity(AtlasClientV2.java:285)
    at 
org.apache.atlas.gaian.GaianSampleData.createInstance(GaianSampleData.java:176)
    at 
org.apache.atlas.gaian.GaianSampleData.createSchema(GaianSampleData.java:198)
    at 
org.apache.atlas.gaian.GaianSampleData.createEntities(GaianSampleData.java:155)
    at 
org.apache.atlas.gaian.GaianSampleData.main(GaianSampleData.java:72)




Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU