Unable to create payment method with java client

151 views
Skip to first unread message

Khanh

unread,
Apr 1, 2015, 6:43:30 PM4/1/15
to killbill...@googlegroups.com
Hello, I am trying to create a payment method but I receive the following error

2015-04-01 18:07:16,662 [qtp1174290147-1183] INFO  c.s.j.a.c.filter.LoggingFilter - 29 * Server in-bound request
29 > POST http://192.168.1.100:8080/1.0/kb/accounts/90f2af9e-69bb-49bf-990a-5f668c09450c/paymentMethods?isDefault=true
29 > X-Killbill-ApiKey: bob
29 > Authorization: Basic YWRtaW46cGFzc3dvcmQ=
29 > X-Killbill-ApiSecret: lazar
29 > Accept: application/json
29 > Connection: keep-alive
29 > User-Agent: KillBill-JavaClient/1.0
29 > Host: 192.168.1.100:8080
29 > X-Killbill-Reason: new account
29 > X-Killbill-CreatedBy: rpc server
29 > Content-Length: 361
29 > Content-Type: application/json; charset=UTF-8
29 >

2015-04-01 18:07:16,692 [Plugin-th-1184] WARN  o.k.c.locker.mysql.MySqlGlobalLocker - Unable to obtain lock for ACCOUNT_FOR_INVOICE_PAYMENTS-ef15038f-dc88-4e0c-9308-c49f37959d87
java.sql.SQLSyntaxErrorException: Incorrect user-level lock name 'ACCOUNT_FOR_INVOICE_PAYMENTS-ef15038f-dc88-4e0c-9308-c49f37959d87'.
    at org.mariadb.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:138) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.internal.SQLExceptionMapper.throwException(SQLExceptionMapper.java:106) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.MySQLStatement.executeQueryEpilog(MySQLStatement.java:266) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:293) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.MySQLStatement.executeQuery(MySQLStatement.java:307) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.MySQLStatement.executeQuery(MySQLStatement.java:366) ~[mariadb-java-client-1.1.7.jar:na]
    at com.zaxxer.hikari.proxy.StatementProxy.executeQuery(StatementProxy.java:77) ~[HikariCP-java6-2.0.1.jar:na]
    at net.sf.log4jdbc.sql.jdbcapi.StatementSpy.executeQuery(StatementSpy.java:731) ~[log4jdbc-log4j2-jdbc4-1.16.jar:na]
    at org.killbill.commons.locker.mysql.MysqlGlobalLockDao.executeLockQuery(MysqlGlobalLockDao.java:46) ~[killbill-locker-0.2.33.jar:na]
    at org.killbill.commons.locker.mysql.MysqlGlobalLockDao.lock(MysqlGlobalLockDao.java:29) ~[killbill-locker-0.2.33.jar:na]
    at org.killbill.commons.locker.mysql.MySqlGlobalLocker.lock(MySqlGlobalLocker.java:94) [killbill-locker-0.2.33.jar:na]
    at org.killbill.commons.locker.mysql.MySqlGlobalLocker.lockWithNumberOfTries(MySqlGlobalLocker.java:57) [killbill-locker-0.2.33.jar:na]
    at org.killbill.billing.payment.core.ProcessorBase$WithAccountLock.processAccountWithLock(ProcessorBase.java:218) [killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:208) [killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:192) [killbill-payment-0.13.5.jar:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_20]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_20]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_20]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]
Caused by: org.mariadb.jdbc.internal.common.QueryException: Incorrect user-level lock name 'ACCOUNT_FOR_INVOICE_PAYMENTS-ef15038f-dc88-4e0c-9308-c49f37959d87'.
    at org.mariadb.jdbc.internal.common.queryresults.StreamingSelectResult.next(StreamingSelectResult.java:91) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.internal.common.queryresults.CachedSelectResult.createCachedSelectResult(CachedSelectResult.java:77) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.internal.mysql.MySQLProtocol.createQueryResult(MySQLProtocol.java:824) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.internal.mysql.MySQLProtocol.getResult(MySQLProtocol.java:966) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:997) ~[mariadb-java-client-1.1.7.jar:na]
    at org.mariadb.jdbc.MySQLStatement.execute(MySQLStatement.java:286) ~[mariadb-java-client-1.1.7.jar:na]
    ... 15 common frames omitted
2015-04-01 18:07:16,695 [qtp1174290147-1183] ERROR o.k.b.payment.core.ProcessorBase - Failed to lock account ef15038f-dc88-4e0c-9308-c49f37959d87
java.util.concurrent.ExecutionException: org.killbill.commons.locker.LockFailedException
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.8.0_20]
    at java.util.concurrent.FutureTask.get(FutureTask.java:206) ~[na:1.8.0_20]
    at org.killbill.billing.payment.dispatcher.PluginDispatcher.dispatchWithTimeout(PluginDispatcher.java:52) ~[killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.dispatcher.PluginDispatcher.dispatchWithTimeout(PluginDispatcher.java:45) ~[killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.core.ProcessorBase.dispatchWithExceptionHandling(ProcessorBase.java:232) ~[killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.core.PaymentMethodProcessor.addPaymentMethod(PaymentMethodProcessor.java:104) [killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.api.DefaultPaymentApi.addPaymentMethod(DefaultPaymentApi.java:375) [killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.api.DefaultPaymentApi$$EnhancerByGuice$$680c8437.CGLIB$addPaymentMethod$4(<generated>) [guice-3.0.jar:na]
    at org.killbill.billing.payment.api.DefaultPaymentApi$$EnhancerByGuice$$680c8437$$FastClassByGuice$$88e8f630.invoke(<generated>) [guice-3.0.jar:na]
    at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) [guice-3.0.jar:na]
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
    at org.killbill.billing.util.glue.KillbillApiAopModule$ProfilingMethodInterceptor$1.execute(KillbillApiAopModule.java:52) [killbill-util-0.13.5.jar:na]
    at org.killbill.commons.profiling.Profiling.executeWithProfiling(Profiling.java:33) [killbill-concurrent-0.2.33.jar:na]
    at org.killbill.billing.util.glue.KillbillApiAopModule$ProfilingMethodInterceptor.invoke(KillbillApiAopModule.java:49) [killbill-util-0.13.5.jar:na]
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) [guice-3.0.jar:na]
    at org.killbill.billing.payment.api.DefaultPaymentApi$$EnhancerByGuice$$680c8437.addPaymentMethod(<generated>) [guice-3.0.jar:na]
    at org.killbill.billing.jaxrs.resources.AccountResource.createPaymentMethod(AccountResource.java:614) [killbill-jaxrs-0.13.5.jar:na]
    at org.killbill.billing.jaxrs.resources.AccountResource$$EnhancerByGuice$$7c5bada1.CGLIB$createPaymentMethod$15(<generated>) [guice-3.0.jar:na]
    at org.killbill.billing.jaxrs.resources.AccountResource$$EnhancerByGuice$$7c5bada1$$FastClassByGuice$$51adfcba.invoke(<generated>) [guice-3.0.jar:na]
    at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) [guice-3.0.jar:na]
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
    at com.palominolabs.metrics.guice.TimedInterceptor.invoke(TimedInterceptor.java:47) [metrics-guice-3.0.2.jar:na]
    at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
    at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) [guice-3.0.jar:na]
    at org.killbill.billing.jaxrs.resources.AccountResource$$EnhancerByGuice$$7c5bada1.createPaymentMethod(<generated>) [guice-3.0.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_20]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_20]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_20]
    at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_20]
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) [jersey-servlet-1.18.1.jar:1.18.1]
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540) [jersey-servlet-1.18.1.jar:1.18.1]
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715) [jersey-servlet-1.18.1.jar:1.18.1]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [servlet-api-3.1.jar:3.1.0]
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
    at org.killbill.billing.server.security.TenantFilter.doFilter(TenantFilter.java:107) [classes/:na]
    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
    at org.killbill.billing.server.filters.ResponseCorsFilter.doFilter(ResponseCorsFilter.java:66) [classes/:na]
    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.apache.shiro.guice.web.SimpleFilterChain.doFilter(SimpleFilterChain.java:44) [shiro-guice-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.guice.web.SimpleFilterChain.doFilter(SimpleFilterChain.java:41) [shiro-guice-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3]
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3]
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3]
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) [jetty-security-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.Server.handle(Server.java:497) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:313) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:626) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:546) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]
Caused by: org.killbill.commons.locker.LockFailedException: null
    at org.killbill.commons.locker.mysql.MySqlGlobalLocker.lock(MySqlGlobalLocker.java:111) ~[killbill-locker-0.2.33.jar:na]
    at org.killbill.commons.locker.mysql.MySqlGlobalLocker.lockWithNumberOfTries(MySqlGlobalLocker.java:57) ~[killbill-locker-0.2.33.jar:na]
    at org.killbill.billing.payment.core.ProcessorBase$WithAccountLock.processAccountWithLock(ProcessorBase.java:218) ~[killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:208) ~[killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.core.ProcessorBase$CallableWithAccountLock.call(ProcessorBase.java:192) ~[killbill-payment-0.13.5.jar:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_20]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_20]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_20]
    ... 1 common frames omitted
2015-04-01 18:07:16,697 [qtp1174290147-1183] WARN  o.k.b.j.mappers.ExceptionMapperBase - Internal error
org.killbill.billing.payment.api.PaymentApiException: Internal payment error : Failed to lock account ef15038f-dc88-4e0c-9308-c49f37959d87
    at org.killbill.billing.payment.core.ProcessorBase.dispatchWithExceptionHandling(ProcessorBase.java:244) ~[killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.core.PaymentMethodProcessor.addPaymentMethod(PaymentMethodProcessor.java:104) ~[killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.payment.api.DefaultPaymentApi.addPaymentMethod(DefaultPaymentApi.java:375) ~[killbill-payment-0.13.5.jar:na]
    at org.killbill.billing.util.glue.KillbillApiAopModule$ProfilingMethodInterceptor$1.execute(KillbillApiAopModule.java:52) ~[killbill-util-0.13.5.jar:na]
    at org.killbill.commons.profiling.Profiling.executeWithProfiling(Profiling.java:33) ~[killbill-concurrent-0.2.33.jar:na]
    at org.killbill.billing.util.glue.KillbillApiAopModule$ProfilingMethodInterceptor.invoke(KillbillApiAopModule.java:49) ~[killbill-util-0.13.5.jar:na]
    at org.killbill.billing.jaxrs.resources.AccountResource.createPaymentMethod(AccountResource.java:614) ~[killbill-jaxrs-0.13.5.jar:na]
    at com.palominolabs.metrics.guice.TimedInterceptor.invoke(TimedInterceptor.java:47) ~[metrics-guice-3.0.2.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_20]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_20]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_20]
    at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_20]
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) ~[jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) ~[jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) ~[jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) ~[jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) ~[jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) ~[jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) [jersey-server-1.18.1.jar:1.18.1]
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) [jersey-servlet-1.18.1.jar:1.18.1]
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540) [jersey-servlet-1.18.1.jar:1.18.1]
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715) [jersey-servlet-1.18.1.jar:1.18.1]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [servlet-api-3.1.jar:3.1.0]
    at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
    at org.killbill.billing.server.security.TenantFilter.doFilter(TenantFilter.java:107) [classes/:na]
    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
    at org.killbill.billing.server.filters.ResponseCorsFilter.doFilter(ResponseCorsFilter.java:66) [classes/:na]
    at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
    at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.apache.shiro.guice.web.SimpleFilterChain.doFilter(SimpleFilterChain.java:44) [shiro-guice-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.guice.web.SimpleFilterChain.doFilter(SimpleFilterChain.java:41) [shiro-guice-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3]
    at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3]
    at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.2.3.jar:1.2.3]
    at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3]
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577) [jetty-security-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.Server.handle(Server.java:497) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:313) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248) [jetty-server-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:626) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:546) [jetty-util-9.2.6.v20141205.jar:9.2.6.v20141205]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_20]
2015-04-01 18:07:16,698 [qtp1174290147-1183] INFO  c.s.j.a.c.filter.LoggingFilter - 29 * Server out-bound response
29 < 500
29 < Content-Type: application/json
29 <



I am using killbill server 0.13.5 and the killbill java client 0.3.1.

The killbill account id I'm trying to add a payment method for is 90f2af9e-69bb-49bf-990a-5f668c09450c and the external id for the user on my rpc server is
ef15038f-dc88-4e0c-9308-c49f37959d87

Any ideas what may be happening? Is it supposed to be attempting to lock by the external id?

stephane brossier

unread,
Apr 1, 2015, 8:02:06 PM4/1/15
to Khanh, killbill...@googlegroups.com
Maybe the end result key (ACCOUNT_FOR_INVOICE_PAYMENTS-ef15038f-dc88-4e0c-9308-c49f37959d87) ends up being too long or contains characters that mysql does not support? Could you try the same thing with an small / simple external key (e.g 'foo') to see if the problem disappears?


--
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 http://groups.google.com/group/killbilling-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/killbilling-users/871a8649-7b29-4641-a971-d4258a2a2046%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Khanh

unread,
Apr 2, 2015, 12:38:33 AM4/2/15
to killbill...@googlegroups.com, khanh....@gmail.com
Hi Stephane,

A payment method is successfully created if I use an email address for the externalid instead of a uuid string. I did another test by appending 30 more characters to the email address that worked previously and it failed with the same error as above so it appears to be a char length issue. Is this a bug? Thanks!

Pierre-Alexandre Meyer

unread,
Apr 2, 2015, 8:31:54 AM4/2/15
to Khanh, killbill...@googlegroups.com
Which version of MySQL are you running? It looks like the behavior changed in 5.7.5:

MySQL 5.7.5 and later enforces a maximum length on lock names of 64 characters. Previously, no limit was enforced.


For more options, visit https://groups.google.com/d/optout.



--
Pierre

Khanh

unread,
Apr 2, 2015, 11:28:56 AM4/2/15
to killbill...@googlegroups.com, khanh....@gmail.com
Hi Pierre,

Thats the issue, I'm using 5.7.5. The lock string generated using a uuid is 65 characters. Is it possible to have the generated lock string shortened? I could see this being a problem moving forward because external systems would have to take the char length of external id's into consideration when creating kb accounts. KB accounts can be created with external id's with a length 36 without issues, but adding a payment method requires an external id length of 35 or less based on this example.

-Khanh

Pierre-Alexandre Meyer

unread,
Apr 2, 2015, 4:51:14 PM4/2/15
to Khanh, killbill...@googlegroups.com
Thanks for double checking.

I've created https://github.com/killbill/killbill/issues/309 for tracking, I don't think changing it should be an issue.


For more options, visit https://groups.google.com/d/optout.



--
Pierre
Reply all
Reply to author
Forward
0 new messages