Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0 when computing bookings #11

Open
valb3r opened this issue May 13, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@valb3r
Copy link
Contributor

valb3r commented May 13, 2021

23:26:14.095 [task-19] DEBUG de.adorsys.xs2a.adapter.impl.http.ApacheHttpClient - 
	<-- HTTP/1.1 200 
	<-- x-request-id: 2c8d74d9-9c9a-47b4-aaac-22b9bc238f39
	<-- date: Thu, 13 May 2021 21:26:13 GMT
	<-- content-length: 7761
	<-- vary: Access-Control-Request-Headers
	<-- x-robots-tag: none
	<-- content-type: application/json
	<--
	<-- Response body [application/json]: {"account":{"iban":"******","currency":"******"},"transactions":{"booked":[{"transactionId":"******","endToEndId":"******","bookingDate":"******","valueDate":"******","transactionAmount":{"currency":"******","amount":"******"},"creditorName":"******","creditorAccount":{"iban":"******","currency":"******"},"debtorName":"******","debtorAccount":{"iban":"******","currency":"******"},"remittanceInformationUnstructured":"******","remittanceInformationUnstructuredArray":["******"],"remittanceInformationStructuredArray":["******"],"additionalInformation":"******","bankTransactionCode":"******","proprietaryBankTransactionCode":"******","balanceAfterTransaction":{"balanceAmount":{"currency":"******","amount":"******"},"balanceType":"******","lastChangeDateTime":"******","referenceDate":"******"}},{"transactionId":"******","endToEndId":"******","bookingDate":"******","valueDate":"******","transactionAmount":{"currency":"******","amount":"******"},"creditorName":"******","creditorAccount":{"iban":"******","currency":"******"},"debtorName":"******","debtorAccount":{"iban":"******","currency":"******"},"remittanceInformationUnstructured":"******","remittanceInformationUnstructuredArray":["******"],"remittanceInformationStructuredArray":["******"],"additionalInformation":"******","bankTransactionCode":"******","proprietaryBankTransactionCode":"******","balanceAfterTransaction":{"balanceAmount":{"currency":"******","amount":"******"},"balanceType":"******","lastChangeDateTime":"******","referenceDate":"******"}},{"transactionId":"******","endToEndId":"******","bookingDate":"******","valueDate":"******","transactionAmount":{"currency":"******","amount":"******"},"creditorName":"******","creditorAccount":{"iban":"******","currency":"******"},"debtorName":"******","debtorAgent":"******","remittanceInformationUnstructured":"******","remittanceInformationUnstructuredArray":["******"],"remittanceInformationStructuredArray":["******"],"additionalInformation":"******","bankTransactionCode":"******","proprietaryBankTransactionCode":"******","balanceAfterTransaction":{"balanceAmount":{"currency":"******","amount":"******"},"balanceType":"******","lastChangeDateTime":"******","referenceDate":"******"}},{"transactionId":"******","endToEndId":"******","bookingDate":"******","valueDate":"******","transactionAmount":{"currency":"******","amount":"******"},"creditorName":"******","creditorAccount":{"iban":"******","currency":"******"},"debtorName":"******","debtorAgent":"******","remittanceInformationUnstructured":"******","remittanceInformationUnstructuredArray":["******"],"remittanceInformationStructuredArray":["******"],"additionalInformation":"******","bankTransactionCode":"******","proprietaryBankTransactionCode":"******","balanceAfterTransaction":{"balanceAmount":{"currency":"******","amount":"******"},"balanceType":"******","lastChangeDateTime":"******","referenceDate":"******"}},{"transactionId":"******","endToEndId":"******","bookingDate":"******","valueDate":"******","transactionAmount":{"currency":"******","amount":"******"},"creditorName":"******","creditorAccount":{"iban":"******","currency":"******"},"debtorName":"******","debtorAccount":{"iban":"******","currency":"******"},"remittanceInformationUnstructured":"******","remittanceInformationUnstructuredArray":["******"],"remittanceInformationStructuredArray":["******"],"additionalInformation":"******","bankTransactionCode":"******","proprietaryBankTransactionCode":"******","balanceAfterTransaction":{"balanceAmount":{"currency":"******","amount":"******"},"balanceType":"******","lastChangeDateTime":"******","referenceDate":"******"}},{"transactionId":"******","endToEndId":"******","bookingDate":"******","valueDate":"******","transactionAmount":{"currency":"******","amount":"******"},"creditorName":"******","creditorAccount":{"iban":"******","currency":"******"},"debtorName":"******","debtorAccount":{"iban":"******","currency":"******"},"remittanceInformationUnstructured":"******","remittanceInformationUnstructuredArray":["******"],"remittanceInformationStructuredArray":["******"],"additionalInformation":"******","bankTransactionCode":"******","proprietaryBankTransactionCode":"******","balanceAfterTransaction":{"balanceAmount":{"currency":"******","amount":"******"},"balanceType":"******","lastChangeDateTime":"******","referenceDate":"******"}},{"transactionId":"******","endToEndId":"******","bookingDate":"******","valueDate":"******","transactionAmount":{"currency":"******","amount":"******"},"creditorName":"******","creditorAccount":{"iban":"******","currency":"******"},"debtorName":"******","debtorAccount":{"iban":"******","currency":"******"},"remittanceInformationUnstructured":"******","remittanceInformationUnstructuredArray":["******"],"remittanceInformationStructuredArray":["******"],"additionalInformation":"******","bankTransactionCode":"******","proprietaryBankTransactionCode":"******","balanceAfterTransaction":{"balanceAmount":{"currency":"******","amount":"******"},"balanceType":"******","lastChangeDateTime":"******","referenceDate":"******"}},{"transactionId":"******","endToEndId":"******","bookingDate":"******","valueDate":"******","transactionAmount":{"currency":"******","amount":"******"},"creditorName":"******","creditorAccount":{"iban":"******","currency":"******"},"debtorName":"******","debtorAccount":{"iban":"******","currency":"******"},"remittanceInformationUnstructured":"******","remittanceInformationUnstructuredArray":["******"],"remittanceInformationStructuredArray":["******"],"additionalInformation":"******","bankTransactionCode":"******","proprietaryBankTransactionCode":"******","balanceAfterTransaction":{"balanceAmount":{"currency":"******","amount":"******"},"balanceType":"******","lastChangeDateTime":"******","referenceDate":"******"}}],"_links":{"account":{"href":"******"}}},"_links":{"download":{"href":"******"}}}
	<--
23:26:14.095 [task-19] INFO  d.a.x.adapter.impl.BaseAccountInformationService - <-- There are 8 transactions in the response
23:26:14.096 [task-19] INFO  d.a.o.p.x.s.x.a.s.SandboxXs2aTransactionListingService - getTransactionList response: ResponseLog(statusCode=200)
23:26:14.096 [task-19] INFO  d.a.o.p.x.s.x.a.s.SandboxXs2aTransactionListingService - done execution (ExecutionLog(id=d7d43dd9-b431-11eb-bf6e-0a580a8005a4, processInstanceId=d7d3c89f-b431-11eb-bf6e-0a580a8005a4, rootProcessInstanceId=d74d5a58-b431-11eb-bf6e-0a580a8005a4, parentId=d7d3c89f-b431-11eb-bf6e-0a580a8005a4)) with context (ContextLog(mode=REAL_CALLS, action=list-transactions, sagaId=d74d5a58-b431-11eb-bf6e-0a580a8005a4, requestId=2c8d74d9-9c9a-47b4-aaac-22b9bc238f39, serviceSessionId=0add43f6-87e7-47a5-b64a-4012944232ac))
23:26:14.159 [task-19] INFO  de.adorsys.smartanalytics.CategorizationService - categorize 8 bookings
23:26:14.193 [http-nio-8085-exec-10] ERROR o.a.c.c.C.[.[localhost].[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] threw exception
java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Unknown Source)
	at java.base/jdk.internal.util.Preconditions.checkIndex(Unknown Source)
	at java.base/java.util.Objects.checkIndex(Unknown Source)
	at java.base/java.util.ArrayList.get(Unknown Source)
	at de.adorsys.smartanalytics.calculator.PeriodCalculator.createBookingPeriods(PeriodCalculator.java:32)
	at de.adorsys.smartanalytics.ClassificationService.group(ClassificationService.java:45)
	at de.adorsys.smartanalytics.core.AnalyticsService.groupBookings(AnalyticsService.java:68)
	at de.adorsys.smartanalytics.core.AnalyticsService.analytics(AnalyticsService.java:40)
	at de.adorsys.opba.smartanalytics.EmbeddedSmartAnalyticsAnalyzer.analyze(EmbeddedSmartAnalyticsAnalyzer.java:29)
	at de.adorsys.opba.smartanalytics.TransactionAnalyzer.apply(TransactionAnalyzer.java:20)
	at de.adorsys.opba.protocol.facade.services.ProtocolResultHandler.applyPostProcessorsToResult(ProtocolResultHandler.java:198)
	at de.adorsys.opba.protocol.facade.services.ProtocolResultHandler.handleSuccess(ProtocolResultHandler.java:134)
	at de.adorsys.opba.protocol.facade.services.ProtocolResultHandler.doHandleResult(ProtocolResultHandler.java:94)
	at de.adorsys.opba.protocol.facade.services.ProtocolResultHandler.handleResult(ProtocolResultHandler.java:83)
	at de.adorsys.opba.protocol.facade.services.ProtocolResultHandler$$FastClassBySpringCGLIB$$b00d7d3d.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
@valb3r valb3r added the bug Something isn't working label May 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant