adorsys / xs2a-connector-examples

Open Source implementation of XS2A connector
https://adorsys.com/en/products/
Apache License 2.0
15 stars 8 forks source link

XS2A connector examples doesn't work properly with latest Ledgers #3

Closed valb3r closed 4 years ago

valb3r commented 4 years ago

When trying to receive transactions list for 'anton.brueckner' I get following stacktrace:

x2sa-sandbox-ledgersgateway_1   | feign.codec.DecodeException: Error while extracting response for type [java.util.List<de.adorsys.ledgers.middleware.api.domain.account.TransactionTO>] and content type [application/json;charset=UTF-8]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized field "balanceAfterTransaction" (class de.adorsys.ledgers.middleware.api.domain.account.TransactionTO), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "balanceAfterTransaction" (class de.adorsys.ledgers.middleware.api.domain.account.TransactionTO), not marked as ignorable (21 known properties: "endToEndId", "debtorName", "mandateId", "bookingDate", "purposeCode", "ultimateCreditor", "bankTransactionCode", "proprietaryBankTransactionCode", "creditorAccount", "creditorId", "amount", "transactionId", "valueDate", "checkId", "creditorName", "debtorAccount", "entryReference", "remittanceInformationStructured", "exchangeRate", "ultimateDebtor", "remittanceInformationUnstructured"])
x2sa-sandbox-ledgersgateway_1   |  at [Source: (PushbackInputStream); line: 1, column: 564] (through reference chain: java.util.ArrayList[0]->de.adorsys.ledgers.middleware.api.domain.account.TransactionTO["balanceAfterTransaction"])
x2sa-sandbox-ledgersgateway_1   |   at feign.SynchronousMethodHandler.decode(SynchronousMethodHandler.java:182)
x2sa-sandbox-ledgersgateway_1   |   at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:142)
x2sa-sandbox-ledgersgateway_1   |   at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:80)
x2sa-sandbox-ledgersgateway_1   |   at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
x2sa-sandbox-ledgersgateway_1   |   at com.sun.proxy.$Proxy145.getTransactionByDates(Unknown Source)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.aspsp.xs2a.connector.spi.impl.AccountSpiImpl.requestTransactionsForAccount(AccountSpiImpl.java:203)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.service.ais.TransactionService.getSpiResponseSpiTransactionReport(TransactionService.java:267)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.service.ais.TransactionService.getTransactionsReportByPeriod(TransactionService.java:132)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.service.ais.TransactionService$$FastClassBySpringCGLIB$$c4a79cee.invoke(<generated>)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:769)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:55)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:747)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.service.ais.TransactionService$$EnhancerBySpringCGLIB$$dc233d71.getTransactionsReportByPeriod(<generated>)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.controller.AccountController.getTransactionList(AccountController.java:103)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.api.AccountApi._getTransactionList(AccountApi.java:165)
x2sa-sandbox-ledgersgateway_1   |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
x2sa-sandbox-ledgersgateway_1   |   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
x2sa-sandbox-ledgersgateway_1   |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
x2sa-sandbox-ledgersgateway_1   |   at java.lang.reflect.Method.invoke(Method.java:498)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
x2sa-sandbox-ledgersgateway_1   |   at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
x2sa-sandbox-ledgersgateway_1   |   at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.SignatureFilter.doFilterInternalCustom(SignatureFilter.java:64)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.GlobalAbstractExceptionFilter.doFilterInternal(GlobalAbstractExceptionFilter.java:40)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.ContentCachingWrappingFilter.doFilterInternalCustom(ContentCachingWrappingFilter.java:43)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.GlobalAbstractExceptionFilter.doFilterInternal(GlobalAbstractExceptionFilter.java:40)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.QwacCertificateFilter.doFilterInternalCustom(QwacCertificateFilter.java:122)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.GlobalAbstractExceptionFilter.doFilterInternal(GlobalAbstractExceptionFilter.java:40)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.OauthModeFilter.doFilterInternalCustom(OauthModeFilter.java:95)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.GlobalAbstractExceptionFilter.doFilterInternal(GlobalAbstractExceptionFilter.java:40)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:113)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.Xs2aLoggingContextFilter.doFilterInternalCustom(Xs2aLoggingContextFilter.java:58)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.GlobalAbstractExceptionFilter.doFilterInternal(GlobalAbstractExceptionFilter.java:40)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.aspsp.xs2a.connector.oauth.TokenAuthenticationFilter.doFilterInternalCustom(TokenAuthenticationFilter.java:84)
x2sa-sandbox-ledgersgateway_1   |   at de.adorsys.psd2.xs2a.web.filter.GlobalAbstractExceptionFilter.doFilterInternal(GlobalAbstractExceptionFilter.java:40)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:108)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
x2sa-sandbox-ledgersgateway_1   |   at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:367)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1598)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
x2sa-sandbox-ledgersgateway_1   |   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
x2sa-sandbox-ledgersgateway_1   |   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
x2sa-sandbox-ledgersgateway_1   |   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
x2sa-sandbox-ledgersgateway_1   |   at java.lang.Thread.run(Thread.java:748)

and final result on get transactions list:

responseBody: [{"tppMessages":[{"category":"ERROR","code":"CONSENT_UNKNOWN","text":"The Consent-ID cannot be matched by the ASPSP relative to the TPP"}]}] 

Reference versions and docker-compose: https://github.com/adorsys/open-banking-gateway/blob/bugfix/bump-xs2a-versions/how-to-start-with-project/xs2a-sandbox-only/docker-compose.yml Same happens with https://github.com/adorsys/open-banking-gateway/blob/develop/how-to-start-with-project/xs2a-sandbox-only/docker-compose.yml

Seregy commented 4 years ago

XS2A-Connector-Examples 5.11 is compatible only with Ledgers 2.8. You can use newly released hotfix version 5.11.1 which supports Ledgers 2.9