Hi,
I am working with json-ld in android and I want to transform a Java class to a json-dl file, I try to create the ObjectMapper with the JsonLdModule but I face a problem I do not understand problem, I know that there is not a problem with the definition of the class as the error comes from this code:
User u = new User("Paco");
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonLdModule module = new JsonLdModule(); //ERROR in this
linemodule.configure(ConfigParam.SCAN_PACKAGE, "cz.cvut.kbss.jopa.jsonld");
mapper.registerModule(module);
I followed that: https://github.com/kbss-cvut/jopa-examples/blob/master/jsonld/src/main/java/cz/cvut/kbss/jopa/jsonld/config/RestConfig.java#L37
The code runs in a Thread inside to a Service.
This is the error:
E/AndroidRuntime: FATAL EXCEPTION: pool-1-thread-1
Process: myprocess, PID: 6355
java.lang.BootstrapMethodError: Exception from call site #177 bootstrap method
at cz.cvut.kbss.jsonld.common.BeanAnnotationProcessor.<clinit>(BeanAnnotationProcessor.java:31)
at cz.cvut.kbss.jsonld.common.BeanAnnotationProcessor.setPropertyAccessResolver(BeanAnnotationProcessor.java:45)
at cz.cvut.kbss.jsonld.jackson.serialization.JsonLdSerializerModifier.<init>(JsonLdSerializerModifier.java:32)
at cz.cvut.kbss.jsonld.jackson.JsonLdModule.init(JsonLdModule.java:38)
at cz.cvut.kbss.jsonld.jackson.JsonLdModule.<init>(JsonLdModule.java:33)
at com.client.Service.myService$2.run(myService.java:325)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.ClassCastException: Bootstrap method returned null
at cz.cvut.kbss.jsonld.common.BeanAnnotationProcessor.<clinit>(BeanAnnotationProcessor.java:31)
at cz.cvut.kbss.jsonld.common.BeanAnnotationProcessor.setPropertyAccessResolver(BeanAnnotationProcessor.java:45)
at cz.cvut.kbss.jsonld.jackson.serialization.JsonLdSerializerModifier.<init>(JsonLdSerializerModifier.java:32)
at cz.cvut.kbss.jsonld.jackson.JsonLdModule.init(JsonLdModule.java:38)
at cz.cvut.kbss.jsonld.jackson.JsonLdModule.<init>(JsonLdModule.java:33)
at com.client.Service.myService$2.run(myService.java:325)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
Any ideas of the problem? and any sugestions of my code?
I try to do something similar to this example: https://github.com/kbss-cvut/jopa-examples/tree/master/jsonld
Hi,
I am working with json-ld in android and I want to transform a Java class to a json-dl file, I try to create the ObjectMapper with the
JsonLdModulebut I face a problem I do not understand problem, I know that there is not a problem with the definition of the class as the error comes from this code:I followed that: https://github.com/kbss-cvut/jopa-examples/blob/master/jsonld/src/main/java/cz/cvut/kbss/jopa/jsonld/config/RestConfig.java#L37
The code runs in a Thread inside to a Service.
This is the error:
Any ideas of the problem? and any sugestions of my code?
I try to do something similar to this example: https://github.com/kbss-cvut/jopa-examples/tree/master/jsonld