question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

exception while generating invoices

See original GitHub issue

I get this exception while generating invoices

2017-02-20T12:16:56,558+0000 lvl='ERROR', log='CallableCallbackBase', th='bus_events-th', xff='', rId='', aRId='1', tRId='1', Fatal NotificationQ dispatch error, data corruption...
com.google.common.eventbus.EventBusException: java.lang.reflect.InvocationTargetException
	at com.google.common.eventbus.EventBusThatThrowsException.dispatchWithException(EventBusThatThrowsException.java:108)
	at com.google.common.eventbus.EventBusThatThrowsException.dispatchQueuedEventsWithException(EventBusThatThrowsException.java:94)
	at com.google.common.eventbus.EventBusThatThrowsException.postWithException(EventBusThatThrowsException.java:82)
	at org.killbill.bus.DefaultPersistentBus.dispatchBusEventWithMetrics(DefaultPersistentBus.java:299)
	at org.killbill.bus.dispatching.BusCallableCallback.dispatch(BusCallableCallback.java:40)
	at org.killbill.bus.dispatching.BusCallableCallback.dispatch(BusCallableCallback.java:29)
	at org.killbill.queue.dispatching.Dispatcher$CallableQueue.call(Dispatcher.java:103)
	at org.killbill.queue.dispatching.Dispatcher$CallableQueue.call(Dispatcher.java:86)
	at org.killbill.commons.concurrent.WrappedCallable.call(WrappedCallable.java:42)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at org.killbill.commons.concurrent.WrappedRunnable.run(WrappedRunnable.java:40)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException: null
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
	at com.google.common.eventbus.EventBusThatThrowsException.dispatchWithException(EventBusThatThrowsException.java:106)
	... 13 common frames omitted
Caused by: java.lang.IndexOutOfBoundsException: Index: -1, Size: 0
	at java.util.LinkedList.checkElementIndex(LinkedList.java:553)
	at java.util.LinkedList.get(LinkedList.java:474)
	at org.killbill.billing.invoice.usage.ContiguousIntervalConsumableInArrear.build(ContiguousIntervalConsumableInArrear.java:138)
	at org.killbill.billing.invoice.usage.SubscriptionConsumableInArrear.computeInArrearUsageInterval(SubscriptionConsumableInArrear.java:165)
	at org.killbill.billing.invoice.usage.SubscriptionConsumableInArrear.computeMissingUsageInvoiceItems(SubscriptionConsumableInArrear.java:114)
	at org.killbill.billing.invoice.generator.UsageInvoiceItemGenerator.generateItems(UsageInvoiceItemGenerator.java:124)
	at org.killbill.billing.invoice.generator.DefaultInvoiceGenerator.generateInvoice(DefaultInvoiceGenerator.java:85)
	at org.killbill.billing.invoice.InvoiceDispatcher.processAccountWithLockAndInputTargetDate(InvoiceDispatcher.java:313)
	at org.killbill.billing.invoice.InvoiceDispatcher.processAccountWithLock(InvoiceDispatcher.java:242)
	at org.killbill.billing.invoice.InvoiceDispatcher.processAccount(InvoiceDispatcher.java:213)
	at org.killbill.billing.invoice.InvoiceDispatcher.processSubscriptionInternal(InvoiceDispatcher.java:199)
	at org.killbill.billing.invoice.InvoiceDispatcher.processSubscriptionForInvoiceGeneration(InvoiceDispatcher.java:174)
	at org.killbill.billing.invoice.InvoiceDispatcher.processSubscriptionForInvoiceGeneration(InvoiceDispatcher.java:170)
	at org.killbill.billing.invoice.InvoiceListener.handleSubscriptionTransition(InvoiceListener.java:75)
	... 19 common frames omitted

this exception is blocking all future invoices for the account. killbill version = 0.16.9

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
sbrossiecommented, May 9, 2017

@tytkal I reused your test case and submitted a fix to avoid the NPE, so i think that should address the issue. However the fix is only on 0.18.x release (0.16.x is not updated unless there is a blinking red issue).

0reactions
tytkalcommented, May 9, 2017

@sbrossie OK I think I have a clue how this happen, Our event system was down a while and all the massages (usage report ) was stuck and not delivered, so may be that why we have usage with this date

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invoice Exceptions: Where they come from and how to prevent ...
Automate exception resolution. As mentioned above, one of the leading causes of invoice exceptions is the lack of PO information on invoices.
Read more >
How to Succeed with Invoice Exception Management - Yooz
Exceptions can be eliminated by leveraging ePayable solutions that ensure all required data, in the proper format and fields, is included on an ......
Read more >
Exception Management in Accounts Payable: Understanding ...
In Accounts Payable, exceptions are part of the game we play. The numbers will not always match up, and your invoices will not...
Read more >
Error 'A Billing Transaction Exception Was Created Error On ...
Symptoms. A billing transaction exception was created because one of the contract billing controls didn't have any funds available.
Read more >
Invoice Match Exceptions and Invoices Requiring Remediation
1, Understand how and where to check status of an invoice match exception. Resolved Match Exceptions will show in the Business Process (BP)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found