NoSuchMethodError: com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer

Я хотел подключиться к серверу KIE через код JAVA, и я использую следующий код.

private KieServicesConfiguration conf;
private KieServicesClient kieServicesClient;

conf = KieServicesFactory.newRestConfiguration("http://localhost:38080/kie-server-7.7.0.Final-ee7/services/rest/server", "admin","admin");
conf.setMarshallingFormat(FORMAT);
        kieServicesClient = KieServicesFactory.newKieServicesClient(conf);
        KieContainerResourceList containersList = kieServicesClient.listContainers().getResult();
        List<KieContainerResource> kieContainers = containersList.getContainers();

Но я получаю следующую ошибку.

Caused by: java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer.<init>(Lcom/fasterxml/jackson/databind/JavaType;Lcom/fasterxml/jackson/databind/jsontype/TypeIdResolver;Ljava/lang/String;ZLjava/lang/Class;)V
    at org.kie.server.api.marshalling.json.JSONMarshaller$CustomAsWrapperTypeDeserializer.<init>(JSONMarshaller.java:758)
    at org.kie.server.api.marshalling.json.JSONMarshaller$3.buildTypeDeserializer(JSONMarshaller.java:213)
    at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findTypeDeserializer(BasicDeserializerFactory.java:1372)
    at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findPropertyTypeDeserializer(BasicDeserializerFactory.java:1507)
    at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.resolveMemberAndTypeAnnotations(BasicDeserializerFactory.java:1856)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.constructSettableProperty(BeanDeserializerFactory.java:774)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.addBeanProps(BeanDeserializerFactory.java:550)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:258)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:173)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:403)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
    at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
    at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:443)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:206)
    at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:26)
    at com.fasterxml.jackson.databind.DeserializationContext.handlePrimaryContextualization(DeserializationContext.java:650)
    at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:490)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:293)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
    at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
    at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:443)
    at com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase._findDeserializer(TypeDeserializerBase.java:188)
    at com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer._deserialize(AsWrapperTypeDeserializer.java:104)
    at com.fasterxml.jackson.databind.jsontype.impl.AsWrapperTypeDeserializer.deserializeTypedFromAny(AsWrapperTypeDeserializer.java:67)
    at com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer.deserializeWithType(UntypedObjectDeserializer.java:290)
    at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:502)
    at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:111)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:276)
    at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:140)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3814)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2858)
    at org.kie.server.api.marshalling.json.JSONMarshaller.unmarshall(JSONMarshaller.java:280)
    at org.kie.server.client.impl.AbstractKieServicesClientImpl.deserialize(AbstractKieServicesClientImpl.java:590)
    at org.kie.server.client.impl.AbstractKieServicesClientImpl.makeHttpGetRequestAndCreateServiceResponse(AbstractKieServicesClientImpl.java:187)
    at org.kie.server.client.impl.KieServicesClientImpl.getServerInfo(KieServicesClientImpl.java:157)
    at org.kie.server.client.impl.KieServicesClientImpl.getCapabilitiesFromServer(KieServicesClientImpl.java:130)
    at org.kie.server.client.impl.KieServicesClientImpl.init(KieServicesClientImpl.java:85)
    at org.kie.server.client.impl.KieServicesClientImpl.<init>(KieServicesClientImpl.java:72)
    at org.kie.server.client.KieServicesFactory.newKieServicesClient(KieServicesFactory.java:101)

И зависимости, которые я добавил,

compile group: 'com.fasterxml.jackson.jaxrs', name: 'jackson-jaxrs-json-provider', version: '2.8.9'
compile group: 'com.fasterxml.jackson.module', name: 'jackson-module-jaxb-annotations', version: '2.8.9'
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.8.9'
    compile group: 'org.kie.server', name: 'kie-server-client', version: '7.6.0.Final'
    compile group: 'org.kie.server', name: 'kie-server-controller-client', version: '7.6.0.Final'
    compile group: 'org.kie.server', name: 'kie-server-api', version: '7.6.0.Final'

Я использую Java 8 и Wildfly 11.0, kie-server-7.7.0.Final-ee7 и kie workbench 6.5.

Может кто-нибудь, пожалуйста, сообщите мне причину. Заранее спасибо.

0 ответов

Другие вопросы по тегам