Spring Boot kie-server unable to register on jbpm-console

751 views
Skip to first unread message

Peter Jerald

unread,
Feb 21, 2018, 11:19:22 PM2/21/18
to jBPM Usage
Hi,

I am running kie-server in spring boot tomcat and successfully able to start without controller but if i provide controllers parameters them I am getting below exception;

This error might look very simple . There is no such constructor parameters which mentioned like in stack trace.  

If i see code for org.kie.server.api.marshalling.json.JSONMarshaller class in github r7.6.0-final branch I can see JSONMarshaller class properly calling "AsWrapperTypeDeserializer" class in jackson lib with excepted parameters.  

In entire work space I can see only two occurrence of this JSONMarshaller class. There is no such method what JSONMarshaller is expecting.

I tried to decompile JSONMarshaller class from kie-server-api jar.  Decompiler shows "//INTERNAL ERROR//" . In eclipse it shows from "sources" jar.  I am able to replicate this issue in three different environment. 

Currently Kie-server spring boot not able to register in jbpm-console.

2018-02-22 09:23:57.540  INFO 7132 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-02-22 09:23:57.543  INFO 7132 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-02-22 09:23:57.897  INFO 7132 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2018-02-22 09:24:00.691  WARN 7132 --- [ntrollerConnect] o.kie.server.common.KeyStoreHelperUtil   : Unable to load key store. Using password from configuration
Exception in thread "KieServer-ControllerConnect" 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;ZLcom/fasterxml/jackson/databind/JavaType;)V
at org.kie.server.api.marshalling.json.JSONMarshaller$CustomAsWrapperTypeDeserializer.<init>(JSONMarshaller.java:759)
at org.kie.server.api.marshalling.json.JSONMarshaller$3.buildTypeDeserializer(JSONMarshaller.java:213)
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findTypeDeserializer(BasicDeserializerFactory.java:1329)
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findPropertyTypeDeserializer(BasicDeserializerFactory.java:1456)
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.resolveType(BasicDeserializerFactory.java:1858)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.constructSettableProperty(BeanDeserializerFactory.java:721)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.addBeanProps(BeanDeserializerFactory.java:507)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:229)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:142)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:403)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:352)
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:428)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:164)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:25)
at com.fasterxml.jackson.databind.DeserializationContext.handleSecondaryContextualization(DeserializationContext.java:669)
at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:430)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.findDeserializer(StdDeserializer.java:947)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:439)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:296)
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:428)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:164)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:25)
at com.fasterxml.jackson.databind.DeserializationContext.handleSecondaryContextualization(DeserializationContext.java:669)
at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:430)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.findDeserializer(StdDeserializer.java:947)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:439)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:296)
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.findRootValueDeserializer(DeserializationContext.java:461)
at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:3833)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3727)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2724)
at org.kie.server.api.marshalling.json.JSONMarshaller.unmarshall(JSONMarshaller.java:281)
at org.kie.server.services.impl.controller.DefaultRestControllerImpl.deserialize(DefaultRestControllerImpl.java:123)
at org.kie.server.services.impl.controller.DefaultRestControllerImpl.makeHttpPutRequestAndCreateCustomResponse(DefaultRestControllerImpl.java:62)
at org.kie.server.services.impl.controller.DefaultRestControllerImpl.connectToSingleController(DefaultRestControllerImpl.java:192)
at org.kie.server.services.impl.controller.DefaultRestControllerImpl.connect(DefaultRestControllerImpl.java:152)
at org.kie.server.services.impl.controller.ControllerConnectRunnable.run(ControllerConnectRunnable.java:63)
at java.lang.Thread.run(Unknown Source)
2018-02-22 09:24:09.575  INFO 7132 --- [           main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@4b916cc2, org.springframework.security.web.context.SecurityContextPersistenceFilter@3de383f7, org.springframework.security.web.header.HeaderWriterFilter@174cb0d8, org.springframework.security.web.authentication.logout.LogoutFilter@32d8710a, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@75c15f76, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@42ebece0, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@7ebfe01a, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@7f5e9949, org.springframework.security.web.session.SessionManagementFilter@60fbc34d, org.springframework.security.web.access.ExceptionTranslationFilter@2bc8caa7, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@637506d8]
2018-02-22 09:24:13.489  INFO 7132 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-02-

Maciej Swiderski

unread,
Feb 22, 2018, 2:39:18 AM2/22/18
to Peter Jerald, jBPM Usage
this is caused by change in jackson library and it seems you get newer version 2.8+ try downgrading jackson(via maven exclusions) to something around 2.6 or 2.7.

Upgrade of jackson 2.8+ will be done for jBPM in next version when we upgrade to WildFly 11.

Maciej

--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/d036013c-b4b8-449f-90b8-fc02e8436aa9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Jerald

unread,
Feb 22, 2018, 2:56:48 AM2/22/18
to jBPM Usage
I cross checked jackson-databind jar from 2.0 to 2.9.

https://github.com/FasterXML/jackson-databind/blob/2.0/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/AsWrapperTypeDeserializer.java

I can see "AsWrapperTypeDeserializer" class with below parameters

AsWrapperTypeDeserializer(JavaType bt, TypeIdResolver idRes,
String typePropertyName, boolean typeIdVisible, Class<?> defaultImpl)

There is no such constructor in jackson-databind jar

Peter Jerald

unread,
Feb 24, 2018, 1:43:57 PM2/24/18
to jBPM Usage
Sorry I misunderstood exception trace.   Trace is correct . 

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;ZLcom/fasterxml/jackson/databind/JavaType;)V

'Z' boolean parameters in method signature. Kie-server-api is referring correct jackson method signature. 

I downgraded by excluding higher version jar which is 2.8.10 but didn't helps. I can see same signature from jackson-databind from 2.0 to 2.9 . I feel its issue with classloader (or) package build issue.

Let me know your comments.

Maciej Swiderski

unread,
Feb 26, 2018, 3:19:15 AM2/26/18
to Peter Jerald, jBPM Usage
here is the difference in constructor: https://github.com/kiegroup/droolsjbpm-integration/pull/1373/files#diff-63a038f8aee4aca5fd3dad3f72359355R758

jBPM 7.6 is aligned with wildfly 10.1 so it’s jackson 2.7.4 max. So you either downgrade to 2.7 or patch you local kie-server-api with the linked changes.

Maciej

--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.

Peter Jerald

unread,
Feb 27, 2018, 6:50:59 AM2/27/18
to jBPM Usage
Thank you so much ! My mistake .I overlooked constructor parameters.

Added -verbose parameters to find which is class loading from which jar . Jackson jars are overridden by 2.8.10 version.

2.8.10 is loading from spring-boot-starter package . I made excludes in pom file and added 2.7.4 version.

Now I can able to register in jbpm-console.

Reply all
Reply to author
Forward
0 new messages