Payment plugin is not registered

228 views
Skip to first unread message

r.men...@gmail.com

unread,
Jun 18, 2020, 9:08:24 PM6/18/20
to Kill Bill users mailing-list
Hi all,

I'm trying to update my payment plugin to install it on Kill Bill 0.22.x (It's currently working on KB version 0.20)

I downloaded the killbill-plugin-framework-java, I added dependencies (following the readme.md file)
Then I copied my classes from old version to this brand new one.

I installed the plugin using KPM:

kpm install_java_plugin 'liv:geoswift-plugin' --from-source-file=/tmp/geoswift-plugin/2.0.0/geoswift-plugin-2.0.0.jar --destination=/var/lib/killbill/bundles

Then I run the inspection:
kpm inspect --destination=/var/lib/killbill/bundlesEnter code here...

I got
__________________________________________________________________________________________________________________________
|     PLUGIN NAME |          PLUGIN KEY | TYPE | GROUP ID | ARTIFACT ID | PACKAGING | VERSIONS sha1=[], def=(*), del=(x) |
__________________________________________________________________________________________________________________________
| geoswift-plugin | liv:geoswift-plugin | java |      ??? |         ??? |       ??? |                      2.0.0[???](*) |
__________________________________________________________________________________________________________________________Enter code here
...

Finally I restarted my docker container... I thougt it was installed (see the image attached), but when I try to add a payment Method, I'm getting Payment plugin geoswift-plugin is not registered

2020-06-19T00:52:08,188+0000 lvl='INFO', log='LoggingFilter', th='catalina-exec-3', xff='', rId='811b30d5-c6ba-4552-9493-e69072b8c908', tok='', aRId='', tRId='1', 62 * Server in-bound request
62 > POST https://be-killbill.ngrok.io/1.0/kb/accounts/5e9d6649-89c5-4fa0-a038-3cd9875a176c/paymentMethods?isDefault=true&payAllUnpaidInvoices=false
62 > host: be-killbill.ngrok.io
62 > user-agent: Killbill-Client/0.22.1/php
62 > x-killbill-createdby: be-chaos
62 > accept: application/json
62 > content-type: application/json
62 > x-killbill-apikey: api-key
62 > x-killbill-apisecret: **********
62 > authorization: **************************
62 > content-length: 1811
62 > x-forwarded-proto: https
62 >

2020-06-19T00:52:08,216+0000 lvl='WARN', log='LoggingResponse', th='catalina-exec-3', xff='', rId='811b30d5-c6ba-4552-9493-e69072b8c908', tok='811b30d5-c6ba-4552-9493-e69072b8c908', aRId='1', tRId='1', Bad request
org
.killbill.billing.payment.api.PaymentApiException: Payment plugin geoswift-plugin is not registered
    at org
.killbill.billing.payment.core.PaymentPluginServiceRegistration.getPaymentPluginApi(PaymentPluginServiceRegistration.java:88)
    at org
.killbill.billing.payment.core.ProcessorBase.getPaymentPluginApi(ProcessorBase.java:116)
    at org
.killbill.billing.payment.core.PaymentMethodProcessor$1.doOperation(PaymentMethodProcessor.java:137)
    at org
.killbill.billing.payment.core.PaymentMethodProcessor$1.doOperation(PaymentMethodProcessor.java:127)
    at org
.killbill.billing.payment.core.ProcessorBase$WithAccountLock.processAccountWithLock(ProcessorBase.java:179)
    at org
.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:162)
    at org
.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:143)
    at org
.killbill.billing.payment.dispatcher.CallableWithRequestData.call(CallableWithRequestData.java:69)
    at org
.killbill.commons.concurrent.WrappedCallable.call(WrappedCallable.java:42)
    at java
.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org
.killbill.commons.concurrent.WrappedRunnable.run(WrappedRunnable.java:48)
    at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java
.lang.Thread.run(Thread.java:748)
2020-06-19T00:52:08,216+0000 lvl='INFO', log='LoggingFilter', th='catalina-exec-3', xff='', rId='811b30d5-c6ba-4552-9493-e69072b8c908', tok='811b30d5-c6ba-4552-9493-e69072b8c908', aRId='1', tRId='1', 62 * Server out-bound response
62 < 400
62 < Content-Type: application/json
62 <

btw, if I send a request to GET /1.0/kb/nodesInfo, I get

        "nodeName": "localhost",
       "bootTime": "2020-06-19T00:39:13.000Z",
       "lastUpdatedDate": "2020-06-19T00:39:13.000Z",
       "kbVersion": "0.22.8",
       "apiVersion": "0.53.17",
       "pluginApiVersion": "0.26.4",
       "commonVersion": "0.23.11",
       "platformVersion": "0.39.15",
       "pluginsInfo": [
           {
               "bundleSymbolicName": null,
               "pluginKey": "liv:geoswift-plugin",
               "pluginName": "geoswift-plugin",
               "version": "2.0.0",
               "state": "RUNNING",
               "isSelectedForStart": true,
               "services": []
           },
Enter code here...

Can someone help me out?

Is there any documentation for plugin update/migrate to work with kb 0.22.x?


Thanks in advance =)

Screen Shot 2020-06-18 at 5.53.49 PM.png

stephane brossier

unread,
Jun 19, 2020, 1:07:38 PM6/19/20
to r.men...@gmail.com, Kill Bill users mailing-list
It looks like your plugin was installed and started correctly, but the PamentPluginApi service was not registered -- see for instance how we do it for the stripe plugin here.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/e672c875-875a-4f47-9e70-336bfe4d92c6o%40googlegroups.com.

r.men...@gmail.com

unread,
Jun 19, 2020, 1:36:46 PM6/19/20
to Kill Bill users mailing-list
Hi Stephane

This is what I have:

    private void registerPaymentPluginApi(final BundleContext context, final PaymentPluginApi api) {
       
final Hashtable<String, String> props = new Hashtable<String, String>();
        props
.put(OSGIPluginProperties.PLUGIN_NAME_PROP, PLUGIN_NAME);
        registrar
.registerService(context, PaymentPluginApi.class, api, props);
   
}

And my PLUGIN_NAME = "geoswift-plugin"

On Friday, 19 June 2020 10:07:38 UTC-7, stephane brossier wrote:
It looks like your plugin was installed and started correctly, but the PamentPluginApi service was not registered -- see for instance how we do it for the stripe plugin here.

To unsubscribe from this group and stop receiving emails from it, send an email to killbill...@googlegroups.com.

stephane brossier

unread,
Jun 19, 2020, 5:04:19 PM6/19/20
to r.men...@gmail.com, Kill Bill users mailing-list
That looks good to me. 🤔 Have you checked the logs - any exceptions? 

To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/f08a1895-4c2a-417c-8b16-0f70d2472028o%40googlegroups.com.

Ricardo Mendes

unread,
Jun 22, 2020, 1:28:57 PM6/22/20
to Kill Bill users mailing-list
Hi Stephane,

This is the only log I see (from /var/lib/tomcat/logs/killbill.out)
2020-06-22T17:14:37,975+0000 lvl='INFO', log='LoggingFilter', th='catalina-exec-1', xff='', rId='92af9f57-dca9-41c1-9671-e8faee3b405b', tok='', aRId='', tRId='1', 92 * Server in-bound request
92 > POST http://killbill:8080/1.0/kb/accounts/5e9d6649-89c5-4fa0-a038-3cd9875a176c/paymentMethods?isDefault=true
92 > accept: application/json
92 > user-agent: killbill/3.2.0; jruby 9.1.17.0 (2.3.3) 2018-04-20 d8b1ff9 OpenJDK 64-Bit Server VM 25.232-b09 on 1.8.0_232-8u232-b09-0ubuntu1~16.04.1-b09 +jit [linux-x86_64]
92 > accept-encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3
92 > x-killbill-apikey: api-key
92 > x-killbill-apisecret: **********
92 > cookie: JSESSIONID=78b5b561-6cba-4cdb-8000-5c5ae6bec13e
92 > content-type: application/json
92 > x-killbill-createdby: admin
92 > x-request-id: 92af9f57-dca9-41c1-9671-e8faee3b405b
92 > host: killbill:8080
92 > content-length: 928
92 >

2020-06-22T17:14:37,987+0000 lvl='WARN', log='LoggingResponse', th='catalina-exec-1', xff='', rId='92af9f57-dca9-41c1-9671-e8faee3b405b', tok='92af9f57-dca9-41c1-9671-e8faee3b405b', aRId='1', tRId='1', Bad request
org
.killbill.billing.payment.api.PaymentApiException: Payment plugin killbill-liv:geoswift-plugin is not registered
    at org
.killbill.billing.payment.core.PaymentPluginServiceRegistration.getPaymentPluginApi(PaymentPluginServiceRegistration.java:88)

    at org
.killbill.billing.payment.core.ProcessorBase.getPaymentPluginApi(ProcessorBase.java:116)
    at org
.killbill.billing.payment.core.PaymentMethodProcessor$1.doOperation(PaymentMethodProcessor.java:137)
    at org
.killbill.billing.payment.core.PaymentMethodProcessor$1.doOperation(PaymentMethodProcessor.java:127)
    at org
.killbill.billing.payment.core.ProcessorBase$WithAccountLock.processAccountWithLock(ProcessorBase.java:179)
    at org
.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:162)
    at org
.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:143)
    at org
.killbill.billing.payment.dispatcher.CallableWithRequestData.call(CallableWithRequestData.java:69)
    at org
.killbill.commons.concurrent.WrappedCallable.call(WrappedCallable.java:42)
    at java
.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org
.killbill.commons.concurrent.WrappedRunnable.run(WrappedRunnable.java:48)
    at java
.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java
.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java
.lang.Thread.run(Thread.java:748)
2020-06-22T17:14:37,987+0000 lvl='INFO', log='LoggingFilter', th='catalina-exec-1', xff='', rId='92af9f57-dca9-41c1-9671-e8faee3b405b', tok='92af9f57-dca9-41c1-9671-e8faee3b405b', aRId='1', tRId='1', 92 * Server out-bound response
92 < 400
92 < Content-Type: application/json
92 <
Enter code here...

I'm attaching the log file as well.

I notice that in the tenant_kvs table, the plugin configuration gets saved like this: PLUGIN_CONFIG_killbill-liv:geoswift-plugin
On KB version 0.20, I was installing the plugin using Kaui, and it was getting saved like this: PLUGIN_CONFIG_geoswift-plugin

I don't know why it's happeing, I mean, I sort of know... to install I'm using "liv" as a namespace:
kpm install_java_plugin 'liv:geoswift-plugin' --from-source-file=/tmp/geoswift-plugin/2.0.0/geoswift-plugin-2.0.0.jar --destination=/var/lib/killbill/bundles

But idk why it adds the `killbill-` prefix

Thnaks again

Ricardo Mendes

unread,
Jun 22, 2020, 1:29:48 PM6/22/20
to Kill Bill users mailing-list
I forgot to attach the log file... here it goes
Hi Stephane,

2020-06-22T17:14:37,<span style="color: #066;" class="styled-by-pre
CreatePaymentMethod.log

stephane brossier

unread,
Jun 23, 2020, 7:05:48 PM6/23/20
to Ricardo Mendes, Kill Bill users mailing-list
I looked at your log file, but there is not much besides what you just said. Unless I can attach a debugger to it, I am not sure how to help...

--
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.

eng.r...@gmail.com

unread,
Jun 24, 2020, 3:37:38 AM6/24/20
to Kill Bill users mailing-list
How can we do that?
Do I need a paid support?

Thanks

stephane brossier

unread,
Jun 24, 2020, 5:47:53 PM6/24/20
to eng.r...@gmail.com, Kill Bill users mailing-list
I am not sure how to help further unless I have access to your code and try it myself, and this (assuming this is ok to even share the code with me) goes beyond what we offer on the mailing list.



Alex Gitonga

unread,
Jul 19, 2020, 4:32:20 PM7/19/20
to Kill Bill users mailing-list
am dealing with same exact problem here

d35633

unread,
Sep 21, 2020, 1:38:50 AM9/21/20
to Kill Bill users mailing-list
How can i use kpm as i have installed kill bill using tomcat container?

It shows 'kpm' is not recognized as internal or external command.

Thank You.

Varun Vora

unread,
Jun 17, 2021, 1:02:45 PM6/17/21
to Kill Bill users mailing-list
I am facing the exact same problem. Compared to the available plugins, one difference I notice is that "bundleSymbolicName" is null for the plugins I created. For the rest of the plugins, there seems to be a symbolic name. Could that be the issue?

Joseph Jaojoco

unread,
Feb 3, 2022, 5:34:43 AM2/3/22
to Kill Bill users mailing-list
I make a jar file to the source code of braintree (https://github.com/Wovenware/killbill-braintree),
I installed it to killbill then this happened to me like this. anyone have a solution?

stephane brossier

unread,
Feb 3, 2022, 8:11:43 PM2/3/22
to Joseph Jaojoco, Kill Bill users mailing-list
I am not sure exactly what you did, and what happened to you, but for a start, I would recommend to use https://github.com/killbill/killbill-braintree (a fork of https://github.com/Wovenware/killbill-braintree with additional updates).

--
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.

Joseph Jaojoco

unread,
Feb 3, 2022, 11:38:19 PM2/3/22
to Kill Bill users mailing-list
Thank you step,

Already tried to installed it to killbill but still the same.
I found out that the OSGI servlet didnt register the manually installed plugin.any idea on this?
Screen Shot 2022-02-04 at 12.36.58 PM.png.
thank you! 
Reply all
Reply to author
Forward
0 new messages