mbaig | Posts: 6

Unrecognized field "messageKey"

0 votes
Suddenly got these errors. Could any tell me why? thanks 13 Nov 2018 14:29:06,983 - ERROR - STDERR - Nov 13, 2018 2:29:06 PM com.silanis.awsng.web.rest.util.JacksonUtil deserialize SEVERE: Failed to deserialize json string: {"messageKey":"error.validation.packageManagement.invalidState","message":"This package is in an invalid state for requested action.","code":400,"name":"Validation Error"} com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "messageKey" (class com.silanis.esl.sdk.SessionToken), not marked as ignorable (one known property: "sessionToken"]) at [Source: java.io.StringReader@3ecd68d7; line: 1, column: 16] (through reference chain: com.silanis.esl.sdk.SessionToken["messageKey"]) at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:79) at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:568) at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:649) at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:830) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:310) at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:112) at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2563) at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:1805) at com.silanis.awsng.web.rest.util.JacksonUtil.deserialize(JacksonUtil.java:38) at com.silanis.esl.sdk.SessionService.createSessionToken(SessionService.java:40) at com.adastar.nqb.service.pdf.PDFDocumentMergeService.esignPDFDocument(PDFDocumentMergeService.java:858) at com.adastar.nqb.screenbean.EnrollmentFormsReviewBean.enrollmentComplete(EnrollmentFormsReviewBean.java:566) at sun.reflect.GeneratedMethodAccessor3272.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.invocation.Invocation.performCall(Invocation.java:359) at org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:598) at org.jboss.ejb.plugins.StatefulHASessionSynchronisationInterceptor.invoke(StatefulHASessionSynchronisationInterceptor.java:107) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168) at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:333) at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205) at org.jboss.ejb.plugins.CleanShutdownInterceptor.invoke(CleanShutdownInterceptor.java:278) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138) at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648) at org.jboss.ejb.Container.invoke(Container.java:960) at sun.reflect.GeneratedMethodAccessor113.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94) at org.jboss.mx.server.Invocation.invoke(Invocation.java:86) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659) at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:169) at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:118) at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:209) at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:195) at org.jboss.proxy.ejb.RetryInterceptor.invoke(RetryInterceptor.java:176) at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61) at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70) at org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:121) at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100) at com.sun.proxy.$Proxy1674.enrollmentComplete(Unknown Source) at com.adastar.nqb.servlet.EnrollmentFormsReviewServlet.doPost(EnrollmentFormsReviewServlet.java:65) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.andesa.filter.AndesaCrossScriptingFilter.doFilter(AndesaCrossScriptingFilter.java:50) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.andesa.filter.CacheFilter.doFilter(CacheFilter.java:56) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.adastar.nqb.util.filter.P3PFilter.doFilter(P3PFilter.java:64) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.blogspot.java4it.commons.filters.gzip.GZipFilter.doFilter(GZipFilter.java:114) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157) at org.jboss.web.tomcat.service.sso.ClusteredSingleSignOn.invoke(ClusteredSingleSignOn.java:677) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562) at org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:151) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446) at java.lang.Thread.run(Thread.java:745) 13 Nov 2018 14:29:07,009 - ERROR - com.adastar.nqb.service.pdf.PDFDocumentMergeService - PDFDocumentMergeService, esignPDFDocument, error: com.silanis.awsng.web.rest.JsonDeserializationException: Failed to deserialize json string to target type com.silanis.esl.sdk.SessionToken 13 Nov 2018 14:29:07,016 - ERROR - com.adastar.nqb.util.AndesaBaseService - AndesaBaseService, parseMessage, msg is com.silanis.awsng.web.rest.JsonDeserializationException: Failed to deserialize json string to target type com.silanis.esl.sdk.SessionToken at com.silanis.awsng.web.rest.util.JacksonUtil.deserialize(JacksonUtil.java:41) at com.silanis.esl.sdk.SessionService.createSessionToken(SessionService.java:40)

Duo_Liang | Posts: 3776

Reply to: Unrecognized field "messageKey"

0 votes
Hi there, Are you using an on-premises version of OneSpanSign? Or are you using a very old SDK? Because currently, the JacksonUtil class is located at com.silanis.esl.api.util.JacksonUtil instead of com.silanis.awsng.web.rest.util.JacksonUtil shown in your log. Duo

Duo_Liang | Posts: 3776

Reply to: Unrecognized field "messageKey"

0 votes
Hi, Generally talking, please make sure your package status is in "SENT". Otherwise, I can reproduce the issue and receive the same error as yours. Duo

Duo_Liang | Posts: 3776

Reply to: Unrecognized field "messageKey"

0 votes
Hi, Our support team told me that you are currently under 9.4 Java sdk, so the best way to align to all latest features is updating your sdk to 11.18 and change your existing code a little bit to compile with the new sdk function interface. But for now and per your issue, it seems that documents haven't been uploaded to your package, and your package can't be sent, that's why you receive this 400 error tells you can't generate a session token. I tested with 9.4 sdk and this function seems doesn't work:
eslClient.getPackageService().uploadDocument(new PackageId("yph8jWYWb5q_DpzWOdh7VajiZAM="), "cleaning_contract.pdf", Files.readAllBytes(file.toPath()), document1);
Are you using the same function to upload your documents? Duo

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off