You may find a striped-out log fragment at https://hub-share.thron.com/content/?id=580b8ec1-86f3-4893-9016-0d681210a890&pkey=yX0zx1; however, this is what we do.
1. The account has the "null" payment method as default; this has been assigned upon the account's creation.
2. (requests 29, 30) we stop the auto invoicing system by getting the correct tag id for AUTO_INVOICING_OFF (request 29) and applying it to the account (request 30).
3. (request 34) we create a new subscription for the product we need; for a test (request 35) we check that the subscription has indeed been created.
4. (request 36) for a test we check that the account has the correct payment method
5. (requests 37 and 38) we remove the AUTO_INVOICING_OFF tag (check step 2. above)
After restarting the auto invoicing process we receive a "failed to acquire lock" exception:
2016-10-26 08:03:57,815 [bus_events-th] WARN o.k.commons.locker.GlobalLockerBase - Failed to acquire lock f6863f30-b181-49f4-a4bf-b7dbf9a87f38 for service ACCNT_INV_PAY after 200 retries
2016-10-26 08:03:57,815 [bus_events-th] ERROR o.k.b.invoice.InvoiceDispatcher - Failed to process invoice for account f6863f30-b181-49f4-a4bf-b7dbf9a87f38, targetDate 2016-10-26T08:03:36.000Z
org.killbill.commons.locker.LockFailedException: null
at org.killbill.commons.locker.GlobalLockerBase.lockWithNumberOfTries(GlobalLockerBase.java:69)
at org.killbill.billing.invoice.InvoiceDispatcher.processAccount(InvoiceDispatcher.java:211)
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:89)
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)
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)
We also noticed that the database tables, in particular the `invoice_items` one, keep growing at a steady pace and with couples of related "RECURRING" / "REPAIR_ADJ" rows.
In the log file you will see other curious exceptions (NPEs and others) that I can't explain.
What should we check first? Is there a way to rebuild the subscriptions and invoices list?
Thank you in advance,
Leonardo
Thank you,
Leonardo
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/b9ff1dac-fbf6-4bef-b0ec-f414b875e3a5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Leonardo
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/aace2ef0-632f-4515-aa17-8a86dae7c996%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/7b07dcf6-298e-4950-a1b1-009d1f78ea64%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/26a35e1d-a3ef-460b-8fe1-5c11a95a490c%40googlegroups.com.
Leonardo,Could you share your catalog as well? This would help the debugging.Thanks!
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/CAKXgekr%2BnWL_xE1hWOueGxSa2Y1q4JBpJGs%3DvMv%3DX21UD%2Bp%2B_A%40mail.gmail.com.
Leonardo,Any update on the issue?Stéphane
On Fri, Oct 28, 2016 at 8:26 AM, Pierre-Alexandre Meyer <pie...@kill-bill.org> wrote:
Leonardo,Could you share your catalog as well? This would help the debugging.Thanks!
On Fri, Oct 28, 2016 at 12:02 AM, Leonardo Scattola <leonardo...@newvision.it> wrote:
Stéphane,thank you again for your precious hints.I've performed the call to the export endpoint; you can find this report at https://hub-share.thron.com/content/?id=03c2f2b7-e874-4fd1-8c00-e12a2d47b258&pkey=5G98z2Meanwhile, I'll perform these actions:
- apply your fix on the code on the development platform
- create a new, clean KB instance (a new DB, another KB instance on a different server)
- re-create the accounts and subscriptions basing on what is currently on the development server
- monitor the situation
Regards,Leonardo
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To post to this group, send email to killbill...@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/26a35e1d-a3ef-460b-8fe1-5c11a95a490c%40googlegroups.com.
--Pierre
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To post to this group, send email to killbill...@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
You may find the whole list of catalogs at this link: https://hub-share.thron.com/content/?id=9237d1c3-0878-41ad-a2fd-69e10954de8a&pkey=vzyj6fAll of these catalogs are currently present; each of them starts on a different timestamp.
Could you confirm what I'm seeing? Am I missing a catalog version?
my bad! You were indeed missing a catalog in the archive; I've updated the ZIP file at the same link by adding the missing catalog (THRONCatalog20160702.xml)
What i don't know is why you get an NPE (i would need to have access to your data on disk). Most probably there was an issue at some point that creating some data that the code does not know how to handle gracefully.
@Leonardo: In the meantime, the GitHub issue has a query to fix the data (make sure to test it in a QA environment first).
I can confirm that the query used to detect the multiple cancel events on our development site returned eight elements; however, on our other sites (quality and production) no rows were returned.
- Is the subscription e79b5260-e8c9-47e0-aafc-e91071f9e5c7 from production or development? It should be returned by the query
- Do you still see the NPE that Stéphane mentioned above in your production logs?
2016-11-03T11:32:18,494+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,526+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,550+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,578+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,602+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,630+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,661+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,690+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,715+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,738+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,770+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,793+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,818+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'2016-11-03T11:32:18,846+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='4', tRId='1', Calculated BCD: subscriptionId='e2d8f4a7-c56b-4cbf-bd63-2e6562b27a25', subscriptionStartDate='2116-01-13T10:14:31.000Z', accountTimeZone='UTC', bcd='13'
2016-11-03T06:33:27,449+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='14', tRId='1', Calculated BCD: subscriptionId='f599a5d6-6ecf-4bae-b5d0-1925efdf52d1', subscriptionStartDate='2116-02-10T14:56:05.000Z', accountTimeZone='UTC', bcd='10'2016-11-03T06:33:27,449+0000 lvl='INFO', log='BillCycleDayCalculator', th='notifications-th', xff='', rId='', aRId='14', tRId='1', Calculated BCD: subscriptionId='f599a5d6-6ecf-4bae-b5d0-1925efdf52d1', subscriptionStartDate='2116-02-10T14:56:05.000Z', accountTimeZone='UTC', bcd='10'2016-11-03T06:33:28,012+0000 lvl='INFO', log='DefaultInternalBillingApi', th='notifications-th', xff='', rId='', aRId='14', tRId='1', Computed billing events for accountId='8f226f40-a709-4924-9965-d5f9f3ab0737'
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/3727387d-9388-46f8-a187-dd9645b33aed%40googlegroups.com.
Are you seeing that on all subscriptions or just some isolated cases?
Are those for the same (catalog) Plan?
Is that a new behavior in 0.16.10?
Also, could you provide the following detail for this use case:> select * from subscription_events where subscription_id = 'f599a5d6-6ecf-4bae-b5d0-1925efdf52d1';A detail of the Plan entry in your catalog matching that subscription.
select * from subscription_events where subscription_id in ('f599a5d6-6ecf-4bae-b5d0-1925efdf52d1', 'a365ef70-1577-4fef-a160-dd4b0060dd5f', '8e8f7f1e-716d-48f7-94e1-bccfa23c9845', 'ff6d4c35-707a-4e93-950d-8e4e2d8922b2', '71f965b3-0ad9-4094-92c2-854f0026dfe3', 'b5524e83-9bd9-40ac-8eca-eaa50b71b2e9', 'bf5ecf56-00bd-46f7-872a-4243d36a2fec', 'c86c5f3e-b302-45c2-941f-892b36c75e8a', '932ae5fc-4abf-4f10-b450-7b8ae92cb72e', '4ce35042-9293-4c3f-bda8-3951ba329133', '4b4ccbe4-1519-4be1-9820-8c94dc4e280c', '902fdc93-a593-4cdf-a1b7-4ab11de0f765', '4aa5f42d-8978-46ae-8170-0b354b04e6f4', 'e07e7bb9-9b62-48fc-99dd-3bf25844d62c', '3ac55c3c-6acd-4114-afa8-5f8c437b125b');
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/3049589d-9c65-4185-8001-ec9e3bdd7ca0%40googlegroups.com.
check the file "catalina.out" in the attachments:
One idea could be setting up another KB machine to perform these calculation and having the other one respond to the external webservices invocation, but I don't think it's an optimal case.
I see a lot of HTTP queries for /1.0/kb/invoices/searchbyDate in the logs. Is that a custom endpoint?
I see a lot of HTTP queries for /1.0/kb/invoices/searchbyDate in the logs. Is that a custom endpoint?Yup! This is a custom method that we implemented to get the list of invoices for an account filtering them on a date range. You can find the source code on the "snippet.txt" file in the attachments.
Can you reproduce the 100% CPU issue on a stock 0.16.11 deployment?
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/4c5b696a-e9a0-48d8-a5c3-e2ce98986b98%40googlegroups.com.
Can you share the full logs (including the startup sequence and HTTP queries you sent)?
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/57d5c590-6deb-4e14-8d03-7e094365877c%40googlegroups.com.
I have created a script which performs the following steps:
| bfb9d3dd-3fcf-4019-b45b-8d8ae23e5090 | 79917 |
| 2fd85592-f88d-4a8b-95bc-4958965f6bde | 58270 |
| 39142922-6f35-48fb-bb53-a642f6dd2b07 | 55955 |
| 37446f6e-ea1a-44a9-98a7-2f67b15d2274 | 5648 |
| 8f5e6304-52b1-4bfc-96f3-999958519cc7 | 5648 |
| 85cf4ebe-5255-44e0-ab71-62c2807315b5 | 5628 |
| 012a6262-5574-419e-9b9e-d6d6565f4d3f | 4224 |
| 902b4fe1-9262-41b2-a9da-5fd48c5fef8d | 4224 |
| 670da212-5047-40ab-a577-34ff9940b5a1 | 4224 |
| 77fe269f-a3ca-49d2-9457-4cd7b202a0d0 | 4224 |
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/7fad0a80-233d-4cee-89a6-a4a2429005f4%40googlegroups.com.
Leonardo,I want to investigate your issue, but i have many more tasks on my plate right now. Also your setup is quite complex (large catalog with lots of versions, lots of subscriptions, ....), so just reproducing takes a long time. One idea is for you to debug by setting breakpoints and digging into why this is happening (happy to provide guidance or any support to facilitate that task). I think the more knowledge you gather about the system the better anyways. A few things to look at:1. Is that an infinite loop (does not look like it)?2. If not why do we see so many traces for subscriptions?Note that i still want to investigate on my end, but if time is a concern, anything you can do on your end will help.Stéphane
Leonardo,Took another look: What i am seeing is that there is a very large number of subscriptions and bundles and so the code loops though all bundles * subscriptions * billing events which in your case is quite a lot. We could definitely improve that (would be quite easy actually), but i am not seeing bugs (as far as i can tell). The reason why you see so many traces like the one below is because some of your subscriptions are BUNDLE aligned and when you have lots of AOs in a bundle we recompute same BCD over and over. As i said space for optimization...Stéphane
On Thu, Nov 10, 2016 at 8:21 AM, stephane brossier <step...@kill-bill.org> wrote:
Leonardo,I want to investigate your issue, but i have many more tasks on my plate right now. Also your setup is quite complex (large catalog with lots of versions, lots of subscriptions, ....), so just reproducing takes a long time. One idea is for you to debug by setting breakpoints and digging into why this is happening (happy to provide guidance or any support to facilitate that task). I think the more knowledge you gather about the system the better anyways. A few things to look at:1. Is that an infinite loop (does not look like it)?2. If not why do we see so many traces for subscriptions?Note that i still want to investigate on my end, but if time is a concern, anything you can do on your end will help.Stéphane
On Wed, Nov 9, 2016 at 11:28 PM, Leonardo Scattola <leonardo...@newvision.it> wrote:
Stéphane,another quick update on the argument: the BCD calculation process on the test server is *still* ongoing. This is the very same issue that we are still experiencing on our production server, and I'm worried because of the impacts in our platform's responsivity. Any ideas?Regards,Leonardo
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To post to this group, send email to killbill...@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/16dbf5c0-95b7-45f3-bf33-78741131643a%40googlegroups.com.
public class DefaultInternalBillingApi implements BillingInternalApi {
private static final Logger log = LoggerFactory.getLogger(DefaultInternalBillingApi.class);
private static Map<UUID, Integer> bcdCache =new HashMap<UUID, Integer>();
and then pass it on in the addBillingEventsForSubscription function: for (final EffectiveSubscriptionInternalEvent transition : billingTransitions) {
final int bcdLocal = bcdCalculator.calculateBcd(account, currentAccountBCD, bundleId, subscription, transition, DefaultInternalBillingApi.bcdCache, context);
We should have a much bigger performance boost, because each BCD calculation would be performed only once; on the other hand, the memory usage could rise a lot (depending on the number of subscriptions...)What do you think?Regards,Leonardo
2016-11-14T10:20:10,463+0000 lvl='INFO', log='FixedAndRecurringInvoiceItemGenerator', th='notifications-th', xff='', rId='', aRId='2', tRId='1', Proposed Invoice items for invoiceId='26fe4024-e3b0-4577-ba29-53729ecf36cd', accountId='4c8849da-19ba-4361-8002-6b5c21d2e4ab'DefaultBillingEvent{type=CREATE, effectiveDate=2015-07-30T11:22:07.000Z, planPhaseName=contentList-monthly-evergreen, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, totalOrdering=342}RECURRING{startDate=2015-07-30, endDate=2015-08-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2015-08-30, endDate=2015-09-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2015-09-30, endDate=2015-10-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2015-10-30, endDate=2015-11-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2015-11-30, endDate=2015-12-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2015-12-30, endDate=2016-01-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-01-30, endDate=2016-02-29, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-02-29, endDate=2016-03-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-03-30, endDate=2016-04-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-04-30, endDate=2016-05-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-05-30, endDate=2016-06-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-06-30, endDate=2016-07-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-07-30, endDate=2016-08-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-08-30, endDate=2016-09-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-09-30, endDate=2016-10-30, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}RECURRING{startDate=2016-10-30, endDate=2016-11-09, amount=0.00, rate=0.0, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, linkedItemId=null}DefaultBillingEvent{type=CANCEL, effectiveDate=2016-11-09T11:22:08.000Z, planPhaseName=contentList-monthly-evergreen, subscriptionId=8f5e6304-52b1-4bfc-96f3-999958519cc7, totalOrdering=343}DefaultBillingEvent{type=CREATE, effectiveDate=2016-09-28T11:22:11.000Z, planPhaseName=thronForSales-1kcontacts-annual-evergreen, subscriptionId=edeae58a-fcac-437a-92dd-1d702d8e697b, totalOrdering=347}RECURRING{startDate=2016-09-28, endDate=2017-09-28, amount=204.00, rate=204.0, subscriptionId=edeae58a-fcac-437a-92dd-1d702d8e697b, linkedItemId=null}DefaultBillingEvent{type=CREATE, effectiveDate=2015-10-02T11:22:08.000Z, planPhaseName=downloadConnector-monthly-evergreen, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, totalOrdering=344}RECURRING{startDate=2015-10-02, endDate=2015-11-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2015-11-02, endDate=2015-12-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2015-12-02, endDate=2016-01-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-01-02, endDate=2016-02-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-02-02, endDate=2016-03-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-03-02, endDate=2016-04-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-04-02, endDate=2016-05-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-05-02, endDate=2016-06-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-06-02, endDate=2016-07-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-07-02, endDate=2016-08-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-08-02, endDate=2016-09-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-09-02, endDate=2016-10-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-10-02, endDate=2016-11-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}RECURRING{startDate=2016-11-02, endDate=2016-12-02, amount=0.00, rate=0.0, subscriptionId=f89003e5-903f-42c5-a190-9ae084f925df, linkedItemId=null}DefaultBillingEvent{type=CREATE, effectiveDate=2016-09-28T11:22:10.000Z, planPhaseName=thronForMarketing-1kdevices-annual-evergreen, subscriptionId=25442614-31b8-4fc5-b1d5-afedec3dc681, totalOrdering=346}RECURRING{startDate=2016-09-28, endDate=2017-09-28, amount=332.00, rate=332.0, subscriptionId=25442614-31b8-4fc5-b1d5-afedec3dc681, linkedItemId=null}DefaultBillingEvent{type=CREATE, effectiveDate=2015-07-30T11:22:05.000Z, planPhaseName=mediaCenter-monthly-evergreen, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, totalOrdering=340}RECURRING{startDate=2015-07-30, endDate=2015-08-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2015-08-30, endDate=2015-09-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2015-09-30, endDate=2015-10-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2015-10-30, endDate=2015-11-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2015-11-30, endDate=2015-12-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2015-12-30, endDate=2016-01-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-01-30, endDate=2016-02-29, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-02-29, endDate=2016-03-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-03-30, endDate=2016-04-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-04-30, endDate=2016-05-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-05-30, endDate=2016-06-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-06-30, endDate=2016-07-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-07-30, endDate=2016-08-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-08-30, endDate=2016-09-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-09-30, endDate=2016-10-30, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}RECURRING{startDate=2016-10-30, endDate=2016-11-09, amount=0.00, rate=0.0, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, linkedItemId=null}DefaultBillingEvent{type=CANCEL, effectiveDate=2016-11-09T11:22:06.000Z, planPhaseName=mediaCenter-monthly-evergreen, subscriptionId=37446f6e-ea1a-44a9-98a7-2f67b15d2274, totalOrdering=341}DefaultBillingEvent{type=CREATE, effectiveDate=2016-09-28T11:22:09.000Z, planPhaseName=omniChannelDam-smallBusiness-annual-evergreen, subscriptionId=75702be4-2d64-4c4a-a321-d84c3c0723c0, totalOrdering=345}RECURRING{startDate=2016-09-28, endDate=2017-09-28, amount=20400.00, rate=20400.0, subscriptionId=75702be4-2d64-4c4a-a321-d84c3c0723c0, linkedItemId=null}
Generated null invoice for accountId='4c8849da-19ba-4361-8002-6b5c21d2e4ab', targetDate='2016-11-09', targetDateTime='2016-11-09T11:22:05.000Z'
Stéphane,
I have reviewed your code; I think it will surely help, but if we create a new bcdCache object for each invocation of the function addBillingEventsForSubscription I feel that the performance boost is only marginal...
What if we create a static object for bcdCache? (something likepublic class DefaultInternalBillingApi implements BillingInternalApi {
private static final Logger log = LoggerFactory.getLogger(DefaultInternalBillingApi.class);
private static Map<UUID, Integer> bcdCache =new HashMap<UUID, Integer>();and then pass it on in the addBillingEventsForSubscription function:for (final EffectiveSubscriptionInternalEvent transition : billingTransitions) {
final int bcdLocal = bcdCalculator.calculateBcd(account, currentAccountBCD, bundleId, subscription, transition, DefaultInternalBillingApi.bcdCache, context);We should have a much bigger performance boost, because each BCD calculation would be performed only once; on the other hand, the memory usage could rise a lot (depending on the number of subscriptions...)What do you think?
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/77a52cf0-9cf6-4cde-bc8b-838ddb803422%40googlegroups.com.
I have reviewed your code; I think it will surely help, but if we create a new bcdCache object for each invocation of the function addBillingEventsForSubscription I feel that the performance boost is only marginal...Well, did you try it?
In a case where you have 300+ subscriptions / bundle (which was your case), we would compute the BCD one time instead of 300? Is that really a marginal improvement?
I would suggest the following:1. Try the new release, and report back
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/a9d5dad8-2b2a-4168-8329-dd6880218097%40googlegroups.com.
> > We have found the issue
and I appreciate the issue ID :D
Thank you again,
Leonardo
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP) logger implementationSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.Exception in thread "main" javax.xml.bind.UnmarshalException: Unable to create an instance of org.killbill.billing.catalog.StandaloneCatalog- with linked exception:[java.lang.reflect.InvocationTargetException]at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader.reportError(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.createInstance(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.unmarshaller.StructureLoader.startElement(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.unmarshaller.ValidatingUnmarshaller.startElement(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(Unknown Source)at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source)at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source)at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source)at org.killbill.xmlloader.XMLLoader.getObjectFromStream(XMLLoader.java:66)at org.killbill.xmlloader.XMLLoader.getObjectFromUri(XMLLoader.java:58)at org.killbill.billing.catalog.LoadCatalog.main(LoadCatalog.java:33)Caused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)at java.lang.reflect.Constructor.newInstance(Unknown Source)at com.sun.xml.internal.bind.v2.ClassFactory.create0(Unknown Source)at com.sun.xml.internal.bind.v2.runtime.ClassBeanInfoImpl.createInstance(Unknown Source)... 26 moreCaused by: java.lang.NoClassDefFoundError: com/google/common/collect/Orderingat org.killbill.billing.catalog.CatalogEntityCollection.<init>(CatalogEntityCollection.java:34)at org.killbill.billing.catalog.StandaloneCatalog.<init>(StandaloneCatalog.java:96)... 32 moreCaused by: java.lang.ClassNotFoundException: com.google.common.collect.Orderingat java.net.URLClassLoader.findClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)... 34 more
java -jar killbill-catalog-0.18.0-load-tool.jar THRONCatalog20161109.xml
Exception in thread "main" java.lang.IllegalStateException: Cannot extract pricelist for plan videoMood-commercials-sup-annualat org.killbill.billing.catalog.DefaultPlan.findPriceListForPlan(DefaultPlan.java:323)at org.killbill.billing.catalog.DefaultPlan.initialize(DefaultPlan.java:188)at org.killbill.billing.catalog.StandaloneCatalog.initialize(StandaloneCatalog.java:309)at org.killbill.billing.catalog.StandaloneCatalog.initialize(StandaloneCatalog.java:58)at org.killbill.xmlloader.XMLLoader.validate(XMLLoader.java:95)at org.killbill.xmlloader.XMLLoader.getObjectFromStream(XMLLoader.java:71)
at org.killbill.xmlloader.XMLLoader.getObjectFromUri(XMLLoader.java:58)at org.killbill.billing.catalog.LoadCatalog.main(LoadCatalog.java:33)
I can however confirm the problem with the missing com/google/common/collect/Ordering class.
Nov 15, 2016 4:32:28 PM org.apache.catalina.core.StandardContext listenerStartSEVERE: Exception sending context initialized event to listener instance of class org.killbill.billing.server.listeners.KillbillGuiceListenerjava.lang.NoClassDefFoundError: org/killbill/commons/embeddeddb/mysql/MySQLStandaloneDBat org.killbill.billing.server.modules.EmbeddedDBProvider.get(EmbeddedDBProvider.java:55)at org.killbill.billing.server.modules.EmbeddedDBProvider.get(EmbeddedDBProvider.java:42)at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:55)at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1031)at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)at com.google.inject.Scopes$1$1.get(Scopes.java:65)at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:204)at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:198)at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:198)at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:179)at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:109)at com.google.inject.Guice.createInjector(Guice.java:95)at org.killbill.commons.skeleton.listeners.GuiceServletContextListener.getInjector(GuiceServletContextListener.java:92)at com.google.inject.servlet.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:45)at org.killbill.commons.skeleton.listeners.GuiceServletContextListener.contextInitialized(GuiceServletContextListener.java:54)at org.killbill.billing.server.listeners.KillbillPlatformGuiceListener.initializeGuice(KillbillPlatformGuiceListener.java:159)at org.killbill.billing.server.listeners.KillbillPlatformGuiceListener.contextInitialized(KillbillPlatformGuiceListener.java:106)at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)at java.util.concurrent.FutureTask.run(Unknown Source)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)Caused by: java.lang.ClassNotFoundException: org.killbill.commons.embeddeddb.mysql.MySQLStandaloneDBat org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)... 33 more
"C:\Program Files\Java\jdk1.7.0_79\bin\java" -Xmx1000m "-Dmaven.home=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2.3\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2.3\plugins\maven\lib\maven3\bin\m2.conf" -Didea.launcher.port=7534 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2.3\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 2016.2.3\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher -Didea.version=2016.2.5 -DskipTests=true install -P mysql,jdk17,!jdk16
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/ab987542-0e31-4095-8267-7cceb2ac9f44%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/672af337-78d3-4e74-a605-95cf84783eb6%40googlegroups.com.
Is that happening with the official 0.18.0 build or with your wrapper?
If the latter, you may need to change your build following https://github.com/killbill/killbill/commit/317d258bb7379ca173ba7c051f2891772757a76d.
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/3219f529-7aa2-4f09-8b50-8915dc9bb4c4%40googlegroups.com.
Nov 16, 2016 7:32:22 AM org.apache.catalina.core.StandardContext listenerStart
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/80529453-c5ca-493c-902f-b14bece29b91%40googlegroups.com.
<Context path="/" docBase="/opt/killbill/app/killbill-default.war" />
--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-users+unsubscribe@googlegroups.com.
To post to this group, send email to killbilling-users@googlegroups.com.
Visit this group at https://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/f5d19300-fe1f-487a-a00a-6d8da02db882%40googlegroups.com.
<Context path="/" docBase="/tmp/killbill/killbill.war" />
Stéphane
DefaultBillingEvent{type=CREATE, effectiveDate=2016-01-18T22:01:46.000Z, planPhaseName=professionalServices-solutionanalyst-tenpack-addonplan-evergreen, subscriptionId=c4b03069-63e9-4935-9da8-8a7ed92649e7, totalOrdering=126}FIXED{startDate=2016-01-18, endDate=null, amount=8000.00, rate=null, subscriptionId=c4b03069-63e9-4935-9da8-8a7ed92649e7, linkedItemId=null}org.killbill.billing.invoice.api.InvoiceApiException: SAFETY BOUND TRIGGERED subscriptionId='c4b03069-63e9-4935-9da8-8a7ed92649e7', resultingItem=FIXED{startDate=2016-01-18, endDate=null, amount=8000.00, rate=null, subscriptionId=c4b03069-63e9-4935-9da8-8a7ed92649e7, linkedItemId=null}at org.killbill.billing.invoice.generator.FixedAndRecurringInvoiceItemGenerator.safetyBound(FixedAndRecurringInvoiceItemGenerator.java:424)at org.killbill.billing.invoice.generator.FixedAndRecurringInvoiceItemGenerator.generateItems(FixedAndRecurringInvoiceItemGenerator.java:110)at org.killbill.billing.invoice.generator.DefaultInvoiceGenerator.generateInvoice(DefaultInvoiceGenerator.java:84)at org.killbill.billing.invoice.InvoiceDispatcher.processAccountWithLockAndInputTargetDate(InvoiceDispatcher.java:331)at org.killbill.billing.invoice.InvoiceDispatcher.processAccountWithLock(InvoiceDispatcher.java:258)at org.killbill.billing.invoice.InvoiceDispatcher.processAccount(InvoiceDispatcher.java:224)at org.killbill.billing.invoice.InvoiceTagHandler.processUnpaid_AUTO_INVOICING_OFF_invoices(InvoiceTagHandler.java:64)at org.killbill.billing.invoice.InvoiceTagHandler.process_AUTO_INVOICING_OFF_removal(InvoiceTagHandler.java:58)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)at com.google.common.eventbus.EventBusThatThrowsException.dispatchWithException(EventBusThatThrowsException.java:106)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(Unknown Source)at org.killbill.commons.concurrent.WrappedRunnable.run(WrappedRunnable.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)
2016-11-22T08:18:21,323+0000 lvl='WARN', log='GlobalLockerBase', th='bus_events-th', xff='', rId='', aRId='6', tRId='1', Failed to acquire lock 7a6dd639-77f4-48ed-b38c-5cd507322308 for service ACCNT_INV_PAY after 50 retries2016-11-22T08:18:21,324+0000 lvl='WARN', log='InvoiceDispatcher', th='bus_events-th', xff='', rId='', aRId='6', tRId='1', Failed to process invoice for accountId='7a6dd639-77f4-48ed-b38c-5cd507322308', targetDate='2016-11-22'org.killbill.commons.locker.LockFailedException: nullat org.killbill.commons.locker.GlobalLockerBase.lockWithNumberOfTries(GlobalLockerBase.java:66)at org.killbill.billing.invoice.InvoiceDispatcher.processAccount(InvoiceDispatcher.java:222)at org.killbill.billing.invoice.InvoiceDispatcher.processSubscriptionInternal(InvoiceDispatcher.java:210)at org.killbill.billing.invoice.InvoiceDispatcher.processSubscriptionForInvoiceGeneration(InvoiceDispatcher.java:185)at org.killbill.billing.invoice.InvoiceDispatcher.processSubscriptionForInvoiceGeneration(InvoiceDispatcher.java:181)at org.killbill.billing.invoice.InvoiceListener.handleSubscriptionTransition(InvoiceListener.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)at com.google.common.eventbus.EventBusThatThrowsException.dispatchWithException(EventBusThatThrowsException.java:106)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(Unknown Source)at org.killbill.commons.concurrent.WrappedRunnable.run(WrappedRunnable.java:40)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)
2016-11-22T08:35:03,072+0000 lvl='ERROR', log='CallableCallbackBase', th='bus_events-th', xff='', rId='', aRId='4', tRId='1', Fatal NotificationQ dispatch error, data corruption...com.google.common.eventbus.EventBusException: java.lang.reflect.InvocationTargetExceptionat 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(Unknown Source)at org.killbill.commons.concurrent.WrappedRunnable.run(WrappedRunnable.java:40)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.InvocationTargetException: null
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)at java.lang.reflect.Method.invoke(Unknown Source)at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)at com.google.common.eventbus.EventBusThatThrowsException.dispatchWithException(EventBusThatThrowsException.java:106)
... 13 common frames omittedCaused by: java.lang.IllegalStateException: Double billing detected: [Item{id=c53b3964-c51f-4df6-8887-26fe97392599, accountId=a2e6d3ea-10ef-4b1f-865a-1a52654f2e7f, bundleId=2b1a35b2-6fe8-42a1-9dce-440621ced78c, subscriptionId=baf1b087-b546-4f3b-a8c1-1c0b8f68f057, targetInvoiceId=c83a5b31-7f72-4605-88f8-336817a5a518, invoiceId=94e61977-eeb4-4ed2-bec0-fc18d06827a6, planName='professionalServices-solutionanalyst-daily-addonpl', phaseName='professionalServices-solutionanalyst-daily-addonpl', startDate=2016-02-02, endDate=2016-03-02, amount=0.00, rate=0E-9, currency=EUR, createdDate=2016-02-02T08:44:24.000Z, linkedId=null, currentRepairedAmount=0, adjustedAmount=0, action=ADD}, Item{id=75f1ea79-dbdb-4399-a746-ffc010e4af65, accountId=a2e6d3ea-10ef-4b1f-865a-1a52654f2e7f, bundleId=2b1a35b2-6fe8-42a1-9dce-440621ced78c, subscriptionId=baf1b087-b546-4f3b-a8c1-1c0b8f68f057, targetInvoiceId=c83a5b31-7f72-4605-88f8-336817a5a518, invoiceId=0ec04a97-0cf5-4287-b216-4084589540d3, planName='professionalServices-solutionanalyst-daily-addonpl', phaseName='professionalServices-solutionanalyst-daily-addonpl', startDate=2016-02-02, endDate=2016-03-02, amount=0.00, rate=0E-9, currency=EUR, createdDate=2016-02-02T08:44:24.000Z, linkedId=null, currentRepairedAmount=0, adjustedAmount=0, action=ADD}, Item{id=fefa35fd-63bd-40b8-a0d2-36e036840e98, accountId=a2e6d3ea-10ef-4b1f-865a-1a52654f2e7f, bundleId=2b1a35b2-6fe8-42a1-9dce-440621ced78c, subscriptionId=baf1b087-b546-4f3b-a8c1-1c0b8f68f057, targetInvoiceId=c83a5b31-7f72-4605-88f8-336817a5a518, invoiceId=3a8c5fea-f16a-4e14-8e24-743e8ca044ad, planName='professionalServices-solutionanalyst-daily-addonpl', phaseName='professionalServices-solutionanalyst-daily-addonpl', startDate=2016-02-02, endDate=2016-03-02, amount=0.00, rate=0E-9, currency=EUR, createdDate=2016-02-02T08:44:27.000Z, linkedId=null, currentRepairedAmount=0, adjustedAmount=0, action=ADD}]at com.google.common.base.Preconditions.checkState(Preconditions.java:197)at org.killbill.billing.invoice.tree.ItemsInterval.getResulting_ADD_Item(ItemsInterval.java:158)at org.killbill.billing.invoice.tree.ItemsInterval.getResultingItem(ItemsInterval.java:134)at org.killbill.billing.invoice.tree.ItemsInterval.buildFromItems(ItemsInterval.java:89)at org.killbill.billing.invoice.tree.ItemsNodeInterval$1.onLastNode(ItemsNodeInterval.java:102)at org.killbill.billing.invoice.tree.NodeInterval.build(NodeInterval.java:59)at org.killbill.billing.invoice.tree.NodeInterval.build(NodeInterval.java:69)at org.killbill.billing.invoice.tree.ItemsNodeInterval.buildForExistingItems(ItemsNodeInterval.java:92)at org.killbill.billing.invoice.tree.SubscriptionItemTree.build(SubscriptionItemTree.java:102)at org.killbill.billing.invoice.tree.AccountItemTree.build(AccountItemTree.java:82)at org.killbill.billing.invoice.tree.AccountItemTree.mergeWithProposedItems(AccountItemTree.java:156)at org.killbill.billing.invoice.generator.FixedAndRecurringInvoiceItemGenerator.generateItems(FixedAndRecurringInvoiceItemGenerator.java:107)
at org.killbill.billing.invoice.generator.DefaultInvoiceGenerator.generateInvoice(DefaultInvoiceGenerator.java:84)at org.killbill.billing.invoice.InvoiceDispatcher.processAccountWithLockAndInputTargetDate(InvoiceDispatcher.java:331)at org.killbill.billing.invoice.InvoiceDispatcher.processAccountWithLock(InvoiceDispatcher.java:258)at org.killbill.billing.invoice.InvoiceDispatcher.processAccount(InvoiceDispatcher.java:224)at org.killbill.billing.invoice.InvoiceTagHandler.processUnpaid_AUTO_INVOICING_OFF_invoices(InvoiceTagHandler.java:64)at org.killbill.billing.invoice.InvoiceTagHandler.process_AUTO_INVOICING_OFF_removal(InvoiceTagHandler.java:58)
... 19 common frames omitted
we finally went live with the 0.18.1 snapshot version
As predicted, the CPU usage dropped instantly and there are no invoice calculations looping.
However, we encountered another issue on the invoicing calculation: we created a new subscription for one of our customers and restarted the invoicing process (removing the AUTO_INVOICING_OFF tag); our Tomcat reported this exception.DefaultBillingEvent{type=CREATE, effectiveDate=2016-01-18T22:01:46.000Z, planPhaseName=professionalServices-solutionanalyst-tenpack-addonplan-evergreen, subscriptionId=c4b03069-63e9-4935-9da8-8a7ed92649e7, totalOrdering=126}FIXED{startDate=2016-01-18, endDate=null, amount=8000.00, rate=null, subscriptionId=c4b03069-63e9-4935-9da8-8a7ed92649e7, linkedItemId=null}org.killbill.billing.invoice.api.InvoiceApiException: SAFETY BOUND TRIGGERED subscriptionId='c4b03069-63e9-4935-9da8-8a7ed92649e7', resultingItem=FIXED{startDate=2016-01-18, endDate=null, amount=8000.00, rate=null, subscriptionId=c4b03069-63e9-4935-9da8-8a7ed92649e7, linkedItemId=null}
The Tomcat has been restarted a few seconds ago, there are no other clients attached and this is an account without a particular activity (except for the huge number of invoice items due to the previous KB behaviour).You can find the export file at https://hub-share.thron.com/content/?id=b22d094e-982a-4d78-9b60-dcfc91a53851&pkey=rUxBqB.
Is there a way to reduce the size of the DB by removing the unneeded rows?
... and another exception has arisen on another customer:
Caused by: java.lang.IllegalStateException: Double billing detected
I'm a little scared about these new exceptions... are they indeed new or didn't they appear because of the invoicing loops?
I'll take a look at the export but it's indeed possible the invoice generation takes too long because of the bad data.