Comments (2)
I tried your code and it works for me. The key issue is this exception
Caused by: java.lang.EnumConstantNotPresentException:
org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion.NON_EMPTY
My guess is that you are using a different version of Jackson-mapper-asl. I
am using version 1.9.8 which is what is included in the pom. My guess is
that you have an older version.
It look like NON_EMPTY was included in 1.9.x versions and did not exist in
prior versions. I tried 1.8.8 and saw the same thing you did.
On Wed, Nov 27, 2013 at 11:31 PM, kering-wang [email protected]:
when i execute query with then kairos-client , i met a exception like this
Exception in thread "main" org.codehaus.jackson.map.JsonMappingException:
org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion.NON_EMPTY
(through reference chain:
org.kairosdb.client.builder.QueryBuilder["metrics"]->java.util.ArrayList[0])
at
org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:215)
at
org.codehaus.jackson.map.JsonMappingException.wrapWithPath(JsonMappingException.java:194)
at
org.codehaus.jackson.map.ser.SerializerBase.wrapAndThrow(SerializerBase.java:154)
at
org.codehaus.jackson.map.ser.ContainerSerializers$IndexedListSerializer.serializeContents(ContainerSerializers.java:278)
at
org.codehaus.jackson.map.ser.ContainerSerializers$IndexedListSerializer.serializeContents(ContainerSerializers.java:229)
at
org.codehaus.jackson.map.ser.ContainerSerializers$AsArraySerializer.serialize(ContainerSerializers.java:130)
at
org.codehaus.jackson.map.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:428)
at
org.codehaus.jackson.map.ser.BeanSerializer.serializeFields(BeanSerializer.java:244)
at
org.codehaus.jackson.map.ser.BeanSerializer.serialize(BeanSerializer.java:211)
at org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:586) at
org.codehaus.jackson.map.ser.StdSerializerProvider.serializeValue(StdSerializerProvider.java:244)
at org.codehaus.jackson.map.ObjectMapper.
configAndWriteValue(ObjectMapper.java:1990)
at org.codehaus.jackson.map.ObjectMapper.writeValue(ObjectMapper.java:1576)
at org.kairosdb.client.builder.QueryBuilder.build(QueryBuilder.java:234)
at org.kairosdb.client.AbstractClient.query(AbstractClient.java:82)
at Get.main(Get.java:42)
Caused by: java.lang.EnumConstantNotPresentException:
org.codehaus.jackson.map.annotate.JsonSerialize$Inclusion.NON_EMPTY
at
sun.reflect.annotation.EnumConstantNotPresentExceptionProxy.generateException(EnumConstantNotPresentExceptionProxy.java:47)
at
sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:75)
at sun.proxy.$Proxy6.include(Unknown Source)
at
org.codehaus.jackson.map.introspect.JacksonAnnotationIntrospector.findSerializationInclusion(JacksonAnnotationIntrospector.java:289)
at
org.codehaus.jackson.map.ser.PropertyBuilder.buildWriter(PropertyBuilder.java:108)
at org.codehaus.jackson.map.ser.BeanSerializerFactory.constructWriter(BeanSerializerFactory.java:727) at
org.codehaus.jackson.map.ser.BeanSerializerFactory.findBeanProperties(BeanSerializerFactory.java:536)
at
org.codehaus.jackson.map.ser.BeanSerializerFactory.constructBeanSerializer(BeanSerializerFactory.java:375)
at
org.codehaus.jackson.map.ser.BeanSerializerFactory.findBeanSerializer(BeanSerializerFactory.java:291)
at
org.codehaus.jackson.map.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:241)
at org.codehaus.jackson.map.ser.StdSerializerProvider.
createUntypedSerializer(StdSerializerProvider.java:747)
at org.codehaus.jackson.map.ser.StdSerializerProvider.createAndCacheUntypedSerializer(StdSerializerProvider.java:688) at
org.codehaus.jackson.map.ser.StdSerializerProvider.findValueSerializer(StdSerializerProvider.java:363)
at
org.codehaus.jackson.map.ser.impl.PropertySerializerMap.findAndAddSerializer(PropertySerializerMap.java:39)
at org.codehaus.jackson.map.ser.ContainerSerializers$AsArraySerializer.
findAndAddDynamic(ContainerSerializers.java:209)
at
org.codehaus.jackson.map.ser.ContainerSerializers$IndexedListSerializer.serializeContents(ContainerSerializers.java:271)
... 12 morethe execute code like this
QueryBuilder builder = QueryBuilder.getInstance();
builder.setStart(Calendar.getInstance().getTime()).addMetric("kairosdb.jvm.free_memory");
HttpClient client = new HttpClient("10.11.0.9", 8015);
QueryResponse response = client.query(builder);
System.out.println("Response Code =" + response.getStatusCode());client.shutdown();
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/8
.
from kairosdb-client.
Moved from Jackson to Gson.
from kairosdb-client.
Related Issues (20)
- Multi Query HOT 1
- Unable to push metrics using kairosdb client HOT 3
- Add support for Filtering aggregator HOT 1
- Add support for Rollups API HOT 5
- Custom HttpClient support HOT 1
- Upgrade Guava dependency to newer version HOT 1
- Upgrade the dependency to Kairos to 1.2.0 HOT 2
- ArrayIndexOutOfBoundsException when re-using MetricBuilder in multiple threads HOT 2
- Allow Query setTime and EndTime to be equal HOT 1
- use client in springboot with @Async HOT 3
- It is the bug when I push the string "127.0.0.1" HOT 2
- Cannot create SamplingAggregator with align_end_time HOT 2
- Upgrade to the latest version of the Apache client. HOT 1
- github 上的例子是基于客户端哪个版本的 HOT 1
- bug1 HOT 3
- On Varargs HOT 4
- QueryTagBuilder the range time is not effect bug HOT 3
- Sampling.value bug
- Authentication HOT 1
- Importing the wrong NotImplementedException HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kairosdb-client.