From 4680c3d21fe7d6bf2b049f4d0b169e512acbd0a6 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Mon, 6 Feb 2017 18:00:56 +0530 Subject: [PATCH 001/112] Change client correlator mandatory --- dep-sandbox/deploy/config.yml | 4 +- dep-sandbox/log/sandbox_service.log | 1407 +++++++++++++++++ .../credit/PatialRefundRequestHandler.java | 2 +- log/sandbox_service.log | 204 +++ 4 files changed, 1614 insertions(+), 3 deletions(-) create mode 100644 dep-sandbox/log/sandbox_service.log create mode 100644 log/sandbox_service.log diff --git a/dep-sandbox/deploy/config.yml b/dep-sandbox/deploy/config.yml index ee9303be..9e42fcc9 100644 --- a/dep-sandbox/deploy/config.yml +++ b/dep-sandbox/deploy/config.yml @@ -1,8 +1,8 @@ database: driverClass: com.mysql.cj.jdbc.Driver user: root - password: - url: jdbc:mysql:///?useSSL=false + password: root + url: jdbc:mysql://localhost/sandbox?useSSL=false server: applicationConnectors: - type: http diff --git a/dep-sandbox/log/sandbox_service.log b/dep-sandbox/log/sandbox_service.log new file mode 100644 index 00000000..2d70b6b1 --- /dev/null +++ b/dep-sandbox/log/sandbox_service.log @@ -0,0 +1,1407 @@ +INFO [2017-02-06 04:39:09,915] org.eclipse.jetty.util.log: Logging initialized @1076ms +INFO [2017-02-06 04:39:09,997] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 04:39:10,175] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 04:39:10,181] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 04:39:10,191] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 04:39:10,250] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 04:39:10,250] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 04:39:10,252] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-06 04:39:11,101] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 04:39:11,104] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2ab0702e{/,null,AVAILABLE} +INFO [2017-02-06 04:39:11,109] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 04:39:11,109] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 04:39:11,117] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,AVAILABLE} +INFO [2017-02-06 04:39:11,158] org.eclipse.jetty.server.ServerConnector: Started application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 04:39:11,159] org.eclipse.jetty.server.ServerConnector: Started admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 04:39:11,160] org.eclipse.jetty.server.Server: Started @2323ms +DEBUG [2017-02-06 04:51:04,682] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 1 0 0 +DEBUG [2017-02-06 04:51:04,684] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 04:51:04,684] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 04:51:04,689] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 04:51:04,809] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 04:51:04,813] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 04:52:01,577] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 04:52:01,577] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-06 04:52:01,578] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 04:52:01,580] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-06 04:52:01,626] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-06 04:57:40,577] com.wso2telco.services.dep.sandbox.service.ProvisionService: /{msisdn}/list/active invoked :MSISDNnullnull +DEBUG [2017-02-06 04:57:40,577] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PROVISIONING FACTORY +DEBUG [2017-02-06 04:57:40,577] com.wso2telco.services.dep.sandbox.servicefactory.provisioning.ProvisioningServiceFactory: ###PROVISION### LOADING LIST OF PROVISIONED SERVICES +DEBUG [2017-02-06 04:57:40,580] com.wso2telco.services.dep.sandbox.servicefactory.provisioning.ListActiveProvisionedServices: Sandbox user : sandbox +DEBUG [2017-02-06 04:57:40,582] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 04:57:40,585] com.wso2telco.services.dep.sandbox.servicefactory.provisioning.ListActiveProvisionedServices: ###PROVISION### Error in Validation : com.wso2telco.dep.oneapivalidation.exceptions.CustomException: SVC0004 +ERROR [2017-02-06 04:57:40,587] com.wso2telco.services.dep.sandbox.service.ProvisionService: LIST ACTIVE PROVISIONED SERVICESE ERROR : +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.getNotWhitelistedNumbers(AbstractRequestHandler.java:95) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:71) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.ProvisionService.getActiveProvisionedServices(ProvisionService.java:123) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:364) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 04:59:32,365] com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService: /service invoked : +DEBUG [2017-02-06 04:59:32,366] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PROVISIONING CONFIGURATION FACTORY +DEBUG [2017-02-06 04:59:32,366] com.wso2telco.services.dep.sandbox.servicefactory.provisionConfig.ProvisioningConfigServiceFactory: ###PROVISIONCONFIG### LOADING SERVICES FOR USER +DEBUG [2017-02-06 04:59:32,368] com.wso2telco.services.dep.sandbox.servicefactory.provisionConfig.RetieveServicesUser: Sandbox user : sandbox +DEBUG [2017-02-06 04:59:32,377] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 04:59:32,378] com.wso2telco.services.dep.sandbox.servicefactory.provisionConfig.RetieveServicesUser: ###PROVISION### Error in Process : java.lang.NullPointerException +DEBUG [2017-02-06 04:59:32,378] com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService: QUERY AVAILVABLE SERVICE FOR USER RESPONSE : OutboundJaxrsResponse{status=400, reason=Bad Request, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-06 05:01:49,128] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 0 0 0 +DEBUG [2017-02-06 05:01:49,128] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:01:49,128] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:01:49,128] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:01:49,131] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:01:49,132] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:02:11,894] com.wso2telco.services.dep.sandbox.service.UserService: 1 10.0 10.0 0 0 0 +DEBUG [2017-02-06 05:02:11,894] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:02:11,894] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:02:11,894] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:02:11,896] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:02:11,918] com.wso2telco.services.dep.sandbox.util.CommonUtil: Error in Parsing MSISDN +! com.wso2telco.core.msisdnvalidator.InvalidMSISDNException: null +! at com.wso2telco.core.msisdnvalidator.MSISDNUtil.parse(MSISDNUtil.java:31) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.util.CommonUtil.extractNumberFromMsisdn(CommonUtil.java:85) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:82) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-06 05:02:11,919] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! com.wso2telco.core.msisdnvalidator.InvalidMSISDNException: null +! at com.wso2telco.core.msisdnvalidator.MSISDNUtil.parse(MSISDNUtil.java:31) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.util.CommonUtil.extractNumberFromMsisdn(CommonUtil.java:85) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:82) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:03:07,376] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 1 0 0 +DEBUG [2017-02-06 05:03:07,376] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:03:07,376] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:03:07,376] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:03:07,378] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:03:07,379] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:03:20,152] com.wso2telco.services.dep.sandbox.service.UserService: 1 0.0 0.0 1 0 0 +DEBUG [2017-02-06 05:03:20,152] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:03:20,152] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:03:20,152] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:03:20,154] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:03:20,155] com.wso2telco.services.dep.sandbox.util.CommonUtil: Error in Parsing MSISDN +! com.wso2telco.core.msisdnvalidator.InvalidMSISDNException: null +! at com.wso2telco.core.msisdnvalidator.MSISDNUtil.parse(MSISDNUtil.java:31) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.util.CommonUtil.extractNumberFromMsisdn(CommonUtil.java:85) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:82) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-06 05:03:20,156] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! com.wso2telco.core.msisdnvalidator.InvalidMSISDNException: null +! at com.wso2telco.core.msisdnvalidator.MSISDNUtil.parse(MSISDNUtil.java:31) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.util.CommonUtil.extractNumberFromMsisdn(CommonUtil.java:85) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:82) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:03:25,630] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 1 0 0 +DEBUG [2017-02-06 05:03:25,630] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:03:25,630] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:03:25,630] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:03:25,633] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:03:25,634] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:11,143] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 0.0 1 0 0 +DEBUG [2017-02-06 05:06:11,143] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:11,143] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:11,143] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:11,146] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:11,146] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:13,200] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 0.0 1 0 0 +DEBUG [2017-02-06 05:06:13,200] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:13,200] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:13,200] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:13,202] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:13,203] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:14,035] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 0.0 1 0 0 +DEBUG [2017-02-06 05:06:14,035] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:14,035] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:14,035] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:14,038] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:14,038] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:17,510] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 10.0 1 0 0 +DEBUG [2017-02-06 05:06:17,510] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:17,510] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:17,510] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:17,513] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:17,513] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:18,340] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 10.0 1 0 0 +DEBUG [2017-02-06 05:06:18,340] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:18,340] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:18,340] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:18,342] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:18,344] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:18,783] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 10.0 1 0 0 +DEBUG [2017-02-06 05:06:18,783] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:18,783] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:18,783] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:18,785] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:18,786] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:07:19,539] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 1 0 0 +DEBUG [2017-02-06 05:07:19,540] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:07:19,540] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:07:19,540] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:07:19,542] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:07:19,543] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:20:18,726] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:20:18,726] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-06 05:20:18,726] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:20:18,727] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-06 05:20:18,736] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-06 05:20:42,111] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:20:42,111] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API SERVICE CALL TYPES +DEBUG [2017-02-06 05:20:42,115] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPIServicecallHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:20:42,118] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:20:42,224] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPIServicecallHandler: ###USER### No any service call is provided for given api LOCATION +DEBUG [2017-02-06 05:20:42,224] com.wso2telco.services.dep.sandbox.service.UserService: GET API SERVICE CALLS RESPONSE : OutboundJaxrsResponse{status=400, reason=Bad Request, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-06 05:25:20,786] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 0 0 0 +DEBUG [2017-02-06 05:25:20,786] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:25:20,786] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:25:20,786] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:25:20,787] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:25:20,788] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:25:35,777] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 0 0 0 +DEBUG [2017-02-06 05:25:35,777] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:25:35,777] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:25:35,777] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:25:35,778] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:25:35,779] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-06 05:28:34,540] org.eclipse.jetty.server.ServerConnector: Stopped application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 05:28:34,540] org.eclipse.jetty.server.ServerConnector: Stopped admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 05:28:34,541] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,UNAVAILABLE} +INFO [2017-02-06 05:28:34,543] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2ab0702e{/,null,UNAVAILABLE} +INFO [2017-02-06 06:36:04,307] org.eclipse.jetty.util.log: Logging initialized @1016ms +INFO [2017-02-06 06:36:04,413] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 06:36:04,641] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 06:36:04,649] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 06:36:04,662] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 06:36:04,704] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 06:36:04,704] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 06:36:04,707] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-06 06:36:05,400] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 06:36:05,403] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2ab0702e{/,null,AVAILABLE} +INFO [2017-02-06 06:36:05,408] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 06:36:05,408] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 06:36:05,413] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,AVAILABLE} +INFO [2017-02-06 06:36:05,419] org.eclipse.jetty.server.ServerConnector: Started application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 06:36:05,420] org.eclipse.jetty.server.ServerConnector: Started admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 06:36:05,420] org.eclipse.jetty.server.Server: Started @2132ms +DEBUG [2017-02-06 06:37:49,973] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 06:37:49,973] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-06 06:37:49,978] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : null +DEBUG [2017-02-06 06:37:49,978] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: AuthToken: null +DEBUG [2017-02-06 06:37:51,967] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : null +DEBUG [2017-02-06 06:37:51,990] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +INFO [2017-02-06 06:38:40,221] org.eclipse.jetty.server.ServerConnector: Stopped application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 06:38:40,223] org.eclipse.jetty.server.ServerConnector: Stopped admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 06:38:40,225] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,UNAVAILABLE} +INFO [2017-02-06 06:38:40,227] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2ab0702e{/,null,UNAVAILABLE} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index e419dd92..4910a83f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -95,7 +95,7 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti amount), new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, "msisdn", msisdn), - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "clientCorrelator", + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "reasonForRefund", reasonForRefund), diff --git a/log/sandbox_service.log b/log/sandbox_service.log new file mode 100644 index 00000000..4eb43248 --- /dev/null +++ b/log/sandbox_service.log @@ -0,0 +1,204 @@ +INFO [2017-02-06 08:36:25,704] org.eclipse.jetty.util.log: Logging initialized @2198ms +INFO [2017-02-06 08:36:25,830] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 08:36:26,086] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 08:36:26,097] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 08:36:26,117] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 08:36:26,163] org.eclipse.jetty.setuid.SetUIDListener: Opened application@213deac2{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:36:26,164] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:36:26,168] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-06 08:36:27,069] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 08:36:27,072] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@5a6d30e2{/,null,AVAILABLE} +INFO [2017-02-06 08:36:27,079] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 08:36:27,079] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 08:36:27,086] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3cd9aa64{/,null,AVAILABLE} +INFO [2017-02-06 08:36:27,091] org.eclipse.jetty.server.ServerConnector: Started application@213deac2{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:36:27,092] org.eclipse.jetty.server.ServerConnector: Started admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:36:27,092] org.eclipse.jetty.server.Server: Started @3589ms +INFO [2017-02-06 08:36:35,687] org.eclipse.jetty.server.ServerConnector: Stopped application@213deac2{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:36:35,688] org.eclipse.jetty.server.ServerConnector: Stopped admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:36:35,690] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3cd9aa64{/,null,UNAVAILABLE} +INFO [2017-02-06 08:36:35,692] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a6d30e2{/,null,UNAVAILABLE} +INFO [2017-02-06 08:36:48,537] org.eclipse.jetty.util.log: Logging initialized @2655ms +INFO [2017-02-06 08:37:28,325] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 08:37:59,994] org.eclipse.jetty.util.log: Logging initialized @2460ms +INFO [2017-02-06 08:38:00,163] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 08:38:00,504] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 08:38:00,513] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 08:38:00,534] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 08:38:00,582] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:38:00,583] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:38:00,592] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-06 08:38:01,738] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 08:38:01,744] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@24a0c58b{/,null,AVAILABLE} +INFO [2017-02-06 08:38:01,753] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 08:38:01,753] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 08:38:01,761] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1118d539{/,null,AVAILABLE} +INFO [2017-02-06 08:38:01,777] org.eclipse.jetty.server.ServerConnector: Started application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:38:01,780] org.eclipse.jetty.server.ServerConnector: Started admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:38:01,783] org.eclipse.jetty.server.Server: Started @4252ms +DEBUG [2017-02-06 08:39:02,358] com.wso2telco.services.dep.sandbox.service.CreditService: ###CREDIT### /{msisdn}/apply invoked : msisdn - admin +DEBUG [2017-02-06 08:39:02,358] com.wso2telco.services.dep.sandbox.service.CreditService: com.wso2telco.services.dep.sandbox.dao.model.custom.CreditRequestBean@b5bb258 +DEBUG [2017-02-06 08:39:02,360] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING CREDIT CONFIGURATION FACTORY +DEBUG [2017-02-06 08:39:02,361] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditServiceFactory: ###CREDIT### LOADING CREDIT APPLY SERVICE +DEBUG [2017-02-06 08:39:02,375] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: Sandbox user : admin +ERROR [2017-02-06 08:39:02,523] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: ###CREDIT### Error in Validation : com.wso2telco.dep.oneapivalidation.exceptions.CustomException: SVC0002 +DEBUG [2017-02-06 08:39:02,539] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: Location parameters are empty +INFO [2017-02-06 08:39:29,778] org.eclipse.jetty.server.ServerConnector: Stopped application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:39:29,779] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:39:29,781] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1118d539{/,null,UNAVAILABLE} +INFO [2017-02-06 08:39:29,784] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24a0c58b{/,null,UNAVAILABLE} +INFO [2017-02-06 08:39:34,855] org.eclipse.jetty.util.log: Logging initialized @2496ms +INFO [2017-02-06 08:39:35,030] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 08:39:35,424] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 08:39:35,434] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 08:39:35,454] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 08:39:35,509] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:39:35,509] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:39:35,513] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-06 08:39:36,479] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 08:39:36,484] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@24134cbc{/,null,AVAILABLE} +INFO [2017-02-06 08:39:36,492] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 08:39:36,492] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 08:39:36,501] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@34c7232c{/,null,AVAILABLE} +INFO [2017-02-06 08:39:36,508] org.eclipse.jetty.server.ServerConnector: Started application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:39:36,509] org.eclipse.jetty.server.ServerConnector: Started admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:39:36,510] org.eclipse.jetty.server.Server: Started @4164ms +INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:41:23,595] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@34c7232c{/,null,UNAVAILABLE} +INFO [2017-02-06 08:41:23,598] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24134cbc{/,null,UNAVAILABLE} From 2f25b401b5bd66b76c58d922fedfefc83f948cc2 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 09:57:24 +0530 Subject: [PATCH 002/112] Paymrnt DAO layer --- dep-sandbox/deploy/config.yml | 2 +- dep-sandbox/log/sandbox_service.log | 66 +++++++++ .../services/dep/sandbox/dao/PaymentDAO.java | 29 ++++ .../dao/hibernate/HibernatePaymentDAO.java | 134 ++++++++++++++++++ .../dep/sandbox/service/Application.java | 1 + .../dep/sandbox/service/PaymentService.java | 81 +++++++++++ 6 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java diff --git a/dep-sandbox/deploy/config.yml b/dep-sandbox/deploy/config.yml index 9e42fcc9..9c8c72fb 100644 --- a/dep-sandbox/deploy/config.yml +++ b/dep-sandbox/deploy/config.yml @@ -1,7 +1,7 @@ database: driverClass: com.mysql.cj.jdbc.Driver user: root - password: root + password: secret url: jdbc:mysql://localhost/sandbox?useSSL=false server: applicationConnectors: diff --git a/dep-sandbox/log/sandbox_service.log b/dep-sandbox/log/sandbox_service.log index 2d70b6b1..56132e77 100644 --- a/dep-sandbox/log/sandbox_service.log +++ b/dep-sandbox/log/sandbox_service.log @@ -1405,3 +1405,69 @@ INFO [2017-02-06 06:38:40,221] org.eclipse.jetty.server.ServerConnector: Stoppe INFO [2017-02-06 06:38:40,223] org.eclipse.jetty.server.ServerConnector: Stopped admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} INFO [2017-02-06 06:38:40,225] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,UNAVAILABLE} INFO [2017-02-06 06:38:40,227] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2ab0702e{/,null,UNAVAILABLE} +INFO [2017-02-07 03:51:51,825] org.eclipse.jetty.util.log: Logging initialized @2819ms +INFO [2017-02-07 03:51:51,945] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 03:51:52,173] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 03:51:52,180] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 03:51:52,208] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 03:51:52,330] org.eclipse.jetty.setuid.SetUIDListener: Opened application@e041f0c{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 03:51:52,332] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a175569{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 03:51:52,336] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-07 03:51:53,321] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 03:51:53,325] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@102efc59{/,null,AVAILABLE} +INFO [2017-02-07 03:51:53,331] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 03:51:53,331] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 03:51:53,337] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@6b8280e6{/,null,AVAILABLE} +INFO [2017-02-07 03:51:53,387] org.eclipse.jetty.server.ServerConnector: Started application@e041f0c{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 03:51:53,387] org.eclipse.jetty.server.ServerConnector: Started admin@6a175569{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 03:51:53,387] org.eclipse.jetty.server.Server: Started @4383ms +DEBUG [2017-02-07 03:52:18,675] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-07 03:52:18,676] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-07 03:52:18,683] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-07 03:52:18,844] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-07 03:52:18,866] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java new file mode 100644 index 00000000..e3553043 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.dao; + +import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; +import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; + +public interface PaymentDAO { + + public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) + throws Exception; + public Integer saveAttributeValue(AttributeValues valueObj) throws Exception; + public AttributeValues getResponse(Integer id) throws Exception; + public boolean saveManageNumbers(ManageNumber manageNumber) throws Exception; +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java new file mode 100644 index 00000000..45133d2f --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.dao.hibernate; + +import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; +import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; +import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.LogFactory; +import org.hibernate.Session; +import org.hibernate.query.Query; + +import javax.persistence.NoResultException; + +public class HibernatePaymentDAO extends AbstractDAO implements PaymentDAO { + + { + LOG = LogFactory.getLog(PaymentDAO.class); + } + + @Override + public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) + throws Exception { + Session session = getSession(); + AttributeValues resultSet = null; + + StringBuilder hql = new StringBuilder(); + + hql.append("SELECT "); + hql.append("val "); + hql.append("FROM "); + hql.append("AttributeValues as val, "); + hql.append("APIServiceCalls AS calls, "); + hql.append("APITypes AS api, "); + hql.append("AttributeDistribution AS dist, "); + hql.append("Attributes AS att, "); + hql.append("ManageNumber AS number "); + hql.append("WHERE "); + hql.append("api.id = calls.apiType.id "); + hql.append("AND calls.apiServiceCallId = dist.serviceCall.apiServiceCallId "); + hql.append("AND dist.distributionId = val.attributeDistribution.distributionId "); + hql.append("AND att.attributeId = dist.attribute.attributeId "); + hql.append("AND api.apiname =:apiName "); + hql.append("AND val.tobject =:tableName "); + hql.append("AND val.value =:attributeValue "); + hql.append("AND att.attributeName =:attributeName "); + + try { + Query query = session.createQuery(hql.toString()); + query.setParameter("apiName", RequestType.PAYMENT.toString()); + query.setParameter("tableName", tableName); + query.setParameter("attributeValue", value); + query.setParameter("attributeName", attributeName); + resultSet = (AttributeValues) query.uniqueResult(); + + } catch (NoResultException e) { + return null; + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in Credit Apply Service ", ex); + throw ex; + } + return resultSet; + } + + @Override + public Integer saveAttributeValue(AttributeValues valueObj) throws Exception { + Integer values; + try { + saveOrUpdate(valueObj); + values = valueObj.getAttributeValueId(); + } catch (Exception e) { + LOG.error("saveAttributeValue", e); + throw e; + } + return values; + } + + @Override + public AttributeValues getResponse(Integer id) throws Exception { + Session session = getSession(); + AttributeValues resultSet = null; + + StringBuilder hql = new StringBuilder(); + + hql.append("SELECT "); + hql.append("val "); + hql.append("FROM "); + hql.append("AttributeValues as val "); + hql.append("WHERE "); + hql.append("val.attributevalueId =:id "); + + try { + Query query = session.createQuery(hql.toString()); + query.setParameter("id", id); + + resultSet = (AttributeValues) query.uniqueResult(); + + } catch (NoResultException e) { + return null; + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in Make Payment Service ", ex); + throw ex; + } + return resultSet; + } + + @Override + public boolean saveManageNumbers(ManageNumber manageNumber) throws Exception { + try { + saveOrUpdate(manageNumber); + } catch (NoResultException e) { + + return false; + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in Payment Service ", ex); + throw ex; + } + return true; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index 48e63127..b9acba65 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -38,6 +38,7 @@ protected List getRestFulComponents() { listOfObject.add(new CreditService()); listOfObject.add(new WalletService()); listOfObject.add(new WalletConfigurationService()); + listOfObject.add(new PaymentService()); return listOfObject; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java new file mode 100644 index 00000000..cb7cefe7 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.service; + +import com.wordnik.swagger.annotations.*; +import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean; +import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestWrapperDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.exception.SandboxException; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("payment/{v1}") +@Produces({MediaType.APPLICATION_JSON}) +@Api(value = "payment/{v1}", description = "Rest Service for Payment API") +public class PaymentService { + + Log LOG = LogFactory.getLog(PaymentService.class); + + @POST + @Path("/transaction/{endUserId}/payment") + @ApiOperation(value = "makePaymentService", notes = "make payment service", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) + public Response makePayment( + @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, + MakePaymentRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { + LOG.debug("###PAYMENT### /{endUserId} invoked : endUserId - " + endUserId); + if (makePaymentRequestBean != null) { + LOG.debug(makePaymentRequestBean); + } + MakePaymentRequestWrapperDTO requestDTO = new MakePaymentRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setMakePaymentRequestBean(makePaymentRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Make Payment SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + } + +} From 18cb90c33be35d54e97439fa588790fa2b3e9ddb Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 11:48:57 +0530 Subject: [PATCH 003/112] make payment validations --- .../payment/PaymentRequestHandler.java | 20 +++++++++++++++++++ .../payment/PaymentResponseWrapper.java | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java new file mode 100644 index 00000000..ece606d5 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +public class PaymentRequestHandler { +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java new file mode 100644 index 00000000..ad84aa09 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +public class PaymentResponseWrapper { +} From 9b930c92d1529ccc2164d45ca28d1d12cd983f71 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 15:17:53 +0530 Subject: [PATCH 004/112] WIP charge user --- dep-sandbox/log/sandbox_service.log | 209 + .../services/dep/sandbox/dao/DaoFactory.java | 6 +- .../services/dep/sandbox/dao/PaymentDAO.java | 2 + .../dao/hibernate/HibernateFactory.java | 4 + .../dao/hibernate/HibernatePaymentDAO.java | 53 + .../dao/model/custom/ChargingMetaData.java | 11 + .../dep/sandbox/service/PaymentService.java | 2 +- .../payment/PaymentRequestFactory.java | 37 +- .../payment/PaymentRequestHandler.java | 492 +- .../payment/PaymentResponseWrapper.java | 27 +- .../servicefactory/wallet/AttributeName.java | 3 +- .../dep/sandbox/util/ServiceName.java | 2 +- log/sandbox_service.log | 5194 +++++++++++++++++ 13 files changed, 6032 insertions(+), 10 deletions(-) diff --git a/dep-sandbox/log/sandbox_service.log b/dep-sandbox/log/sandbox_service.log index 56132e77..a0d0d8f7 100644 --- a/dep-sandbox/log/sandbox_service.log +++ b/dep-sandbox/log/sandbox_service.log @@ -1471,3 +1471,212 @@ DEBUG [2017-02-07 03:52:18,676] com.wso2telco.services.dep.sandbox.servicefactor DEBUG [2017-02-07 03:52:18,683] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox DEBUG [2017-02-07 03:52:18,844] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox DEBUG [2017-02-07 03:52:18,866] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-07 04:50:38,661] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-07 04:50:38,663] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-07 04:50:38,663] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-07 04:50:38,667] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-07 04:50:38,669] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +INFO [2017-02-07 04:53:23,884] org.eclipse.jetty.server.ServerConnector: Stopped application@e041f0c{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 04:53:23,888] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a175569{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 04:53:23,888] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@6b8280e6{/,null,UNAVAILABLE} +INFO [2017-02-07 04:53:23,892] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@102efc59{/,null,UNAVAILABLE} +INFO [2017-02-07 04:54:20,648] org.eclipse.jetty.util.log: Logging initialized @1166ms +INFO [2017-02-07 04:54:20,754] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 04:54:21,018] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 04:54:21,025] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 04:54:21,039] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 04:54:21,085] org.eclipse.jetty.setuid.SetUIDListener: Opened application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 04:54:21,086] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 04:54:21,088] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-07 04:54:21,919] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 04:54:21,923] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1daf3b44{/,null,AVAILABLE} +INFO [2017-02-07 04:54:21,929] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 04:54:21,929] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 04:54:21,937] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@64f1fd08{/,null,AVAILABLE} +INFO [2017-02-07 04:54:21,945] org.eclipse.jetty.server.ServerConnector: Started application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 04:54:21,946] org.eclipse.jetty.server.ServerConnector: Started admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 04:54:21,946] org.eclipse.jetty.server.Server: Started @2466ms +DEBUG [2017-02-07 04:54:41,754] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-07 04:54:41,755] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-07 04:54:41,761] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-07 04:54:41,869] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-07 04:54:41,887] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +INFO [2017-02-07 06:46:01,888] org.eclipse.jetty.server.ServerConnector: Stopped application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 06:46:01,890] org.eclipse.jetty.server.ServerConnector: Stopped admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 06:46:01,892] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@64f1fd08{/,null,UNAVAILABLE} +INFO [2017-02-07 06:46:01,895] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1daf3b44{/,null,UNAVAILABLE} +INFO [2017-02-07 06:49:32,420] org.eclipse.jetty.util.log: Logging initialized @1178ms +INFO [2017-02-07 06:49:32,532] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 06:49:32,804] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 06:49:32,812] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 06:49:32,825] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 06:49:32,879] org.eclipse.jetty.setuid.SetUIDListener: Opened application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 06:49:32,880] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 06:49:32,884] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-07 06:49:33,727] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 06:49:33,731] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1daf3b44{/,null,AVAILABLE} +INFO [2017-02-07 06:49:33,737] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 06:49:33,737] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 06:49:33,743] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@64f1fd08{/,null,AVAILABLE} +INFO [2017-02-07 06:49:33,752] org.eclipse.jetty.server.ServerConnector: Started application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 06:49:33,753] org.eclipse.jetty.server.ServerConnector: Started admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 06:49:33,754] org.eclipse.jetty.server.Server: Started @2514ms +DEBUG [2017-02-07 06:56:35,866] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 06:56:35,866] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@20b8df82 +DEBUG [2017-02-07 06:56:35,867] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +ERROR [2017-02-07 06:56:35,872] com.wso2telco.services.dep.sandbox.service.PaymentService: Make Payment SERVICE ERROR +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:03:57,617] org.eclipse.jetty.server.ServerConnector: Stopped application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:03:57,618] org.eclipse.jetty.server.ServerConnector: Stopped admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:03:57,619] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@64f1fd08{/,null,UNAVAILABLE} +INFO [2017-02-07 07:03:57,623] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1daf3b44{/,null,UNAVAILABLE} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java index 52a0a091..c4bbdd7b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java @@ -35,7 +35,11 @@ public static NumberDAO getNumberDAO() { public static WalletDAO getWalletDAO(){ return new HibernateFactory().getHibernateWalletDAO(); } - + + public static PaymentDAO getPaymentDAO(){ + return new HibernateFactory().getHibernatePaymentDAO(); + } + public static LoggingDAO getLoggingDAO(){ return new HibernateFactory().getHibernateLoggingDao(); } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java index e3553043..539af154 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java @@ -21,6 +21,8 @@ public interface PaymentDAO { + public AttributeValues getAttributeValue(String endUserId, String serviceCall, String attribute, Integer userId) + throws Exception; public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) throws Exception; public Integer saveAttributeValue(AttributeValues valueObj) throws Exception; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java index 19fce722..b10d5bda 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java @@ -33,6 +33,10 @@ public HibernateNumberDAO getHibernateNumberDAO() { public HibernateWalletDAO getHibernateWalletDAO() { return new HibernateWalletDAO(); } + + public HibernatePaymentDAO getHibernatePaymentDAO() { + return new HibernatePaymentDAO(); + } public HibernateLoggingDao getHibernateLoggingDao() { return new HibernateLoggingDao(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java index 45133d2f..5504b0d8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java @@ -20,6 +20,7 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; import com.wso2telco.services.dep.sandbox.util.RequestType; +import com.wso2telco.services.dep.sandbox.util.TableName; import org.apache.commons.logging.LogFactory; import org.hibernate.Session; import org.hibernate.query.Query; @@ -32,6 +33,58 @@ public class HibernatePaymentDAO extends AbstractDAO implements PaymentDAO { LOG = LogFactory.getLog(PaymentDAO.class); } + @Override + public AttributeValues getAttributeValue(String endUserId, String serviceCall, String attribute, Integer userId) + throws Exception { + + Session session = getSession(); + AttributeValues resultSet = null; + + StringBuilder hql = new StringBuilder(); + + hql.append("SELECT "); + hql.append("val "); + hql.append("FROM "); + hql.append("AttributeValues as val, "); + hql.append("APIServiceCalls AS calls, "); + hql.append("APITypes AS api, "); + hql.append("AttributeDistribution AS dist, "); + hql.append("Attributes AS att, "); + hql.append("ManageNumber AS number "); + hql.append("WHERE "); + hql.append("api.id = calls.apiType.id "); + hql.append("AND calls.apiServiceCallId = dist.serviceCall.apiServiceCallId "); + hql.append("AND dist.distributionId = val.attributeDistribution.distributionId "); + hql.append("AND att.attributeId = dist.attribute.attributeId "); + hql.append("AND number.id = val.ownerdid "); + hql.append("AND api.apiname =:apiName "); + hql.append("AND calls.serviceName =:serviceName "); + hql.append("AND val.tobject =:tableName "); + hql.append("AND number.Number =:number "); + hql.append("AND att.attributeName =:attName "); + hql.append("AND number.user.id =:userId "); + + try { + Query query = session.createQuery(hql.toString()); + query.setParameter("apiName", RequestType.PAYMENT.toString()); + query.setParameter("serviceName", serviceCall); + query.setParameter("number", endUserId); + query.setParameter("tableName", TableName.NUMBERS.toString().toLowerCase()); + query.setParameter("attName", attribute); + query.setParameter("userId", userId); + resultSet = (AttributeValues) query.uniqueResult(); + + } catch (NoResultException e) { + return null; + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in Make Payment Service ", ex); + throw ex; + } + return resultSet; + } + + + @Override public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) throws Exception { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java index 7ca25b0f..3a43442b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java @@ -27,6 +27,8 @@ public class ChargingMetaData { private String channel; + private String taxAmount; + public String getOnBehalfOf() { return onBehalfOf; } @@ -51,6 +53,14 @@ public void setChannel(String channel) { this.channel = channel; } + public String getTaxAmount() { + return taxAmount; + } + + public void setTaxAmount(String taxAmount) { + this.taxAmount = taxAmount; + } + public String toString() { StringBuilder builder = new StringBuilder(); @@ -61,4 +71,5 @@ public String toString() { return builder.toString(); } + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index cb7cefe7..ed0932b4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -45,7 +45,7 @@ public class PaymentService { Log LOG = LogFactory.getLog(PaymentService.class); @POST - @Path("/transaction/{endUserId}/payment") + @Path("/{endUserId}/transactions/amount") @ApiOperation(value = "makePaymentService", notes = "make payment service", response = Response.class) @ApiImplicitParams({ @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index 16387749..d561cecc 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -1,12 +1,41 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.wso2telco.services.dep.sandbox.servicefactory.payment; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; + public class PaymentRequestFactory { - // TODO: based on the json body need to implement request handle - public static RequestHandleable getInstance(final RequestDTO requestDTO) { + private static Log LOG = LogFactory.getLog(PaymentRequestFactory.class); + + // TODO: based on the json body need to implement request handle + public static RequestHandleable getInstance(final RequestDTO requestDTO) { + + final String MAKE_PAYMENT = "payment"; + + if (requestDTO.getRequestPath().contains(MAKE_PAYMENT)) { + LOG.debug("LOADING MAKE PAYMENT SERVICE"); + return new PaymentRequestHandler(); + } - return null; - } + return null; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index ece606d5..f6e85a19 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -16,5 +16,495 @@ package com.wso2telco.services.dep.sandbox.servicefactory.payment; -public class PaymentRequestHandler { +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.ibm.icu.math.BigDecimal; +import com.wso2telco.core.dbutils.exception.PolicyError; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; +import com.wso2telco.services.dep.sandbox.dao.NumberDAO; +import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; + +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; + +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; +import com.wso2telco.services.dep.sandbox.util.*; +import org.apache.commons.lang.math.NumberUtils; +import org.apache.commons.logging.LogFactory; +import scala.util.parsing.combinator.testing.Str; + +import javax.annotation.Nonnull; +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Currency; +import java.util.Date; +import java.util.List; + +public class PaymentRequestHandler extends AbstractRequestHandler { + + + private PaymentDAO paymentDAO; + private LoggingDAO loggingDAO; + private NumberDAO numberDAO; + private MakePaymentRequestWrapperDTO requestWrapperDTO; + private PaymentResponseWrapper responseWrapper; + private MessageLogHandler logHandler; + private String serviceCallPayment; + private Integer transactionId; + + + { + LOG = LogFactory.getLog(PaymentRequestHandler.class); + paymentDAO = DaoFactory.getPaymentDAO(); + loggingDAO = DaoFactory.getLoggingDAO(); + numberDAO = DaoFactory.getNumberDAO(); + dao = DaoFactory.getGenaricDAO(); + logHandler = MessageLogHandler.getInstance(); + } + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + List address = new ArrayList(); + address.add(requestWrapperDTO.getEndUserId()); + return address; + } + + @Override + protected void init(MakePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { + responseWrapper = new PaymentResponseWrapper(); + requestWrapperDTO = extendedRequestDTO; + } + + @Override + protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Exception { + MakePaymentRequestBean requestBean = wrapperDTO.getMakePaymentRequestBean(); + MakePaymentRequestBean.makePayment request = requestBean.getmakePayment(); + PaymentAmount paymentAmount = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + ChargingMetaData metaData = paymentAmount.getChargingMetaData(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserID = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); + String msisdn = CommonUtil.getNullOrTrimmedValue(request.getEndUserId()); + String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount().toString()); + String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency().toString()); + String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metaData.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metaData.getChannel()); + String taxAmount =CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + + List validationRulesList = new ArrayList<>(); + + try { + + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, + "endUserID", endUserID)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, + "endUserID", msisdn)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "amount", amount)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "currency", currency)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "description", description)); + if (metaData != null) { + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "onBehalfOf", onBehalfOf)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "categoryCode", categoryCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "channel", channel)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "taxAmount", taxAmount)); + } + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "referenceCode", referenceCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "notifyURL", notifyURL)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + }catch (CustomException ex) { + LOG.error("###PAYMENT### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + return true; + + } + + @Override + protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + try { + MakePaymentRequestBean requestBean = extendedRequestDTO.getMakePaymentRequestBean(); + MakePaymentRequestBean.makePayment request = requestBean.getmakePayment(); + PaymentAmount paymentAmount = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + ChargingMetaData metadata = paymentAmount.getChargingMetaData(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserIdPath = extendedRequestDTO.getEndUserId(); + String endUserIdRequest = request.getEndUserId(); + String endUserId = getLastMobileNumber(endUserIdPath); + String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); + String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String taxAmount =CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + serviceCallPayment = ServiceName.ChargeUser.toString(); + String userName = extendedRequestDTO.getUser().getUserName(); + Integer userId = extendedRequestDTO.getUser().getId(); + + MakePaymentResponseBean responseBean = new MakePaymentResponseBean(); + PaymentAmountResponse payAmount = new PaymentAmountResponse(); + ChargingInformation chargeInformation = new ChargingInformation(); + ChargingMetaData chargeMetaData = new ChargingMetaData(); + + // Save Request Log + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); + + Gson gson = new Gson(); + String jsonString = gson.toJson(requestBean); + MessageLog messageLog = new MessageLog(); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setRequest(jsonString); + messageLog.setMessageTimestamp(new Date()); + + int ref_number = loggingDAO.saveMessageLog(messageLog); + String serverReferenceCodeFormat = String.format("%06d", ref_number); + String serverReferenceCode = "PAYMENT_REF" + serverReferenceCodeFormat; + + // check already charge request against client correlator + if (clientCorrelator != null) { + String tableAttributeValue = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + String clientCorrelatorAttribute = AttributeName.clientCorrelatorWallet.toString(); + AttributeValues duplicateClientCorrelator = paymentDAO.checkDuplicateValue(serviceCallPayment, + clientCorrelator, clientCorrelatorAttribute, tableAttributeValue); + if (duplicateClientCorrelator != null) { + APIServiceCalls apiServiceCall = duplicateClientCorrelator.getAttributedid().getAPIServiceCall(); + String serviceCall = apiServiceCall.getServiceName(); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer id = duplicateClientCorrelator.getOwnerdid(); + AttributeValues response = paymentDAO.getResponse(id); + if (serviceCall.equals(serviceCallPayment) && (response.getOwnerdid() == manageNumber.getId())) { + // return already sent response + MakePaymentResponseBean obj = null; + obj = gson.fromJson(response.getValue(), MakePaymentResponseBean.class); + MakePaymentDTO dto = new MakePaymentDTO(); + dto.setmakePayment(obj); + responseWrapper.setMakePaymentDTO(dto); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + } else { + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Clientcorrelator is already used")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + } + } + + // check path param endUserId and request body endUserId + if (!(endUserIdPath.equals(endUserIdRequest))) { + LOG.error("###PAYMENT### two different endUserId provided"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "two different endUserId provided")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check account valid amount + if (NumberUtils.isNumber(amount) != true) { + LOG.error("###PAYMENT### amount should be a valid positive number"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "amount should be positive number")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check account amount decimal format + Double chargeAmount = Double.parseDouble(amount); + BigDecimal bigDecimal = new BigDecimal(amount); + Integer decimalDigits = bigDecimal.scale(); + if (!((decimalDigits <= 2) && (decimalDigits >= 0)) || chargeAmount < 0) { + LOG.error("###PAYMENT### amount should be a whole number or two digit decimal"); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "amount should be a whole or two digit decimal positive number")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check valid account currency for endUserId + boolean isValidCurrency = currencySymbol(currency); + if (!isValidCurrency) { + LOG.error("###PAYMENT### currency code not valid accorfing to ISO 4217"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "currency code not valid accorfing to ISO 4217")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); + String accountCurrencyAttribute = AttributeName.Currency.toString().toLowerCase(); + AttributeValues accountCurrencyValue = paymentDAO.getAttributeValue(endUserId, serviceCallBalanceLookUp, + accountCurrencyAttribute, userId); + if (accountCurrencyValue != null) { + String accountCurrency = accountCurrencyValue.getValue(); + if (!(currency.equals(accountCurrency))) { + LOG.error("###PAYMENT### Valid currency doesn't exists for the given inputs"); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "Valid currency does not exist for the given input parameters")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + } + + // check channel + if (channel != null && !containsChannel(channel)) { + LOG.error("###PAYMENT### Valid channel doesn't exists for the given inputs"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Valid channel doesn't exists for the given inputs")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check already charged request against reference code + String referenceCodeAttribue = AttributeName.referenceCodeWallet.toString(); + String tableNumber = TableName.NUMBERS.toString().toLowerCase(); + AttributeValues duplicateReferenceCode = paymentDAO.checkDuplicateValue(serviceCallPayment, referenceCode, + referenceCodeAttribue, tableNumber); + if (duplicateReferenceCode != null) { + LOG.error("###PAYMENT### Already charged for this reference code"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Already charged for this reference code")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + responseBean.setClientCorrelator(clientCorrelator); + responseBean.setEndUserId(endUserIdPath); + + chargeInformation.setAmount(amount); + chargeInformation.setCurrency(currency); + chargeInformation.setDescription(description); + + if (onBehalfOf != null || categoryCode != null || channel != null) { + chargeMetaData.setPurchaseCategoryCode(categoryCode); + chargeMetaData.setChannel(channel); + chargeMetaData.setOnBehalfOf(onBehalfOf); + chargeMetaData.setTaxAmount(taxAmount); + } + + responseBean.setReferenceCode(referenceCode); + responseBean.setServerReferenceCode(serverReferenceCode); + responseBean.setNotifyURL(notifyURL); + + ManageNumber manageNumber = numberDAO.getNumber(endUserId, + extendedRequestDTO.getUser().getUserName().toString()); + Double balance = manageNumber.getBalance(); + AttributeValues transactionStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallPayment, + AttributeName.transactionStatus.toString(), userId); + + // Get the tax Amount + Double chargeTaxAmount = Double.parseDouble(taxAmount); + + // transaction operation status as denied + if ((balance < chargeAmount)) { + LOG.error("###PAYMENT### Denied : Account balance insufficient to charge request "); + responseWrapper.setHttpStatus(Response.Status.FORBIDDEN); + responseWrapper + .setRequestError(constructRequestError(POLICYEXCEPTION, PolicyError.NO_VALID_SERVICES_AVAILABLE, + "Denied : Account balance insufficient to charge request")); + return responseWrapper; + } + + // set transaction operation status as refused + else if (transactionStatusValue != null) { + String transactionStatus = transactionStatusValue.getValue(); + if (transactionStatus.equals(TransactionStatus.Refused.toString())) { + responseBean.setTransactionOperationStatus(TransactionStatus.Refused.toString()); + } + // set transaction status as charged + } else if (balance >= chargeAmount) { + balance = balance - (chargeAmount+chargeTaxAmount); + // walletDAO.updateBalance(endUserId, balance, userId); + manageNumber.setBalance(balance); + numberDAO.saveManageNumbers(manageNumber); + responseBean.setTransactionOperationStatus(TransactionStatus.Charged.toString()); + } + + MakePaymentDTO makePaymentDTO = new MakePaymentDTO(); + payAmount.setChargingInformation(chargeInformation); + if (onBehalfOf != null || categoryCode != null || channel != null) { + payAmount.setChargingMetaData(chargeMetaData); + } + responseBean.setPaymentAmount(payAmount); + makePaymentDTO.setmakePayment(responseBean); + responseWrapper.setMakePaymentDTO(makePaymentDTO); + responseWrapper.setHttpStatus(Response.Status.OK); + + // save payment transaction + transactionId = saveTransaction(responseBean, endUserId, userName); + + // save client correlator + if (clientCorrelator != null) { + saveClientCorrelator(endUserId, clientCorrelator); + } + saveReferenceCode(endUserId, referenceCode, userName); + + }catch (Exception ex) { + LOG.error("###PAYMENT### Error Occured in PAYMENT Service. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); + } + return responseWrapper; + + } + + + private Integer saveTransaction(MakePaymentResponseBean responseBean, String endUserId, String userName) + throws Exception { + Integer transactionId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.makePayment.toString().toLowerCase(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + String jsonInString = null; + Gson gson = new Gson(); + + JsonElement je = new JsonParser().parse(gson.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(jsonInString); + transactionId = paymentDAO.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in processing save transaction. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + return transactionId; + } + + public void saveClientCorrelator(String endUserId, String clientCorrelator) throws Exception { + Integer ownerId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + String attributeName = AttributeName.clientCorrelatorPayment.toString(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ownerId = transactionId; + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(clientCorrelator); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in processing save insertion of clientCorrelator request. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + private static boolean currencySymbol(@Nonnull final String currencyCode) { + try { + final Currency currency = Currency.getInstance(currencyCode); + return true; + } catch (final IllegalArgumentException x) { + return false; + } + } + + public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.clientCorrelatorPayment.toString(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(referenceCode); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + public boolean containsChannel(String channelValue) { + for (Channel channel : Channel.values()) { + if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { + return true; + } + } + return false; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java index ad84aa09..801d28df 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -16,5 +16,30 @@ package com.wso2telco.services.dep.sandbox.servicefactory.payment; -public class PaymentResponseWrapper { +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class PaymentResponseWrapper extends AbstractReturnWrapperDTO { + + private MakePaymentDTO makePaymentDTO; + + public MakePaymentDTO getMakePaymentDTO() { + return makePaymentDTO; + } + + public void setMakePaymentDTO(MakePaymentDTO makePaymentDTO) { + this.makePaymentDTO = makePaymentDTO; + } + + @Override + public Object getResponse() { + if (getRequestError() == null) { + return makePaymentDTO; + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + + } + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java index 7e6664a2..0b496f18 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java @@ -16,5 +16,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory.wallet; public enum AttributeName { - Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet + Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet, makePayment, clientCorrelatorPayment + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index 6580b1e8..f9657dfd 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.util; public enum ServiceName { - GetAttribute, GetProfile, ApplyCredit, PatialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup,; + GetAttribute, GetProfile, ApplyCredit, PatialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser; } diff --git a/log/sandbox_service.log b/log/sandbox_service.log index 4eb43248..6c4ba91d 100644 --- a/log/sandbox_service.log +++ b/log/sandbox_service.log @@ -202,3 +202,5197 @@ INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stoppe INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} INFO [2017-02-06 08:41:23,595] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@34c7232c{/,null,UNAVAILABLE} INFO [2017-02-06 08:41:23,598] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24134cbc{/,null,UNAVAILABLE} +INFO [2017-02-07 07:03:36,298] org.eclipse.jetty.util.log: Logging initialized @2937ms +INFO [2017-02-07 07:03:36,473] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:03:36,818] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:03:36,828] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:03:36,850] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 07:03:36,959] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +ERROR [2017-02-07 07:03:36,962] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +INFO [2017-02-07 07:04:05,526] org.eclipse.jetty.util.log: Logging initialized @2616ms +INFO [2017-02-07 07:04:05,671] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:04:05,959] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:04:05,970] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:04:05,990] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:04:06,031] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:04:06,031] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:04:06,035] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:04:07,224] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:04:07,229] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 07:04:07,237] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:04:07,238] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:04:07,246] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 07:04:07,260] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:04:07,261] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:04:07,262] org.eclipse.jetty.server.Server: Started @4354ms +DEBUG [2017-02-07 07:08:46,997] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:08:46,998] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@74575e37 +DEBUG [2017-02-07 07:08:47,000] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:08:47,001] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:08:47,019] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:08:47,340] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:11:23,807] org.eclipse.jetty.util.log: Logging initialized @2822ms +INFO [2017-02-07 07:11:23,966] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:11:24,308] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:11:24,317] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:11:24,337] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 07:11:24,380] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +ERROR [2017-02-07 07:11:24,383] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +INFO [2017-02-07 07:11:38,813] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:11:38,815] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:11:38,816] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 07:11:38,819] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 07:11:47,504] org.eclipse.jetty.util.log: Logging initialized @2664ms +INFO [2017-02-07 07:11:47,655] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:11:47,963] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:11:47,974] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:11:47,994] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:11:48,056] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:11:48,057] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:11:48,062] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:11:49,215] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:11:49,220] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 07:11:49,227] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:11:49,227] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:11:49,233] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 07:11:49,240] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:11:49,241] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:11:49,241] org.eclipse.jetty.server.Server: Started @4403ms +DEBUG [2017-02-07 07:12:37,565] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:12:37,566] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@25b8fbb6 +DEBUG [2017-02-07 07:12:37,568] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:12:37,570] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:12:37,583] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:12:37,843] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:13:28,625] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:13:28,627] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:13:28,629] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 07:13:28,634] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 07:13:34,725] org.eclipse.jetty.util.log: Logging initialized @3483ms +INFO [2017-02-07 07:13:34,958] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:13:35,344] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:13:35,357] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:13:35,382] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:13:35,450] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:13:35,451] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:13:35,456] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:13:36,824] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:13:36,830] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2c9d90fc{/,null,AVAILABLE} +INFO [2017-02-07 07:13:36,841] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:13:36,841] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:13:36,853] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@257f30f7{/,null,AVAILABLE} +INFO [2017-02-07 07:13:36,870] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:13:36,871] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:13:36,872] org.eclipse.jetty.server.Server: Started @5634ms +DEBUG [2017-02-07 07:13:45,902] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:13:45,903] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@2d55a882 +DEBUG [2017-02-07 07:13:45,905] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:13:45,906] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:13:46,009] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:32:07,477] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:32:07,546] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:32:07,554] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:32:07,556] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@257f30f7{/,null,UNAVAILABLE} +INFO [2017-02-07 07:32:07,564] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2c9d90fc{/,null,UNAVAILABLE} +INFO [2017-02-07 07:32:44,232] org.eclipse.jetty.util.log: Logging initialized @3030ms +INFO [2017-02-07 07:32:44,464] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:32:44,849] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:32:44,863] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:32:44,888] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:32:44,959] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:32:44,960] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:32:44,968] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:32:46,245] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:32:46,249] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:32:46,257] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:32:46,257] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:32:46,265] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.Server: Started @5077ms +DEBUG [2017-02-07 07:32:52,870] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:32:52,870] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@555238b3 +DEBUG [2017-02-07 07:32:52,872] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:32:52,873] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:32:52,900] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:33:57,656] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:33:57,756] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:33:57,761] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:33:57,763] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:33:57,770] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:34:03,103] org.eclipse.jetty.util.log: Logging initialized @3319ms +INFO [2017-02-07 07:34:03,317] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:34:03,751] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:34:03,766] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:34:03,808] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:34:03,904] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:03,904] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:03,911] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:34:06,440] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:34:06,448] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:34:06,461] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:34:06,461] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:34:06,478] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:34:06,492] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:06,496] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:06,497] org.eclipse.jetty.server.Server: Started @6716ms +DEBUG [2017-02-07 07:34:07,175] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:34:07,177] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 +DEBUG [2017-02-07 07:34:07,179] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:34:07,180] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:34:07,446] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:34:28,321] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:34:28,473] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:28,483] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:28,487] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:34:28,505] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:34:35,038] org.eclipse.jetty.util.log: Logging initialized @2963ms +INFO [2017-02-07 07:34:35,247] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:34:35,638] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:34:35,649] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:34:35,671] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:34:35,735] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:35,736] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:35,740] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:34:36,996] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:34:37,001] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:34:37,012] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:34:37,012] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:34:37,023] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:34:37,036] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:37,037] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:37,037] org.eclipse.jetty.server.Server: Started @4965ms +DEBUG [2017-02-07 07:34:40,228] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:34:40,228] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1b3ca2b +DEBUG [2017-02-07 07:34:40,231] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:34:40,232] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:34:40,532] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:35:25,076] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:35:25,162] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:35:25,165] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:35:25,168] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:35:25,189] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:35:38,582] org.eclipse.jetty.util.log: Logging initialized @3133ms +INFO [2017-02-07 07:35:38,769] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:35:39,137] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:35:39,150] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:35:39,174] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:35:39,233] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:35:39,233] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:35:39,238] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:35:40,519] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:35:40,526] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@7b96de8d{/,null,AVAILABLE} +INFO [2017-02-07 07:35:40,541] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:35:40,542] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:35:40,553] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3dfd6220{/,null,AVAILABLE} +INFO [2017-02-07 07:35:40,565] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:35:40,567] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:35:40,567] org.eclipse.jetty.server.Server: Started @5121ms +DEBUG [2017-02-07 07:35:44,667] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:35:44,667] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 +DEBUG [2017-02-07 07:35:44,669] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:35:44,671] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:35:44,945] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:36:17,403] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:36:17,537] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:36:17,550] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:36:17,552] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3dfd6220{/,null,UNAVAILABLE} +INFO [2017-02-07 07:36:17,570] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@7b96de8d{/,null,UNAVAILABLE} +INFO [2017-02-07 07:36:53,795] org.eclipse.jetty.util.log: Logging initialized @2983ms +INFO [2017-02-07 07:36:53,989] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:36:54,422] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:36:54,437] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:36:54,466] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:36:54,553] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:36:54,554] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:36:54,559] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:36:55,826] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:36:55,832] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:36:55,841] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:36:55,842] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:36:55,850] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:36:55,859] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:36:55,859] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:36:55,860] org.eclipse.jetty.server.Server: Started @5051ms +DEBUG [2017-02-07 07:36:58,768] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:36:58,768] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@555238b3 +DEBUG [2017-02-07 07:36:58,771] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:36:58,772] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:36:58,799] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:37:03,066] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:44:57,591] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:44:57,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:44:57,594] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:44:57,603] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:45:10,263] org.eclipse.jetty.util.log: Logging initialized @2900ms +INFO [2017-02-07 07:45:10,450] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:45:10,838] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:45:10,850] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:45:10,875] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:45:10,936] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:45:10,936] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:45:10,940] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:45:12,139] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:45:12,145] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:45:12,154] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:45:12,154] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:45:12,164] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:45:12,179] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:45:12,180] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:45:12,182] org.eclipse.jetty.server.Server: Started @4823ms +DEBUG [2017-02-07 07:45:18,431] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:45:18,431] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 +DEBUG [2017-02-07 07:45:18,434] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:45:18,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:45:18,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:45:23,343] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:45:23,344] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:45:23,346] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save insertion of clientCorrelator request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-07 07:45:23,376] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:45:23,377] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:45:23,378] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:49:27,064] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:49:27,065] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:49:27,067] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:49:27,079] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:49:44,465] org.eclipse.jetty.util.log: Logging initialized @2994ms +INFO [2017-02-07 07:49:44,662] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:49:45,023] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:49:45,034] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:49:45,062] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:49:45,130] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:49:45,130] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:49:45,134] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:49:46,411] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:49:46,416] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:49:46,425] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:49:46,426] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:49:46,435] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:49:46,449] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:49:46,450] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:49:46,451] org.eclipse.jetty.server.Server: Started @4983ms +DEBUG [2017-02-07 07:49:52,242] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:49:52,242] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@59095f0f +DEBUG [2017-02-07 07:49:52,244] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:49:52,245] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:49:52,266] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:49:56,357] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:49:56,361] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:49:56,362] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:53:26,239] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:53:26,240] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:53:26,242] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:53:26,249] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:53:31,125] org.eclipse.jetty.util.log: Logging initialized @2980ms +INFO [2017-02-07 07:53:31,328] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:53:31,696] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:53:31,708] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:53:31,731] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:53:31,788] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:53:31,789] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:53:31,794] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:53:32,945] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:53:32,950] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:53:32,960] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:53:32,960] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:53:32,971] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:53:32,982] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:53:32,983] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:53:32,983] org.eclipse.jetty.server.Server: Started @4841ms +DEBUG [2017-02-07 07:53:38,008] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:53:38,008] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@5fcbe282 +DEBUG [2017-02-07 07:53:38,010] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:53:38,011] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:53:38,282] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:55:11,223] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:55:11,225] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:55:11,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:55:29,554] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:55:29,555] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:55:29,557] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:55:29,564] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:55:39,680] org.eclipse.jetty.util.log: Logging initialized @2886ms +INFO [2017-02-07 07:55:39,974] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:55:40,383] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:55:40,394] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:55:40,416] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:55:40,473] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:55:40,473] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:55:40,477] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:55:41,651] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:55:41,657] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:55:41,667] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:55:41,667] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:55:41,677] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:55:41,692] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:55:41,693] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:55:41,693] org.eclipse.jetty.server.Server: Started @4903ms +DEBUG [2017-02-07 07:55:46,105] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:55:46,105] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@4d88656d +DEBUG [2017-02-07 07:55:46,107] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:55:46,109] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:55:46,133] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:56:53,892] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:56:53,894] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:56:53,896] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:56:53,984] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:56:54,003] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:56:54,005] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:56:54,019] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:57:00,811] org.eclipse.jetty.util.log: Logging initialized @2732ms +INFO [2017-02-07 07:57:01,038] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:57:01,354] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:57:01,364] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:57:01,387] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:57:01,444] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:57:01,444] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:57:01,448] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:57:02,519] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:57:02,524] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 07:57:02,534] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:57:02,535] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:57:02,543] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 07:57:02,555] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:57:02,556] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:57:02,557] org.eclipse.jetty.server.Server: Started @4480ms +DEBUG [2017-02-07 07:57:08,458] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:57:08,458] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@468272f8 +DEBUG [2017-02-07 07:57:08,460] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:57:08,460] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:57:08,476] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:57:12,312] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:57:12,342] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:57:12,345] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:59:23,476] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:59:23,476] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:59:23,478] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 07:59:23,484] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 08:44:39,947] org.eclipse.jetty.util.log: Logging initialized @3039ms +INFO [2017-02-07 08:44:40,133] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:44:40,543] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:44:40,559] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:44:40,584] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:44:40,643] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:44:40,644] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:44:40,649] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:44:41,920] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:44:41,926] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 08:44:41,935] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:44:41,936] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:44:41,946] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 08:44:41,956] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:44:41,958] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:44:41,958] org.eclipse.jetty.server.Server: Started @5054ms +DEBUG [2017-02-07 08:44:48,187] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 08:44:48,187] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@2e97091c +DEBUG [2017-02-07 08:44:48,189] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 08:44:48,191] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 08:44:48,393] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 08:48:51,832] org.eclipse.jetty.util.log: Logging initialized @3712ms +INFO [2017-02-07 08:48:52,143] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:48:52,649] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:48:52,666] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:48:52,704] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 08:48:52,788] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@3ed34ef5: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 8 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +ERROR [2017-02-07 08:48:52,788] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 8 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +DEBUG [2017-02-07 08:49:00,595] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:49:00,597] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:49:00,599] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 08:49:00,731] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:49:00,748] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:49:00,750] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 08:49:00,759] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 08:49:27,422] org.eclipse.jetty.util.log: Logging initialized @3062ms +INFO [2017-02-07 08:49:27,603] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:49:27,965] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:49:27,977] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:49:28,009] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:49:28,065] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:49:28,066] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:49:28,072] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:49:29,319] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:49:29,324] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2c9d90fc{/,null,AVAILABLE} +INFO [2017-02-07 08:49:29,334] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:49:29,334] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:49:29,344] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@257f30f7{/,null,AVAILABLE} +INFO [2017-02-07 08:49:29,357] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:49:29,359] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:49:29,359] org.eclipse.jetty.server.Server: Started @5003ms +DEBUG [2017-02-07 08:49:32,548] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 08:49:32,548] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@74116013 +DEBUG [2017-02-07 08:49:32,551] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 08:49:32,552] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 08:49:32,596] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 08:49:51,820] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:49:52,534] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:49:55,524] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 08:50:20,513] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:50:20,514] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:50:20,516] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@257f30f7{/,null,UNAVAILABLE} +INFO [2017-02-07 08:50:20,531] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2c9d90fc{/,null,UNAVAILABLE} +INFO [2017-02-07 08:53:37,435] org.eclipse.jetty.util.log: Logging initialized @2921ms +INFO [2017-02-07 08:53:37,660] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:53:38,021] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:53:38,032] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:53:38,057] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:53:38,115] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:53:38,115] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:53:38,121] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:53:39,518] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:53:39,523] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@7b96de8d{/,null,AVAILABLE} +INFO [2017-02-07 08:53:39,533] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:53:39,534] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:53:39,552] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3dfd6220{/,null,AVAILABLE} +INFO [2017-02-07 08:53:39,566] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:53:39,567] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:53:39,567] org.eclipse.jetty.server.Server: Started @5056ms +DEBUG [2017-02-07 08:53:45,988] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 08:53:45,988] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@5c0ce930 +DEBUG [2017-02-07 08:53:45,990] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 08:53:45,991] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 08:53:46,020] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 08:56:29,854] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:56:29,864] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:56:29,874] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 08:57:16,552] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:57:16,555] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:57:16,561] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3dfd6220{/,null,UNAVAILABLE} +INFO [2017-02-07 08:57:16,571] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@7b96de8d{/,null,UNAVAILABLE} +INFO [2017-02-07 08:57:23,711] org.eclipse.jetty.util.log: Logging initialized @2631ms +INFO [2017-02-07 08:57:23,891] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:57:24,245] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:57:24,261] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:57:24,291] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:57:24,365] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:57:24,366] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:57:24,370] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:57:26,079] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:57:26,084] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 08:57:26,093] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:57:26,094] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:57:26,102] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 08:57:26,112] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:57:26,113] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:57:26,114] org.eclipse.jetty.server.Server: Started @5035ms +DEBUG [2017-02-07 08:57:31,944] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 08:57:31,944] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1b39936a +DEBUG [2017-02-07 08:57:31,946] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 08:57:31,947] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 08:57:31,960] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 08:57:35,684] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:57:35,692] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:57:35,695] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 08:59:44,770] org.eclipse.jetty.util.log: Logging initialized @2513ms +INFO [2017-02-07 08:59:44,928] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:59:45,315] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:59:45,326] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:59:45,348] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 08:59:45,400] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +ERROR [2017-02-07 08:59:45,402] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +INFO [2017-02-07 08:59:49,190] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:59:49,193] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:59:49,195] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 08:59:49,202] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 08:59:56,421] org.eclipse.jetty.util.log: Logging initialized @2847ms +INFO [2017-02-07 08:59:56,627] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:59:56,971] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:59:56,986] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:59:57,014] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:59:57,083] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:59:57,084] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:59:57,090] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:59:58,322] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:59:58,326] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 08:59:58,334] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:59:58,334] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:59:58,343] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.Server: Started @4790ms +DEBUG [2017-02-07 09:00:02,980] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:00:02,980] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@72d118bb +DEBUG [2017-02-07 09:00:02,981] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:00:02,982] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:00:02,995] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@564727ff +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@135d15d6 +DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:01:54,604] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1f1fa0c7 +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 09:26:06,769] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 09:26:06,771] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 09:26:06,772] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 09:26:06,783] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 09:26:16,711] org.eclipse.jetty.util.log: Logging initialized @2621ms +INFO [2017-02-07 09:26:16,887] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 09:26:17,235] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 09:26:17,249] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 09:26:17,268] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 09:26:17,310] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 09:26:17,311] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 09:26:17,314] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 09:26:18,262] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 09:26:18,266] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 09:26:18,273] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 09:26:18,273] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 09:26:18,281] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 09:26:18,290] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 09:26:18,291] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 09:26:18,292] org.eclipse.jetty.server.Server: Started @4205ms +DEBUG [2017-02-07 09:26:23,433] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:26:23,434] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@46332b70 +DEBUG [2017-02-07 09:26:23,435] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:26:23,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:26:23,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin From 44022db9a3284c4016ba95b23993295ecc51d166 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 17:08:46 +0530 Subject: [PATCH 005/112] Implemented charge request classes --- .../custom/AmountTransactionRequestBean.java | 83 +++ .../dao/model/custom/ChargePaymentAmount.java | 53 ++ .../ChargePaymentRequestWrapperDTO.java | 47 ++ .../custom/PaymentChargingInformation.java | 60 ++ .../model/custom/PaymentChargingMetaData.java | 75 +++ .../dep/sandbox/service/PaymentService.java | 10 +- .../payment/PaymentRequestHandler.java | 39 +- dep-sandbox/src/main/java/hibernate.cfg.xml | 2 +- log/sandbox_service.log | 561 ++++++++++++++++++ 9 files changed, 903 insertions(+), 27 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentAmount.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingMetaData.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java new file mode 100644 index 00000000..6d64ce8a --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class AmountTransactionRequestBean { + + private amountTransaction amountTransaction; + + public amountTransaction getAmountTransaction() { + return amountTransaction; + } + + public void setAmountTransaction(amountTransaction amountTransaction) { + this.amountTransaction = amountTransaction; + } + + public static class amountTransaction { + private String clientCorrelator; + + private String endUserId; + + private ChargePaymentAmount paymentAmount; + + private String referenceCode; + + private String transactionOperationStatus; + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public String getReferenceCode() { + return referenceCode; + } + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public ChargePaymentAmount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(ChargePaymentAmount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentAmount.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentAmount.java new file mode 100644 index 00000000..23ff3b8b --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentAmount.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class ChargePaymentAmount { + + private PaymentChargingInformation chargingInformation; + + private PaymentChargingMetaData chargingMetaData; + + public PaymentChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(PaymentChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + + public PaymentChargingMetaData getChargingMetaData() { + return chargingMetaData; + } + + public void setChargingMetaData(PaymentChargingMetaData chargingMetaData) { + this.chargingMetaData = chargingMetaData; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + if (chargingInformation != null) { + builder.append(" " + getChargingInformation().toString()); + } + + if (chargingMetaData != null) { + builder.append(" " + getChargingMetaData().toString()); + } + + return builder.toString(); + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java new file mode 100644 index 00000000..17eb00a4 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class ChargePaymentRequestWrapperDTO extends RequestDTO { + + /** + * + */ + private static final long serialVersionUID = -6173594710611363567L; + + /** The endUserId param **/ + private String endUserId; + + private AmountTransactionRequestBean amountTransactionRequestBean; + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + /** The request bean **/ + public AmountTransactionRequestBean getAmountTransactionRequestBean() { + return amountTransactionRequestBean; + } + + public void setAmountTransactionRequestBean(AmountTransactionRequestBean amountTransactionRequestBean) { + this.amountTransactionRequestBean = amountTransactionRequestBean; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java new file mode 100644 index 00000000..f9c792b5 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class PaymentChargingInformation { + + private String amount; + + private String currency; + + private String description; + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + builder.append(" Amount : " + amount); + builder.append(" Currency : " + currency); + builder.append(" Description : " + description); + + return builder.toString(); + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingMetaData.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingMetaData.java new file mode 100644 index 00000000..103f986d --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingMetaData.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class PaymentChargingMetaData { + + private String onBehalfOf; + + private String purchaseCategoryCode; + + private String channel; + + private String taxAmount; + + public String getOnBehalfOf() { + return onBehalfOf; + } + + public void setOnBehalfOf(String onBehalfOf) { + this.onBehalfOf = onBehalfOf; + } + + public String getPurchaseCategoryCode() { + return purchaseCategoryCode; + } + + public void setPurchaseCategoryCode(String purchaseCategoryCode) { + this.purchaseCategoryCode = purchaseCategoryCode; + } + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public String getTaxAmount() { + return taxAmount; + } + + public void setTaxAmount(String taxAmount) { + this.taxAmount = taxAmount; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + builder.append(" onBehalfOf : " + onBehalfOf); + builder.append(" categoryCode : " + purchaseCategoryCode); + builder.append(" channel : " + channel); + + return builder.toString(); + } + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index ed0932b4..34739d60 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -17,9 +17,7 @@ package com.wso2telco.services.dep.sandbox.service; import com.wordnik.swagger.annotations.*; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.exception.SandboxException; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; @@ -51,15 +49,15 @@ public class PaymentService { @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) public Response makePayment( @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, - MakePaymentRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { + AmountTransactionRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { LOG.debug("###PAYMENT### /{endUserId} invoked : endUserId - " + endUserId); if (makePaymentRequestBean != null) { LOG.debug(makePaymentRequestBean); } - MakePaymentRequestWrapperDTO requestDTO = new MakePaymentRequestWrapperDTO(); + ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); requestDTO.setHttpRequest(request); requestDTO.setEndUserId(endUserId); - requestDTO.setMakePaymentRequestBean(makePaymentRequestBean); + requestDTO.setAmountTransactionRequestBean(makePaymentRequestBean); requestDTO.setRequestType(RequestType.PAYMENT); RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index f6e85a19..f568d379 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -42,7 +42,6 @@ import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.logging.LogFactory; -import scala.util.parsing.combinator.testing.Str; import javax.annotation.Nonnull; import javax.ws.rs.core.Response; @@ -51,13 +50,13 @@ import java.util.Date; import java.util.List; -public class PaymentRequestHandler extends AbstractRequestHandler { +public class PaymentRequestHandler extends AbstractRequestHandler { private PaymentDAO paymentDAO; private LoggingDAO loggingDAO; private NumberDAO numberDAO; - private MakePaymentRequestWrapperDTO requestWrapperDTO; + private ChargePaymentRequestWrapperDTO requestWrapperDTO; private PaymentResponseWrapper responseWrapper; private MessageLogHandler logHandler; private String serviceCallPayment; @@ -86,18 +85,18 @@ protected List getAddress() { } @Override - protected void init(MakePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { + protected void init(ChargePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { responseWrapper = new PaymentResponseWrapper(); requestWrapperDTO = extendedRequestDTO; } @Override - protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Exception { - MakePaymentRequestBean requestBean = wrapperDTO.getMakePaymentRequestBean(); - MakePaymentRequestBean.makePayment request = requestBean.getmakePayment(); - PaymentAmount paymentAmount = request.getPaymentAmount(); - ChargingInformation chargingInformation = paymentAmount.getChargingInformation(); - ChargingMetaData metaData = paymentAmount.getChargingMetaData(); + protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exception { + AmountTransactionRequestBean requestBean = wrapperDTO.getAmountTransactionRequestBean(); + AmountTransactionRequestBean.amountTransaction request = requestBean.getAmountTransaction(); + ChargePaymentAmount paymentAmount = request.getPaymentAmount(); + PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + PaymentChargingMetaData metaData = paymentAmount.getChargingMetaData(); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String endUserID = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); @@ -110,7 +109,7 @@ protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Excep String channel = CommonUtil.getNullOrTrimmedValue(metaData.getChannel()); String taxAmount =CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); List validationRulesList = new ArrayList<>(); @@ -141,7 +140,7 @@ protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Excep validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "referenceCode", referenceCode)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, - "notifyURL", notifyURL)); + "transactionOperationStatus", transactionOperationStatus)); ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; validationRules = validationRulesList.toArray(validationRules); @@ -159,18 +158,18 @@ protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Excep } @Override - protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { + protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { if (responseWrapper.getRequestError() != null) { responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); return responseWrapper; } try { - MakePaymentRequestBean requestBean = extendedRequestDTO.getMakePaymentRequestBean(); - MakePaymentRequestBean.makePayment request = requestBean.getmakePayment(); - PaymentAmount paymentAmount = request.getPaymentAmount(); - ChargingInformation chargingInformation = paymentAmount.getChargingInformation(); - ChargingMetaData metadata = paymentAmount.getChargingMetaData(); + AmountTransactionRequestBean requestBean = extendedRequestDTO.getAmountTransactionRequestBean(); + AmountTransactionRequestBean.amountTransaction request = requestBean.getAmountTransaction(); + ChargePaymentAmount paymentAmount = request.getPaymentAmount(); + PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + PaymentChargingMetaData metadata = paymentAmount.getChargingMetaData(); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String endUserIdPath = extendedRequestDTO.getEndUserId(); @@ -184,7 +183,7 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); String taxAmount =CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); serviceCallPayment = ServiceName.ChargeUser.toString(); String userName = extendedRequestDTO.getUser().getUserName(); Integer userId = extendedRequestDTO.getUser().getId(); @@ -337,7 +336,7 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th responseBean.setReferenceCode(referenceCode); responseBean.setServerReferenceCode(serverReferenceCode); - responseBean.setNotifyURL(notifyURL); + responseBean.setTransactionOperationStatus(transactionOperationStatus); ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName().toString()); diff --git a/dep-sandbox/src/main/java/hibernate.cfg.xml b/dep-sandbox/src/main/java/hibernate.cfg.xml index b24bb9a7..18a84dbd 100644 --- a/dep-sandbox/src/main/java/hibernate.cfg.xml +++ b/dep-sandbox/src/main/java/hibernate.cfg.xml @@ -13,7 +13,7 @@ - true + false true thread diff --git a/log/sandbox_service.log b/log/sandbox_service.log index 6c4ba91d..c6eff8d7 100644 --- a/log/sandbox_service.log +++ b/log/sandbox_service.log @@ -5396,3 +5396,564 @@ DEBUG [2017-02-07 09:26:23,434] com.wso2telco.services.dep.sandbox.service.Payme DEBUG [2017-02-07 09:26:23,435] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY DEBUG [2017-02-07 09:26:23,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE DEBUG [2017-02-07 09:26:23,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 10:28:24,434] org.eclipse.jetty.util.log: Logging initialized @2588ms +INFO [2017-02-07 10:28:24,628] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 10:28:25,040] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 10:28:25,052] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 10:28:25,078] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 10:28:25,146] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +ERROR [2017-02-07 10:28:25,153] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +INFO [2017-02-07 10:28:39,163] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:28:39,165] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:28:39,166] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 10:28:39,169] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 10:28:56,758] org.eclipse.jetty.util.log: Logging initialized @2553ms +INFO [2017-02-07 10:28:56,909] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 10:28:57,205] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 10:28:57,215] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 10:28:57,235] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 10:28:57,278] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:28:57,278] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:28:57,282] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 10:28:58,389] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 10:28:58,394] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 10:28:58,401] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 10:28:58,402] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 10:28:58,407] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 10:28:58,414] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:28:58,415] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:28:58,416] org.eclipse.jetty.server.Server: Started @4212ms +INFO [2017-02-07 10:34:24,853] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:34:24,854] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:34:24,855] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 10:34:24,858] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 10:34:33,173] org.eclipse.jetty.util.log: Logging initialized @2544ms +INFO [2017-02-07 10:34:33,327] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 10:34:33,622] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 10:34:33,634] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 10:34:33,654] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 10:34:33,696] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:34:33,696] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:34:33,700] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 10:34:34,837] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 10:34:34,841] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 10:34:34,849] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 10:34:34,849] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 10:34:34,855] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 10:34:34,864] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:34:34,865] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:34:34,867] org.eclipse.jetty.server.Server: Started @4240ms +DEBUG [2017-02-07 10:38:35,825] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 10:38:35,826] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@594d863e +DEBUG [2017-02-07 10:38:35,829] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 10:38:35,830] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 10:38:35,846] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 10:51:31,622] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@68150107 +DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 10:51:31,624] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 10:52:13,029] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 10:52:13,030] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@252eb04 +DEBUG [2017-02-07 10:52:13,031] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 10:52:13,031] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 10:52:13,032] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 10:52:36,225] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 10:52:36,225] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@a5b178c +DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 10:58:47,644] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:58:47,651] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:58:47,653] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 10:58:47,656] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 10:59:44,605] org.eclipse.jetty.util.log: Logging initialized @2504ms +INFO [2017-02-07 10:59:44,767] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 10:59:45,071] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 10:59:45,081] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 10:59:45,103] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 10:59:45,145] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:59:45,145] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:59:45,149] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 10:59:46,173] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 10:59:46,177] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 10:59:46,185] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 10:59:46,185] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 10:59:46,193] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 10:59:46,200] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:59:46,201] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:59:46,202] org.eclipse.jetty.server.Server: Started @4103ms +INFO [2017-02-07 11:00:34,908] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:00:34,909] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:00:34,911] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:00:34,915] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 11:01:59,185] org.eclipse.jetty.util.log: Logging initialized @2520ms +INFO [2017-02-07 11:01:59,355] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 11:01:59,646] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 11:01:59,657] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 11:01:59,678] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 11:01:59,734] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:01:59,735] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:01:59,740] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 11:02:00,740] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 11:02:00,745] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 11:02:00,753] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 11:02:00,754] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 11:02:00,761] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 11:02:00,771] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:02:00,772] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:02:00,773] org.eclipse.jetty.server.Server: Started @4110ms +DEBUG [2017-02-07 11:04:36,735] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 11:04:36,735] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@75d46ab4 +DEBUG [2017-02-07 11:04:36,737] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 11:04:36,737] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 11:04:36,752] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 11:16:14,598] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:16:14,599] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:16:14,601] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:16:14,605] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 11:16:23,267] org.eclipse.jetty.util.log: Logging initialized @2511ms +INFO [2017-02-07 11:16:23,431] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 11:16:23,733] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 11:16:23,747] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 11:16:23,769] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 11:16:23,815] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:16:23,815] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:16:23,819] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 11:16:24,890] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 11:16:24,894] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 11:16:24,902] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 11:16:24,903] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 11:16:24,909] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 11:16:24,916] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:16:24,917] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:16:24,917] org.eclipse.jetty.server.Server: Started @4163ms +DEBUG [2017-02-07 11:19:12,080] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 11:19:12,081] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@43d050da +DEBUG [2017-02-07 11:19:12,084] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 11:19:12,085] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 11:19:12,098] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 11:22:40,167] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:22:40,168] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:22:40,169] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:22:40,173] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 11:31:36,615] org.eclipse.jetty.util.log: Logging initialized @2512ms +INFO [2017-02-07 11:31:36,773] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 11:31:37,121] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 11:31:37,133] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 11:31:37,158] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 11:31:37,215] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:31:37,215] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:31:37,219] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 11:31:38,289] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 11:31:38,294] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 11:31:38,302] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 11:31:38,302] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 11:31:38,309] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 11:31:38,316] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:31:38,317] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:31:38,318] org.eclipse.jetty.server.Server: Started @4216ms +DEBUG [2017-02-07 11:32:43,114] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 11:32:43,114] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@3b1ff77b +DEBUG [2017-02-07 11:32:43,116] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 11:32:43,117] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 11:32:43,133] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 11:33:20,002] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:33:20,006] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:33:20,209] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:33:20,214] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 11:36:36,364] org.eclipse.jetty.util.log: Logging initialized @2502ms +INFO [2017-02-07 11:36:36,521] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 11:36:36,835] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 11:36:36,845] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 11:36:36,865] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 11:36:36,911] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:36:36,911] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:36:36,915] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 11:36:37,932] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 11:36:37,937] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 11:36:37,945] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 11:36:37,945] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 11:36:37,952] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 11:36:37,961] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:36:37,962] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:36:37,963] org.eclipse.jetty.server.Server: Started @4103ms +DEBUG [2017-02-07 11:37:48,831] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 11:37:48,832] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@413084ea +DEBUG [2017-02-07 11:37:48,834] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 11:37:48,835] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 11:37:48,851] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 11:38:11,943] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:38:11,946] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:38:11,948] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:38:11,953] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} From 29281a6809445b0b8c3af8d4bf7270cc8e527f85 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 19:45:55 +0530 Subject: [PATCH 006/112] Implemented charge Response Clases --- .../model/custom/ChargeAmountResponse.java | 53 +++++++++ .../dao/model/custom/ChargePaymentDTO.java | 29 +++++ .../custom/ChargePaymentResponseBean.java | 105 ++++++++++++++++++ .../dao/model/custom/ChargingMetaData.java | 10 -- .../payment/PaymentRequestHandler.java | 31 +++--- .../payment/PaymentResponseWrapper.java | 7 +- .../servicefactory/wallet/AttributeName.java | 2 +- 7 files changed, 210 insertions(+), 27 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeAmountResponse.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeAmountResponse.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeAmountResponse.java new file mode 100644 index 00000000..db591264 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeAmountResponse.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class ChargeAmountResponse { + + private PaymentChargingInformation chargingInformation; + + private String totalAmountCharged; + + private PaymentChargingMetaData chargingMetaData; + + public PaymentChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(PaymentChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + + public PaymentChargingMetaData getChargingMetaData() { + return chargingMetaData; + } + + public void setChargingMetaData(PaymentChargingMetaData chargingMetaData) { + this.chargingMetaData = chargingMetaData; + } + + public String getTotalAmountCharged() { + return totalAmountCharged; + } + + public void setTotalAmountCharged(String totalAmountCharged) { + this.totalAmountCharged = totalAmountCharged; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentDTO.java new file mode 100644 index 00000000..3e3644d6 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentDTO.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class ChargePaymentDTO { + + private ChargePaymentResponseBean amountTransaction; + + public ChargePaymentResponseBean getAmountTransaction() { + return amountTransaction; + } + + public void setAmountTransaction(ChargePaymentResponseBean amountTransaction) { + this.amountTransaction = amountTransaction; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java new file mode 100644 index 00000000..00160fca --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class ChargePaymentResponseBean { + + private String clientCorrelator; + + private String endUserId; + + private String originalReferenceCode; + + private String originalServerReferenceCode; + + private ChargeAmountResponse paymentAmount; + + private String referenceCode; + + private String serverReferenceCode; + + private String transactionOperationStatus; + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public String getOriginalReferenceCode() { + return originalReferenceCode; + } + + public void setOriginalReferenceCode(String originalReferenceCode) { + this.originalReferenceCode = originalReferenceCode; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + + public String getReferenceCode() { + return referenceCode; + } + + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public String getServerReferenceCode() { + return serverReferenceCode; + } + + public void setServerReferenceCode(String serverReferenceCode) { + this.serverReferenceCode = serverReferenceCode; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + + public ChargeAmountResponse getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(ChargeAmountResponse paymentAmount) { + this.paymentAmount = paymentAmount; + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java index 3a43442b..9e84f0a9 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java @@ -27,8 +27,6 @@ public class ChargingMetaData { private String channel; - private String taxAmount; - public String getOnBehalfOf() { return onBehalfOf; } @@ -53,14 +51,6 @@ public void setChannel(String channel) { this.channel = channel; } - public String getTaxAmount() { - return taxAmount; - } - - public void setTaxAmount(String taxAmount) { - this.taxAmount = taxAmount; - } - public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index f568d379..5718954e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -188,10 +188,10 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) String userName = extendedRequestDTO.getUser().getUserName(); Integer userId = extendedRequestDTO.getUser().getId(); - MakePaymentResponseBean responseBean = new MakePaymentResponseBean(); - PaymentAmountResponse payAmount = new PaymentAmountResponse(); - ChargingInformation chargeInformation = new ChargingInformation(); - ChargingMetaData chargeMetaData = new ChargingMetaData(); + ChargePaymentResponseBean responseBean = new ChargePaymentResponseBean(); + ChargeAmountResponse payAmount = new ChargeAmountResponse(); + PaymentChargingInformation chargeInformation = new PaymentChargingInformation(); + PaymentChargingMetaData chargeMetaData = new PaymentChargingMetaData(); // Save Request Log APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); @@ -214,7 +214,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) // check already charge request against client correlator if (clientCorrelator != null) { String tableAttributeValue = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); - String clientCorrelatorAttribute = AttributeName.clientCorrelatorWallet.toString(); + String clientCorrelatorAttribute = AttributeName.clientCorrelatorPayment.toString(); AttributeValues duplicateClientCorrelator = paymentDAO.checkDuplicateValue(serviceCallPayment, clientCorrelator, clientCorrelatorAttribute, tableAttributeValue); if (duplicateClientCorrelator != null) { @@ -225,10 +225,10 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) AttributeValues response = paymentDAO.getResponse(id); if (serviceCall.equals(serviceCallPayment) && (response.getOwnerdid() == manageNumber.getId())) { // return already sent response - MakePaymentResponseBean obj = null; - obj = gson.fromJson(response.getValue(), MakePaymentResponseBean.class); - MakePaymentDTO dto = new MakePaymentDTO(); - dto.setmakePayment(obj); + ChargePaymentResponseBean obj = null; + obj = gson.fromJson(response.getValue(), ChargePaymentResponseBean.class); + ChargePaymentDTO dto = new ChargePaymentDTO(); + dto.setAmountTransaction(obj); responseWrapper.setMakePaymentDTO(dto); responseWrapper.setHttpStatus(Response.Status.OK); return responseWrapper; @@ -308,7 +308,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) } // check already charged request against reference code - String referenceCodeAttribue = AttributeName.referenceCodeWallet.toString(); + String referenceCodeAttribue = AttributeName.referenceCodePayment.toString(); String tableNumber = TableName.NUMBERS.toString().toLowerCase(); AttributeValues duplicateReferenceCode = paymentDAO.checkDuplicateValue(serviceCallPayment, referenceCode, referenceCodeAttribue, tableNumber); @@ -327,6 +327,11 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) chargeInformation.setCurrency(currency); chargeInformation.setDescription(description); + // Setting the Total Amount Charged + Double tax = Double.parseDouble(taxAmount); + Double totle = tax+chargeAmount; + payAmount.setTotalAmountCharged(totle.toString()); + if (onBehalfOf != null || categoryCode != null || channel != null) { chargeMetaData.setPurchaseCategoryCode(categoryCode); chargeMetaData.setChannel(channel); @@ -372,13 +377,13 @@ else if (transactionStatusValue != null) { responseBean.setTransactionOperationStatus(TransactionStatus.Charged.toString()); } - MakePaymentDTO makePaymentDTO = new MakePaymentDTO(); + ChargePaymentDTO makePaymentDTO = new ChargePaymentDTO(); payAmount.setChargingInformation(chargeInformation); if (onBehalfOf != null || categoryCode != null || channel != null) { payAmount.setChargingMetaData(chargeMetaData); } responseBean.setPaymentAmount(payAmount); - makePaymentDTO.setmakePayment(responseBean); + makePaymentDTO.setAmountTransaction(responseBean); responseWrapper.setMakePaymentDTO(makePaymentDTO); responseWrapper.setHttpStatus(Response.Status.OK); @@ -402,7 +407,7 @@ else if (transactionStatusValue != null) { } - private Integer saveTransaction(MakePaymentResponseBean responseBean, String endUserId, String userName) + private Integer saveTransaction(ChargePaymentResponseBean responseBean, String endUserId, String userName) throws Exception { Integer transactionId = null; try { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java index 801d28df..31961956 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -16,19 +16,20 @@ package com.wso2telco.services.dep.sandbox.servicefactory.payment; +import com.wso2telco.services.dep.sandbox.dao.model.custom.ChargePaymentDTO; import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentDTO; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; public class PaymentResponseWrapper extends AbstractReturnWrapperDTO { - private MakePaymentDTO makePaymentDTO; + private ChargePaymentDTO makePaymentDTO; - public MakePaymentDTO getMakePaymentDTO() { + public ChargePaymentDTO getMakePaymentDTO() { return makePaymentDTO; } - public void setMakePaymentDTO(MakePaymentDTO makePaymentDTO) { + public void setMakePaymentDTO(ChargePaymentDTO makePaymentDTO) { this.makePaymentDTO = makePaymentDTO; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java index 0b496f18..794e8784 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java @@ -16,6 +16,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory.wallet; public enum AttributeName { - Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet, makePayment, clientCorrelatorPayment + Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet, makePayment, clientCorrelatorPayment, referenceCodePayment } From 44c285449c47af2498709b3a23a394ff3f425581 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 8 Feb 2017 09:23:06 +0530 Subject: [PATCH 007/112] gitignote updated --- .../payment/PaymentRequestFactory.java | 1 - .../payment/PaymentRequestHandler.java | 22 +++++++++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index d561cecc..0c4e89db 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -26,7 +26,6 @@ public class PaymentRequestFactory { private static Log LOG = LogFactory.getLog(PaymentRequestFactory.class); - // TODO: based on the json body need to implement request handle public static RequestHandleable getInstance(final RequestDTO requestDTO) { final String MAKE_PAYMENT = "payment"; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 5718954e..4bc00af6 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -107,7 +107,7 @@ protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exc String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); String categoryCode = CommonUtil.getNullOrTrimmedValue(metaData.getPurchaseCategoryCode()); String channel = CommonUtil.getNullOrTrimmedValue(metaData.getChannel()); - String taxAmount =CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); @@ -147,7 +147,7 @@ protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exc Validation.checkRequestParams(validationRules); - }catch (CustomException ex) { + } catch (CustomException ex) { LOG.error("###PAYMENT### Error in Validations. ", ex); responseWrapper.setRequestError( constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); @@ -181,7 +181,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); - String taxAmount =CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); serviceCallPayment = ServiceName.ChargeUser.toString(); @@ -327,10 +327,12 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) chargeInformation.setCurrency(currency); chargeInformation.setDescription(description); + // Get the tax Amount + Double chargeTaxAmount = Double.parseDouble(taxAmount); + // Setting the Total Amount Charged - Double tax = Double.parseDouble(taxAmount); - Double totle = tax+chargeAmount; - payAmount.setTotalAmountCharged(totle.toString()); + Double total = chargeTaxAmount + chargeAmount; + payAmount.setTotalAmountCharged(total.toString()); if (onBehalfOf != null || categoryCode != null || channel != null) { chargeMetaData.setPurchaseCategoryCode(categoryCode); @@ -349,9 +351,6 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) AttributeValues transactionStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallPayment, AttributeName.transactionStatus.toString(), userId); - // Get the tax Amount - Double chargeTaxAmount = Double.parseDouble(taxAmount); - // transaction operation status as denied if ((balance < chargeAmount)) { LOG.error("###PAYMENT### Denied : Account balance insufficient to charge request "); @@ -370,8 +369,7 @@ else if (transactionStatusValue != null) { } // set transaction status as charged } else if (balance >= chargeAmount) { - balance = balance - (chargeAmount+chargeTaxAmount); - // walletDAO.updateBalance(endUserId, balance, userId); + balance = balance - (chargeAmount + chargeTaxAmount); manageNumber.setBalance(balance); numberDAO.saveManageNumbers(manageNumber); responseBean.setTransactionOperationStatus(TransactionStatus.Charged.toString()); @@ -396,7 +394,7 @@ else if (transactionStatusValue != null) { } saveReferenceCode(endUserId, referenceCode, userName); - }catch (Exception ex) { + } catch (Exception ex) { LOG.error("###PAYMENT### Error Occured in PAYMENT Service. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); responseWrapper From a37d32105e2e48599f09878c32a176ef85275ed7 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 8 Feb 2017 09:26:15 +0530 Subject: [PATCH 008/112] gitignore updated --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2dc27ec0..bceb0705 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ target *.iws *.ipr .idea +dep-sanbox/log +log From d2cee736eb0a0bce983d027c3f706707e329e05d Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 8 Feb 2017 09:28:41 +0530 Subject: [PATCH 009/112] deleted log files --- .gitignore | 3 +- log/sandbox_service.log | 5959 --------------------------------------- 2 files changed, 2 insertions(+), 5960 deletions(-) delete mode 100644 log/sandbox_service.log diff --git a/.gitignore b/.gitignore index bceb0705..aec0e7e5 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,6 @@ target *.iws *.ipr .idea -dep-sanbox/log log +dep-sanbox/log + diff --git a/log/sandbox_service.log b/log/sandbox_service.log deleted file mode 100644 index c6eff8d7..00000000 --- a/log/sandbox_service.log +++ /dev/null @@ -1,5959 +0,0 @@ -INFO [2017-02-06 08:36:25,704] org.eclipse.jetty.util.log: Logging initialized @2198ms -INFO [2017-02-06 08:36:25,830] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-06 08:36:26,086] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-06 08:36:26,097] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-06 08:36:26,117] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-06 08:36:26,163] org.eclipse.jetty.setuid.SetUIDListener: Opened application@213deac2{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:36:26,164] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:36:26,168] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-06 08:36:27,069] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-06 08:36:27,072] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@5a6d30e2{/,null,AVAILABLE} -INFO [2017-02-06 08:36:27,079] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-06 08:36:27,079] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-06 08:36:27,086] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3cd9aa64{/,null,AVAILABLE} -INFO [2017-02-06 08:36:27,091] org.eclipse.jetty.server.ServerConnector: Started application@213deac2{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:36:27,092] org.eclipse.jetty.server.ServerConnector: Started admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:36:27,092] org.eclipse.jetty.server.Server: Started @3589ms -INFO [2017-02-06 08:36:35,687] org.eclipse.jetty.server.ServerConnector: Stopped application@213deac2{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:36:35,688] org.eclipse.jetty.server.ServerConnector: Stopped admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:36:35,690] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3cd9aa64{/,null,UNAVAILABLE} -INFO [2017-02-06 08:36:35,692] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a6d30e2{/,null,UNAVAILABLE} -INFO [2017-02-06 08:36:48,537] org.eclipse.jetty.util.log: Logging initialized @2655ms -INFO [2017-02-06 08:37:28,325] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-06 08:37:59,994] org.eclipse.jetty.util.log: Logging initialized @2460ms -INFO [2017-02-06 08:38:00,163] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-06 08:38:00,504] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-06 08:38:00,513] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-06 08:38:00,534] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-06 08:38:00,582] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:38:00,583] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:38:00,592] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-06 08:38:01,738] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-06 08:38:01,744] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@24a0c58b{/,null,AVAILABLE} -INFO [2017-02-06 08:38:01,753] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-06 08:38:01,753] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-06 08:38:01,761] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1118d539{/,null,AVAILABLE} -INFO [2017-02-06 08:38:01,777] org.eclipse.jetty.server.ServerConnector: Started application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:38:01,780] org.eclipse.jetty.server.ServerConnector: Started admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:38:01,783] org.eclipse.jetty.server.Server: Started @4252ms -DEBUG [2017-02-06 08:39:02,358] com.wso2telco.services.dep.sandbox.service.CreditService: ###CREDIT### /{msisdn}/apply invoked : msisdn - admin -DEBUG [2017-02-06 08:39:02,358] com.wso2telco.services.dep.sandbox.service.CreditService: com.wso2telco.services.dep.sandbox.dao.model.custom.CreditRequestBean@b5bb258 -DEBUG [2017-02-06 08:39:02,360] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING CREDIT CONFIGURATION FACTORY -DEBUG [2017-02-06 08:39:02,361] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditServiceFactory: ###CREDIT### LOADING CREDIT APPLY SERVICE -DEBUG [2017-02-06 08:39:02,375] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: Sandbox user : admin -ERROR [2017-02-06 08:39:02,523] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: ###CREDIT### Error in Validation : com.wso2telco.dep.oneapivalidation.exceptions.CustomException: SVC0002 -DEBUG [2017-02-06 08:39:02,539] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: Location parameters are empty -INFO [2017-02-06 08:39:29,778] org.eclipse.jetty.server.ServerConnector: Stopped application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:39:29,779] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:39:29,781] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1118d539{/,null,UNAVAILABLE} -INFO [2017-02-06 08:39:29,784] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24a0c58b{/,null,UNAVAILABLE} -INFO [2017-02-06 08:39:34,855] org.eclipse.jetty.util.log: Logging initialized @2496ms -INFO [2017-02-06 08:39:35,030] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-06 08:39:35,424] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-06 08:39:35,434] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-06 08:39:35,454] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-06 08:39:35,509] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:39:35,509] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:39:35,513] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-06 08:39:36,479] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-06 08:39:36,484] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@24134cbc{/,null,AVAILABLE} -INFO [2017-02-06 08:39:36,492] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-06 08:39:36,492] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-06 08:39:36,501] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@34c7232c{/,null,AVAILABLE} -INFO [2017-02-06 08:39:36,508] org.eclipse.jetty.server.ServerConnector: Started application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:39:36,509] org.eclipse.jetty.server.ServerConnector: Started admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:39:36,510] org.eclipse.jetty.server.Server: Started @4164ms -INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:41:23,595] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@34c7232c{/,null,UNAVAILABLE} -INFO [2017-02-06 08:41:23,598] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24134cbc{/,null,UNAVAILABLE} -INFO [2017-02-07 07:03:36,298] org.eclipse.jetty.util.log: Logging initialized @2937ms -INFO [2017-02-07 07:03:36,473] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:03:36,818] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:03:36,828] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:03:36,850] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 07:03:36,959] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -ERROR [2017-02-07 07:03:36,962] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -INFO [2017-02-07 07:04:05,526] org.eclipse.jetty.util.log: Logging initialized @2616ms -INFO [2017-02-07 07:04:05,671] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:04:05,959] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:04:05,970] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:04:05,990] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:04:06,031] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:04:06,031] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:04:06,035] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:04:07,224] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:04:07,229] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 07:04:07,237] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:04:07,238] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:04:07,246] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 07:04:07,260] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:04:07,261] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:04:07,262] org.eclipse.jetty.server.Server: Started @4354ms -DEBUG [2017-02-07 07:08:46,997] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:08:46,998] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@74575e37 -DEBUG [2017-02-07 07:08:47,000] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:08:47,001] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:08:47,019] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:08:47,340] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:11:23,807] org.eclipse.jetty.util.log: Logging initialized @2822ms -INFO [2017-02-07 07:11:23,966] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:11:24,308] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:11:24,317] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:11:24,337] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 07:11:24,380] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -ERROR [2017-02-07 07:11:24,383] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -INFO [2017-02-07 07:11:38,813] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:11:38,815] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:11:38,816] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 07:11:38,819] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 07:11:47,504] org.eclipse.jetty.util.log: Logging initialized @2664ms -INFO [2017-02-07 07:11:47,655] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:11:47,963] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:11:47,974] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:11:47,994] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:11:48,056] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:11:48,057] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:11:48,062] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:11:49,215] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:11:49,220] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 07:11:49,227] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:11:49,227] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:11:49,233] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 07:11:49,240] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:11:49,241] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:11:49,241] org.eclipse.jetty.server.Server: Started @4403ms -DEBUG [2017-02-07 07:12:37,565] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:12:37,566] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@25b8fbb6 -DEBUG [2017-02-07 07:12:37,568] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:12:37,570] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:12:37,583] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:12:37,843] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:13:28,625] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:13:28,627] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:13:28,629] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 07:13:28,634] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 07:13:34,725] org.eclipse.jetty.util.log: Logging initialized @3483ms -INFO [2017-02-07 07:13:34,958] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:13:35,344] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:13:35,357] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:13:35,382] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:13:35,450] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:13:35,451] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:13:35,456] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:13:36,824] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:13:36,830] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2c9d90fc{/,null,AVAILABLE} -INFO [2017-02-07 07:13:36,841] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:13:36,841] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:13:36,853] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@257f30f7{/,null,AVAILABLE} -INFO [2017-02-07 07:13:36,870] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:13:36,871] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:13:36,872] org.eclipse.jetty.server.Server: Started @5634ms -DEBUG [2017-02-07 07:13:45,902] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:13:45,903] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@2d55a882 -DEBUG [2017-02-07 07:13:45,905] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:13:45,906] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:13:46,009] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:32:07,477] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:32:07,546] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:32:07,554] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:32:07,556] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@257f30f7{/,null,UNAVAILABLE} -INFO [2017-02-07 07:32:07,564] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2c9d90fc{/,null,UNAVAILABLE} -INFO [2017-02-07 07:32:44,232] org.eclipse.jetty.util.log: Logging initialized @3030ms -INFO [2017-02-07 07:32:44,464] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:32:44,849] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:32:44,863] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:32:44,888] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:32:44,959] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:32:44,960] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:32:44,968] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:32:46,245] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:32:46,249] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:32:46,257] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:32:46,257] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:32:46,265] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.Server: Started @5077ms -DEBUG [2017-02-07 07:32:52,870] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:32:52,870] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@555238b3 -DEBUG [2017-02-07 07:32:52,872] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:32:52,873] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:32:52,900] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:33:57,656] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:33:57,756] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:33:57,761] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:33:57,763] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:33:57,770] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:34:03,103] org.eclipse.jetty.util.log: Logging initialized @3319ms -INFO [2017-02-07 07:34:03,317] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:34:03,751] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:34:03,766] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:34:03,808] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:34:03,904] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:03,904] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:03,911] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:34:06,440] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:34:06,448] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:34:06,461] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:34:06,461] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:34:06,478] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:34:06,492] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:06,496] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:06,497] org.eclipse.jetty.server.Server: Started @6716ms -DEBUG [2017-02-07 07:34:07,175] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:34:07,177] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 -DEBUG [2017-02-07 07:34:07,179] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:34:07,180] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:34:07,446] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:34:28,321] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:34:28,473] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:28,483] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:28,487] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:34:28,505] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:34:35,038] org.eclipse.jetty.util.log: Logging initialized @2963ms -INFO [2017-02-07 07:34:35,247] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:34:35,638] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:34:35,649] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:34:35,671] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:34:35,735] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:35,736] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:35,740] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:34:36,996] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:34:37,001] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:34:37,012] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:34:37,012] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:34:37,023] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:34:37,036] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:37,037] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:37,037] org.eclipse.jetty.server.Server: Started @4965ms -DEBUG [2017-02-07 07:34:40,228] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:34:40,228] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1b3ca2b -DEBUG [2017-02-07 07:34:40,231] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:34:40,232] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:34:40,532] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:35:25,076] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:35:25,162] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:35:25,165] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:35:25,168] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:35:25,189] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:35:38,582] org.eclipse.jetty.util.log: Logging initialized @3133ms -INFO [2017-02-07 07:35:38,769] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:35:39,137] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:35:39,150] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:35:39,174] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:35:39,233] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:35:39,233] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:35:39,238] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:35:40,519] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:35:40,526] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@7b96de8d{/,null,AVAILABLE} -INFO [2017-02-07 07:35:40,541] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:35:40,542] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:35:40,553] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3dfd6220{/,null,AVAILABLE} -INFO [2017-02-07 07:35:40,565] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:35:40,567] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:35:40,567] org.eclipse.jetty.server.Server: Started @5121ms -DEBUG [2017-02-07 07:35:44,667] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:35:44,667] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 -DEBUG [2017-02-07 07:35:44,669] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:35:44,671] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:35:44,945] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:36:17,403] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:36:17,537] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:36:17,550] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:36:17,552] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3dfd6220{/,null,UNAVAILABLE} -INFO [2017-02-07 07:36:17,570] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@7b96de8d{/,null,UNAVAILABLE} -INFO [2017-02-07 07:36:53,795] org.eclipse.jetty.util.log: Logging initialized @2983ms -INFO [2017-02-07 07:36:53,989] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:36:54,422] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:36:54,437] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:36:54,466] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:36:54,553] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:36:54,554] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:36:54,559] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:36:55,826] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:36:55,832] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:36:55,841] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:36:55,842] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:36:55,850] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:36:55,859] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:36:55,859] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:36:55,860] org.eclipse.jetty.server.Server: Started @5051ms -DEBUG [2017-02-07 07:36:58,768] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:36:58,768] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@555238b3 -DEBUG [2017-02-07 07:36:58,771] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:36:58,772] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:36:58,799] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:37:03,066] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:44:57,591] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:44:57,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:44:57,594] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:44:57,603] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:45:10,263] org.eclipse.jetty.util.log: Logging initialized @2900ms -INFO [2017-02-07 07:45:10,450] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:45:10,838] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:45:10,850] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:45:10,875] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:45:10,936] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:45:10,936] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:45:10,940] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:45:12,139] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:45:12,145] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:45:12,154] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:45:12,154] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:45:12,164] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:45:12,179] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:45:12,180] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:45:12,182] org.eclipse.jetty.server.Server: Started @4823ms -DEBUG [2017-02-07 07:45:18,431] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:45:18,431] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 -DEBUG [2017-02-07 07:45:18,434] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:45:18,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:45:18,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:45:23,343] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:45:23,344] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:45:23,346] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save insertion of clientCorrelator request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -DEBUG [2017-02-07 07:45:23,376] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:45:23,377] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:45:23,378] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:49:27,064] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:49:27,065] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:49:27,067] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:49:27,079] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:49:44,465] org.eclipse.jetty.util.log: Logging initialized @2994ms -INFO [2017-02-07 07:49:44,662] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:49:45,023] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:49:45,034] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:49:45,062] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:49:45,130] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:49:45,130] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:49:45,134] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:49:46,411] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:49:46,416] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:49:46,425] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:49:46,426] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:49:46,435] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:49:46,449] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:49:46,450] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:49:46,451] org.eclipse.jetty.server.Server: Started @4983ms -DEBUG [2017-02-07 07:49:52,242] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:49:52,242] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@59095f0f -DEBUG [2017-02-07 07:49:52,244] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:49:52,245] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:49:52,266] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:49:56,357] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:49:56,361] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:49:56,362] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:53:26,239] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:53:26,240] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:53:26,242] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:53:26,249] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:53:31,125] org.eclipse.jetty.util.log: Logging initialized @2980ms -INFO [2017-02-07 07:53:31,328] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:53:31,696] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:53:31,708] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:53:31,731] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:53:31,788] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:53:31,789] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:53:31,794] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:53:32,945] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:53:32,950] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:53:32,960] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:53:32,960] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:53:32,971] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:53:32,982] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:53:32,983] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:53:32,983] org.eclipse.jetty.server.Server: Started @4841ms -DEBUG [2017-02-07 07:53:38,008] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:53:38,008] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@5fcbe282 -DEBUG [2017-02-07 07:53:38,010] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:53:38,011] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:53:38,282] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:55:11,223] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:55:11,225] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:55:11,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:55:29,554] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:55:29,555] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:55:29,557] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:55:29,564] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:55:39,680] org.eclipse.jetty.util.log: Logging initialized @2886ms -INFO [2017-02-07 07:55:39,974] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:55:40,383] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:55:40,394] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:55:40,416] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:55:40,473] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:55:40,473] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:55:40,477] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:55:41,651] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:55:41,657] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:55:41,667] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:55:41,667] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:55:41,677] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:55:41,692] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:55:41,693] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:55:41,693] org.eclipse.jetty.server.Server: Started @4903ms -DEBUG [2017-02-07 07:55:46,105] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:55:46,105] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@4d88656d -DEBUG [2017-02-07 07:55:46,107] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:55:46,109] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:55:46,133] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:56:53,892] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:56:53,894] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:56:53,896] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:56:53,984] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:56:54,003] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:56:54,005] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:56:54,019] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:57:00,811] org.eclipse.jetty.util.log: Logging initialized @2732ms -INFO [2017-02-07 07:57:01,038] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:57:01,354] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:57:01,364] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:57:01,387] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:57:01,444] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:57:01,444] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:57:01,448] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:57:02,519] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:57:02,524] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 07:57:02,534] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:57:02,535] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:57:02,543] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 07:57:02,555] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:57:02,556] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:57:02,557] org.eclipse.jetty.server.Server: Started @4480ms -DEBUG [2017-02-07 07:57:08,458] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:57:08,458] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@468272f8 -DEBUG [2017-02-07 07:57:08,460] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:57:08,460] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:57:08,476] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:57:12,312] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:57:12,342] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:57:12,345] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:59:23,476] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:59:23,476] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:59:23,478] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 07:59:23,484] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 08:44:39,947] org.eclipse.jetty.util.log: Logging initialized @3039ms -INFO [2017-02-07 08:44:40,133] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:44:40,543] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:44:40,559] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:44:40,584] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:44:40,643] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:44:40,644] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:44:40,649] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:44:41,920] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:44:41,926] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 08:44:41,935] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:44:41,936] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:44:41,946] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 08:44:41,956] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:44:41,958] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:44:41,958] org.eclipse.jetty.server.Server: Started @5054ms -DEBUG [2017-02-07 08:44:48,187] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 08:44:48,187] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@2e97091c -DEBUG [2017-02-07 08:44:48,189] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 08:44:48,191] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 08:44:48,393] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 08:48:51,832] org.eclipse.jetty.util.log: Logging initialized @3712ms -INFO [2017-02-07 08:48:52,143] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:48:52,649] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:48:52,666] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:48:52,704] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 08:48:52,788] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@3ed34ef5: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 8 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -ERROR [2017-02-07 08:48:52,788] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 8 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -DEBUG [2017-02-07 08:49:00,595] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:49:00,597] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:49:00,599] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 08:49:00,731] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:49:00,748] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:49:00,750] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 08:49:00,759] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 08:49:27,422] org.eclipse.jetty.util.log: Logging initialized @3062ms -INFO [2017-02-07 08:49:27,603] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:49:27,965] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:49:27,977] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:49:28,009] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:49:28,065] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:49:28,066] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:49:28,072] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:49:29,319] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:49:29,324] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2c9d90fc{/,null,AVAILABLE} -INFO [2017-02-07 08:49:29,334] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:49:29,334] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:49:29,344] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@257f30f7{/,null,AVAILABLE} -INFO [2017-02-07 08:49:29,357] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:49:29,359] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:49:29,359] org.eclipse.jetty.server.Server: Started @5003ms -DEBUG [2017-02-07 08:49:32,548] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 08:49:32,548] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@74116013 -DEBUG [2017-02-07 08:49:32,551] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 08:49:32,552] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 08:49:32,596] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 08:49:51,820] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:49:52,534] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:49:55,524] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 08:50:20,513] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:50:20,514] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:50:20,516] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@257f30f7{/,null,UNAVAILABLE} -INFO [2017-02-07 08:50:20,531] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2c9d90fc{/,null,UNAVAILABLE} -INFO [2017-02-07 08:53:37,435] org.eclipse.jetty.util.log: Logging initialized @2921ms -INFO [2017-02-07 08:53:37,660] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:53:38,021] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:53:38,032] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:53:38,057] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:53:38,115] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:53:38,115] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:53:38,121] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:53:39,518] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:53:39,523] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@7b96de8d{/,null,AVAILABLE} -INFO [2017-02-07 08:53:39,533] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:53:39,534] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:53:39,552] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3dfd6220{/,null,AVAILABLE} -INFO [2017-02-07 08:53:39,566] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:53:39,567] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:53:39,567] org.eclipse.jetty.server.Server: Started @5056ms -DEBUG [2017-02-07 08:53:45,988] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 08:53:45,988] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@5c0ce930 -DEBUG [2017-02-07 08:53:45,990] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 08:53:45,991] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 08:53:46,020] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 08:56:29,854] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:56:29,864] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:56:29,874] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 08:57:16,552] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:57:16,555] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:57:16,561] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3dfd6220{/,null,UNAVAILABLE} -INFO [2017-02-07 08:57:16,571] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@7b96de8d{/,null,UNAVAILABLE} -INFO [2017-02-07 08:57:23,711] org.eclipse.jetty.util.log: Logging initialized @2631ms -INFO [2017-02-07 08:57:23,891] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:57:24,245] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:57:24,261] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:57:24,291] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:57:24,365] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:57:24,366] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:57:24,370] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:57:26,079] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:57:26,084] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 08:57:26,093] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:57:26,094] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:57:26,102] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 08:57:26,112] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:57:26,113] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:57:26,114] org.eclipse.jetty.server.Server: Started @5035ms -DEBUG [2017-02-07 08:57:31,944] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 08:57:31,944] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1b39936a -DEBUG [2017-02-07 08:57:31,946] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 08:57:31,947] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 08:57:31,960] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 08:57:35,684] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:57:35,692] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:57:35,695] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 08:59:44,770] org.eclipse.jetty.util.log: Logging initialized @2513ms -INFO [2017-02-07 08:59:44,928] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:59:45,315] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:59:45,326] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:59:45,348] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 08:59:45,400] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -ERROR [2017-02-07 08:59:45,402] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -INFO [2017-02-07 08:59:49,190] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:59:49,193] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:59:49,195] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 08:59:49,202] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 08:59:56,421] org.eclipse.jetty.util.log: Logging initialized @2847ms -INFO [2017-02-07 08:59:56,627] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:59:56,971] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:59:56,986] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:59:57,014] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:59:57,083] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:59:57,084] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:59:57,090] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:59:58,322] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:59:58,326] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 08:59:58,334] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:59:58,334] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:59:58,343] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.Server: Started @4790ms -DEBUG [2017-02-07 09:00:02,980] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:00:02,980] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@72d118bb -DEBUG [2017-02-07 09:00:02,981] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:00:02,982] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:00:02,995] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@564727ff -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@135d15d6 -DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:01:54,604] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1f1fa0c7 -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 09:26:06,769] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 09:26:06,771] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 09:26:06,772] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 09:26:06,783] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 09:26:16,711] org.eclipse.jetty.util.log: Logging initialized @2621ms -INFO [2017-02-07 09:26:16,887] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 09:26:17,235] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 09:26:17,249] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 09:26:17,268] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 09:26:17,310] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 09:26:17,311] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 09:26:17,314] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 09:26:18,262] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 09:26:18,266] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 09:26:18,273] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 09:26:18,273] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 09:26:18,281] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 09:26:18,290] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 09:26:18,291] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 09:26:18,292] org.eclipse.jetty.server.Server: Started @4205ms -DEBUG [2017-02-07 09:26:23,433] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:26:23,434] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@46332b70 -DEBUG [2017-02-07 09:26:23,435] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:26:23,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:26:23,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 10:28:24,434] org.eclipse.jetty.util.log: Logging initialized @2588ms -INFO [2017-02-07 10:28:24,628] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 10:28:25,040] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 10:28:25,052] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 10:28:25,078] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 10:28:25,146] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -ERROR [2017-02-07 10:28:25,153] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -INFO [2017-02-07 10:28:39,163] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:28:39,165] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:28:39,166] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 10:28:39,169] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 10:28:56,758] org.eclipse.jetty.util.log: Logging initialized @2553ms -INFO [2017-02-07 10:28:56,909] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 10:28:57,205] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 10:28:57,215] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 10:28:57,235] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 10:28:57,278] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:28:57,278] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:28:57,282] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 10:28:58,389] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 10:28:58,394] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 10:28:58,401] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 10:28:58,402] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 10:28:58,407] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 10:28:58,414] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:28:58,415] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:28:58,416] org.eclipse.jetty.server.Server: Started @4212ms -INFO [2017-02-07 10:34:24,853] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:34:24,854] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:34:24,855] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 10:34:24,858] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 10:34:33,173] org.eclipse.jetty.util.log: Logging initialized @2544ms -INFO [2017-02-07 10:34:33,327] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 10:34:33,622] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 10:34:33,634] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 10:34:33,654] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 10:34:33,696] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:34:33,696] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:34:33,700] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 10:34:34,837] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 10:34:34,841] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 10:34:34,849] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 10:34:34,849] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 10:34:34,855] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 10:34:34,864] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:34:34,865] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:34:34,867] org.eclipse.jetty.server.Server: Started @4240ms -DEBUG [2017-02-07 10:38:35,825] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 10:38:35,826] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@594d863e -DEBUG [2017-02-07 10:38:35,829] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 10:38:35,830] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 10:38:35,846] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 10:51:31,622] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@68150107 -DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 10:51:31,624] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 10:52:13,029] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 10:52:13,030] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@252eb04 -DEBUG [2017-02-07 10:52:13,031] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 10:52:13,031] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 10:52:13,032] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 10:52:36,225] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 10:52:36,225] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@a5b178c -DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 10:58:47,644] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:58:47,651] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:58:47,653] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 10:58:47,656] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 10:59:44,605] org.eclipse.jetty.util.log: Logging initialized @2504ms -INFO [2017-02-07 10:59:44,767] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 10:59:45,071] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 10:59:45,081] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 10:59:45,103] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 10:59:45,145] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:59:45,145] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:59:45,149] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 10:59:46,173] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 10:59:46,177] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 10:59:46,185] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 10:59:46,185] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 10:59:46,193] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 10:59:46,200] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:59:46,201] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:59:46,202] org.eclipse.jetty.server.Server: Started @4103ms -INFO [2017-02-07 11:00:34,908] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:00:34,909] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:00:34,911] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:00:34,915] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 11:01:59,185] org.eclipse.jetty.util.log: Logging initialized @2520ms -INFO [2017-02-07 11:01:59,355] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 11:01:59,646] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 11:01:59,657] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 11:01:59,678] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 11:01:59,734] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:01:59,735] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:01:59,740] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 11:02:00,740] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 11:02:00,745] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 11:02:00,753] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 11:02:00,754] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 11:02:00,761] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 11:02:00,771] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:02:00,772] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:02:00,773] org.eclipse.jetty.server.Server: Started @4110ms -DEBUG [2017-02-07 11:04:36,735] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 11:04:36,735] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@75d46ab4 -DEBUG [2017-02-07 11:04:36,737] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 11:04:36,737] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 11:04:36,752] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 11:16:14,598] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:16:14,599] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:16:14,601] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:16:14,605] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 11:16:23,267] org.eclipse.jetty.util.log: Logging initialized @2511ms -INFO [2017-02-07 11:16:23,431] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 11:16:23,733] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 11:16:23,747] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 11:16:23,769] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 11:16:23,815] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:16:23,815] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:16:23,819] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 11:16:24,890] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 11:16:24,894] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 11:16:24,902] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 11:16:24,903] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 11:16:24,909] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 11:16:24,916] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:16:24,917] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:16:24,917] org.eclipse.jetty.server.Server: Started @4163ms -DEBUG [2017-02-07 11:19:12,080] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 11:19:12,081] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@43d050da -DEBUG [2017-02-07 11:19:12,084] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 11:19:12,085] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 11:19:12,098] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 11:22:40,167] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:22:40,168] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:22:40,169] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:22:40,173] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 11:31:36,615] org.eclipse.jetty.util.log: Logging initialized @2512ms -INFO [2017-02-07 11:31:36,773] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 11:31:37,121] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 11:31:37,133] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 11:31:37,158] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 11:31:37,215] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:31:37,215] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:31:37,219] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 11:31:38,289] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 11:31:38,294] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 11:31:38,302] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 11:31:38,302] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 11:31:38,309] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 11:31:38,316] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:31:38,317] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:31:38,318] org.eclipse.jetty.server.Server: Started @4216ms -DEBUG [2017-02-07 11:32:43,114] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 11:32:43,114] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@3b1ff77b -DEBUG [2017-02-07 11:32:43,116] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 11:32:43,117] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 11:32:43,133] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 11:33:20,002] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:33:20,006] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:33:20,209] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:33:20,214] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 11:36:36,364] org.eclipse.jetty.util.log: Logging initialized @2502ms -INFO [2017-02-07 11:36:36,521] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 11:36:36,835] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 11:36:36,845] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 11:36:36,865] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 11:36:36,911] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:36:36,911] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:36:36,915] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 11:36:37,932] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 11:36:37,937] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 11:36:37,945] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 11:36:37,945] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 11:36:37,952] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 11:36:37,961] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:36:37,962] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:36:37,963] org.eclipse.jetty.server.Server: Started @4103ms -DEBUG [2017-02-07 11:37:48,831] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 11:37:48,832] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@413084ea -DEBUG [2017-02-07 11:37:48,834] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 11:37:48,835] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 11:37:48,851] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 11:38:11,943] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:38:11,946] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:38:11,948] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:38:11,953] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} From a82118e26e14927bfb5996e32519d0a1ecec4754 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 8 Feb 2017 17:02:46 +0530 Subject: [PATCH 010/112] WIP refund payment Api --- .../custom/ChargeRefundAmountResponse.java | 53 ++ .../PaymentRefundRequestWrapperDTO.java | 42 ++ .../PaymentRefundTransactionRequestBean.java | 108 ++++ .../PaymentRefundTransactionResponseBean.java | 99 ++++ .../dao/model/custom/RefundPaymentDTO.java | 14 + .../dep/sandbox/service/PaymentService.java | 34 ++ .../payment/PaymentRefundRequestHandler.java | 503 ++++++++++++++++++ .../payment/PaymentRefundResponseWrapper.java | 46 ++ .../payment/PaymentRequestFactory.java | 4 + .../payment/PaymentResponseWrapper.java | 1 - 10 files changed, 903 insertions(+), 1 deletion(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundRequestWrapperDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundPaymentDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java new file mode 100644 index 00000000..68a9ea6e --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class ChargeRefundAmountResponse { + + private PaymentChargingInformation chargingInformation; + + private String totalAmountRefunded; + + private PaymentChargingMetaData chargingMetaData; + + public PaymentChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(PaymentChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + + public PaymentChargingMetaData getChargingMetaData() { + return chargingMetaData; + } + + public void setChargingMetaData(PaymentChargingMetaData chargingMetaData) { + this.chargingMetaData = chargingMetaData; + } + + public String getTotalAmountRefunded() { + return totalAmountRefunded; + } + + public void setTotalAmountRefunded(String totalAmountRefunded) { + this.totalAmountRefunded = totalAmountRefunded; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundRequestWrapperDTO.java new file mode 100644 index 00000000..a83b5234 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundRequestWrapperDTO.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class PaymentRefundRequestWrapperDTO extends RequestDTO { + + /** The endUserId param **/ + private String endUserId; + + /** The request bean **/ + private PaymentRefundTransactionRequestBean refundRequestBean; + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public PaymentRefundTransactionRequestBean getRefundRequestBean() { + return refundRequestBean; + } + + public void setRefundRequestBean(PaymentRefundTransactionRequestBean refundRequestBean) { + this.refundRequestBean = refundRequestBean; + } +} \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java new file mode 100644 index 00000000..42f2b544 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + +public class PaymentRefundTransactionRequestBean { + + private AmountTransaction amountTransaction; + + public AmountTransaction getAmountTransaction() { + return amountTransaction; + } + + public void setAmountTransaction(AmountTransaction amountTransaction) { + this.amountTransaction = amountTransaction; + } + + + public static class AmountTransaction { + + private String clientCorrelator; + + private String endUserId; + + private String originalServerReferenceCode; + + private ChargePaymentAmount paymentAmount; + + private String referenceCode; + + private String transactionOperationStatus; + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + + public String getReferenceCode() { + return referenceCode; + } + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + + public ChargePaymentAmount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(ChargePaymentAmount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("Client Correlator : " + getClientCorrelator()); + builder.append("EndUserId : " + getEndUserId()); + builder.append("Reference Code : " + getReferenceCode()); + + if (getPaymentAmount() != null) { + builder.append(" " + getPaymentAmount().toString()); + } + + return builder.toString(); + } + + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java new file mode 100644 index 00000000..2ec3e3fb --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java @@ -0,0 +1,99 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class PaymentRefundTransactionResponseBean { + + + private String clientCorrelator; + + private String endUserId; + + private String originalReferenceCode; + + private String originalServerReferenceCode; + + private ChargeRefundAmountResponse paymentAmount; + + private String referenceCode; + + private String serverReferenceCode; + + private String resourceURL; + + private String transactionOperationStatus; + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public String getOriginalReferenceCode() { + return originalReferenceCode; + } + + public void setOriginalReferenceCode(String originalReferenceCode) { + this.originalReferenceCode = originalReferenceCode; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + + public String getReferenceCode() { + return referenceCode; + } + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public String getServerReferenceCode() { + return serverReferenceCode; + } + + public void setServerReferenceCode(String serverReferenceCode) { + this.serverReferenceCode = serverReferenceCode; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + + public ChargeRefundAmountResponse getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(ChargeRefundAmountResponse paymentAmount) { + this.paymentAmount = paymentAmount; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundPaymentDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundPaymentDTO.java new file mode 100644 index 00000000..63ff4d37 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundPaymentDTO.java @@ -0,0 +1,14 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class RefundPaymentDTO { + + private PaymentRefundTransactionResponseBean amountTransaction; + + public PaymentRefundTransactionResponseBean getAmountTransaction() { + return amountTransaction; + } + + public void setAmountTransaction(PaymentRefundTransactionResponseBean amountTransaction) { + this.amountTransaction = amountTransaction; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 34739d60..d5e7f511 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -76,4 +76,38 @@ public Response makePayment( } } + /** @path should be changed to ("/{endUserId}/transactions/amount") **/ + @POST + @Path("/{endUserId}/transactions/refund") + @ApiOperation(value = "refundService", notes = "refund service", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name= "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) + public Response refundUser(@ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, + PaymentRefundTransactionRequestBean refundRequestBean, @Context HttpServletRequest request) { + LOG.debug("###REFUND### /{endUserId}/refund invoked : endUserId - " + endUserId); + if (refundRequestBean != null) { + LOG.debug(refundRequestBean); + } + PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setRefundRequestBean(refundRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Refund User SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + } + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java new file mode 100644 index 00000000..951a0d0d --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -0,0 +1,503 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.ibm.icu.math.BigDecimal; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; +import com.wso2telco.services.dep.sandbox.dao.NumberDAO; +import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.RefundTransactionRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; +import com.wso2telco.services.dep.sandbox.util.*; +import org.apache.commons.lang.math.NumberUtils; +import org.apache.commons.logging.LogFactory; + +import javax.annotation.Nonnull; +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Currency; +import java.util.Date; +import java.util.List; + +public class PaymentRefundRequestHandler extends AbstractRequestHandler { + + private PaymentDAO paymentDAO; + private LoggingDAO loggingDAO; + private NumberDAO numberDAO; + private PaymentRefundRequestWrapperDTO requestWrapperDTO; + private PaymentRefundResponseWrapper responseWrapper; + private MessageLogHandler logHandler; + private String serviceCallRefund; + private boolean isContainsMetaData; + private Integer transactionId; + + { + LOG = LogFactory.getLog(RefundTransactionRequestHandler.class); + paymentDAO = DaoFactory.getPaymentDAO(); + loggingDAO = DaoFactory.getLoggingDAO(); + numberDAO = DaoFactory.getNumberDAO(); + dao = DaoFactory.getGenaricDAO(); + logHandler = MessageLogHandler.getInstance(); + } + + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + List address = new ArrayList(); + address.add(requestWrapperDTO.getEndUserId()); + return address; + } + + @Override + protected void init(PaymentRefundRequestWrapperDTO extendedRequestDTO) throws Exception { + responseWrapper = new PaymentRefundResponseWrapper(); + requestWrapperDTO = extendedRequestDTO; + } + + @Override + protected boolean validate(PaymentRefundRequestWrapperDTO wrapperDTO) throws Exception { + + PaymentRefundTransactionRequestBean requestBean = wrapperDTO.getRefundRequestBean(); + //Getting Refund Transaction + PaymentRefundTransactionRequestBean.AmountTransaction request = requestBean.getAmountTransaction(); + ChargePaymentAmount paymentAmount = request.getPaymentAmount(); + + PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + PaymentChargingMetaData metaData = paymentAmount.getChargingMetaData(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserID = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); + String msisdn = CommonUtil.getNullOrTrimmedValue(request.getEndUserId()); + String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount().toString()); + String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency().toString()); + String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metaData.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metaData.getChannel()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); + + List validationRulesList = new ArrayList<>(); + + try { + + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, + "endUserID", endUserID)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, + "endUserID", msisdn)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "amount", amount)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "currency", currency)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "description", description)); + if (metaData != null) { + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "onBehalfOf", onBehalfOf)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "categoryCode", categoryCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "channel", channel)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "taxAmount", taxAmount)); + } + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "referenceCode", referenceCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "transactionOperationStatus", transactionOperationStatus)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###REFUND### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + return true; + } + + @Override + protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) throws Exception { + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + try { + PaymentRefundTransactionRequestBean requestBean = extendedRequestDTO.getRefundRequestBean(); + PaymentRefundTransactionRequestBean.AmountTransaction request = requestBean.getAmountTransaction(); + ChargePaymentAmount paymentAmount = request.getPaymentAmount(); + PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + PaymentChargingMetaData metadata = paymentAmount.getChargingMetaData(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserIdPath = extendedRequestDTO.getEndUserId(); + String endUserIdRequest = request.getEndUserId(); + String endUserId = getLastMobileNumber(endUserIdPath); +// String originalReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String originalServerReferenceCode = CommonUtil + .getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); + String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); + serviceCallRefund = ServiceName.RefundPayment.toString(); + // Attribute Name Used in wallet + String accountCurrencyAttribute = AttributeName.Currency.toString().toLowerCase(); + String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); + String userName = extendedRequestDTO.getUser().getUserName(); + Integer userId = extendedRequestDTO.getUser().getId(); + + // Save Request Log + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallRefund); + + Gson gson = new Gson(); + String jsonString = gson.toJson(requestBean); + MessageLog messageLog = new MessageLog(); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setRequest(jsonString); + messageLog.setMessageTimestamp(new Date()); + + int ref_number = loggingDAO.saveMessageLog(messageLog); + String serverReferenceCodeFormat = String.format("%06d", ref_number); + String serverReferenceCode = "PAYMENT_REF" + serverReferenceCodeFormat; + + // check already charge request against client correlator + if (clientCorrelator != null) { + String clientCorrelatorAttribute = AttributeName.clientCorrelatorPayment.toString(); + String tableAttributeValue = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + AttributeValues duplicateClientCorrelator = paymentDAO.checkDuplicateValue(serviceCallRefund, + clientCorrelator, clientCorrelatorAttribute, tableAttributeValue); + if (duplicateClientCorrelator != null) { + APIServiceCalls apiServiceCall = duplicateClientCorrelator.getAttributedid().getAPIServiceCall(); + String serviceCall = apiServiceCall.getServiceName(); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer id = duplicateClientCorrelator.getOwnerdid(); + AttributeValues response = paymentDAO.getResponse(id); + if (serviceCall.equals(serviceCallRefund) && (response.getOwnerdid() == manageNumber.getId())) { + PaymentRefundTransactionResponseBean obj = null; + obj = gson.fromJson(response.getValue(), PaymentRefundTransactionResponseBean.class); + RefundPaymentDTO dto = new RefundPaymentDTO(); + dto.setAmountTransaction(obj); + responseWrapper.setRefundPaymentDTO(dto); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + } else { + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Clientcorrelator is already used")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + } + } + + // check path param endUserId and request body endUserId + if (!(endUserIdPath.equals(endUserIdRequest))) { + LOG.error("###REFUND### two different endUserId provided"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "two different endUserId provided")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check valid amount format + if ((NumberUtils.isNumber(amount) != true)) { + LOG.error("###WALLET### amount should be a valid number"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "amount should be a valid number")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check account amount decimal format + Double chargeAmount = Double.parseDouble(amount); + BigDecimal bigDecimal = new BigDecimal(amount); + Integer decimalDigits = bigDecimal.scale(); + if (!((decimalDigits <= 2) && (decimalDigits >= 0)) || chargeAmount < 0) { + LOG.error("###REFUND### amount should be a whole number or two digit decimal"); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "amount should be a whole or two digit decimal positive number")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check valid account currency for endUserId + boolean isValidCurrency = currencySymbol(currency); + if (!isValidCurrency) { + LOG.error("###WALLET### currency code not as per ISO 4217"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "currency code not as per ISO 4217")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + + } + AttributeValues accountCurrencyValue = paymentDAO.getAttributeValue(endUserId, serviceCallBalanceLookUp, + accountCurrencyAttribute, userId); + if (accountCurrencyValue != null) { + String accountCurrency = accountCurrencyValue.getValue(); + if (!(currency.equals(accountCurrency))) { + LOG.error("###REFUND### Valid currecy doesn't exists for the given inputs"); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "Valid currency does not exist for the given input parameters")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + } + + // check channel + if (channel != null && !containsChannel(channel)) { + LOG.error("###WALLET### Valid channel doesn't exists for the given inputs"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Valid channel doesn't exists for the given inputs")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + String referenceCodeAttribute = AttributeName.referenceCodePayment.toString(); + String tableNumber = TableName.NUMBERS.toString().toLowerCase(); + AttributeValues duplicateReferenceCode = paymentDAO.checkDuplicateValue(serviceCallRefund, referenceCode, + referenceCodeAttribute, tableNumber); + if (duplicateReferenceCode != null) { + LOG.error("###REFUND### Already charged for this reference code"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Already charged for this reference code")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + PaymentRefundTransactionResponseBean responseBean = new PaymentRefundTransactionResponseBean(); + ChargeRefundAmountResponse payAmount = new ChargeRefundAmountResponse(); + PaymentChargingInformation chargeInformation = new PaymentChargingInformation(); + PaymentChargingMetaData chargeMetaData = new PaymentChargingMetaData(); + + responseBean.setClientCorrelator(clientCorrelator); + responseBean.setEndUserId(endUserIdPath); + responseBean.setOriginalServerReferenceCode(originalServerReferenceCode); + + chargeInformation.setAmount(amount); + chargeInformation.setCurrency(currency); + chargeInformation.setDescription(description); + + if (onBehalfOf != null || categoryCode != null || channel != null) { + chargeMetaData.setPurchaseCategoryCode(categoryCode); + chargeMetaData.setChannel(channel); + chargeMetaData.setOnBehalfOf(onBehalfOf); + chargeMetaData.setTaxAmount(taxAmount); + isContainsMetaData = true; + } + + responseBean.setReferenceCode(referenceCode); + responseBean.setServerReferenceCode(serverReferenceCode); + responseBean.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); + + // Get the Charged Tax Amount + + Double chargedTaxAmount = Double.parseDouble(taxAmount); + + // set transaction operation status as charged + ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName()); + Double updateBalance = manageNumber.getBalance() + (chargeAmount + chargedTaxAmount); + AttributeValues accountStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallRefund, + AttributeName.transactionStatus.toString(), userId); + // set transaction operation status as refused + manageNumber.setBalance(updateBalance); + + if (accountStatusValue != null) { + String accountStatus = accountStatusValue.getValue(); + // set transaction operation status as Refused // Here wallet Status are Used + if (accountStatus.equals(TransactionStatus.Refused.toString())) { + responseBean.setTransactionOperationStatus(TransactionStatus.Refused.toString()); + + } + } + // set transaction operation status as Refunded + else if (paymentDAO.saveManageNumbers(manageNumber)) { + responseBean.setTransactionOperationStatus(TransactionStatus.Refunded.toString()); + } + + responseWrapper.setHttpStatus(Response.Status.OK); + RefundPaymentDTO refundPaymentDTO = new RefundPaymentDTO(); + payAmount.setChargingInformation(chargingInformation); + payAmount.setChargingMetaData(chargeMetaData); + responseBean.setPaymentAmount(payAmount); + refundPaymentDTO.setAmountTransaction(responseBean); // RefundTransaction + responseWrapper.setRefundPaymentDTO(refundPaymentDTO); + + // save transaction + transactionId = saveTransaction(responseBean, endUserId, userName); + + // save client correlator + if (clientCorrelator != null) { + saveClientCorrelator(endUserId, clientCorrelator, userName); + } + // save client correlator + saveReferenceCode(endUserId, referenceCode, userName); + } catch (Exception ex) { + LOG.error("###REFUND### Error Occured in PAYMENT Service. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); + } + return responseWrapper; + } + + public Integer saveTransaction(PaymentRefundTransactionResponseBean responseBean, String endUserId, String userName) + throws Exception { + Integer transactionId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.Refund.toString().toLowerCase(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + String jsonInString = null; + Gson gson = new Gson(); + + JsonElement je = new JsonParser().parse(gson.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(jsonInString); + transactionId = paymentDAO.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###WALLET### Error in processing save transaction. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + return transactionId; + } + + public void saveClientCorrelator(String endUserId, String clientCorrelator, String userName) throws Exception { + Integer ownerId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + String attributeName = AttributeName.clientCorrelatorWallet.toString(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ownerId = transactionId; + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(clientCorrelator); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###WALLET### Error in processing save insertion of clientCorrelator request. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + private static boolean currencySymbol(@Nonnull final String currencyCode) { + try { + final Currency currency = Currency.getInstance(currencyCode); + return true; + } catch (final IllegalArgumentException x) { + return false; + } + } + + public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.referenceCodeWallet.toString(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(referenceCode); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + public boolean containsChannel(String channelValue) { + + for (Channel channel : Channel.values()) { + if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { + return true; + } + } + + return false; + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java new file mode 100644 index 00000000..8d626e24 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundPaymentDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class PaymentRefundResponseWrapper extends AbstractReturnWrapperDTO { + + private RefundPaymentDTO refundPaymentDTO; + + public RefundPaymentDTO getRefundPaymentDTO() { + return refundPaymentDTO; + } + + public void setRefundPaymentDTO(RefundPaymentDTO refundPaymentDTO) { + this.refundPaymentDTO = refundPaymentDTO; + } + + @Override + public Object getResponse() { + if (getRequestError() == null) { + return refundPaymentDTO; + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + + } + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index 0c4e89db..67fcdc37 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -29,10 +29,14 @@ public class PaymentRequestFactory { public static RequestHandleable getInstance(final RequestDTO requestDTO) { final String MAKE_PAYMENT = "payment"; + final String REFUND_PAYMENT = "refund"; if (requestDTO.getRequestPath().contains(MAKE_PAYMENT)) { LOG.debug("LOADING MAKE PAYMENT SERVICE"); return new PaymentRequestHandler(); + } else if (requestDTO.getRequestPath().contains(REFUND_PAYMENT)) { + LOG.debug("LOADING REFUND PAYMENT SERVICE"); + return new PaymentRefundRequestHandler(); } return null; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java index 31961956..e1fa2684 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -18,7 +18,6 @@ import com.wso2telco.services.dep.sandbox.dao.model.custom.ChargePaymentDTO; import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentDTO; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; public class PaymentResponseWrapper extends AbstractReturnWrapperDTO { From 959b2d639abde98652fd1b219ed04368a49cafd5 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 9 Feb 2017 15:05:14 +0530 Subject: [PATCH 011/112] Implemented Payment Refund version-1 --- dep-sandbox/dbscripts/dep-sandbox1_5_0.sql | 9 +++-- .../dep/sandbox/service/PaymentService.java | 1 - .../payment/PaymentRefundRequestHandler.java | 33 +++++++++++-------- .../payment/PaymentRequestFactory.java | 2 +- .../payment/PaymentRequestHandler.java | 4 +-- .../servicefactory/wallet/AttributeName.java | 3 +- .../dep/sandbox/util/ServiceName.java | 2 +- 7 files changed, 29 insertions(+), 25 deletions(-) diff --git a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql index e377cd06..c7dce4c5 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql @@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `sbxapiservicecalls` ( -- Dumping data for table `sbxapiservicecalls` -- -INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'); +INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'chargeUser'),(11,4,'RefundUser'); @@ -300,8 +300,7 @@ INSERT INTO `sbxstatus` VALUES (1,'Pending','PRV_PROVISION_PENDING','Provision T -- Dumping data for table `sbtprmsisdnservicessmap` -- -INSERT INTO `sbtprmsisdnservicessmap` VALUES (1,1,1),(2,1,2),(3,2,1),(4,1,3),(5,2,2),(6,2,3),(7,3,3),(8,3,2),(9,3,1); - +sbxapiservicecalls -- -- Table structure for table `sbtprprovisionedservices` -- @@ -376,7 +375,7 @@ CREATE TABLE IF NOT EXISTS `sbxattribute` ( -- Dumping data for table `sbxattribute` -- -INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'); +INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'makePayment'),(30,'clientCorrelatorPayment'),(31,'referenceCodePayment'),(32,'refundUser'); -- -- Table structure for table `sbtattributedistribution` -- @@ -394,7 +393,7 @@ CREATE TABLE IF NOT EXISTS `sbtattributedistribution` ( -- Dumping data for table `sbtattributedistribution` -- -INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6); +INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,10),(33,30,10),(34,31,10),(35,32,11),(36,30,11),(37,31,11); -- diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index d5e7f511..9d51a65e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -76,7 +76,6 @@ public Response makePayment( } } - /** @path should be changed to ("/{endUserId}/transactions/amount") **/ @POST @Path("/{endUserId}/transactions/refund") @ApiOperation(value = "refundService", notes = "refund service", response = Response.class) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 951a0d0d..6b1f278e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -35,7 +35,6 @@ import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; -import com.wso2telco.services.dep.sandbox.servicefactory.wallet.RefundTransactionRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.lang.math.NumberUtils; @@ -61,7 +60,7 @@ public class PaymentRefundRequestHandler extends AbstractRequestHandler Date: Wed, 8 Feb 2017 15:13:26 +0530 Subject: [PATCH 012/112] Rewrite partial credit API --- dep-sandbox/dbscripts/dep-sandbox1_5_0.sql | 7 +- .../services/dep/sandbox/dao/CreditDAO.java | 2 +- .../dao/hibernate/HibernateCreditDAO.java | 8 +- .../model/custom/ChargingMetaDataWithTax.java | 62 ++++ .../custom/PaymentAmountResponseWithTax.java | 29 ++ .../model/custom/PaymentAmountWithTax.java | 44 +++ .../dao/model/custom/RefundRequestBean.java | 85 +++-- .../dao/model/custom/RefundResponseBean.java | 196 ++++++---- .../dep/sandbox/service/CreditService.java | 8 +- .../servicefactory/credit/AttributeName.java | 2 +- .../credit/CreditApplyRequestHandler.java | 2 +- .../credit/OperationStatus.java | 9 + .../credit/PatialRefundRequestHandler.java | 348 ++++++++++++++---- 13 files changed, 618 insertions(+), 184 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/OperationStatus.java diff --git a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql index c7dce4c5..7b7a1102 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql @@ -300,7 +300,8 @@ INSERT INTO `sbxstatus` VALUES (1,'Pending','PRV_PROVISION_PENDING','Provision T -- Dumping data for table `sbtprmsisdnservicessmap` -- -sbxapiservicecalls +INSERT INTO `sbtprmsisdnservicessmap` VALUES (1,1,1),(2,1,2),(3,2,1),(4,1,3),(5,2,2),(6,2,3),(7,3,3),(8,3,2),(9,3,1); + -- -- Table structure for table `sbtprprovisionedservices` -- @@ -375,7 +376,7 @@ CREATE TABLE IF NOT EXISTS `sbxattribute` ( -- Dumping data for table `sbxattribute` -- -INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'makePayment'),(30,'clientCorrelatorPayment'),(31,'referenceCodePayment'),(32,'refundUser'); +INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'patialRefund'); -- -- Table structure for table `sbtattributedistribution` -- @@ -393,7 +394,7 @@ CREATE TABLE IF NOT EXISTS `sbtattributedistribution` ( -- Dumping data for table `sbtattributedistribution` -- -INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,10),(33,30,10),(34,31,10),(35,32,11),(36,30,11),(37,31,11); +INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,9),(33,26,9),(34,25,9); -- diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CreditDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CreditDAO.java index 3b040cb7..f194680b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CreditDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CreditDAO.java @@ -22,7 +22,7 @@ public interface CreditDAO { public AttributeValues checkDuplication(Integer userId, String serviceCall, String attributeValue, String attributeName) throws Exception; - public AttributeValues getTransactionValue(String endUserId, Integer attributeValue, String serviceCall) throws Exception; + public AttributeValues getTransactionValue(String endUserId, Integer attributeValue, String attributeName, String serviceCall) throws Exception; public Integer saveAttributeValue(AttributeValues valueObj) throws Exception; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCreditDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCreditDAO.java index 1a5decd1..cb1c25f2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCreditDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCreditDAO.java @@ -70,12 +70,12 @@ public AttributeValues checkDuplication(Integer userId, String serviceCall, Stri } @Override - public AttributeValues getTransactionValue(String endUserId, Integer attributeValue, String serviceCall) + public AttributeValues getTransactionValue(String endUserId, Integer attributeValue, String attributeName, String serviceCall) throws Exception { Session session = getSession(); AttributeValues resultSet = null; - String service = ServiceName.ApplyCredit.toString(); + //String service = ServiceName.ApplyCredit.toString(); StringBuilder hql = new StringBuilder(); hql.append("SELECT "); @@ -100,9 +100,9 @@ public AttributeValues getTransactionValue(String endUserId, Integer attributeVa Query query = session.createQuery(hql.toString()); query.setParameter("apiName", RequestType.CREDIT.toString()); query.setParameter("tableName", TableName.SBXATTRIBUTEVALUE.toString().toLowerCase()); - query.setParameter("attributeName", serviceCall); + query.setParameter("attributeName", attributeName); query.setParameter("attributeValue", attributeValue); - query.setParameter("serviceCall", service); + query.setParameter("serviceCall", serviceCall); resultSet = (AttributeValues) query.uniqueResult(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java new file mode 100644 index 00000000..d37df8e3 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java @@ -0,0 +1,62 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class ChargingMetaDataWithTax { + + private String onBehalfOf; + + private String purchaseCategoryCode; + + private String channel; + + private String tax; + + public String getTax() { + return tax; + } + + public void setTax(String tax) { + this.tax = tax; + } + + public String getOnBehalfOf() { + return onBehalfOf; + } + + public void setOnBehalfOf(String onBehalfOf) { + this.onBehalfOf = onBehalfOf; + } + + public String getPurchaseCategoryCode() { + return purchaseCategoryCode; + } + + public void setPurchaseCategoryCode(String purchaseCategoryCode) { + this.purchaseCategoryCode = purchaseCategoryCode; + } + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + builder.append(" onBehalfOf : " + onBehalfOf); + builder.append(" categoryCode : " + purchaseCategoryCode); + builder.append(" channel : " + channel); + builder.append("taxAmount" +tax); + + return builder.toString(); + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java new file mode 100644 index 00000000..a9fda8d5 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java @@ -0,0 +1,29 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +/** + * Created by sidath on 2/7/17. + */ +public class PaymentAmountResponseWithTax { + + private ChargingInformation chargingInformation; + + private ChargingMetaDataWithTax chargingMetaData; + + public ChargingMetaDataWithTax getChargingMetaDataWithTax() { + return chargingMetaData; + } + + public void setChargingMetaDataWithTax(ChargingMetaDataWithTax chargingMetaDataWithTax) { + this.chargingMetaData = chargingMetaDataWithTax; + } + + public ChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(ChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + +} + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java new file mode 100644 index 00000000..d41da0b2 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java @@ -0,0 +1,44 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +/** + * Created by sidath on 2/7/17. + */ +public class PaymentAmountWithTax { + + private ChargingInformation chargingInformation; + + private ChargingMetaDataWithTax chargingMetaData; + + public ChargingMetaDataWithTax getChargingMetaData() { + return chargingMetaData; + } + + public void setChargingMetaData(ChargingMetaDataWithTax chargingMetaData) { + this.chargingMetaData = chargingMetaData; + } + + public ChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(ChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + if (chargingInformation != null) { + builder.append(" " + getChargingInformation().toString()); + } + + if(chargingMetaData != null){ + builder.append(" "+getChargingMetaData().toString()); + } + + return builder.toString(); + } + + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java index 78a7733e..f371437f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java @@ -17,25 +17,20 @@ public void setRefundRequest(RefundRequest refundRequest) { public static class RefundRequest{ - private double amount; - + private String clientCorrelator; + + private String msisdn; + private String originalServerReferenceCode; + private String reasonForRefund; - - private String merchantIdentification; - - private String serverTransactionReference; - - private CallbackReference receiptRequest; - public double getAmount() { - return amount; - } + private double refundAmount; - public void setAmount(double amount) { - this.amount = amount; - } + private PaymentAmountWithTax paymentAmount; + + private String referenceCode; public String getClientCorrelator() { return clientCorrelator; @@ -45,6 +40,23 @@ public void setClientCorrelator(String clientCorrelator) { this.clientCorrelator = clientCorrelator; } + + public String getMsisdn() { + return msisdn; + } + + public void setMsisdn(String msisdn) { + this.msisdn = msisdn; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + public String getReasonForRefund() { return reasonForRefund; } @@ -53,29 +65,50 @@ public void setReasonForRefund(String reasonForRefund) { this.reasonForRefund = reasonForRefund; } - public String getMerchantIdentification() { - return merchantIdentification; + public double getRefundAmount() { + return refundAmount; } - public void setMerchantIdentification(String merchantIdentification) { - this.merchantIdentification = merchantIdentification; + public void setRefundAmount(double refundAmount) { + this.refundAmount = refundAmount; + } + + + public PaymentAmountWithTax getPaymentAmount() { + return paymentAmount; } - public String getServerTransactionReference() { - return serverTransactionReference; + public void setPaymentAmount(PaymentAmountWithTax paymentAmount) { + this.paymentAmount = paymentAmount; } - public void setServerTransactionReference(String serverTransactionReference) { - this.serverTransactionReference = serverTransactionReference; + + + + public String getReferenceCode() { + return referenceCode; } - public CallbackReference getReceiptRequest() { - return receiptRequest; + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; } - public void setReceiptRequest(CallbackReference receiptRequest) { - this.receiptRequest = receiptRequest; + + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("Client Correlator : " + getClientCorrelator()); + builder.append("msisdn : " + getMsisdn()); + builder.append("OriginalServerReferenceCode : " +getOriginalServerReferenceCode()); + builder.append("reasonForRefund : " + getReasonForRefund()); + builder.append("refundAmount : " + getPaymentAmount()); + + if (getPaymentAmount() != null) { + builder.append(" " + getPaymentAmount().toString()); + } + + return builder.toString(); } + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java index 7c4170d8..8db462b1 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java @@ -1,83 +1,123 @@ package com.wso2telco.services.dep.sandbox.dao.model.custom; public class RefundResponseBean { - - private RefundResponse refundResponse; - - - public RefundResponse getRefundResponse() { - return refundResponse; - } - - - public void setRefundResponse(RefundResponse refundResponse) { - this.refundResponse = refundResponse; - } - - - public static class RefundResponse { - - private double amount; - - private String serverTransactionReference; - - private String clientCorrelator; - - private String reasonForRefund; - - private String merchantIdentification; - - private CallbackReference receiptResponse; - - public double getAmount() { - return amount; - } - - public void setAmount(double amount) { - this.amount = amount; - } - - public String getServerTransactionReference() { - return serverTransactionReference; - } - - public void setServerTransactionReference(String serverTransactionReference) { - this.serverTransactionReference = serverTransactionReference; - } - - public String getClientCorrelator() { - return clientCorrelator; - } - - public void setClientCorrelator(String clientCorrelator) { - this.clientCorrelator = clientCorrelator; - } - - public String getReasonForRefund() { - return reasonForRefund; - } - - public void setReasonForRefund(String reasonForRefund) { - this.reasonForRefund = reasonForRefund; - } - - public String getMerchantIdentification() { - return merchantIdentification; - } - - public void setMerchantIdentification(String merchantIdentification) { - this.merchantIdentification = merchantIdentification; - } - - public CallbackReference getReceiptResponse() { - return receiptResponse; - } - - public void setReceiptResponse(CallbackReference receiptResponse) { - this.receiptResponse = receiptResponse; - } - - - } + + private RefundResponse refundResponse; + + + public RefundResponse getRefundResponse() { + return refundResponse; + } + + + public void setRefundResponse(RefundResponse refundResponse) { + this.refundResponse = refundResponse; + } + + + public static class RefundResponse { + + private String clientCorrelator; + + private String endUserID; + + private String originalServerReferenceCode; + + private String reasonForRefund; + + private double refundAmount; + + private PaymentAmountWithTax paymentAmount; + + private String referenceCode; + + private String resourceURL; + + private String transactionOperationStatus; + + private String serverReferanceCode; + + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserID() { + return endUserID; + } + + public void setEndUserID(String endUserID) { + this.endUserID = endUserID; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + + public String getReasonForRefund() { + return reasonForRefund; + } + + public void setReasonForRefund(String reasonForRefund) { + this.reasonForRefund = reasonForRefund; + } + + public double getRefundAmount() { + return refundAmount; + } + + public void setRefundAmount(double refundAmount) { + this.refundAmount = refundAmount; + } + + + public String getReferenceCode() { + return referenceCode; + } + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + + public PaymentAmountWithTax getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(PaymentAmountWithTax paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getServerReferanceCode() { + return serverReferanceCode; + } + + public void setServerReferanceCode(String serverReferanceCode) { + this.serverReferanceCode = serverReferanceCode; + } + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java index 744d6b69..2a676a46 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java @@ -11,6 +11,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -19,9 +20,6 @@ import com.wordnik.swagger.annotations.ApiImplicitParams; import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiParam; -import com.wso2telco.services.dep.sandbox.dao.model.custom.CreditApplyRequestWrapper; -import com.wso2telco.services.dep.sandbox.dao.model.custom.CreditRequestBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; import com.wso2telco.services.dep.sandbox.exception.SandboxException.SandboxErrorType; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; @@ -70,7 +68,7 @@ public Response creditApplyForRequestedService( } } - /*@POST + @POST @Path("/{msisdn}/refund") @ApiOperation(value = "patialRefundForRequestedService", notes = "patial refund requested service", response = Response.class) @ApiImplicitParams({ @@ -102,6 +100,6 @@ public Response patialRefundForRequestedService( Response response = Response.status(Status.BAD_REQUEST).entity(SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxErrorType.SERVICE_ERROR.getMessage()).build(); return response; } - }*/ + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/AttributeName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/AttributeName.java index 19f2b8f0..3354288b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/AttributeName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/AttributeName.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory.credit; public enum AttributeName { - referenceCodeCredit, clientCorrelator, applyCredit + referenceCodeCredit, clientCorrelator, applyCredit, patialRefund } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java index f74f07ae..6e2b9da1 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java @@ -200,7 +200,7 @@ protected Returnable process(CreditApplyRequestWrapper extendedRequestDTO) throw ManageNumber manageNumber = numberDao.getNumber(msisdn, userName); if(ownerId == manageNumber.getId()){ //send the already sent response - AttributeValues applyCreditResponse = creditDAO.getTransactionValue(msisdn,values.getAttributeValueId() ,AttributeName.applyCredit.toString()); + AttributeValues applyCreditResponse = creditDAO.getTransactionValue(msisdn,values.getAttributeValueId() ,AttributeName.applyCredit.toString(), ServiceName.ApplyCredit.toString()); CreditApplyResponseBean bean = new CreditApplyResponseBean(); ObjectMapper mapper = new ObjectMapper(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/OperationStatus.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/OperationStatus.java new file mode 100644 index 00000000..526778b7 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/OperationStatus.java @@ -0,0 +1,9 @@ +package com.wso2telco.services.dep.sandbox.servicefactory.credit; + +/** + * Created by sidath on 2/7/17. + */ +public enum OperationStatus { + + Charged, Denied, Refused, Refunded +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index 4910a83f..f5543724 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -1,11 +1,24 @@ package com.wso2telco.services.dep.sandbox.servicefactory.credit; +import java.io.StringWriter; import java.util.ArrayList; +import java.util.Date; import java.util.List; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.wso2telco.services.dep.sandbox.dao.CreditDAO; +import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.*; +import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.logging.LogFactory; import org.json.simple.JSONObject; @@ -15,43 +28,36 @@ import com.wso2telco.dep.oneapivalidation.util.ValidationRule; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.NumberDAO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.CallbackReference; -import com.wso2telco.services.dep.sandbox.dao.model.custom.PatialRefundRequestWrapper; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundRequestBean; import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundRequestBean.RefundRequest; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundResponseBean; import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundResponseBean.RefundResponse; -import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; -import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; -import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; -import com.wso2telco.services.dep.sandbox.util.CommonUtil; -import com.wso2telco.services.dep.sandbox.util.MessageLogHandler; -import com.wso2telco.services.dep.sandbox.util.RequestType; -import com.wso2telco.services.dep.sandbox.util.ServiceName; public class PatialRefundRequestHandler extends AbstractRequestHandler { private NumberDAO numberDao; + private CreditDAO creditDAO; private MessageLogHandler logHandler; private PatialRefundRequestWrapper requestWrapperDTO; private PatialRefundResponseWrapper responseWrapperDTO; - - final String REFUND_REQUEST = "refundRequest"; + private Integer correlatorid; + private LoggingDAO loggingDao; + final String REFUND_AMOUNT = "refundAmount"; final String MSISDN = "msisdn"; - final String AMOUNT = "amount"; final String CLIENTCORRELATOR = "clientCorrelator"; final String REASON = "reasonForRefund"; - final String ID = "merchantIdentification"; - final String REFERENCE = "serverTransactionReference"; - final String RECEIPT = "receiptRequest"; - final String NOTIFYURL = "notifyURL"; - final String CALLBACKDATA = "callbackData"; + final String REFERENCE = "originalServerReferenceCode"; + final String REFERENCE_CODE = "referenceCode"; + final String PAYMENT_AMOUNT = "paymentAmount"; + final String CHANGING_INFO = "chargingInformation"; + final String CHARGING_META_DATA = "chargingMetaData"; + final String REFUND_REQUEST = "refundRequest"; { LOG = LogFactory.getLog(PatialRefundRequestHandler.class); + loggingDao = DaoFactory.getLoggingDAO(); numberDao = DaoFactory.getNumberDAO(); + creditDAO = DaoFactory.getCreditDAO(); dao = DaoFactory.getGenaricDAO(); logHandler = MessageLogHandler.getInstance(); } @@ -73,38 +79,48 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti RefundRequestBean requestBean = wrapperDTO.getRefundRequestBean(); RefundRequest request = requestBean.getRefundRequest(); + PaymentAmountWithTax paymentAmountWithTax = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); + ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); if (requestBean != null && request != null) { - CallbackReference callRef = request.getReceiptRequest(); - - if (callRef != null) { - double amount = request.getAmount(); - String msisdn = CommonUtil.getNullOrTrimmedValue("+" + wrapperDTO.getMsisdn()); + double amount = request.getRefundAmount(); + String msisdn = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getMsisdn()); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); - String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMerchantIdentification()); + String originalServerReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String serverTransactionReference = CommonUtil - .getNullOrTrimmedValue(request.getServerTransactionReference()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(callRef.getNotifyURL()); - String callbackData = CommonUtil.getNullOrTrimmedValue(callRef.getCallbackData()); + .getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTax()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + try { ValidationRule[] validationRules = { - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_DOUBLE_GT_ZERO, "amount", + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_DOUBLE_GT_ZERO, "refundAmount", amount), new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, "msisdn", msisdn), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "originalServerReferenceCode", + originalServerReferenceCode), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "reasonForRefund", reasonForRefund), - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "merchantIdentification", - merchantIdentification), new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "serverTransactionReference", serverTransactionReference), - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_URL, "notifyURL", notifyURL), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "callbackData", callbackData) }; + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "onBehalfOf", onBehalfOf), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "categoryCode", categoryCode), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "channel", channel), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL,"taxAmount",taxAmount), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL,"referenceCode",referenceCode) + + }; Validation.checkRequestParams(validationRules); } catch (CustomException ex) { @@ -120,39 +136,123 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti ServiceError.INVALID_INPUT_VALUE.getMessage(), wrapperDTO.getMsisdn())); responseWrapperDTO.setHttpStatus(javax.ws.rs.core.Response.Status.BAD_REQUEST); } - - } return false; } @Override protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) throws Exception { + if (responseWrapperDTO.getRequestError() != null) { + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; } RefundRequestBean requestBean = extendedRequestDTO.getRefundRequestBean(); RefundRequest request = requestBean.getRefundRequest(); - + PaymentAmountWithTax paymentAmountWithTax = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); + ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); APITypes apiType = dao.getAPIType(RequestType.CREDIT.toString().toLowerCase()); - APIServiceCalls serviceType = dao.getServiceCall(apiType.getId(), ServiceName.PatialRefund.toString()); + APIServiceCalls serviceType = dao.getServiceCall(apiType.getId(), ServiceName.PartialRefund.toString()); JSONObject obj = buildJSONObject(request); logHandler.saveMessageLog(serviceType.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), MSISDN, extendedRequestDTO.getMsisdn(), obj); - double amount = request.getAmount(); + + double amount = request.getRefundAmount(); String msisdn = CommonUtil.getNullOrTrimmedValue(extendedRequestDTO.getMsisdn()); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); - String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMerchantIdentification()); - String serverTransactionReference = CommonUtil.getNullOrTrimmedValue(request.getServerTransactionReference()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getNotifyURL()); - String callbackData = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getCallbackData()); + String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMsisdn()); + String serverTransactionReference = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String userName = extendedRequestDTO.getUser().getUserName(); + String serviceCreditApply = ServiceName.PartialRefund.toString(); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(String.valueOf(request.getReferenceCode())); + String endUserID = getLastMobileNumber(extendedRequestDTO.getMsisdn()); + + StringWriter out = new StringWriter(); + obj.writeJSONString(out); + String jsonString = out.toString(); + + MessageLog messageLog = new MessageLog(); + messageLog.setServicenameid(serviceType.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference(MSISDN); + messageLog.setValue(extendedRequestDTO.getMsisdn()); + messageLog.setRequest(jsonString); + messageLog.setMessageTimestamp(new Date()); + + //Genarate server reference number. + int ref_number = loggingDao.saveMessageLog(messageLog); + String serverReferenceCode = String.format("%06d",ref_number ); + try { - ManageNumber manageNumber = numberDao.getNumber(msisdn, extendedRequestDTO.getUser().getUserName()); + + String clientCorrelatorAttribute = AttributeName.clientCorrelator.toString(); + Integer userId = extendedRequestDTO.getUser().getId(); + //Null check for client correlator. + if(clientCorrelator != null){ + AttributeValues duplicateClientCorrelator = creditDAO.checkDuplication(userId, serviceCreditApply, clientCorrelator, clientCorrelatorAttribute); + + if(duplicateClientCorrelator != null){ + Integer ownerId = duplicateClientCorrelator.getOwnerdid(); + ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); + if(ownerId == manageNumber.getId()){ + //send the already sent response + AttributeValues partialRefundResponse = creditDAO.getTransactionValue(endUserID,duplicateClientCorrelator.getAttributeValueId() ,AttributeName.patialRefund.toString(),ServiceName.PartialRefund.toString()); + RefundResponseBean bean = new RefundResponseBean(); + + ObjectMapper mapper = new ObjectMapper(); + String responseString = partialRefundResponse.getValue(); + RefundResponse res = mapper.readValue(responseString, RefundResponse.class); + bean.setRefundResponse(res); + responseWrapperDTO.setRefundResponseBean(bean); + responseWrapperDTO.setHttpStatus(Response.Status.OK); + return responseWrapperDTO; + }else{ + buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(),referenceCode,serverReferenceCode,chargingInformation,metadata ); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Clientcorrelator is already used for different msisdn")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } + } + } + + //Check channel. + if (channel != null && !containsChannel(channel)) { + LOG.error("###WALLET### Valid channel doesn't exists for the given inputs"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Valid channel doesn't exists for the given inputs")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } + + //Save reference code. + String referenceCodeAttribute = AttributeName.referenceCodeCredit.toString(); + AttributeValues value = creditDAO.checkDuplication(userId, serviceCreditApply, referenceCode, referenceCodeAttribute); + if(value != null){ + buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(),referenceCode,serverReferenceCode,chargingInformation,metadata ); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Already used reference code for the request")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + }else{ + saveReferenceCode(endUserID, referenceCode, userName); + } + + ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); if (manageNumber != null) { updateBalance(manageNumber, amount); - buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, - serverTransactionReference, callbackData, notifyURL); + RefundResponseBean responseBean = buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(),referenceCode,serverReferenceCode,chargingInformation,metadata ); + if(clientCorrelator != null){ + correlatorid = saveClientCorrelator(endUserID, clientCorrelator, userName); + saveTransaction(responseBean); + } + responseWrapperDTO.setHttpStatus(Response.Status.OK); return responseWrapperDTO; } else { @@ -161,6 +261,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; } + } catch (Exception ex) { LOG.error("###CREDIT### Error in processing credit service request. ", ex); responseWrapperDTO @@ -168,8 +269,8 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; } - } + } @Override protected void init(PatialRefundRequestWrapper extendedRequestDTO) throws Exception { requestWrapperDTO = extendedRequestDTO; @@ -183,23 +284,28 @@ private void updateBalance(ManageNumber manageNumber, double amount) throws Exce numberDao.saveManageNumbers(manageNumber); } - private void buildJsonResponseBody(double amount, String clientCorrelator, String merchantIdentification, - String reason, String serverTransactionReference, String callbackData, String notifyURL) { + private RefundResponseBean buildJsonResponseBody(double amount, String clientCorrelator, String merchantIdentification, + String reason, String serverTransactionReference,String operationStatus, String referenceCode, String serverReferenceCode, ChargingInformation chargingInformation, ChargingMetaDataWithTax chargingMetaDataWithTax) { + + PaymentAmountWithTax paymentAmountWithTax = new PaymentAmountWithTax(); + paymentAmountWithTax.setChargingInformation(chargingInformation); + paymentAmountWithTax.setChargingMetaData(chargingMetaDataWithTax); - CallbackReference receiptResponse = new CallbackReference(); - receiptResponse.setCallbackData(callbackData); - receiptResponse.setNotifyURL(notifyURL); - receiptResponse.setResourceURL(CommonUtil.getResourceUrl(requestWrapperDTO)); RefundResponse refundResponse = new RefundResponse(); - refundResponse.setAmount(amount); - refundResponse.setServerTransactionReference(serverTransactionReference); + refundResponse.setRefundAmount(amount); + refundResponse.setOriginalServerReferenceCode(serverTransactionReference); refundResponse.setClientCorrelator(clientCorrelator); - refundResponse.setMerchantIdentification(merchantIdentification); + refundResponse.setEndUserID(merchantIdentification); refundResponse.setReasonForRefund(reason); - refundResponse.setReceiptResponse(receiptResponse); + refundResponse.setPaymentAmount(paymentAmountWithTax); + refundResponse.setReferenceCode(referenceCode); + refundResponse.setServerReferanceCode(serverReferenceCode); + refundResponse.setResourceURL(CommonUtil.getResourceUrl(requestWrapperDTO)); + refundResponse.setTransactionOperationStatus(operationStatus); RefundResponseBean refundResponseBean = new RefundResponseBean(); refundResponseBean.setRefundResponse(refundResponse); responseWrapperDTO.setRefundResponseBean(refundResponseBean); + return refundResponseBean; } @@ -208,20 +314,132 @@ private JSONObject buildJSONObject(RefundRequest request){ JSONObject obj = new JSONObject(); JSONObject refundRequest = new JSONObject(); - JSONObject receiptRequest = new JSONObject(); - - receiptRequest.put(NOTIFYURL, request.getReceiptRequest().getNotifyURL()); - receiptRequest.put(CALLBACKDATA, request.getReceiptRequest().getCallbackData()); - - refundRequest.put(AMOUNT, request.getAmount()); + JSONObject payment = new JSONObject(); + + payment.put(CHANGING_INFO, request.getPaymentAmount().getChargingInformation()); + payment.put(CHARGING_META_DATA, request.getPaymentAmount().getChargingMetaData()); + refundRequest.put(CLIENTCORRELATOR, request.getClientCorrelator()); + refundRequest.put(MSISDN, request.getMsisdn()); + refundRequest.put(REFERENCE,request.getOriginalServerReferenceCode()); refundRequest.put(REASON, request.getReasonForRefund()); - refundRequest.put(ID, request.getMerchantIdentification()); - refundRequest.put(REFERENCE, request.getServerTransactionReference()); - refundRequest.put(RECEIPT, receiptRequest); + refundRequest.put(REFUND_AMOUNT, request.getRefundAmount()); + refundRequest.put(PAYMENT_AMOUNT, payment); + refundRequest.put(REFERENCE_CODE,request.getReferenceCode()); obj.put(REFUND_REQUEST, refundRequest); return obj; } + + public Integer saveClientCorrelator(String endUserId, String correlator, String userName) throws Exception { + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.clientCorrelator.toString(); + String apiType = RequestType.CREDIT.toString(); + String serviceCallApplyCredit = ServiceName.PartialRefund.toString(); + APITypes api = dao.getAPIType(apiType); + APIServiceCalls serviceCall = dao.getServiceCall(api.getId(), serviceCallApplyCredit); + Attributes attribute = dao.getAttribute(attributeName); + AttributeDistribution distribution = dao.getAttributeDistribution(serviceCall.getApiServiceCallId(), attribute.getAttributeId()); + ManageNumber manageNumber = numberDao.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(distribution); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(correlator); + correlatorid = creditDAO.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PATIAL_REFUND_CREDIT### Error in processing save of clientCorrelator request. ", ex); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + } + return correlatorid; + } + + + public boolean containsChannel(String channelValue) { + + for (Channel channel : Channel.values()) { + if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { + return true; + } + } + + return false; + } + + + + public void saveTransaction(RefundResponseBean responseBean) + throws Exception { + + AttributeDistribution distributionId = null; + Integer ownerId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + String attributeName = AttributeName.patialRefund.toString(); + String apiType = RequestType.CREDIT.toString(); + String serviceCallApplyCredit = ServiceName.PartialRefund.toString(); + APITypes api = dao.getAPIType(apiType); + APIServiceCalls serviceCall = dao.getServiceCall(api.getId(), serviceCallApplyCredit); + Attributes attribute = dao.getAttribute(attributeName); + AttributeDistribution distribution = dao.getAttributeDistribution(serviceCall.getApiServiceCallId(), attribute.getAttributeId()); + ownerId = correlatorid; + + Gson gson = new Gson(); + JsonElement je =new JsonParser().parse(gson.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + JsonElement get = asJsonObject.get("refundResponse"); + JsonObject asJsonObjectPayment = get.getAsJsonObject(); + String jsonString = null; + jsonString = gson.toJson(asJsonObjectPayment); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(distribution); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(jsonString); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PARTIAL_REFUND### Error in processing save transaction. ", ex); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + + + public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.referenceCodeCredit.toString(); + String apiType = RequestType.CREDIT.toString(); + String serviceCallApplyCredit = ServiceName.PartialRefund.toString(); + APITypes api = dao.getAPIType(apiType); + APIServiceCalls serviceCall = dao.getServiceCall(api.getId(), serviceCallApplyCredit); + Attributes attribute = dao.getAttribute(attributeName); + AttributeDistribution distribution = dao.getAttributeDistribution(serviceCall.getApiServiceCallId(), attribute.getAttributeId()); + ManageNumber manageNumber = numberDao.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(distribution); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(referenceCode); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###CREDIT### Error in processing save of referenceCode request. ", ex); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + } From 4742dc5d4c050aff2cd86617f73794d066666b0b Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Thu, 9 Feb 2017 15:32:36 +0530 Subject: [PATCH 013/112] Implement filter for payment API --- dep-sandbox/dbscripts/dep-sandbox1_5_0.sql | 6 +- dep-sandbox/deploy/config.yml | 2 +- .../ChargePaymentRequestWrapperDTO.java | 11 +- .../model/custom/ChargingMetaDataWithTax.java | 15 +++ .../custom/PaymentAmountResponseWithTax.java | 18 ++- .../model/custom/PaymentAmountWithTax.java | 18 ++- .../dao/model/custom/RefundRequestBean.java | 15 +++ .../dao/model/custom/RefundResponseBean.java | 15 +++ .../dep/sandbox/service/PaymentService.java | 111 ++++++++++-------- .../credit/PatialRefundRequestHandler.java | 15 +++ .../payment/PaymentRefundRequestHandler.java | 6 +- .../payment/PaymentRequestFactory.java | 22 ++-- .../payment/PaymentRequestHandler.java | 8 +- 13 files changed, 175 insertions(+), 87 deletions(-) diff --git a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql index 7b7a1102..cf4ca17a 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql @@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `sbxapiservicecalls` ( -- Dumping data for table `sbxapiservicecalls` -- -INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'chargeUser'),(11,4,'RefundUser'); +INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'); @@ -376,7 +376,7 @@ CREATE TABLE IF NOT EXISTS `sbxattribute` ( -- Dumping data for table `sbxattribute` -- -INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'patialRefund'); +INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'patialRefund'),(30,'makePayment'),(31,'clientCorrelatorPayment'),(32,'referenceCodePayment'),(33,'refundUser'); -- -- Table structure for table `sbtattributedistribution` -- @@ -394,7 +394,7 @@ CREATE TABLE IF NOT EXISTS `sbtattributedistribution` ( -- Dumping data for table `sbtattributedistribution` -- -INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,9),(33,26,9),(34,25,9); +INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,9),(33,26,9),(34,25,9),(35,30,10),(36,31,10),(37,32,10),(38,33,11),(39,31,11),(40,32,11); -- diff --git a/dep-sandbox/deploy/config.yml b/dep-sandbox/deploy/config.yml index 9c8c72fb..9e42fcc9 100644 --- a/dep-sandbox/deploy/config.yml +++ b/dep-sandbox/deploy/config.yml @@ -1,7 +1,7 @@ database: driverClass: com.mysql.cj.jdbc.Driver user: root - password: secret + password: root url: jdbc:mysql://localhost/sandbox?useSSL=false server: applicationConnectors: diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java index 17eb00a4..040bda18 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java @@ -26,7 +26,7 @@ public class ChargePaymentRequestWrapperDTO extends RequestDTO { /** The endUserId param **/ private String endUserId; - private AmountTransactionRequestBean amountTransactionRequestBean; + private PaymentRefundTransactionRequestBean paymentRefundTransactionRequestBean; public String getEndUserId() { return endUserId; @@ -36,12 +36,11 @@ public void setEndUserId(String endUserId) { this.endUserId = endUserId; } - /** The request bean **/ - public AmountTransactionRequestBean getAmountTransactionRequestBean() { - return amountTransactionRequestBean; + public PaymentRefundTransactionRequestBean getPaymentRefundTransactionRequestBean() { + return paymentRefundTransactionRequestBean; } - public void setAmountTransactionRequestBean(AmountTransactionRequestBean amountTransactionRequestBean) { - this.amountTransactionRequestBean = amountTransactionRequestBean; + public void setPaymentRefundTransactionRequestBean(PaymentRefundTransactionRequestBean paymentRefundTransactionRequestBean) { + this.paymentRefundTransactionRequestBean = paymentRefundTransactionRequestBean; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java index d37df8e3..351cc1f8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java @@ -1,3 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java index a9fda8d5..bca5afca 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java @@ -1,8 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; -/** - * Created by sidath on 2/7/17. - */ public class PaymentAmountResponseWithTax { private ChargingInformation chargingInformation; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java index d41da0b2..9d5c93e4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java @@ -1,8 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; -/** - * Created by sidath on 2/7/17. - */ public class PaymentAmountWithTax { private ChargingInformation chargingInformation; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java index f371437f..a23aa814 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java @@ -1,3 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; public class RefundRequestBean { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java index 8db462b1..abcde158 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java @@ -1,3 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; public class RefundResponseBean { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 9d51a65e..5505dc20 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -22,9 +22,13 @@ import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRefundRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler; import com.wso2telco.services.dep.sandbox.util.RequestType; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.json.JSONArray; +import org.json.JSONObject; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.POST; @@ -49,64 +53,67 @@ public class PaymentService { @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) public Response makePayment( @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, - AmountTransactionRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { + PaymentRefundTransactionRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { LOG.debug("###PAYMENT### /{endUserId} invoked : endUserId - " + endUserId); if (makePaymentRequestBean != null) { LOG.debug(makePaymentRequestBean); } - ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); - requestDTO.setHttpRequest(request); - requestDTO.setEndUserId(endUserId); - requestDTO.setAmountTransactionRequestBean(makePaymentRequestBean); - requestDTO.setRequestType(RequestType.PAYMENT); - - RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); - Returnable returnable = null; - - try { - returnable = handler.execute(requestDTO); - Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); - return response; - } catch (Exception ex) { - LOG.error("Make Payment SERVICE ERROR", ex); - Response response = Response.status(Response.Status.BAD_REQUEST).entity( - SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) - .build(); - return response; - } - } - @POST - @Path("/{endUserId}/transactions/refund") - @ApiOperation(value = "refundService", notes = "refund service", response = Response.class) - @ApiImplicitParams({ - @ApiImplicitParam(name= "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) - public Response refundUser(@ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, - PaymentRefundTransactionRequestBean refundRequestBean, @Context HttpServletRequest request) { - LOG.debug("###REFUND### /{endUserId}/refund invoked : endUserId - " + endUserId); - if (refundRequestBean != null) { - LOG.debug(refundRequestBean); - } - PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); - requestDTO.setHttpRequest(request); - requestDTO.setEndUserId(endUserId); - requestDTO.setRefundRequestBean(refundRequestBean); - requestDTO.setRequestType(RequestType.PAYMENT); - - RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); - Returnable returnable = null; - - try { - returnable = handler.execute(requestDTO); - Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); - return response; - } catch (Exception ex) { - LOG.error("Refund User SERVICE ERROR", ex); - Response response = Response.status(Response.Status.BAD_REQUEST).entity( - SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) - .build(); - return response; + + if(makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Charged")){ + + ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setPaymentRefundTransactionRequestBean(makePaymentRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Make Payment SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + + + }else { + + PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setRefundRequestBean(makePaymentRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Make Payment SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + + + } + + + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index f5543724..928988ac 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -1,3 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.credit; import java.io.StringWriter; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 6b1f278e..10067a98 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -49,6 +49,7 @@ public class PaymentRefundRequestHandler extends AbstractRequestHandler { + private PaymentDAO paymentDAO; private LoggingDAO loggingDAO; private NumberDAO numberDAO; @@ -192,11 +193,8 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); String userName = extendedRequestDTO.getUser().getUserName(); Integer userId = extendedRequestDTO.getUser().getId(); - // APITypes api = + // Save Request Log -/* - APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); -*/ APITypes apiTypes = dao.getAPIType(RequestType.PAYMENT.toString()); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index 1588c2fa..1c10b1ea 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -27,18 +27,18 @@ public class PaymentRequestFactory { private static Log LOG = LogFactory.getLog(PaymentRequestFactory.class); public static RequestHandleable getInstance(final RequestDTO requestDTO) { -// Todo: end points should be same in Payment Service - final String MAKE_PAYMENT = "payment"; - final String REFUND_PAYMENT = "refund"; - - if (requestDTO.getRequestPath().contains(MAKE_PAYMENT)) { - LOG.debug("LOADING MAKE PAYMENT SERVICE"); - return new PaymentRequestHandler(); - } else if (requestDTO.getRequestPath().contains(REFUND_PAYMENT)) { - LOG.debug("LOADING REFUND PAYMENT SERVICE"); - return new PaymentRefundRequestHandler(); - } + final String MAKE_PAYMENT = "ChargePaymentRequestWrapper"; + final String REFUND_PAYMENT = "PaymentRefundRequestWrapper"; + + if(requestDTO.toString().contains(REFUND_PAYMENT)){ + LOG.debug("LOADING REFUND PAYMENT SERVICE"); + return new PaymentRefundRequestHandler(); + + } else if(requestDTO.toString().contains(MAKE_PAYMENT)){ + LOG.debug("LOADING MAKE PAYMENT SERVICE"); + return new PaymentRequestHandler(); + } return null; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 78927f6d..909a3c1b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -92,8 +92,8 @@ protected void init(ChargePaymentRequestWrapperDTO extendedRequestDTO) throws Ex @Override protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exception { - AmountTransactionRequestBean requestBean = wrapperDTO.getAmountTransactionRequestBean(); - AmountTransactionRequestBean.amountTransaction request = requestBean.getAmountTransaction(); + PaymentRefundTransactionRequestBean requestBean = wrapperDTO.getPaymentRefundTransactionRequestBean(); + PaymentRefundTransactionRequestBean.AmountTransaction request = requestBean.getAmountTransaction(); ChargePaymentAmount paymentAmount = request.getPaymentAmount(); PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); PaymentChargingMetaData metaData = paymentAmount.getChargingMetaData(); @@ -165,8 +165,8 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) } try { - AmountTransactionRequestBean requestBean = extendedRequestDTO.getAmountTransactionRequestBean(); - AmountTransactionRequestBean.amountTransaction request = requestBean.getAmountTransaction(); + PaymentRefundTransactionRequestBean requestBean = extendedRequestDTO.getPaymentRefundTransactionRequestBean(); + PaymentRefundTransactionRequestBean.AmountTransaction request = requestBean.getAmountTransaction(); ChargePaymentAmount paymentAmount = request.getPaymentAmount(); PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); PaymentChargingMetaData metadata = paymentAmount.getChargingMetaData(); From 087e0f5ff20817f2f00f62b361b11898b0617eec Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Mon, 13 Feb 2017 13:12:58 +0530 Subject: [PATCH 014/112] Recorrect Code --- .../services/dep/sandbox/dao/PaymentDAO.java | 10 +++++----- .../dao/hibernate/HibernatePaymentDAO.java | 12 +++++------ .../custom/AmountTransactionRequestBean.java | 10 +++++----- .../dep/sandbox/service/PaymentService.java | 10 +++++----- .../credit/PatialRefundRequestHandler.java | 3 +++ .../payment/PaymentRefundRequestHandler.java | 20 +++++++++---------- .../payment/PaymentRefundResponseWrapper.java | 10 +++++----- .../payment/PaymentRequestFactory.java | 10 +++++----- .../payment/PaymentRequestHandler.java | 13 +++++++----- .../payment/PaymentResponseWrapper.java | 10 +++++----- 10 files changed, 56 insertions(+), 52 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java index 539af154..041f5fe7 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java index 5504b0d8..74e85661 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.hibernate; @@ -136,7 +136,7 @@ public Integer saveAttributeValue(AttributeValues valueObj) throws Exception { saveOrUpdate(valueObj); values = valueObj.getAttributeValueId(); } catch (Exception e) { - LOG.error("saveAttributeValue", e); + LOG.error("###PAYMENT### Error in save AttributeValue", e); throw e; } return values; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java index 6d64ce8a..2e3dc5fd 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 5505dc20..4ffe20da 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.service; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index 928988ac..f3dceb30 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -371,6 +371,7 @@ public Integer saveClientCorrelator(String endUserId, String correlator, String } catch (Exception ex) { LOG.error("###PATIAL_REFUND_CREDIT### Error in processing save of clientCorrelator request. ", ex); responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } return correlatorid; } @@ -424,6 +425,7 @@ public void saveTransaction(RefundResponseBean responseBean) } catch (Exception ex) { LOG.error("###PARTIAL_REFUND### Error in processing save transaction. ", ex); responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } @@ -453,6 +455,7 @@ public void saveReferenceCode(String endUserId, String referenceCode, String use } catch (Exception ex) { LOG.error("###CREDIT### Error in processing save of referenceCode request. ", ex); responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 10067a98..e0f869b0 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; @@ -175,7 +175,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) String endUserIdPath = extendedRequestDTO.getEndUserId(); String endUserIdRequest = request.getEndUserId(); String endUserId = getLastMobileNumber(endUserIdPath); -// String originalReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); String originalServerReferenceCode = CommonUtil .getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); @@ -196,6 +195,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) // Save Request Log + APITypes apiTypes = dao.getAPIType(RequestType.PAYMENT.toString()); //This has Hardcoded value @@ -345,10 +345,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) responseBean.setServerReferenceCode(serverReferenceCode); responseBean.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); - // Get the Charged Tax Amount - - Double chargedTaxAmount = Double.parseDouble(taxAmount); - // set transaction operation status as charged ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName()); Double updateBalance = manageNumber.getBalance() + (chargeAmount + chargedTaxAmount); @@ -402,7 +398,6 @@ public Integer saveTransaction(PaymentRefundTransactionResponseBean responseBean try { AttributeValues valueObj = new AttributeValues(); String tableName = TableName.NUMBERS.toString().toLowerCase(); -// String attributeName = AttributeName.Refund.toString().toLowerCase(); //original String attributeName = AttributeName.refundUser.toString().toLowerCase(); APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); @@ -428,6 +423,7 @@ public Integer saveTransaction(PaymentRefundTransactionResponseBean responseBean } catch (Exception ex) { LOG.error("###REFUND### Error in processing save transaction. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } return transactionId; } @@ -456,6 +452,7 @@ public void saveClientCorrelator(String endUserId, String clientCorrelator, Stri } catch (Exception ex) { LOG.error("###REFUND### Error in processing save insertion of clientCorrelator request. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } @@ -491,6 +488,7 @@ public void saveReferenceCode(String endUserId, String referenceCode, String use } catch (Exception ex) { LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java index 8d626e24..6443ba1a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index 1c10b1ea..a577c074 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 909a3c1b..62e5c41e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; @@ -436,6 +436,7 @@ private Integer saveTransaction(ChargePaymentResponseBean responseBean, String e } catch (Exception ex) { LOG.error("###PAYMENT### Error in processing save transaction. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } return transactionId; } @@ -463,6 +464,7 @@ public void saveClientCorrelator(String endUserId, String clientCorrelator) thro } catch (Exception ex) { LOG.error("###PAYMENT### Error in processing save insertion of clientCorrelator request. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } @@ -498,6 +500,7 @@ public void saveReferenceCode(String endUserId, String referenceCode, String use } catch (Exception ex) { LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java index e1fa2684..ea6fa589 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; From 36232872f62f1967af415dd33482819897657e66 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Mon, 13 Feb 2017 10:32:53 +0530 Subject: [PATCH 015/112] alter some classes --- dep-sandbox/deploy/config.yml | 4 ++-- .../services/dep/sandbox/service/PaymentService.java | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dep-sandbox/deploy/config.yml b/dep-sandbox/deploy/config.yml index 9e42fcc9..01d89285 100644 --- a/dep-sandbox/deploy/config.yml +++ b/dep-sandbox/deploy/config.yml @@ -1,8 +1,8 @@ database: driverClass: com.mysql.cj.jdbc.Driver user: root - password: root - url: jdbc:mysql://localhost/sandbox?useSSL=false + password: + url: jdbc:mysql:///?useSSL=false server: applicationConnectors: - type: http diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 4ffe20da..6582b242 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -58,9 +58,8 @@ public Response makePayment( if (makePaymentRequestBean != null) { LOG.debug(makePaymentRequestBean); } - - - if(makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Charged")){ + //Separate Charged and Refunded request calls + if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Charged")) { ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); requestDTO.setHttpRequest(request); @@ -83,8 +82,7 @@ public Response makePayment( return response; } - - }else { + } else { PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); requestDTO.setHttpRequest(request); @@ -115,5 +113,4 @@ public Response makePayment( } - } From 23c4c2431a7150e05f796e872f331e9f28c0727b Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Tue, 14 Feb 2017 10:35:20 +0530 Subject: [PATCH 016/112] solve HUBDEV-790 --- dep-sandbox/README.md | 212 ++++++++++++++++-- ...-sandbox1_5_0.sql => dep-sandbox1_6_0.sql} | 0 .../dbscripts/migration1_5_0to1_6_0.sql | 6 + .../dep/sandbox/service/PaymentService.java | 7 - .../payment/PaymentRefundRequestHandler.java | 9 +- .../dep/sandbox/util/ServiceName.java | 2 +- 6 files changed, 206 insertions(+), 30 deletions(-) rename dep-sandbox/dbscripts/{dep-sandbox1_5_0.sql => dep-sandbox1_6_0.sql} (100%) create mode 100644 dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql diff --git a/dep-sandbox/README.md b/dep-sandbox/README.md index 72ef644e..acc4f584 100644 --- a/dep-sandbox/README.md +++ b/dep-sandbox/README.md @@ -849,17 +849,27 @@ http://:/{v1}/credit/{msisdn}/refund Request Body : ``` { - "refundRequest":{ - "amount":0, - "clientCorrelator":"clientCorrelator", - "reasonForRefund":"reasonForRefund", - "merchantIdentification":"merchantIdentification", - "serverTransactionReference":"serverTransactionReference", - "receiptRequest":{ - "notifyURL":"notifyURL", - "callbackData":"callbackData" - } - } + "refundRequest": { + "clientCorrelator":"54321", + "msisdn": "tel:+12345678901", + "originalServerReferenceCode": "ABC-123", + "reasonForRefund": "adjustment", + "refundAmount": 1, + "paymentAmount": { + "chargingInformation": { + "amount": "10", + "currency": "USD", + "description": "Alien Invaders Game" + }, + "chargingMetaData": { + "onBehalfOf": "Example Games Inc", + "purchaseCategoryCode": "Game", + "channel": "WAP", + "tax": "0" + } + }, + "referenceCode": "REF-12345" + } } ``` @@ -867,18 +877,31 @@ Response : ``` { "refundResponse": { - "amount": 0, - "serverTransactionReference": "serverTransactionReference", - "clientCorrelator": "clientCorrelator", - "reasonForRefund": "reasonForRefund", - "merchantIdentification": "merchantIdentification", - "receiptResponse": { - "notifyURL": "notifyURL", - "callbackData": "callbackData", - "resourceURL": "http://:/{v1}/credit/{msisdn}/refund" - } + "clientCorrelator": "54321", + "endUserID": "tel:+12345678901", + "originalServerReferenceCode": "ABC-123", + "reasonForRefund": "adjustment", + "refundAmount": 1, + "paymentAmount": { + "chargingInformation": { + "amount": "10", + "currency": "USD", + "description": "Alien Invaders Game" + }, + "chargingMetaData": { + "onBehalfOf": "Example Games Inc", + "purchaseCategoryCode": "Game", + "channel": "WAP", + "tax": "0" + } + }, + "referenceCode": "REF-12345", + "resourceURL": "", + "transactionOperationStatus": "Refunded", + "serverReferanceCode": "000014" } } + ``` @@ -1178,3 +1201,150 @@ Response : 200 OK will be returned if the service is successfully added for the msisdn. Unless 400 Bad Request will be returned +###6.6 Payment Service + +####6.6.1 Introduction + +Payment service will provide the Service providers a list of payment services available for the given MSISDN and based on the services available service provider can make/refund payment. Basically Payment API supports 2 operations. + +- Charge a User - Charge a subscriber for a service provided by your Web application. +- Refund a User - Refund a end user + +####6.6.2 API features with postman testing + +Request : + +Type - POST + +Request URI: +``` +http://:/payment/{v1}/transaction/{endUserId}/amount +``` + +Request Body : +``` +{ + "amountTransaction":{ + “clientCorrelator”: ”123456:AIN12345”, + "endUserId":"tel:+00123456789", + "paymentAmount":{ + "chargingInformation":{ + "amount":"2", + "currency":"LKR", + "description":"Alien Invaders Game" + }, + "chargingMetaData":{ + "onBehalfOf":"Example Games Inc", + "purchaseCategoryCode":"Game", + "channel":"WAP", + "taxAmount":"0" + } + }, + "referenceCode":"REF-12345", + "transactionOperationStatus":"Charged" + } +} + +``` + +Response : + +``` +{ + "amountTransaction":{ + “clientCorrelator”: ”123456:AIN12345”, + "endUserId":"tel:+00123456789", + "paymentAmount":{ + "chargingInformation":{ + "amount":"10", + "currency":"LKR", + "description":"Alien Invaders Game" + }, + "totalAmountCharged":"12.99", + "chargingMetaData":{ + "onBehalfOf":"Example Games Inc", + "purchaseCategoryCode":"Game", + "channel":"WAP", + "taxAmount":"0" + } + }, + "referenceCode":"REF-12345", + "transactionOperationStatus":"Charged" + } +} + +``` + +- Refund - Refund an end user + +Request : + +Type - POST + +Request URI: +``` +http://:/payment/{v1}/transaction/{endUserId}/amount + +``` +Request Body : +``` + +{ + "amountTransaction":{ + “clientCorrelator”: ”123456:AIN12345”, + "endUserId":"tel:+00123456789", + "originalServerReferenceCode":"ABC-123", + "paymentAmount":{ + "chargingInformation":{ + "amount":"10", + "currency":"USD", + "description":"Alien Invaders Game" + }, + "chargingMetaData":{ + "onBehalfOf":"Example Games Inc", + "purchaseCategoryCode":"Game", + "channel":"WAP", + "taxAmount":"0" + } + }, + "referenceCode":"REF-12345", + "originalServerReferenceCode":"ABC-123", + "transactionOperationStatus":"Refunded" + } +} + +``` + +Response : +``` + +{ + "amountTransaction":{ + “clientCorrelator”: ”123456:AIN12345”, + "endUserId":"tel:+00123456789", + "paymentAmount":{ + "chargingInformation":{ + "amount":"10", + "currency":"USD", + "description":"Alien Invaders" + }, + "chargingMetaData":{ + "onBehalfOf":"Example Games Inc", + "purchaseCategoryCode":"Game", + "channel":"WAP", + "taxAmount":"0" + }, + "totalAmountRefunded":"10" + }, + "referenceCode":"REF-12345", + "originalServerReferenceCode":"ABC-123", + "resourceURL":" tel%3A%2B16309700001/amount/efg789", + "transactionOperationStatus":"Refunded" + } +} + +``` + +Response : +200 OK will be returned if the service is successfully added for the msisdn. +Unless 400 Bad Request will be returned \ No newline at end of file diff --git a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql similarity index 100% rename from dep-sandbox/dbscripts/dep-sandbox1_5_0.sql rename to dep-sandbox/dbscripts/dep-sandbox1_6_0.sql diff --git a/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql b/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql new file mode 100644 index 00000000..0f49b1eb --- /dev/null +++ b/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql @@ -0,0 +1,6 @@ + +INSERT INTO `sbxapiservicecalls` VALUES (10,4,'ChargeUser'),(11,4,'RefundUser'); + +INSERT INTO `sbxattribute` VALUES (29,'patialRefund'),(30,'makePayment'),(31,'clientCorrelatorPayment'),(32,'referenceCodePayment'),(33,'refundUser'); + +INSERT INTO `sbtattributedistribution` VALUES (32,29,9),(33,26,9),(34,25,9),(35,30,10),(36,31,10),(37,32,10),(38,33,11),(39,31,11),(40,32,11); \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 6582b242..b55cc0ed 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -89,7 +89,6 @@ public Response makePayment( requestDTO.setEndUserId(endUserId); requestDTO.setRefundRequestBean(makePaymentRequestBean); requestDTO.setRequestType(RequestType.PAYMENT); - requestDTO.setRequestType(RequestType.PAYMENT); RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); Returnable returnable = null; @@ -105,12 +104,6 @@ public Response makePayment( .build(); return response; } - - - } - - - } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index e0f869b0..b2a1db2b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -345,7 +345,14 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) responseBean.setServerReferenceCode(serverReferenceCode); responseBean.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); - // set transaction operation status as charged + // Get the Charged Tax Amount + Double chargedTaxAmount = Double.parseDouble(taxAmount); + //Total Amount Refunded + Double totalAmountRefunded = chargeAmount+chargedTaxAmount; + // Setting the total Amount Refund + payAmount.setTotalAmountRefunded(totalAmountRefunded.toString()); + + // set transaction operation status as charged ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName()); Double updateBalance = manageNumber.getBalance() + (chargeAmount + chargedTaxAmount); AttributeValues accountStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallRefund, diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index ff75462b..b9744f1f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.util; public enum ServiceName { - GetAttribute, GetProfile, ApplyCredit, PatialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser; + GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser; } From 8a22e492d40123770c8dfe9019dbddcee90b1e14 Mon Sep 17 00:00:00 2001 From: shahintha Date: Tue, 14 Feb 2017 05:12:31 +0000 Subject: [PATCH 017/112] [maven-release-plugin] prepare release v1_6_0-RC1 --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index 192ac4f6..0282ce21 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.2.0-SNAPSHOT + 1.6.0-RC1 ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index 5d00ec05..3eae2b4e 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.2.0-SNAPSHOT + 1.6.0-RC1 ../../pom.xml diff --git a/pom.xml b/pom.xml index 05d93ad3..9064daa2 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.2.0-SNAPSHOT + 1.6.0-RC1 WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_0_0-rc1 + v1_6_0-RC1 From 600892b1b250c3c2b7a471601f656978526cd552 Mon Sep 17 00:00:00 2001 From: shahintha Date: Tue, 14 Feb 2017 05:12:36 +0000 Subject: [PATCH 018/112] [maven-release-plugin] prepare for next development iteration --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index 0282ce21..d53fab8b 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.0-RC1 + 1.6.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index 3eae2b4e..d4df6f27 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.0-RC1 + 1.6.0-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index 9064daa2..0e70b14b 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.6.0-RC1 + 1.6.0-SNAPSHOT WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_6_0-RC1 + v1_0_0-rc1 From fffa6bf664700d4d5d1a81efb6d102b989fb6638 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Wed, 15 Feb 2017 12:33:05 +0530 Subject: [PATCH 019/112] Location Service implementation --- .../custom/LocationRequestWrapperDTO.java | 3 - .../dep/sandbox/service/Application.java | 9 +- .../dep/sandbox/service/LocationService.java | 74 ++++++++ .../location/LocationRequestFactory.java | 33 +++- .../location/LocationRequestHandler.java | 172 ++++++++++-------- .../location/LocationResponseWrapperDTO.java | 23 ++- .../location/TerminalLocation.java | 41 ++--- .../location/TerminalLocationList.java | 24 ++- 8 files changed, 248 insertions(+), 131 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/LocationRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/LocationRequestWrapperDTO.java index b7b17110..af47ad5e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/LocationRequestWrapperDTO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/LocationRequestWrapperDTO.java @@ -2,9 +2,6 @@ public class LocationRequestWrapperDTO extends RequestDTO { - /** - * - */ private static final long serialVersionUID = -1548321785136669498L; private String address; private String requestedAccuracy; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index b9acba65..bfdd99ac 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -16,14 +16,12 @@ package com.wso2telco.services.dep.sandbox.service; -import java.util.ArrayList; -import java.util.List; - import com.wso2telco.core.mi.AbstractApplication; -import com.wso2telco.core.mi.ConfigDTO; - import io.dropwizard.setup.Environment; +import java.util.ArrayList; +import java.util.List; + public class Application extends AbstractApplication { @Override @@ -39,6 +37,7 @@ protected List getRestFulComponents() { listOfObject.add(new WalletService()); listOfObject.add(new WalletConfigurationService()); listOfObject.add(new PaymentService()); + listOfObject.add(new LocationService()); return listOfObject; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java new file mode 100644 index 00000000..c4056254 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.service; + +import com.wordnik.swagger.annotations.*; +import com.wso2telco.services.dep.sandbox.dao.model.custom.LocationRequestWrapperDTO; +import com.wso2telco.services.dep.sandbox.exception.SandboxException; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("/location") +@Produces({MediaType.APPLICATION_JSON}) +@Api(value = "location", description = "Rest Service for Location API") +public class LocationService { + + Log LOG = LogFactory.getLog(LocationService.class); + + @GET + @ApiOperation(value = "locationService", notes = "locationService", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header") }) + public Response location( + @ApiParam(value = "address", required = true) @QueryParam("address") String address, @ApiParam(value = "requestedAccuracy", required = true) @QueryParam("requestedAccuracy") String requestedAccuracy, + @Context HttpServletRequest request) { + LOG.debug("address={address}&requestedAccuracy={requestedAccuracy} invorked :" + address +" " +requestedAccuracy); + LocationRequestWrapperDTO requestDTO = new LocationRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setAddress(address); + requestDTO.setRequestedAccuracy(requestedAccuracy); + requestDTO.setRequestType(RequestType.LOCATION); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + LOG.debug("Location SERVICE RESPONSE : " + response); + return response; + } catch (Exception ex) { + LOG.error("Location SERVICE ERROR : ", ex); + return Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + } + + } + + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestFactory.java index 8fe907d3..e539759c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestFactory.java @@ -1,17 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.location; import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; public class LocationRequestFactory { - - private static LocationRequestHandler instance =null; - // TODO: based on the json body need to implement request handle + + private static Log LOG = LogFactory.getLog(LocationRequestFactory.class); + @SuppressWarnings("rawtypes") public static synchronized RequestHandleable getInstance(final RequestDTO requestDTO) { - if (instance==null) { - instance = new LocationRequestHandler(); - } - return instance; + + if(requestDTO != null){ + + return new LocationRequestHandler(); + } + return null; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java index 58389b4a..75c4ce8c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java @@ -1,14 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.location; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.ws.rs.core.Response.Status; - -import org.apache.commons.logging.LogFactory; - import com.wso2telco.dep.oneapivalidation.service.impl.location.ValidateLocation; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.LocationDAO; @@ -17,6 +23,13 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.User; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import org.apache.commons.logging.LogFactory; + +import javax.ws.rs.core.Response.Status; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; class LocationRequestHandler extends AbstractRequestHandler{ @@ -35,81 +48,84 @@ class LocationRequestHandler extends AbstractRequestHandler Date: Mon, 6 Feb 2017 18:00:56 +0530 Subject: [PATCH 020/112] Change client correlator mandatory --- dep-sandbox/deploy/config.yml | 4 +- dep-sandbox/log/sandbox_service.log | 1407 +++++++++++++++++ .../credit/PatialRefundRequestHandler.java | 2 +- log/sandbox_service.log | 204 +++ 4 files changed, 1614 insertions(+), 3 deletions(-) create mode 100644 dep-sandbox/log/sandbox_service.log create mode 100644 log/sandbox_service.log diff --git a/dep-sandbox/deploy/config.yml b/dep-sandbox/deploy/config.yml index ee9303be..9e42fcc9 100644 --- a/dep-sandbox/deploy/config.yml +++ b/dep-sandbox/deploy/config.yml @@ -1,8 +1,8 @@ database: driverClass: com.mysql.cj.jdbc.Driver user: root - password: - url: jdbc:mysql:///?useSSL=false + password: root + url: jdbc:mysql://localhost/sandbox?useSSL=false server: applicationConnectors: - type: http diff --git a/dep-sandbox/log/sandbox_service.log b/dep-sandbox/log/sandbox_service.log new file mode 100644 index 00000000..2d70b6b1 --- /dev/null +++ b/dep-sandbox/log/sandbox_service.log @@ -0,0 +1,1407 @@ +INFO [2017-02-06 04:39:09,915] org.eclipse.jetty.util.log: Logging initialized @1076ms +INFO [2017-02-06 04:39:09,997] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 04:39:10,175] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 04:39:10,181] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 04:39:10,191] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 04:39:10,250] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 04:39:10,250] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 04:39:10,252] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-06 04:39:11,101] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 04:39:11,104] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2ab0702e{/,null,AVAILABLE} +INFO [2017-02-06 04:39:11,109] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 04:39:11,109] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 04:39:11,117] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,AVAILABLE} +INFO [2017-02-06 04:39:11,158] org.eclipse.jetty.server.ServerConnector: Started application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 04:39:11,159] org.eclipse.jetty.server.ServerConnector: Started admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 04:39:11,160] org.eclipse.jetty.server.Server: Started @2323ms +DEBUG [2017-02-06 04:51:04,682] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 1 0 0 +DEBUG [2017-02-06 04:51:04,684] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 04:51:04,684] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 04:51:04,689] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 04:51:04,809] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 04:51:04,813] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 04:52:01,577] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 04:52:01,577] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-06 04:52:01,578] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 04:52:01,580] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-06 04:52:01,626] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-06 04:57:40,577] com.wso2telco.services.dep.sandbox.service.ProvisionService: /{msisdn}/list/active invoked :MSISDNnullnull +DEBUG [2017-02-06 04:57:40,577] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PROVISIONING FACTORY +DEBUG [2017-02-06 04:57:40,577] com.wso2telco.services.dep.sandbox.servicefactory.provisioning.ProvisioningServiceFactory: ###PROVISION### LOADING LIST OF PROVISIONED SERVICES +DEBUG [2017-02-06 04:57:40,580] com.wso2telco.services.dep.sandbox.servicefactory.provisioning.ListActiveProvisionedServices: Sandbox user : sandbox +DEBUG [2017-02-06 04:57:40,582] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 04:57:40,585] com.wso2telco.services.dep.sandbox.servicefactory.provisioning.ListActiveProvisionedServices: ###PROVISION### Error in Validation : com.wso2telco.dep.oneapivalidation.exceptions.CustomException: SVC0004 +ERROR [2017-02-06 04:57:40,587] com.wso2telco.services.dep.sandbox.service.ProvisionService: LIST ACTIVE PROVISIONED SERVICESE ERROR : +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.getNotWhitelistedNumbers(AbstractRequestHandler.java:95) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:71) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.ProvisionService.getActiveProvisionedServices(ProvisionService.java:123) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:364) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 04:59:32,365] com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService: /service invoked : +DEBUG [2017-02-06 04:59:32,366] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PROVISIONING CONFIGURATION FACTORY +DEBUG [2017-02-06 04:59:32,366] com.wso2telco.services.dep.sandbox.servicefactory.provisionConfig.ProvisioningConfigServiceFactory: ###PROVISIONCONFIG### LOADING SERVICES FOR USER +DEBUG [2017-02-06 04:59:32,368] com.wso2telco.services.dep.sandbox.servicefactory.provisionConfig.RetieveServicesUser: Sandbox user : sandbox +DEBUG [2017-02-06 04:59:32,377] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 04:59:32,378] com.wso2telco.services.dep.sandbox.servicefactory.provisionConfig.RetieveServicesUser: ###PROVISION### Error in Process : java.lang.NullPointerException +DEBUG [2017-02-06 04:59:32,378] com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService: QUERY AVAILVABLE SERVICE FOR USER RESPONSE : OutboundJaxrsResponse{status=400, reason=Bad Request, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-06 05:01:49,128] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 0 0 0 +DEBUG [2017-02-06 05:01:49,128] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:01:49,128] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:01:49,128] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:01:49,131] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:01:49,132] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:02:11,894] com.wso2telco.services.dep.sandbox.service.UserService: 1 10.0 10.0 0 0 0 +DEBUG [2017-02-06 05:02:11,894] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:02:11,894] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:02:11,894] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:02:11,896] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:02:11,918] com.wso2telco.services.dep.sandbox.util.CommonUtil: Error in Parsing MSISDN +! com.wso2telco.core.msisdnvalidator.InvalidMSISDNException: null +! at com.wso2telco.core.msisdnvalidator.MSISDNUtil.parse(MSISDNUtil.java:31) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.util.CommonUtil.extractNumberFromMsisdn(CommonUtil.java:85) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:82) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-06 05:02:11,919] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! com.wso2telco.core.msisdnvalidator.InvalidMSISDNException: null +! at com.wso2telco.core.msisdnvalidator.MSISDNUtil.parse(MSISDNUtil.java:31) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.util.CommonUtil.extractNumberFromMsisdn(CommonUtil.java:85) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:82) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:03:07,376] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 1 0 0 +DEBUG [2017-02-06 05:03:07,376] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:03:07,376] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:03:07,376] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:03:07,378] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:03:07,379] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:03:20,152] com.wso2telco.services.dep.sandbox.service.UserService: 1 0.0 0.0 1 0 0 +DEBUG [2017-02-06 05:03:20,152] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:03:20,152] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:03:20,152] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:03:20,154] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:03:20,155] com.wso2telco.services.dep.sandbox.util.CommonUtil: Error in Parsing MSISDN +! com.wso2telco.core.msisdnvalidator.InvalidMSISDNException: null +! at com.wso2telco.core.msisdnvalidator.MSISDNUtil.parse(MSISDNUtil.java:31) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.util.CommonUtil.extractNumberFromMsisdn(CommonUtil.java:85) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:82) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-06 05:03:20,156] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! com.wso2telco.core.msisdnvalidator.InvalidMSISDNException: null +! at com.wso2telco.core.msisdnvalidator.MSISDNUtil.parse(MSISDNUtil.java:31) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.util.CommonUtil.extractNumberFromMsisdn(CommonUtil.java:85) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:82) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:03:25,630] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 1 0 0 +DEBUG [2017-02-06 05:03:25,630] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:03:25,630] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:03:25,630] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:03:25,633] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:03:25,634] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:11,143] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 0.0 1 0 0 +DEBUG [2017-02-06 05:06:11,143] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:11,143] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:11,143] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:11,146] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:11,146] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:13,200] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 0.0 1 0 0 +DEBUG [2017-02-06 05:06:13,200] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:13,200] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:13,200] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:13,202] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:13,203] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:14,035] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 0.0 1 0 0 +DEBUG [2017-02-06 05:06:14,035] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:14,035] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:14,035] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:14,038] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:14,038] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:17,510] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 10.0 1 0 0 +DEBUG [2017-02-06 05:06:17,510] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:17,510] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:17,510] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:17,513] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:17,513] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:18,340] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 10.0 1 0 0 +DEBUG [2017-02-06 05:06:18,340] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:18,340] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:18,340] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:18,342] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:18,344] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:06:18,783] com.wso2telco.services.dep.sandbox.service.UserService: 10.0 10.0 1 0 0 +DEBUG [2017-02-06 05:06:18,783] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:06:18,783] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:06:18,783] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:06:18,785] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:06:18,786] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:07:19,539] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 1 0 0 +DEBUG [2017-02-06 05:07:19,540] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:07:19,540] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:07:19,540] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:07:19,542] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:07:19,543] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:20:18,726] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:20:18,726] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-06 05:20:18,726] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:20:18,727] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-06 05:20:18,736] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-06 05:20:42,111] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:20:42,111] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API SERVICE CALL TYPES +DEBUG [2017-02-06 05:20:42,115] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPIServicecallHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:20:42,118] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:20:42,224] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPIServicecallHandler: ###USER### No any service call is provided for given api LOCATION +DEBUG [2017-02-06 05:20:42,224] com.wso2telco.services.dep.sandbox.service.UserService: GET API SERVICE CALLS RESPONSE : OutboundJaxrsResponse{status=400, reason=Bad Request, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-06 05:25:20,786] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 0 0 0 +DEBUG [2017-02-06 05:25:20,786] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:25:20,786] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:25:20,786] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:25:20,787] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:25:20,788] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-06 05:25:35,777] com.wso2telco.services.dep.sandbox.service.UserService: 0.0 0.0 0 0 0 +DEBUG [2017-02-06 05:25:35,777] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 05:25:35,777] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING NUMBER SERVICE CALL +DEBUG [2017-02-06 05:25:35,777] com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-06 05:25:35,778] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +ERROR [2017-02-06 05:25:35,779] com.wso2telco.services.dep.sandbox.service.UserService: ###ADD MANAGE NUMBER### Error encountered in UserService : +! java.lang.StringIndexOutOfBoundsException: String index out of range: 0 +! at java.lang.String.charAt(String.java:658) ~[na:1.8.0_121] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.checkMSISDN(ManageNumberServiceHandler.java:137) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:51) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.user.ManageNumberServiceHandler.validate(ManageNumberServiceHandler.java:25) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:66) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.wso2telco.services.dep.sandbox.service.UserService.addManageNumber(UserService.java:230) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-06 05:28:34,540] org.eclipse.jetty.server.ServerConnector: Stopped application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 05:28:34,540] org.eclipse.jetty.server.ServerConnector: Stopped admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 05:28:34,541] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,UNAVAILABLE} +INFO [2017-02-06 05:28:34,543] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2ab0702e{/,null,UNAVAILABLE} +INFO [2017-02-06 06:36:04,307] org.eclipse.jetty.util.log: Logging initialized @1016ms +INFO [2017-02-06 06:36:04,413] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 06:36:04,641] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 06:36:04,649] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 06:36:04,662] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 06:36:04,704] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 06:36:04,704] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 06:36:04,707] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-06 06:36:05,400] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 06:36:05,403] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2ab0702e{/,null,AVAILABLE} +INFO [2017-02-06 06:36:05,408] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 06:36:05,408] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 06:36:05,413] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,AVAILABLE} +INFO [2017-02-06 06:36:05,419] org.eclipse.jetty.server.ServerConnector: Started application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 06:36:05,420] org.eclipse.jetty.server.ServerConnector: Started admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 06:36:05,420] org.eclipse.jetty.server.Server: Started @2132ms +DEBUG [2017-02-06 06:37:49,973] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-06 06:37:49,973] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-06 06:37:49,978] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : null +DEBUG [2017-02-06 06:37:49,978] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: AuthToken: null +DEBUG [2017-02-06 06:37:51,967] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : null +DEBUG [2017-02-06 06:37:51,990] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +INFO [2017-02-06 06:38:40,221] org.eclipse.jetty.server.ServerConnector: Stopped application@5f577419{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 06:38:40,223] org.eclipse.jetty.server.ServerConnector: Stopped admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 06:38:40,225] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,UNAVAILABLE} +INFO [2017-02-06 06:38:40,227] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2ab0702e{/,null,UNAVAILABLE} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index e419dd92..4910a83f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -95,7 +95,7 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti amount), new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, "msisdn", msisdn), - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "clientCorrelator", + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "reasonForRefund", reasonForRefund), diff --git a/log/sandbox_service.log b/log/sandbox_service.log new file mode 100644 index 00000000..4eb43248 --- /dev/null +++ b/log/sandbox_service.log @@ -0,0 +1,204 @@ +INFO [2017-02-06 08:36:25,704] org.eclipse.jetty.util.log: Logging initialized @2198ms +INFO [2017-02-06 08:36:25,830] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 08:36:26,086] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 08:36:26,097] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 08:36:26,117] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 08:36:26,163] org.eclipse.jetty.setuid.SetUIDListener: Opened application@213deac2{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:36:26,164] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:36:26,168] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-06 08:36:27,069] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 08:36:27,072] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@5a6d30e2{/,null,AVAILABLE} +INFO [2017-02-06 08:36:27,079] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 08:36:27,079] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 08:36:27,086] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3cd9aa64{/,null,AVAILABLE} +INFO [2017-02-06 08:36:27,091] org.eclipse.jetty.server.ServerConnector: Started application@213deac2{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:36:27,092] org.eclipse.jetty.server.ServerConnector: Started admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:36:27,092] org.eclipse.jetty.server.Server: Started @3589ms +INFO [2017-02-06 08:36:35,687] org.eclipse.jetty.server.ServerConnector: Stopped application@213deac2{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:36:35,688] org.eclipse.jetty.server.ServerConnector: Stopped admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:36:35,690] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3cd9aa64{/,null,UNAVAILABLE} +INFO [2017-02-06 08:36:35,692] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a6d30e2{/,null,UNAVAILABLE} +INFO [2017-02-06 08:36:48,537] org.eclipse.jetty.util.log: Logging initialized @2655ms +INFO [2017-02-06 08:37:28,325] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 08:37:59,994] org.eclipse.jetty.util.log: Logging initialized @2460ms +INFO [2017-02-06 08:38:00,163] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 08:38:00,504] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 08:38:00,513] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 08:38:00,534] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 08:38:00,582] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:38:00,583] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:38:00,592] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-06 08:38:01,738] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 08:38:01,744] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@24a0c58b{/,null,AVAILABLE} +INFO [2017-02-06 08:38:01,753] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 08:38:01,753] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 08:38:01,761] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1118d539{/,null,AVAILABLE} +INFO [2017-02-06 08:38:01,777] org.eclipse.jetty.server.ServerConnector: Started application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:38:01,780] org.eclipse.jetty.server.ServerConnector: Started admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:38:01,783] org.eclipse.jetty.server.Server: Started @4252ms +DEBUG [2017-02-06 08:39:02,358] com.wso2telco.services.dep.sandbox.service.CreditService: ###CREDIT### /{msisdn}/apply invoked : msisdn - admin +DEBUG [2017-02-06 08:39:02,358] com.wso2telco.services.dep.sandbox.service.CreditService: com.wso2telco.services.dep.sandbox.dao.model.custom.CreditRequestBean@b5bb258 +DEBUG [2017-02-06 08:39:02,360] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING CREDIT CONFIGURATION FACTORY +DEBUG [2017-02-06 08:39:02,361] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditServiceFactory: ###CREDIT### LOADING CREDIT APPLY SERVICE +DEBUG [2017-02-06 08:39:02,375] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: Sandbox user : admin +ERROR [2017-02-06 08:39:02,523] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: ###CREDIT### Error in Validation : com.wso2telco.dep.oneapivalidation.exceptions.CustomException: SVC0002 +DEBUG [2017-02-06 08:39:02,539] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: Location parameters are empty +INFO [2017-02-06 08:39:29,778] org.eclipse.jetty.server.ServerConnector: Stopped application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:39:29,779] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:39:29,781] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1118d539{/,null,UNAVAILABLE} +INFO [2017-02-06 08:39:29,784] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24a0c58b{/,null,UNAVAILABLE} +INFO [2017-02-06 08:39:34,855] org.eclipse.jetty.util.log: Logging initialized @2496ms +INFO [2017-02-06 08:39:35,030] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-06 08:39:35,424] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-06 08:39:35,434] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-06 08:39:35,454] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-06 08:39:35,509] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:39:35,509] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:39:35,513] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-06 08:39:36,479] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-06 08:39:36,484] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@24134cbc{/,null,AVAILABLE} +INFO [2017-02-06 08:39:36,492] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-06 08:39:36,492] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-06 08:39:36,501] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@34c7232c{/,null,AVAILABLE} +INFO [2017-02-06 08:39:36,508] org.eclipse.jetty.server.ServerConnector: Started application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:39:36,509] org.eclipse.jetty.server.ServerConnector: Started admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:39:36,510] org.eclipse.jetty.server.Server: Started @4164ms +INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped application@5b3bb1f7{HTTP/1.1}{localhost:8181} +INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-06 08:41:23,595] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@34c7232c{/,null,UNAVAILABLE} +INFO [2017-02-06 08:41:23,598] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24134cbc{/,null,UNAVAILABLE} From de15b94bacf3c29b9231c2b0e9f69c193aa83c3e Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 09:57:24 +0530 Subject: [PATCH 021/112] Paymrnt DAO layer --- dep-sandbox/deploy/config.yml | 2 +- dep-sandbox/log/sandbox_service.log | 66 +++++++++ .../services/dep/sandbox/dao/PaymentDAO.java | 29 ++++ .../dao/hibernate/HibernatePaymentDAO.java | 134 ++++++++++++++++++ .../dep/sandbox/service/Application.java | 1 + .../dep/sandbox/service/PaymentService.java | 81 +++++++++++ 6 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java diff --git a/dep-sandbox/deploy/config.yml b/dep-sandbox/deploy/config.yml index 9e42fcc9..9c8c72fb 100644 --- a/dep-sandbox/deploy/config.yml +++ b/dep-sandbox/deploy/config.yml @@ -1,7 +1,7 @@ database: driverClass: com.mysql.cj.jdbc.Driver user: root - password: root + password: secret url: jdbc:mysql://localhost/sandbox?useSSL=false server: applicationConnectors: diff --git a/dep-sandbox/log/sandbox_service.log b/dep-sandbox/log/sandbox_service.log index 2d70b6b1..56132e77 100644 --- a/dep-sandbox/log/sandbox_service.log +++ b/dep-sandbox/log/sandbox_service.log @@ -1405,3 +1405,69 @@ INFO [2017-02-06 06:38:40,221] org.eclipse.jetty.server.ServerConnector: Stoppe INFO [2017-02-06 06:38:40,223] org.eclipse.jetty.server.ServerConnector: Stopped admin@28fa700e{HTTP/1.1}{0.0.0.0:8282} INFO [2017-02-06 06:38:40,225] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a2bd7c8{/,null,UNAVAILABLE} INFO [2017-02-06 06:38:40,227] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2ab0702e{/,null,UNAVAILABLE} +INFO [2017-02-07 03:51:51,825] org.eclipse.jetty.util.log: Logging initialized @2819ms +INFO [2017-02-07 03:51:51,945] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 03:51:52,173] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 03:51:52,180] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 03:51:52,208] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 03:51:52,330] org.eclipse.jetty.setuid.SetUIDListener: Opened application@e041f0c{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 03:51:52,332] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a175569{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 03:51:52,336] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-07 03:51:53,321] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 03:51:53,325] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@102efc59{/,null,AVAILABLE} +INFO [2017-02-07 03:51:53,331] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 03:51:53,331] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 03:51:53,337] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@6b8280e6{/,null,AVAILABLE} +INFO [2017-02-07 03:51:53,387] org.eclipse.jetty.server.ServerConnector: Started application@e041f0c{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 03:51:53,387] org.eclipse.jetty.server.ServerConnector: Started admin@6a175569{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 03:51:53,387] org.eclipse.jetty.server.Server: Started @4383ms +DEBUG [2017-02-07 03:52:18,675] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-07 03:52:18,676] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-07 03:52:18,683] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-07 03:52:18,844] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-07 03:52:18,866] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java new file mode 100644 index 00000000..e3553043 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.dao; + +import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; +import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; + +public interface PaymentDAO { + + public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) + throws Exception; + public Integer saveAttributeValue(AttributeValues valueObj) throws Exception; + public AttributeValues getResponse(Integer id) throws Exception; + public boolean saveManageNumbers(ManageNumber manageNumber) throws Exception; +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java new file mode 100644 index 00000000..45133d2f --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.dao.hibernate; + +import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; +import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; +import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.LogFactory; +import org.hibernate.Session; +import org.hibernate.query.Query; + +import javax.persistence.NoResultException; + +public class HibernatePaymentDAO extends AbstractDAO implements PaymentDAO { + + { + LOG = LogFactory.getLog(PaymentDAO.class); + } + + @Override + public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) + throws Exception { + Session session = getSession(); + AttributeValues resultSet = null; + + StringBuilder hql = new StringBuilder(); + + hql.append("SELECT "); + hql.append("val "); + hql.append("FROM "); + hql.append("AttributeValues as val, "); + hql.append("APIServiceCalls AS calls, "); + hql.append("APITypes AS api, "); + hql.append("AttributeDistribution AS dist, "); + hql.append("Attributes AS att, "); + hql.append("ManageNumber AS number "); + hql.append("WHERE "); + hql.append("api.id = calls.apiType.id "); + hql.append("AND calls.apiServiceCallId = dist.serviceCall.apiServiceCallId "); + hql.append("AND dist.distributionId = val.attributeDistribution.distributionId "); + hql.append("AND att.attributeId = dist.attribute.attributeId "); + hql.append("AND api.apiname =:apiName "); + hql.append("AND val.tobject =:tableName "); + hql.append("AND val.value =:attributeValue "); + hql.append("AND att.attributeName =:attributeName "); + + try { + Query query = session.createQuery(hql.toString()); + query.setParameter("apiName", RequestType.PAYMENT.toString()); + query.setParameter("tableName", tableName); + query.setParameter("attributeValue", value); + query.setParameter("attributeName", attributeName); + resultSet = (AttributeValues) query.uniqueResult(); + + } catch (NoResultException e) { + return null; + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in Credit Apply Service ", ex); + throw ex; + } + return resultSet; + } + + @Override + public Integer saveAttributeValue(AttributeValues valueObj) throws Exception { + Integer values; + try { + saveOrUpdate(valueObj); + values = valueObj.getAttributeValueId(); + } catch (Exception e) { + LOG.error("saveAttributeValue", e); + throw e; + } + return values; + } + + @Override + public AttributeValues getResponse(Integer id) throws Exception { + Session session = getSession(); + AttributeValues resultSet = null; + + StringBuilder hql = new StringBuilder(); + + hql.append("SELECT "); + hql.append("val "); + hql.append("FROM "); + hql.append("AttributeValues as val "); + hql.append("WHERE "); + hql.append("val.attributevalueId =:id "); + + try { + Query query = session.createQuery(hql.toString()); + query.setParameter("id", id); + + resultSet = (AttributeValues) query.uniqueResult(); + + } catch (NoResultException e) { + return null; + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in Make Payment Service ", ex); + throw ex; + } + return resultSet; + } + + @Override + public boolean saveManageNumbers(ManageNumber manageNumber) throws Exception { + try { + saveOrUpdate(manageNumber); + } catch (NoResultException e) { + + return false; + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in Payment Service ", ex); + throw ex; + } + return true; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index 48e63127..b9acba65 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -38,6 +38,7 @@ protected List getRestFulComponents() { listOfObject.add(new CreditService()); listOfObject.add(new WalletService()); listOfObject.add(new WalletConfigurationService()); + listOfObject.add(new PaymentService()); return listOfObject; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java new file mode 100644 index 00000000..cb7cefe7 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.service; + +import com.wordnik.swagger.annotations.*; +import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean; +import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestWrapperDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.exception.SandboxException; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("payment/{v1}") +@Produces({MediaType.APPLICATION_JSON}) +@Api(value = "payment/{v1}", description = "Rest Service for Payment API") +public class PaymentService { + + Log LOG = LogFactory.getLog(PaymentService.class); + + @POST + @Path("/transaction/{endUserId}/payment") + @ApiOperation(value = "makePaymentService", notes = "make payment service", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) + public Response makePayment( + @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, + MakePaymentRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { + LOG.debug("###PAYMENT### /{endUserId} invoked : endUserId - " + endUserId); + if (makePaymentRequestBean != null) { + LOG.debug(makePaymentRequestBean); + } + MakePaymentRequestWrapperDTO requestDTO = new MakePaymentRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setMakePaymentRequestBean(makePaymentRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Make Payment SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + } + +} From f1d26e0cacbe204e7d80e53df0b1225255e830b4 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 11:48:57 +0530 Subject: [PATCH 022/112] make payment validations --- .../payment/PaymentRequestHandler.java | 20 +++++++++++++++++++ .../payment/PaymentResponseWrapper.java | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java new file mode 100644 index 00000000..ece606d5 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +public class PaymentRequestHandler { +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java new file mode 100644 index 00000000..ad84aa09 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +public class PaymentResponseWrapper { +} From 6ac36a23363ea2b1ab5e22932094a0ac90e2370f Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 15:17:53 +0530 Subject: [PATCH 023/112] WIP charge user --- dep-sandbox/log/sandbox_service.log | 209 + .../services/dep/sandbox/dao/DaoFactory.java | 6 +- .../services/dep/sandbox/dao/PaymentDAO.java | 2 + .../dao/hibernate/HibernateFactory.java | 4 + .../dao/hibernate/HibernatePaymentDAO.java | 53 + .../dao/model/custom/ChargingMetaData.java | 11 + .../dep/sandbox/service/PaymentService.java | 2 +- .../payment/PaymentRequestFactory.java | 37 +- .../payment/PaymentRequestHandler.java | 492 +- .../payment/PaymentResponseWrapper.java | 27 +- .../servicefactory/wallet/AttributeName.java | 3 +- .../dep/sandbox/util/ServiceName.java | 2 +- log/sandbox_service.log | 5194 +++++++++++++++++ 13 files changed, 6032 insertions(+), 10 deletions(-) diff --git a/dep-sandbox/log/sandbox_service.log b/dep-sandbox/log/sandbox_service.log index 56132e77..a0d0d8f7 100644 --- a/dep-sandbox/log/sandbox_service.log +++ b/dep-sandbox/log/sandbox_service.log @@ -1471,3 +1471,212 @@ DEBUG [2017-02-07 03:52:18,676] com.wso2telco.services.dep.sandbox.servicefactor DEBUG [2017-02-07 03:52:18,683] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox DEBUG [2017-02-07 03:52:18,844] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox DEBUG [2017-02-07 03:52:18,866] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +DEBUG [2017-02-07 04:50:38,661] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-07 04:50:38,663] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-07 04:50:38,663] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-07 04:50:38,667] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-07 04:50:38,669] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +INFO [2017-02-07 04:53:23,884] org.eclipse.jetty.server.ServerConnector: Stopped application@e041f0c{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 04:53:23,888] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a175569{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 04:53:23,888] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@6b8280e6{/,null,UNAVAILABLE} +INFO [2017-02-07 04:53:23,892] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@102efc59{/,null,UNAVAILABLE} +INFO [2017-02-07 04:54:20,648] org.eclipse.jetty.util.log: Logging initialized @1166ms +INFO [2017-02-07 04:54:20,754] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 04:54:21,018] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 04:54:21,025] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 04:54:21,039] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 04:54:21,085] org.eclipse.jetty.setuid.SetUIDListener: Opened application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 04:54:21,086] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 04:54:21,088] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-07 04:54:21,919] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 04:54:21,923] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1daf3b44{/,null,AVAILABLE} +INFO [2017-02-07 04:54:21,929] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 04:54:21,929] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 04:54:21,937] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@64f1fd08{/,null,AVAILABLE} +INFO [2017-02-07 04:54:21,945] org.eclipse.jetty.server.ServerConnector: Started application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 04:54:21,946] org.eclipse.jetty.server.ServerConnector: Started admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 04:54:21,946] org.eclipse.jetty.server.Server: Started @2466ms +DEBUG [2017-02-07 04:54:41,754] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING USER FACTORY +DEBUG [2017-02-07 04:54:41,755] com.wso2telco.services.dep.sandbox.servicefactory.user.UserServiceFactory: LOADING API TYPES +DEBUG [2017-02-07 04:54:41,761] com.wso2telco.services.dep.sandbox.servicefactory.user.RetrieveAPITypeServiceHandler: Sandbox user : sandbox +DEBUG [2017-02-07 04:54:41,869] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateUserDAO: No user found as : sandbox +DEBUG [2017-02-07 04:54:41,887] com.wso2telco.services.dep.sandbox.service.UserService: GET API TYPES SERVICE RESPONSE : OutboundJaxrsResponse{status=200, reason=OK, hasEntity=true, closed=false, buffered=false} +INFO [2017-02-07 06:46:01,888] org.eclipse.jetty.server.ServerConnector: Stopped application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 06:46:01,890] org.eclipse.jetty.server.ServerConnector: Stopped admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 06:46:01,892] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@64f1fd08{/,null,UNAVAILABLE} +INFO [2017-02-07 06:46:01,895] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1daf3b44{/,null,UNAVAILABLE} +INFO [2017-02-07 06:49:32,420] org.eclipse.jetty.util.log: Logging initialized @1178ms +INFO [2017-02-07 06:49:32,532] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 06:49:32,804] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 06:49:32,812] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 06:49:32,825] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 06:49:32,879] org.eclipse.jetty.setuid.SetUIDListener: Opened application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 06:49:32,880] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 06:49:32,884] org.eclipse.jetty.server.Server: jetty-9.2.z-SNAPSHOT +INFO [2017-02-07 06:49:33,727] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 06:49:33,731] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1daf3b44{/,null,AVAILABLE} +INFO [2017-02-07 06:49:33,737] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 06:49:33,737] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 06:49:33,743] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@64f1fd08{/,null,AVAILABLE} +INFO [2017-02-07 06:49:33,752] org.eclipse.jetty.server.ServerConnector: Started application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 06:49:33,753] org.eclipse.jetty.server.ServerConnector: Started admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 06:49:33,754] org.eclipse.jetty.server.Server: Started @2514ms +DEBUG [2017-02-07 06:56:35,866] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 06:56:35,866] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@20b8df82 +DEBUG [2017-02-07 06:56:35,867] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +ERROR [2017-02-07 06:56:35,872] com.wso2telco.services.dep.sandbox.service.PaymentService: Make Payment SERVICE ERROR +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) ~[dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [dep-sanbox-1.2.0-SNAPSHOT.jar:na] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:03:57,617] org.eclipse.jetty.server.ServerConnector: Stopped application@11ee02f8{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:03:57,618] org.eclipse.jetty.server.ServerConnector: Stopped admin@4102b1b1{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:03:57,619] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@64f1fd08{/,null,UNAVAILABLE} +INFO [2017-02-07 07:03:57,623] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1daf3b44{/,null,UNAVAILABLE} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java index 52a0a091..c4bbdd7b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java @@ -35,7 +35,11 @@ public static NumberDAO getNumberDAO() { public static WalletDAO getWalletDAO(){ return new HibernateFactory().getHibernateWalletDAO(); } - + + public static PaymentDAO getPaymentDAO(){ + return new HibernateFactory().getHibernatePaymentDAO(); + } + public static LoggingDAO getLoggingDAO(){ return new HibernateFactory().getHibernateLoggingDao(); } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java index e3553043..539af154 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java @@ -21,6 +21,8 @@ public interface PaymentDAO { + public AttributeValues getAttributeValue(String endUserId, String serviceCall, String attribute, Integer userId) + throws Exception; public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) throws Exception; public Integer saveAttributeValue(AttributeValues valueObj) throws Exception; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java index 19fce722..b10d5bda 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java @@ -33,6 +33,10 @@ public HibernateNumberDAO getHibernateNumberDAO() { public HibernateWalletDAO getHibernateWalletDAO() { return new HibernateWalletDAO(); } + + public HibernatePaymentDAO getHibernatePaymentDAO() { + return new HibernatePaymentDAO(); + } public HibernateLoggingDao getHibernateLoggingDao() { return new HibernateLoggingDao(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java index 45133d2f..5504b0d8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java @@ -20,6 +20,7 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; import com.wso2telco.services.dep.sandbox.util.RequestType; +import com.wso2telco.services.dep.sandbox.util.TableName; import org.apache.commons.logging.LogFactory; import org.hibernate.Session; import org.hibernate.query.Query; @@ -32,6 +33,58 @@ public class HibernatePaymentDAO extends AbstractDAO implements PaymentDAO { LOG = LogFactory.getLog(PaymentDAO.class); } + @Override + public AttributeValues getAttributeValue(String endUserId, String serviceCall, String attribute, Integer userId) + throws Exception { + + Session session = getSession(); + AttributeValues resultSet = null; + + StringBuilder hql = new StringBuilder(); + + hql.append("SELECT "); + hql.append("val "); + hql.append("FROM "); + hql.append("AttributeValues as val, "); + hql.append("APIServiceCalls AS calls, "); + hql.append("APITypes AS api, "); + hql.append("AttributeDistribution AS dist, "); + hql.append("Attributes AS att, "); + hql.append("ManageNumber AS number "); + hql.append("WHERE "); + hql.append("api.id = calls.apiType.id "); + hql.append("AND calls.apiServiceCallId = dist.serviceCall.apiServiceCallId "); + hql.append("AND dist.distributionId = val.attributeDistribution.distributionId "); + hql.append("AND att.attributeId = dist.attribute.attributeId "); + hql.append("AND number.id = val.ownerdid "); + hql.append("AND api.apiname =:apiName "); + hql.append("AND calls.serviceName =:serviceName "); + hql.append("AND val.tobject =:tableName "); + hql.append("AND number.Number =:number "); + hql.append("AND att.attributeName =:attName "); + hql.append("AND number.user.id =:userId "); + + try { + Query query = session.createQuery(hql.toString()); + query.setParameter("apiName", RequestType.PAYMENT.toString()); + query.setParameter("serviceName", serviceCall); + query.setParameter("number", endUserId); + query.setParameter("tableName", TableName.NUMBERS.toString().toLowerCase()); + query.setParameter("attName", attribute); + query.setParameter("userId", userId); + resultSet = (AttributeValues) query.uniqueResult(); + + } catch (NoResultException e) { + return null; + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in Make Payment Service ", ex); + throw ex; + } + return resultSet; + } + + + @Override public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) throws Exception { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java index 7ca25b0f..3a43442b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java @@ -27,6 +27,8 @@ public class ChargingMetaData { private String channel; + private String taxAmount; + public String getOnBehalfOf() { return onBehalfOf; } @@ -51,6 +53,14 @@ public void setChannel(String channel) { this.channel = channel; } + public String getTaxAmount() { + return taxAmount; + } + + public void setTaxAmount(String taxAmount) { + this.taxAmount = taxAmount; + } + public String toString() { StringBuilder builder = new StringBuilder(); @@ -61,4 +71,5 @@ public String toString() { return builder.toString(); } + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index cb7cefe7..ed0932b4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -45,7 +45,7 @@ public class PaymentService { Log LOG = LogFactory.getLog(PaymentService.class); @POST - @Path("/transaction/{endUserId}/payment") + @Path("/{endUserId}/transactions/amount") @ApiOperation(value = "makePaymentService", notes = "make payment service", response = Response.class) @ApiImplicitParams({ @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index 16387749..d561cecc 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -1,12 +1,41 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.wso2telco.services.dep.sandbox.servicefactory.payment; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; + public class PaymentRequestFactory { - // TODO: based on the json body need to implement request handle - public static RequestHandleable getInstance(final RequestDTO requestDTO) { + private static Log LOG = LogFactory.getLog(PaymentRequestFactory.class); + + // TODO: based on the json body need to implement request handle + public static RequestHandleable getInstance(final RequestDTO requestDTO) { + + final String MAKE_PAYMENT = "payment"; + + if (requestDTO.getRequestPath().contains(MAKE_PAYMENT)) { + LOG.debug("LOADING MAKE PAYMENT SERVICE"); + return new PaymentRequestHandler(); + } - return null; - } + return null; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index ece606d5..f6e85a19 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -16,5 +16,495 @@ package com.wso2telco.services.dep.sandbox.servicefactory.payment; -public class PaymentRequestHandler { +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.ibm.icu.math.BigDecimal; +import com.wso2telco.core.dbutils.exception.PolicyError; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; +import com.wso2telco.services.dep.sandbox.dao.NumberDAO; +import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; + +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; + +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; +import com.wso2telco.services.dep.sandbox.util.*; +import org.apache.commons.lang.math.NumberUtils; +import org.apache.commons.logging.LogFactory; +import scala.util.parsing.combinator.testing.Str; + +import javax.annotation.Nonnull; +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Currency; +import java.util.Date; +import java.util.List; + +public class PaymentRequestHandler extends AbstractRequestHandler { + + + private PaymentDAO paymentDAO; + private LoggingDAO loggingDAO; + private NumberDAO numberDAO; + private MakePaymentRequestWrapperDTO requestWrapperDTO; + private PaymentResponseWrapper responseWrapper; + private MessageLogHandler logHandler; + private String serviceCallPayment; + private Integer transactionId; + + + { + LOG = LogFactory.getLog(PaymentRequestHandler.class); + paymentDAO = DaoFactory.getPaymentDAO(); + loggingDAO = DaoFactory.getLoggingDAO(); + numberDAO = DaoFactory.getNumberDAO(); + dao = DaoFactory.getGenaricDAO(); + logHandler = MessageLogHandler.getInstance(); + } + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + List address = new ArrayList(); + address.add(requestWrapperDTO.getEndUserId()); + return address; + } + + @Override + protected void init(MakePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { + responseWrapper = new PaymentResponseWrapper(); + requestWrapperDTO = extendedRequestDTO; + } + + @Override + protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Exception { + MakePaymentRequestBean requestBean = wrapperDTO.getMakePaymentRequestBean(); + MakePaymentRequestBean.makePayment request = requestBean.getmakePayment(); + PaymentAmount paymentAmount = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + ChargingMetaData metaData = paymentAmount.getChargingMetaData(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserID = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); + String msisdn = CommonUtil.getNullOrTrimmedValue(request.getEndUserId()); + String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount().toString()); + String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency().toString()); + String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metaData.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metaData.getChannel()); + String taxAmount =CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + + List validationRulesList = new ArrayList<>(); + + try { + + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, + "endUserID", endUserID)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, + "endUserID", msisdn)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "amount", amount)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "currency", currency)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "description", description)); + if (metaData != null) { + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "onBehalfOf", onBehalfOf)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "categoryCode", categoryCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "channel", channel)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "taxAmount", taxAmount)); + } + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "referenceCode", referenceCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "notifyURL", notifyURL)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + }catch (CustomException ex) { + LOG.error("###PAYMENT### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + return true; + + } + + @Override + protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + try { + MakePaymentRequestBean requestBean = extendedRequestDTO.getMakePaymentRequestBean(); + MakePaymentRequestBean.makePayment request = requestBean.getmakePayment(); + PaymentAmount paymentAmount = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + ChargingMetaData metadata = paymentAmount.getChargingMetaData(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserIdPath = extendedRequestDTO.getEndUserId(); + String endUserIdRequest = request.getEndUserId(); + String endUserId = getLastMobileNumber(endUserIdPath); + String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); + String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String taxAmount =CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + serviceCallPayment = ServiceName.ChargeUser.toString(); + String userName = extendedRequestDTO.getUser().getUserName(); + Integer userId = extendedRequestDTO.getUser().getId(); + + MakePaymentResponseBean responseBean = new MakePaymentResponseBean(); + PaymentAmountResponse payAmount = new PaymentAmountResponse(); + ChargingInformation chargeInformation = new ChargingInformation(); + ChargingMetaData chargeMetaData = new ChargingMetaData(); + + // Save Request Log + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); + + Gson gson = new Gson(); + String jsonString = gson.toJson(requestBean); + MessageLog messageLog = new MessageLog(); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setRequest(jsonString); + messageLog.setMessageTimestamp(new Date()); + + int ref_number = loggingDAO.saveMessageLog(messageLog); + String serverReferenceCodeFormat = String.format("%06d", ref_number); + String serverReferenceCode = "PAYMENT_REF" + serverReferenceCodeFormat; + + // check already charge request against client correlator + if (clientCorrelator != null) { + String tableAttributeValue = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + String clientCorrelatorAttribute = AttributeName.clientCorrelatorWallet.toString(); + AttributeValues duplicateClientCorrelator = paymentDAO.checkDuplicateValue(serviceCallPayment, + clientCorrelator, clientCorrelatorAttribute, tableAttributeValue); + if (duplicateClientCorrelator != null) { + APIServiceCalls apiServiceCall = duplicateClientCorrelator.getAttributedid().getAPIServiceCall(); + String serviceCall = apiServiceCall.getServiceName(); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer id = duplicateClientCorrelator.getOwnerdid(); + AttributeValues response = paymentDAO.getResponse(id); + if (serviceCall.equals(serviceCallPayment) && (response.getOwnerdid() == manageNumber.getId())) { + // return already sent response + MakePaymentResponseBean obj = null; + obj = gson.fromJson(response.getValue(), MakePaymentResponseBean.class); + MakePaymentDTO dto = new MakePaymentDTO(); + dto.setmakePayment(obj); + responseWrapper.setMakePaymentDTO(dto); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + } else { + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Clientcorrelator is already used")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + } + } + + // check path param endUserId and request body endUserId + if (!(endUserIdPath.equals(endUserIdRequest))) { + LOG.error("###PAYMENT### two different endUserId provided"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "two different endUserId provided")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check account valid amount + if (NumberUtils.isNumber(amount) != true) { + LOG.error("###PAYMENT### amount should be a valid positive number"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "amount should be positive number")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check account amount decimal format + Double chargeAmount = Double.parseDouble(amount); + BigDecimal bigDecimal = new BigDecimal(amount); + Integer decimalDigits = bigDecimal.scale(); + if (!((decimalDigits <= 2) && (decimalDigits >= 0)) || chargeAmount < 0) { + LOG.error("###PAYMENT### amount should be a whole number or two digit decimal"); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "amount should be a whole or two digit decimal positive number")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check valid account currency for endUserId + boolean isValidCurrency = currencySymbol(currency); + if (!isValidCurrency) { + LOG.error("###PAYMENT### currency code not valid accorfing to ISO 4217"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "currency code not valid accorfing to ISO 4217")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); + String accountCurrencyAttribute = AttributeName.Currency.toString().toLowerCase(); + AttributeValues accountCurrencyValue = paymentDAO.getAttributeValue(endUserId, serviceCallBalanceLookUp, + accountCurrencyAttribute, userId); + if (accountCurrencyValue != null) { + String accountCurrency = accountCurrencyValue.getValue(); + if (!(currency.equals(accountCurrency))) { + LOG.error("###PAYMENT### Valid currency doesn't exists for the given inputs"); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "Valid currency does not exist for the given input parameters")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + } + + // check channel + if (channel != null && !containsChannel(channel)) { + LOG.error("###PAYMENT### Valid channel doesn't exists for the given inputs"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Valid channel doesn't exists for the given inputs")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check already charged request against reference code + String referenceCodeAttribue = AttributeName.referenceCodeWallet.toString(); + String tableNumber = TableName.NUMBERS.toString().toLowerCase(); + AttributeValues duplicateReferenceCode = paymentDAO.checkDuplicateValue(serviceCallPayment, referenceCode, + referenceCodeAttribue, tableNumber); + if (duplicateReferenceCode != null) { + LOG.error("###PAYMENT### Already charged for this reference code"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Already charged for this reference code")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + responseBean.setClientCorrelator(clientCorrelator); + responseBean.setEndUserId(endUserIdPath); + + chargeInformation.setAmount(amount); + chargeInformation.setCurrency(currency); + chargeInformation.setDescription(description); + + if (onBehalfOf != null || categoryCode != null || channel != null) { + chargeMetaData.setPurchaseCategoryCode(categoryCode); + chargeMetaData.setChannel(channel); + chargeMetaData.setOnBehalfOf(onBehalfOf); + chargeMetaData.setTaxAmount(taxAmount); + } + + responseBean.setReferenceCode(referenceCode); + responseBean.setServerReferenceCode(serverReferenceCode); + responseBean.setNotifyURL(notifyURL); + + ManageNumber manageNumber = numberDAO.getNumber(endUserId, + extendedRequestDTO.getUser().getUserName().toString()); + Double balance = manageNumber.getBalance(); + AttributeValues transactionStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallPayment, + AttributeName.transactionStatus.toString(), userId); + + // Get the tax Amount + Double chargeTaxAmount = Double.parseDouble(taxAmount); + + // transaction operation status as denied + if ((balance < chargeAmount)) { + LOG.error("###PAYMENT### Denied : Account balance insufficient to charge request "); + responseWrapper.setHttpStatus(Response.Status.FORBIDDEN); + responseWrapper + .setRequestError(constructRequestError(POLICYEXCEPTION, PolicyError.NO_VALID_SERVICES_AVAILABLE, + "Denied : Account balance insufficient to charge request")); + return responseWrapper; + } + + // set transaction operation status as refused + else if (transactionStatusValue != null) { + String transactionStatus = transactionStatusValue.getValue(); + if (transactionStatus.equals(TransactionStatus.Refused.toString())) { + responseBean.setTransactionOperationStatus(TransactionStatus.Refused.toString()); + } + // set transaction status as charged + } else if (balance >= chargeAmount) { + balance = balance - (chargeAmount+chargeTaxAmount); + // walletDAO.updateBalance(endUserId, balance, userId); + manageNumber.setBalance(balance); + numberDAO.saveManageNumbers(manageNumber); + responseBean.setTransactionOperationStatus(TransactionStatus.Charged.toString()); + } + + MakePaymentDTO makePaymentDTO = new MakePaymentDTO(); + payAmount.setChargingInformation(chargeInformation); + if (onBehalfOf != null || categoryCode != null || channel != null) { + payAmount.setChargingMetaData(chargeMetaData); + } + responseBean.setPaymentAmount(payAmount); + makePaymentDTO.setmakePayment(responseBean); + responseWrapper.setMakePaymentDTO(makePaymentDTO); + responseWrapper.setHttpStatus(Response.Status.OK); + + // save payment transaction + transactionId = saveTransaction(responseBean, endUserId, userName); + + // save client correlator + if (clientCorrelator != null) { + saveClientCorrelator(endUserId, clientCorrelator); + } + saveReferenceCode(endUserId, referenceCode, userName); + + }catch (Exception ex) { + LOG.error("###PAYMENT### Error Occured in PAYMENT Service. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); + } + return responseWrapper; + + } + + + private Integer saveTransaction(MakePaymentResponseBean responseBean, String endUserId, String userName) + throws Exception { + Integer transactionId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.makePayment.toString().toLowerCase(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + String jsonInString = null; + Gson gson = new Gson(); + + JsonElement je = new JsonParser().parse(gson.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(jsonInString); + transactionId = paymentDAO.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in processing save transaction. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + return transactionId; + } + + public void saveClientCorrelator(String endUserId, String clientCorrelator) throws Exception { + Integer ownerId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + String attributeName = AttributeName.clientCorrelatorPayment.toString(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ownerId = transactionId; + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(clientCorrelator); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in processing save insertion of clientCorrelator request. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + private static boolean currencySymbol(@Nonnull final String currencyCode) { + try { + final Currency currency = Currency.getInstance(currencyCode); + return true; + } catch (final IllegalArgumentException x) { + return false; + } + } + + public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.clientCorrelatorPayment.toString(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(referenceCode); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + public boolean containsChannel(String channelValue) { + for (Channel channel : Channel.values()) { + if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { + return true; + } + } + return false; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java index ad84aa09..801d28df 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -16,5 +16,30 @@ package com.wso2telco.services.dep.sandbox.servicefactory.payment; -public class PaymentResponseWrapper { +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class PaymentResponseWrapper extends AbstractReturnWrapperDTO { + + private MakePaymentDTO makePaymentDTO; + + public MakePaymentDTO getMakePaymentDTO() { + return makePaymentDTO; + } + + public void setMakePaymentDTO(MakePaymentDTO makePaymentDTO) { + this.makePaymentDTO = makePaymentDTO; + } + + @Override + public Object getResponse() { + if (getRequestError() == null) { + return makePaymentDTO; + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + + } + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java index 7e6664a2..0b496f18 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java @@ -16,5 +16,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory.wallet; public enum AttributeName { - Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet + Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet, makePayment, clientCorrelatorPayment + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index 6580b1e8..f9657dfd 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.util; public enum ServiceName { - GetAttribute, GetProfile, ApplyCredit, PatialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup,; + GetAttribute, GetProfile, ApplyCredit, PatialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser; } diff --git a/log/sandbox_service.log b/log/sandbox_service.log index 4eb43248..6c4ba91d 100644 --- a/log/sandbox_service.log +++ b/log/sandbox_service.log @@ -202,3 +202,5197 @@ INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stoppe INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} INFO [2017-02-06 08:41:23,595] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@34c7232c{/,null,UNAVAILABLE} INFO [2017-02-06 08:41:23,598] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24134cbc{/,null,UNAVAILABLE} +INFO [2017-02-07 07:03:36,298] org.eclipse.jetty.util.log: Logging initialized @2937ms +INFO [2017-02-07 07:03:36,473] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:03:36,818] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:03:36,828] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:03:36,850] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 07:03:36,959] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +ERROR [2017-02-07 07:03:36,962] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +INFO [2017-02-07 07:04:05,526] org.eclipse.jetty.util.log: Logging initialized @2616ms +INFO [2017-02-07 07:04:05,671] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:04:05,959] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:04:05,970] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:04:05,990] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:04:06,031] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:04:06,031] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:04:06,035] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:04:07,224] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:04:07,229] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 07:04:07,237] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:04:07,238] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:04:07,246] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 07:04:07,260] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:04:07,261] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:04:07,262] org.eclipse.jetty.server.Server: Started @4354ms +DEBUG [2017-02-07 07:08:46,997] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:08:46,998] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@74575e37 +DEBUG [2017-02-07 07:08:47,000] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:08:47,001] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:08:47,019] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:08:47,340] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:11:23,807] org.eclipse.jetty.util.log: Logging initialized @2822ms +INFO [2017-02-07 07:11:23,966] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:11:24,308] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:11:24,317] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:11:24,337] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 07:11:24,380] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +ERROR [2017-02-07 07:11:24,383] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +INFO [2017-02-07 07:11:38,813] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:11:38,815] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:11:38,816] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 07:11:38,819] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 07:11:47,504] org.eclipse.jetty.util.log: Logging initialized @2664ms +INFO [2017-02-07 07:11:47,655] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:11:47,963] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:11:47,974] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:11:47,994] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:11:48,056] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:11:48,057] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:11:48,062] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:11:49,215] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:11:49,220] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 07:11:49,227] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:11:49,227] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:11:49,233] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 07:11:49,240] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:11:49,241] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:11:49,241] org.eclipse.jetty.server.Server: Started @4403ms +DEBUG [2017-02-07 07:12:37,565] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:12:37,566] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@25b8fbb6 +DEBUG [2017-02-07 07:12:37,568] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:12:37,570] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:12:37,583] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:12:37,843] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:13:28,625] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:13:28,627] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:13:28,629] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 07:13:28,634] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 07:13:34,725] org.eclipse.jetty.util.log: Logging initialized @3483ms +INFO [2017-02-07 07:13:34,958] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:13:35,344] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:13:35,357] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:13:35,382] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:13:35,450] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:13:35,451] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:13:35,456] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:13:36,824] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:13:36,830] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2c9d90fc{/,null,AVAILABLE} +INFO [2017-02-07 07:13:36,841] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:13:36,841] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:13:36,853] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@257f30f7{/,null,AVAILABLE} +INFO [2017-02-07 07:13:36,870] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:13:36,871] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:13:36,872] org.eclipse.jetty.server.Server: Started @5634ms +DEBUG [2017-02-07 07:13:45,902] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:13:45,903] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@2d55a882 +DEBUG [2017-02-07 07:13:45,905] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:13:45,906] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:13:46,009] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:32:07,477] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:32:07,546] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:32:07,554] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:32:07,556] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@257f30f7{/,null,UNAVAILABLE} +INFO [2017-02-07 07:32:07,564] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2c9d90fc{/,null,UNAVAILABLE} +INFO [2017-02-07 07:32:44,232] org.eclipse.jetty.util.log: Logging initialized @3030ms +INFO [2017-02-07 07:32:44,464] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:32:44,849] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:32:44,863] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:32:44,888] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:32:44,959] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:32:44,960] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:32:44,968] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:32:46,245] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:32:46,249] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:32:46,257] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:32:46,257] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:32:46,265] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.Server: Started @5077ms +DEBUG [2017-02-07 07:32:52,870] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:32:52,870] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@555238b3 +DEBUG [2017-02-07 07:32:52,872] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:32:52,873] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:32:52,900] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:33:57,656] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:33:57,756] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:33:57,761] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:33:57,763] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:33:57,770] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:34:03,103] org.eclipse.jetty.util.log: Logging initialized @3319ms +INFO [2017-02-07 07:34:03,317] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:34:03,751] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:34:03,766] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:34:03,808] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:34:03,904] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:03,904] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:03,911] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:34:06,440] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:34:06,448] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:34:06,461] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:34:06,461] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:34:06,478] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:34:06,492] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:06,496] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:06,497] org.eclipse.jetty.server.Server: Started @6716ms +DEBUG [2017-02-07 07:34:07,175] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:34:07,177] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 +DEBUG [2017-02-07 07:34:07,179] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:34:07,180] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:34:07,446] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:34:28,321] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:34:28,473] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:28,483] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:28,487] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:34:28,505] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:34:35,038] org.eclipse.jetty.util.log: Logging initialized @2963ms +INFO [2017-02-07 07:34:35,247] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:34:35,638] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:34:35,649] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:34:35,671] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:34:35,735] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:35,736] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:35,740] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:34:36,996] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:34:37,001] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:34:37,012] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:34:37,012] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:34:37,023] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:34:37,036] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:34:37,037] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:34:37,037] org.eclipse.jetty.server.Server: Started @4965ms +DEBUG [2017-02-07 07:34:40,228] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:34:40,228] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1b3ca2b +DEBUG [2017-02-07 07:34:40,231] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:34:40,232] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:34:40,532] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:35:25,076] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:35:25,162] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:35:25,165] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:35:25,168] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:35:25,189] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:35:38,582] org.eclipse.jetty.util.log: Logging initialized @3133ms +INFO [2017-02-07 07:35:38,769] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:35:39,137] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:35:39,150] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:35:39,174] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:35:39,233] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:35:39,233] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:35:39,238] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:35:40,519] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:35:40,526] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@7b96de8d{/,null,AVAILABLE} +INFO [2017-02-07 07:35:40,541] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:35:40,542] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:35:40,553] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3dfd6220{/,null,AVAILABLE} +INFO [2017-02-07 07:35:40,565] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:35:40,567] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:35:40,567] org.eclipse.jetty.server.Server: Started @5121ms +DEBUG [2017-02-07 07:35:44,667] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:35:44,667] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 +DEBUG [2017-02-07 07:35:44,669] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:35:44,671] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:35:44,945] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:36:17,403] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:36:17,537] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:36:17,550] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:36:17,552] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3dfd6220{/,null,UNAVAILABLE} +INFO [2017-02-07 07:36:17,570] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@7b96de8d{/,null,UNAVAILABLE} +INFO [2017-02-07 07:36:53,795] org.eclipse.jetty.util.log: Logging initialized @2983ms +INFO [2017-02-07 07:36:53,989] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:36:54,422] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:36:54,437] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:36:54,466] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:36:54,553] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:36:54,554] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:36:54,559] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:36:55,826] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:36:55,832] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:36:55,841] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:36:55,842] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:36:55,850] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:36:55,859] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:36:55,859] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:36:55,860] org.eclipse.jetty.server.Server: Started @5051ms +DEBUG [2017-02-07 07:36:58,768] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:36:58,768] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@555238b3 +DEBUG [2017-02-07 07:36:58,771] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:36:58,772] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:36:58,799] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +ERROR [2017-02-07 07:37:03,066] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. +! java.lang.NullPointerException: null +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:44:57,591] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:44:57,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:44:57,594] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:44:57,603] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:45:10,263] org.eclipse.jetty.util.log: Logging initialized @2900ms +INFO [2017-02-07 07:45:10,450] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:45:10,838] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:45:10,850] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:45:10,875] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:45:10,936] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:45:10,936] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:45:10,940] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:45:12,139] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:45:12,145] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:45:12,154] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:45:12,154] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:45:12,164] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:45:12,179] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:45:12,180] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:45:12,182] org.eclipse.jetty.server.Server: Started @4823ms +DEBUG [2017-02-07 07:45:18,431] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:45:18,431] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 +DEBUG [2017-02-07 07:45:18,434] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:45:18,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:45:18,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:45:23,343] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:45:23,344] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:45:23,346] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save insertion of clientCorrelator request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +DEBUG [2017-02-07 07:45:23,376] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:45:23,377] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:45:23,378] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:49:27,064] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:49:27,065] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:49:27,067] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:49:27,079] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:49:44,465] org.eclipse.jetty.util.log: Logging initialized @2994ms +INFO [2017-02-07 07:49:44,662] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:49:45,023] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:49:45,034] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:49:45,062] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:49:45,130] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:49:45,130] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:49:45,134] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:49:46,411] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:49:46,416] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:49:46,425] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:49:46,426] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:49:46,435] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:49:46,449] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:49:46,450] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:49:46,451] org.eclipse.jetty.server.Server: Started @4983ms +DEBUG [2017-02-07 07:49:52,242] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:49:52,242] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@59095f0f +DEBUG [2017-02-07 07:49:52,244] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:49:52,245] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:49:52,266] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:49:56,357] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:49:56,361] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:49:56,362] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:53:26,239] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:53:26,240] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:53:26,242] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:53:26,249] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:53:31,125] org.eclipse.jetty.util.log: Logging initialized @2980ms +INFO [2017-02-07 07:53:31,328] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:53:31,696] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:53:31,708] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:53:31,731] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:53:31,788] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:53:31,789] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:53:31,794] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:53:32,945] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:53:32,950] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:53:32,960] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:53:32,960] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:53:32,971] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:53:32,982] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:53:32,983] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:53:32,983] org.eclipse.jetty.server.Server: Started @4841ms +DEBUG [2017-02-07 07:53:38,008] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:53:38,008] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@5fcbe282 +DEBUG [2017-02-07 07:53:38,010] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:53:38,011] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:53:38,282] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:55:11,223] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:55:11,225] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:55:11,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:55:29,554] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:55:29,555] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:55:29,557] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:55:29,564] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:55:39,680] org.eclipse.jetty.util.log: Logging initialized @2886ms +INFO [2017-02-07 07:55:39,974] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:55:40,383] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:55:40,394] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:55:40,416] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:55:40,473] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:55:40,473] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:55:40,477] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:55:41,651] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:55:41,657] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 07:55:41,667] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:55:41,667] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:55:41,677] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 07:55:41,692] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:55:41,693] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:55:41,693] org.eclipse.jetty.server.Server: Started @4903ms +DEBUG [2017-02-07 07:55:46,105] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:55:46,105] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@4d88656d +DEBUG [2017-02-07 07:55:46,107] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:55:46,109] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:55:46,133] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:56:53,892] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:56:53,894] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:56:53,896] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:56:53,984] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:56:54,003] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:56:54,005] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 07:56:54,019] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 07:57:00,811] org.eclipse.jetty.util.log: Logging initialized @2732ms +INFO [2017-02-07 07:57:01,038] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 07:57:01,354] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 07:57:01,364] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 07:57:01,387] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 07:57:01,444] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:57:01,444] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:57:01,448] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 07:57:02,519] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 07:57:02,524] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 07:57:02,534] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 07:57:02,535] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 07:57:02,543] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 07:57:02,555] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:57:02,556] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:57:02,557] org.eclipse.jetty.server.Server: Started @4480ms +DEBUG [2017-02-07 07:57:08,458] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 07:57:08,458] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@468272f8 +DEBUG [2017-02-07 07:57:08,460] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 07:57:08,460] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 07:57:08,476] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 07:57:12,312] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:57:12,342] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 07:57:12,345] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 07:59:23,476] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 07:59:23,476] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 07:59:23,478] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 07:59:23,484] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 08:44:39,947] org.eclipse.jetty.util.log: Logging initialized @3039ms +INFO [2017-02-07 08:44:40,133] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:44:40,543] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:44:40,559] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:44:40,584] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:44:40,643] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:44:40,644] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:44:40,649] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:44:41,920] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:44:41,926] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} +INFO [2017-02-07 08:44:41,935] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:44:41,936] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:44:41,946] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} +INFO [2017-02-07 08:44:41,956] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:44:41,958] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:44:41,958] org.eclipse.jetty.server.Server: Started @5054ms +DEBUG [2017-02-07 08:44:48,187] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 08:44:48,187] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@2e97091c +DEBUG [2017-02-07 08:44:48,189] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 08:44:48,191] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 08:44:48,393] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 08:48:51,832] org.eclipse.jetty.util.log: Logging initialized @3712ms +INFO [2017-02-07 08:48:52,143] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:48:52,649] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:48:52,666] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:48:52,704] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 08:48:52,788] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@3ed34ef5: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 8 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +ERROR [2017-02-07 08:48:52,788] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 8 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +DEBUG [2017-02-07 08:49:00,595] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:49:00,597] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:49:00,599] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 08:49:00,731] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:49:00,748] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:49:00,750] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} +INFO [2017-02-07 08:49:00,759] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} +INFO [2017-02-07 08:49:27,422] org.eclipse.jetty.util.log: Logging initialized @3062ms +INFO [2017-02-07 08:49:27,603] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:49:27,965] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:49:27,977] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:49:28,009] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:49:28,065] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:49:28,066] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:49:28,072] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:49:29,319] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:49:29,324] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2c9d90fc{/,null,AVAILABLE} +INFO [2017-02-07 08:49:29,334] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:49:29,334] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:49:29,344] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@257f30f7{/,null,AVAILABLE} +INFO [2017-02-07 08:49:29,357] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:49:29,359] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:49:29,359] org.eclipse.jetty.server.Server: Started @5003ms +DEBUG [2017-02-07 08:49:32,548] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 08:49:32,548] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@74116013 +DEBUG [2017-02-07 08:49:32,551] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 08:49:32,552] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 08:49:32,596] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 08:49:51,820] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:49:52,534] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:49:55,524] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 08:50:20,513] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:50:20,514] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:50:20,516] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@257f30f7{/,null,UNAVAILABLE} +INFO [2017-02-07 08:50:20,531] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2c9d90fc{/,null,UNAVAILABLE} +INFO [2017-02-07 08:53:37,435] org.eclipse.jetty.util.log: Logging initialized @2921ms +INFO [2017-02-07 08:53:37,660] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:53:38,021] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:53:38,032] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:53:38,057] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:53:38,115] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:53:38,115] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:53:38,121] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:53:39,518] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:53:39,523] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@7b96de8d{/,null,AVAILABLE} +INFO [2017-02-07 08:53:39,533] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:53:39,534] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:53:39,552] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3dfd6220{/,null,AVAILABLE} +INFO [2017-02-07 08:53:39,566] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:53:39,567] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:53:39,567] org.eclipse.jetty.server.Server: Started @5056ms +DEBUG [2017-02-07 08:53:45,988] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 08:53:45,988] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@5c0ce930 +DEBUG [2017-02-07 08:53:45,990] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 08:53:45,991] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 08:53:46,020] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 08:56:29,854] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:56:29,864] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:56:29,874] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 08:57:16,552] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:57:16,555] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:57:16,561] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3dfd6220{/,null,UNAVAILABLE} +INFO [2017-02-07 08:57:16,571] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@7b96de8d{/,null,UNAVAILABLE} +INFO [2017-02-07 08:57:23,711] org.eclipse.jetty.util.log: Logging initialized @2631ms +INFO [2017-02-07 08:57:23,891] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:57:24,245] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:57:24,261] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:57:24,291] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:57:24,365] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:57:24,366] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:57:24,370] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:57:26,079] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:57:26,084] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 08:57:26,093] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:57:26,094] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:57:26,102] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 08:57:26,112] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:57:26,113] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:57:26,114] org.eclipse.jetty.server.Server: Started @5035ms +DEBUG [2017-02-07 08:57:31,944] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 08:57:31,944] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1b39936a +DEBUG [2017-02-07 08:57:31,946] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 08:57:31,947] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 08:57:31,960] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 08:57:35,684] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:57:35,692] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +ERROR [2017-02-07 08:57:35,695] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. +! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! ... 84 common frames omitted +! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement +! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] +! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] +! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] +! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] +! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] +! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] +! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] +! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] +! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] +INFO [2017-02-07 08:59:44,770] org.eclipse.jetty.util.log: Logging initialized @2513ms +INFO [2017-02-07 08:59:44,928] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:59:45,315] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:59:45,326] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:59:45,348] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 08:59:45,400] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +ERROR [2017-02-07 08:59:45,402] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +INFO [2017-02-07 08:59:49,190] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:59:49,193] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:59:49,195] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 08:59:49,202] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 08:59:56,421] org.eclipse.jetty.util.log: Logging initialized @2847ms +INFO [2017-02-07 08:59:56,627] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 08:59:56,971] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 08:59:56,986] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 08:59:57,014] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 08:59:57,083] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:59:57,084] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:59:57,090] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 08:59:58,322] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 08:59:58,326] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 08:59:58,334] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 08:59:58,334] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 08:59:58,343] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.Server: Started @4790ms +DEBUG [2017-02-07 09:00:02,980] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:00:02,980] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@72d118bb +DEBUG [2017-02-07 09:00:02,981] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:00:02,982] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:00:02,995] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@564727ff +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@135d15d6 +DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:01:54,604] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1f1fa0c7 +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 09:26:06,769] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 09:26:06,771] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 09:26:06,772] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 09:26:06,783] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 09:26:16,711] org.eclipse.jetty.util.log: Logging initialized @2621ms +INFO [2017-02-07 09:26:16,887] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 09:26:17,235] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 09:26:17,249] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 09:26:17,268] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 09:26:17,310] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 09:26:17,311] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 09:26:17,314] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 09:26:18,262] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 09:26:18,266] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 09:26:18,273] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 09:26:18,273] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 09:26:18,281] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 09:26:18,290] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 09:26:18,291] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 09:26:18,292] org.eclipse.jetty.server.Server: Started @4205ms +DEBUG [2017-02-07 09:26:23,433] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 09:26:23,434] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@46332b70 +DEBUG [2017-02-07 09:26:23,435] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 09:26:23,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 09:26:23,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin From 7eb0fd3489120da2d52c5701325b263deb155720 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 17:08:46 +0530 Subject: [PATCH 024/112] Implemented charge request classes --- .../custom/AmountTransactionRequestBean.java | 83 +++ .../dao/model/custom/ChargePaymentAmount.java | 53 ++ .../ChargePaymentRequestWrapperDTO.java | 47 ++ .../custom/PaymentChargingInformation.java | 60 ++ .../model/custom/PaymentChargingMetaData.java | 75 +++ .../dep/sandbox/service/PaymentService.java | 10 +- .../payment/PaymentRequestHandler.java | 39 +- dep-sandbox/src/main/java/hibernate.cfg.xml | 2 +- log/sandbox_service.log | 561 ++++++++++++++++++ 9 files changed, 903 insertions(+), 27 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentAmount.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingMetaData.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java new file mode 100644 index 00000000..6d64ce8a --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class AmountTransactionRequestBean { + + private amountTransaction amountTransaction; + + public amountTransaction getAmountTransaction() { + return amountTransaction; + } + + public void setAmountTransaction(amountTransaction amountTransaction) { + this.amountTransaction = amountTransaction; + } + + public static class amountTransaction { + private String clientCorrelator; + + private String endUserId; + + private ChargePaymentAmount paymentAmount; + + private String referenceCode; + + private String transactionOperationStatus; + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public String getReferenceCode() { + return referenceCode; + } + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public ChargePaymentAmount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(ChargePaymentAmount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentAmount.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentAmount.java new file mode 100644 index 00000000..23ff3b8b --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentAmount.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class ChargePaymentAmount { + + private PaymentChargingInformation chargingInformation; + + private PaymentChargingMetaData chargingMetaData; + + public PaymentChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(PaymentChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + + public PaymentChargingMetaData getChargingMetaData() { + return chargingMetaData; + } + + public void setChargingMetaData(PaymentChargingMetaData chargingMetaData) { + this.chargingMetaData = chargingMetaData; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + if (chargingInformation != null) { + builder.append(" " + getChargingInformation().toString()); + } + + if (chargingMetaData != null) { + builder.append(" " + getChargingMetaData().toString()); + } + + return builder.toString(); + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java new file mode 100644 index 00000000..17eb00a4 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class ChargePaymentRequestWrapperDTO extends RequestDTO { + + /** + * + */ + private static final long serialVersionUID = -6173594710611363567L; + + /** The endUserId param **/ + private String endUserId; + + private AmountTransactionRequestBean amountTransactionRequestBean; + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + /** The request bean **/ + public AmountTransactionRequestBean getAmountTransactionRequestBean() { + return amountTransactionRequestBean; + } + + public void setAmountTransactionRequestBean(AmountTransactionRequestBean amountTransactionRequestBean) { + this.amountTransactionRequestBean = amountTransactionRequestBean; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java new file mode 100644 index 00000000..f9c792b5 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class PaymentChargingInformation { + + private String amount; + + private String currency; + + private String description; + + public String getAmount() { + return amount; + } + + public void setAmount(String amount) { + this.amount = amount; + } + + public String getCurrency() { + return currency; + } + + public void setCurrency(String currency) { + this.currency = currency; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + builder.append(" Amount : " + amount); + builder.append(" Currency : " + currency); + builder.append(" Description : " + description); + + return builder.toString(); + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingMetaData.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingMetaData.java new file mode 100644 index 00000000..103f986d --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingMetaData.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class PaymentChargingMetaData { + + private String onBehalfOf; + + private String purchaseCategoryCode; + + private String channel; + + private String taxAmount; + + public String getOnBehalfOf() { + return onBehalfOf; + } + + public void setOnBehalfOf(String onBehalfOf) { + this.onBehalfOf = onBehalfOf; + } + + public String getPurchaseCategoryCode() { + return purchaseCategoryCode; + } + + public void setPurchaseCategoryCode(String purchaseCategoryCode) { + this.purchaseCategoryCode = purchaseCategoryCode; + } + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public String getTaxAmount() { + return taxAmount; + } + + public void setTaxAmount(String taxAmount) { + this.taxAmount = taxAmount; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + builder.append(" onBehalfOf : " + onBehalfOf); + builder.append(" categoryCode : " + purchaseCategoryCode); + builder.append(" channel : " + channel); + + return builder.toString(); + } + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index ed0932b4..34739d60 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -17,9 +17,7 @@ package com.wso2telco.services.dep.sandbox.service; import com.wordnik.swagger.annotations.*; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.exception.SandboxException; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; @@ -51,15 +49,15 @@ public class PaymentService { @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) public Response makePayment( @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, - MakePaymentRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { + AmountTransactionRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { LOG.debug("###PAYMENT### /{endUserId} invoked : endUserId - " + endUserId); if (makePaymentRequestBean != null) { LOG.debug(makePaymentRequestBean); } - MakePaymentRequestWrapperDTO requestDTO = new MakePaymentRequestWrapperDTO(); + ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); requestDTO.setHttpRequest(request); requestDTO.setEndUserId(endUserId); - requestDTO.setMakePaymentRequestBean(makePaymentRequestBean); + requestDTO.setAmountTransactionRequestBean(makePaymentRequestBean); requestDTO.setRequestType(RequestType.PAYMENT); RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index f6e85a19..f568d379 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -42,7 +42,6 @@ import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.logging.LogFactory; -import scala.util.parsing.combinator.testing.Str; import javax.annotation.Nonnull; import javax.ws.rs.core.Response; @@ -51,13 +50,13 @@ import java.util.Date; import java.util.List; -public class PaymentRequestHandler extends AbstractRequestHandler { +public class PaymentRequestHandler extends AbstractRequestHandler { private PaymentDAO paymentDAO; private LoggingDAO loggingDAO; private NumberDAO numberDAO; - private MakePaymentRequestWrapperDTO requestWrapperDTO; + private ChargePaymentRequestWrapperDTO requestWrapperDTO; private PaymentResponseWrapper responseWrapper; private MessageLogHandler logHandler; private String serviceCallPayment; @@ -86,18 +85,18 @@ protected List getAddress() { } @Override - protected void init(MakePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { + protected void init(ChargePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { responseWrapper = new PaymentResponseWrapper(); requestWrapperDTO = extendedRequestDTO; } @Override - protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Exception { - MakePaymentRequestBean requestBean = wrapperDTO.getMakePaymentRequestBean(); - MakePaymentRequestBean.makePayment request = requestBean.getmakePayment(); - PaymentAmount paymentAmount = request.getPaymentAmount(); - ChargingInformation chargingInformation = paymentAmount.getChargingInformation(); - ChargingMetaData metaData = paymentAmount.getChargingMetaData(); + protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exception { + AmountTransactionRequestBean requestBean = wrapperDTO.getAmountTransactionRequestBean(); + AmountTransactionRequestBean.amountTransaction request = requestBean.getAmountTransaction(); + ChargePaymentAmount paymentAmount = request.getPaymentAmount(); + PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + PaymentChargingMetaData metaData = paymentAmount.getChargingMetaData(); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String endUserID = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); @@ -110,7 +109,7 @@ protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Excep String channel = CommonUtil.getNullOrTrimmedValue(metaData.getChannel()); String taxAmount =CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); List validationRulesList = new ArrayList<>(); @@ -141,7 +140,7 @@ protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Excep validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "referenceCode", referenceCode)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, - "notifyURL", notifyURL)); + "transactionOperationStatus", transactionOperationStatus)); ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; validationRules = validationRulesList.toArray(validationRules); @@ -159,18 +158,18 @@ protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Excep } @Override - protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { + protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) throws Exception { if (responseWrapper.getRequestError() != null) { responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); return responseWrapper; } try { - MakePaymentRequestBean requestBean = extendedRequestDTO.getMakePaymentRequestBean(); - MakePaymentRequestBean.makePayment request = requestBean.getmakePayment(); - PaymentAmount paymentAmount = request.getPaymentAmount(); - ChargingInformation chargingInformation = paymentAmount.getChargingInformation(); - ChargingMetaData metadata = paymentAmount.getChargingMetaData(); + AmountTransactionRequestBean requestBean = extendedRequestDTO.getAmountTransactionRequestBean(); + AmountTransactionRequestBean.amountTransaction request = requestBean.getAmountTransaction(); + ChargePaymentAmount paymentAmount = request.getPaymentAmount(); + PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + PaymentChargingMetaData metadata = paymentAmount.getChargingMetaData(); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String endUserIdPath = extendedRequestDTO.getEndUserId(); @@ -184,7 +183,7 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); String taxAmount =CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); serviceCallPayment = ServiceName.ChargeUser.toString(); String userName = extendedRequestDTO.getUser().getUserName(); Integer userId = extendedRequestDTO.getUser().getId(); @@ -337,7 +336,7 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th responseBean.setReferenceCode(referenceCode); responseBean.setServerReferenceCode(serverReferenceCode); - responseBean.setNotifyURL(notifyURL); + responseBean.setTransactionOperationStatus(transactionOperationStatus); ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName().toString()); diff --git a/dep-sandbox/src/main/java/hibernate.cfg.xml b/dep-sandbox/src/main/java/hibernate.cfg.xml index b24bb9a7..18a84dbd 100644 --- a/dep-sandbox/src/main/java/hibernate.cfg.xml +++ b/dep-sandbox/src/main/java/hibernate.cfg.xml @@ -13,7 +13,7 @@ - true + false true thread diff --git a/log/sandbox_service.log b/log/sandbox_service.log index 6c4ba91d..c6eff8d7 100644 --- a/log/sandbox_service.log +++ b/log/sandbox_service.log @@ -5396,3 +5396,564 @@ DEBUG [2017-02-07 09:26:23,434] com.wso2telco.services.dep.sandbox.service.Payme DEBUG [2017-02-07 09:26:23,435] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY DEBUG [2017-02-07 09:26:23,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE DEBUG [2017-02-07 09:26:23,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 10:28:24,434] org.eclipse.jetty.util.log: Logging initialized @2588ms +INFO [2017-02-07 10:28:24,628] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 10:28:25,040] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 10:28:25,052] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 10:28:25,078] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +WARN [2017-02-07 10:28:25,146] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +ERROR [2017-02-07 10:28:25,153] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down +! java.net.BindException: Address already in use +! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] +! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] +! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] +! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] +! ... 13 common frames omitted +! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use +! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] +! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] +! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] +! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] +! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] +! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] +! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] +! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] +! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] +INFO [2017-02-07 10:28:39,163] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:28:39,165] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:28:39,166] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 10:28:39,169] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 10:28:56,758] org.eclipse.jetty.util.log: Logging initialized @2553ms +INFO [2017-02-07 10:28:56,909] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 10:28:57,205] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 10:28:57,215] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 10:28:57,235] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 10:28:57,278] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:28:57,278] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:28:57,282] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 10:28:58,389] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 10:28:58,394] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} +INFO [2017-02-07 10:28:58,401] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 10:28:58,402] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 10:28:58,407] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} +INFO [2017-02-07 10:28:58,414] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:28:58,415] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:28:58,416] org.eclipse.jetty.server.Server: Started @4212ms +INFO [2017-02-07 10:34:24,853] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:34:24,854] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:34:24,855] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} +INFO [2017-02-07 10:34:24,858] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} +INFO [2017-02-07 10:34:33,173] org.eclipse.jetty.util.log: Logging initialized @2544ms +INFO [2017-02-07 10:34:33,327] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 10:34:33,622] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 10:34:33,634] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 10:34:33,654] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 10:34:33,696] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:34:33,696] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:34:33,700] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 10:34:34,837] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 10:34:34,841] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 10:34:34,849] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 10:34:34,849] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 10:34:34,855] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 10:34:34,864] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:34:34,865] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:34:34,867] org.eclipse.jetty.server.Server: Started @4240ms +DEBUG [2017-02-07 10:38:35,825] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 10:38:35,826] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@594d863e +DEBUG [2017-02-07 10:38:35,829] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 10:38:35,830] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 10:38:35,846] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 10:51:31,622] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@68150107 +DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 10:51:31,624] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 10:52:13,029] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 10:52:13,030] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@252eb04 +DEBUG [2017-02-07 10:52:13,031] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 10:52:13,031] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 10:52:13,032] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +DEBUG [2017-02-07 10:52:36,225] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 10:52:36,225] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@a5b178c +DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 10:58:47,644] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:58:47,651] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:58:47,653] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 10:58:47,656] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 10:59:44,605] org.eclipse.jetty.util.log: Logging initialized @2504ms +INFO [2017-02-07 10:59:44,767] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 10:59:45,071] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 10:59:45,081] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 10:59:45,103] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 10:59:45,145] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:59:45,145] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:59:45,149] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 10:59:46,173] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 10:59:46,177] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 10:59:46,185] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 10:59:46,185] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 10:59:46,193] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 10:59:46,200] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 10:59:46,201] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 10:59:46,202] org.eclipse.jetty.server.Server: Started @4103ms +INFO [2017-02-07 11:00:34,908] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:00:34,909] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:00:34,911] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:00:34,915] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 11:01:59,185] org.eclipse.jetty.util.log: Logging initialized @2520ms +INFO [2017-02-07 11:01:59,355] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 11:01:59,646] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 11:01:59,657] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 11:01:59,678] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 11:01:59,734] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:01:59,735] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:01:59,740] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 11:02:00,740] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 11:02:00,745] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 11:02:00,753] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 11:02:00,754] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 11:02:00,761] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 11:02:00,771] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:02:00,772] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:02:00,773] org.eclipse.jetty.server.Server: Started @4110ms +DEBUG [2017-02-07 11:04:36,735] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 11:04:36,735] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@75d46ab4 +DEBUG [2017-02-07 11:04:36,737] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 11:04:36,737] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 11:04:36,752] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 11:16:14,598] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:16:14,599] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:16:14,601] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:16:14,605] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 11:16:23,267] org.eclipse.jetty.util.log: Logging initialized @2511ms +INFO [2017-02-07 11:16:23,431] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 11:16:23,733] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 11:16:23,747] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 11:16:23,769] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 11:16:23,815] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:16:23,815] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:16:23,819] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 11:16:24,890] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 11:16:24,894] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 11:16:24,902] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 11:16:24,903] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 11:16:24,909] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 11:16:24,916] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:16:24,917] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:16:24,917] org.eclipse.jetty.server.Server: Started @4163ms +DEBUG [2017-02-07 11:19:12,080] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 11:19:12,081] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@43d050da +DEBUG [2017-02-07 11:19:12,084] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 11:19:12,085] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 11:19:12,098] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 11:22:40,167] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:22:40,168] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:22:40,169] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:22:40,173] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 11:31:36,615] org.eclipse.jetty.util.log: Logging initialized @2512ms +INFO [2017-02-07 11:31:36,773] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 11:31:37,121] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 11:31:37,133] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 11:31:37,158] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 11:31:37,215] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:31:37,215] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:31:37,219] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 11:31:38,289] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 11:31:38,294] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 11:31:38,302] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 11:31:38,302] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 11:31:38,309] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 11:31:38,316] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:31:38,317] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:31:38,318] org.eclipse.jetty.server.Server: Started @4216ms +DEBUG [2017-02-07 11:32:43,114] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 11:32:43,114] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@3b1ff77b +DEBUG [2017-02-07 11:32:43,116] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 11:32:43,117] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 11:32:43,133] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 11:33:20,002] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:33:20,006] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:33:20,209] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:33:20,214] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} +INFO [2017-02-07 11:36:36,364] org.eclipse.jetty.util.log: Logging initialized @2502ms +INFO [2017-02-07 11:36:36,521] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* +INFO [2017-02-07 11:36:36,835] io.dropwizard.server.ServerFactory: Starting Application +INFO [2017-02-07 11:36:36,845] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / +INFO [2017-02-07 11:36:36,865] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / +INFO [2017-02-07 11:36:36,911] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:36:36,911] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:36:36,915] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 +INFO [2017-02-07 11:36:37,932] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: + + GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) + POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) + POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) + GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) + GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) + POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) + GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) + POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) + GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) + POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) + GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) + GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) + GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) + POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) + GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) + GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) + POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) + +INFO [2017-02-07 11:36:37,937] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} +INFO [2017-02-07 11:36:37,945] io.dropwizard.setup.AdminEnvironment: tasks = + + POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) + POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) + +WARN [2017-02-07 11:36:37,945] io.dropwizard.setup.AdminEnvironment: +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! +! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! +! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! +! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +INFO [2017-02-07 11:36:37,952] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} +INFO [2017-02-07 11:36:37,961] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:36:37,962] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:36:37,963] org.eclipse.jetty.server.Server: Started @4103ms +DEBUG [2017-02-07 11:37:48,831] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 +DEBUG [2017-02-07 11:37:48,832] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@413084ea +DEBUG [2017-02-07 11:37:48,834] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY +DEBUG [2017-02-07 11:37:48,835] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE +DEBUG [2017-02-07 11:37:48,851] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin +INFO [2017-02-07 11:38:11,943] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} +INFO [2017-02-07 11:38:11,946] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} +INFO [2017-02-07 11:38:11,948] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} +INFO [2017-02-07 11:38:11,953] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} From 9e52732def0674b53a2a55edef8fa28fa421604e Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Feb 2017 19:45:55 +0530 Subject: [PATCH 025/112] Implemented charge Response Clases --- .../model/custom/ChargeAmountResponse.java | 53 +++++++++ .../dao/model/custom/ChargePaymentDTO.java | 29 +++++ .../custom/ChargePaymentResponseBean.java | 105 ++++++++++++++++++ .../dao/model/custom/ChargingMetaData.java | 10 -- .../payment/PaymentRequestHandler.java | 31 +++--- .../payment/PaymentResponseWrapper.java | 7 +- .../servicefactory/wallet/AttributeName.java | 2 +- 7 files changed, 210 insertions(+), 27 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeAmountResponse.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeAmountResponse.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeAmountResponse.java new file mode 100644 index 00000000..db591264 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeAmountResponse.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class ChargeAmountResponse { + + private PaymentChargingInformation chargingInformation; + + private String totalAmountCharged; + + private PaymentChargingMetaData chargingMetaData; + + public PaymentChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(PaymentChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + + public PaymentChargingMetaData getChargingMetaData() { + return chargingMetaData; + } + + public void setChargingMetaData(PaymentChargingMetaData chargingMetaData) { + this.chargingMetaData = chargingMetaData; + } + + public String getTotalAmountCharged() { + return totalAmountCharged; + } + + public void setTotalAmountCharged(String totalAmountCharged) { + this.totalAmountCharged = totalAmountCharged; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentDTO.java new file mode 100644 index 00000000..3e3644d6 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentDTO.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class ChargePaymentDTO { + + private ChargePaymentResponseBean amountTransaction; + + public ChargePaymentResponseBean getAmountTransaction() { + return amountTransaction; + } + + public void setAmountTransaction(ChargePaymentResponseBean amountTransaction) { + this.amountTransaction = amountTransaction; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java new file mode 100644 index 00000000..00160fca --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class ChargePaymentResponseBean { + + private String clientCorrelator; + + private String endUserId; + + private String originalReferenceCode; + + private String originalServerReferenceCode; + + private ChargeAmountResponse paymentAmount; + + private String referenceCode; + + private String serverReferenceCode; + + private String transactionOperationStatus; + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public String getOriginalReferenceCode() { + return originalReferenceCode; + } + + public void setOriginalReferenceCode(String originalReferenceCode) { + this.originalReferenceCode = originalReferenceCode; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + + public String getReferenceCode() { + return referenceCode; + } + + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public String getServerReferenceCode() { + return serverReferenceCode; + } + + public void setServerReferenceCode(String serverReferenceCode) { + this.serverReferenceCode = serverReferenceCode; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + + public ChargeAmountResponse getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(ChargeAmountResponse paymentAmount) { + this.paymentAmount = paymentAmount; + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java index 3a43442b..9e84f0a9 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaData.java @@ -27,8 +27,6 @@ public class ChargingMetaData { private String channel; - private String taxAmount; - public String getOnBehalfOf() { return onBehalfOf; } @@ -53,14 +51,6 @@ public void setChannel(String channel) { this.channel = channel; } - public String getTaxAmount() { - return taxAmount; - } - - public void setTaxAmount(String taxAmount) { - this.taxAmount = taxAmount; - } - public String toString() { StringBuilder builder = new StringBuilder(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index f568d379..5718954e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -188,10 +188,10 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) String userName = extendedRequestDTO.getUser().getUserName(); Integer userId = extendedRequestDTO.getUser().getId(); - MakePaymentResponseBean responseBean = new MakePaymentResponseBean(); - PaymentAmountResponse payAmount = new PaymentAmountResponse(); - ChargingInformation chargeInformation = new ChargingInformation(); - ChargingMetaData chargeMetaData = new ChargingMetaData(); + ChargePaymentResponseBean responseBean = new ChargePaymentResponseBean(); + ChargeAmountResponse payAmount = new ChargeAmountResponse(); + PaymentChargingInformation chargeInformation = new PaymentChargingInformation(); + PaymentChargingMetaData chargeMetaData = new PaymentChargingMetaData(); // Save Request Log APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); @@ -214,7 +214,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) // check already charge request against client correlator if (clientCorrelator != null) { String tableAttributeValue = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); - String clientCorrelatorAttribute = AttributeName.clientCorrelatorWallet.toString(); + String clientCorrelatorAttribute = AttributeName.clientCorrelatorPayment.toString(); AttributeValues duplicateClientCorrelator = paymentDAO.checkDuplicateValue(serviceCallPayment, clientCorrelator, clientCorrelatorAttribute, tableAttributeValue); if (duplicateClientCorrelator != null) { @@ -225,10 +225,10 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) AttributeValues response = paymentDAO.getResponse(id); if (serviceCall.equals(serviceCallPayment) && (response.getOwnerdid() == manageNumber.getId())) { // return already sent response - MakePaymentResponseBean obj = null; - obj = gson.fromJson(response.getValue(), MakePaymentResponseBean.class); - MakePaymentDTO dto = new MakePaymentDTO(); - dto.setmakePayment(obj); + ChargePaymentResponseBean obj = null; + obj = gson.fromJson(response.getValue(), ChargePaymentResponseBean.class); + ChargePaymentDTO dto = new ChargePaymentDTO(); + dto.setAmountTransaction(obj); responseWrapper.setMakePaymentDTO(dto); responseWrapper.setHttpStatus(Response.Status.OK); return responseWrapper; @@ -308,7 +308,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) } // check already charged request against reference code - String referenceCodeAttribue = AttributeName.referenceCodeWallet.toString(); + String referenceCodeAttribue = AttributeName.referenceCodePayment.toString(); String tableNumber = TableName.NUMBERS.toString().toLowerCase(); AttributeValues duplicateReferenceCode = paymentDAO.checkDuplicateValue(serviceCallPayment, referenceCode, referenceCodeAttribue, tableNumber); @@ -327,6 +327,11 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) chargeInformation.setCurrency(currency); chargeInformation.setDescription(description); + // Setting the Total Amount Charged + Double tax = Double.parseDouble(taxAmount); + Double totle = tax+chargeAmount; + payAmount.setTotalAmountCharged(totle.toString()); + if (onBehalfOf != null || categoryCode != null || channel != null) { chargeMetaData.setPurchaseCategoryCode(categoryCode); chargeMetaData.setChannel(channel); @@ -372,13 +377,13 @@ else if (transactionStatusValue != null) { responseBean.setTransactionOperationStatus(TransactionStatus.Charged.toString()); } - MakePaymentDTO makePaymentDTO = new MakePaymentDTO(); + ChargePaymentDTO makePaymentDTO = new ChargePaymentDTO(); payAmount.setChargingInformation(chargeInformation); if (onBehalfOf != null || categoryCode != null || channel != null) { payAmount.setChargingMetaData(chargeMetaData); } responseBean.setPaymentAmount(payAmount); - makePaymentDTO.setmakePayment(responseBean); + makePaymentDTO.setAmountTransaction(responseBean); responseWrapper.setMakePaymentDTO(makePaymentDTO); responseWrapper.setHttpStatus(Response.Status.OK); @@ -402,7 +407,7 @@ else if (transactionStatusValue != null) { } - private Integer saveTransaction(MakePaymentResponseBean responseBean, String endUserId, String userName) + private Integer saveTransaction(ChargePaymentResponseBean responseBean, String endUserId, String userName) throws Exception { Integer transactionId = null; try { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java index 801d28df..31961956 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -16,19 +16,20 @@ package com.wso2telco.services.dep.sandbox.servicefactory.payment; +import com.wso2telco.services.dep.sandbox.dao.model.custom.ChargePaymentDTO; import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentDTO; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; public class PaymentResponseWrapper extends AbstractReturnWrapperDTO { - private MakePaymentDTO makePaymentDTO; + private ChargePaymentDTO makePaymentDTO; - public MakePaymentDTO getMakePaymentDTO() { + public ChargePaymentDTO getMakePaymentDTO() { return makePaymentDTO; } - public void setMakePaymentDTO(MakePaymentDTO makePaymentDTO) { + public void setMakePaymentDTO(ChargePaymentDTO makePaymentDTO) { this.makePaymentDTO = makePaymentDTO; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java index 0b496f18..794e8784 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java @@ -16,6 +16,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory.wallet; public enum AttributeName { - Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet, makePayment, clientCorrelatorPayment + Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet, makePayment, clientCorrelatorPayment, referenceCodePayment } From 796e7ebf81b12bf74b577ee9d9f5cbfc73bc4d06 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 8 Feb 2017 09:23:06 +0530 Subject: [PATCH 026/112] gitignote updated --- .../payment/PaymentRequestFactory.java | 1 - .../payment/PaymentRequestHandler.java | 22 +++++++++---------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index d561cecc..0c4e89db 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -26,7 +26,6 @@ public class PaymentRequestFactory { private static Log LOG = LogFactory.getLog(PaymentRequestFactory.class); - // TODO: based on the json body need to implement request handle public static RequestHandleable getInstance(final RequestDTO requestDTO) { final String MAKE_PAYMENT = "payment"; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 5718954e..4bc00af6 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -107,7 +107,7 @@ protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exc String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); String categoryCode = CommonUtil.getNullOrTrimmedValue(metaData.getPurchaseCategoryCode()); String channel = CommonUtil.getNullOrTrimmedValue(metaData.getChannel()); - String taxAmount =CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); @@ -147,7 +147,7 @@ protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exc Validation.checkRequestParams(validationRules); - }catch (CustomException ex) { + } catch (CustomException ex) { LOG.error("###PAYMENT### Error in Validations. ", ex); responseWrapper.setRequestError( constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); @@ -181,7 +181,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); - String taxAmount =CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); serviceCallPayment = ServiceName.ChargeUser.toString(); @@ -327,10 +327,12 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) chargeInformation.setCurrency(currency); chargeInformation.setDescription(description); + // Get the tax Amount + Double chargeTaxAmount = Double.parseDouble(taxAmount); + // Setting the Total Amount Charged - Double tax = Double.parseDouble(taxAmount); - Double totle = tax+chargeAmount; - payAmount.setTotalAmountCharged(totle.toString()); + Double total = chargeTaxAmount + chargeAmount; + payAmount.setTotalAmountCharged(total.toString()); if (onBehalfOf != null || categoryCode != null || channel != null) { chargeMetaData.setPurchaseCategoryCode(categoryCode); @@ -349,9 +351,6 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) AttributeValues transactionStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallPayment, AttributeName.transactionStatus.toString(), userId); - // Get the tax Amount - Double chargeTaxAmount = Double.parseDouble(taxAmount); - // transaction operation status as denied if ((balance < chargeAmount)) { LOG.error("###PAYMENT### Denied : Account balance insufficient to charge request "); @@ -370,8 +369,7 @@ else if (transactionStatusValue != null) { } // set transaction status as charged } else if (balance >= chargeAmount) { - balance = balance - (chargeAmount+chargeTaxAmount); - // walletDAO.updateBalance(endUserId, balance, userId); + balance = balance - (chargeAmount + chargeTaxAmount); manageNumber.setBalance(balance); numberDAO.saveManageNumbers(manageNumber); responseBean.setTransactionOperationStatus(TransactionStatus.Charged.toString()); @@ -396,7 +394,7 @@ else if (transactionStatusValue != null) { } saveReferenceCode(endUserId, referenceCode, userName); - }catch (Exception ex) { + } catch (Exception ex) { LOG.error("###PAYMENT### Error Occured in PAYMENT Service. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); responseWrapper From a42215e16d9ac25d740e587b07b0a55629448e21 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 8 Feb 2017 09:26:15 +0530 Subject: [PATCH 027/112] gitignore updated --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 2dc27ec0..bceb0705 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ target *.iws *.ipr .idea +dep-sanbox/log +log From 95f181f94726dbfa9fdf8bd9ae93991279990def Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 8 Feb 2017 09:28:41 +0530 Subject: [PATCH 028/112] deleted log files --- .gitignore | 3 +- log/sandbox_service.log | 5959 --------------------------------------- 2 files changed, 2 insertions(+), 5960 deletions(-) delete mode 100644 log/sandbox_service.log diff --git a/.gitignore b/.gitignore index bceb0705..aec0e7e5 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,6 @@ target *.iws *.ipr .idea -dep-sanbox/log log +dep-sanbox/log + diff --git a/log/sandbox_service.log b/log/sandbox_service.log deleted file mode 100644 index c6eff8d7..00000000 --- a/log/sandbox_service.log +++ /dev/null @@ -1,5959 +0,0 @@ -INFO [2017-02-06 08:36:25,704] org.eclipse.jetty.util.log: Logging initialized @2198ms -INFO [2017-02-06 08:36:25,830] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-06 08:36:26,086] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-06 08:36:26,097] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-06 08:36:26,117] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-06 08:36:26,163] org.eclipse.jetty.setuid.SetUIDListener: Opened application@213deac2{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:36:26,164] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:36:26,168] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-06 08:36:27,069] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-06 08:36:27,072] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@5a6d30e2{/,null,AVAILABLE} -INFO [2017-02-06 08:36:27,079] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-06 08:36:27,079] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-06 08:36:27,086] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3cd9aa64{/,null,AVAILABLE} -INFO [2017-02-06 08:36:27,091] org.eclipse.jetty.server.ServerConnector: Started application@213deac2{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:36:27,092] org.eclipse.jetty.server.ServerConnector: Started admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:36:27,092] org.eclipse.jetty.server.Server: Started @3589ms -INFO [2017-02-06 08:36:35,687] org.eclipse.jetty.server.ServerConnector: Stopped application@213deac2{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:36:35,688] org.eclipse.jetty.server.ServerConnector: Stopped admin@23eee4b8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:36:35,690] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3cd9aa64{/,null,UNAVAILABLE} -INFO [2017-02-06 08:36:35,692] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@5a6d30e2{/,null,UNAVAILABLE} -INFO [2017-02-06 08:36:48,537] org.eclipse.jetty.util.log: Logging initialized @2655ms -INFO [2017-02-06 08:37:28,325] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-06 08:37:59,994] org.eclipse.jetty.util.log: Logging initialized @2460ms -INFO [2017-02-06 08:38:00,163] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-06 08:38:00,504] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-06 08:38:00,513] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-06 08:38:00,534] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-06 08:38:00,582] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:38:00,583] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:38:00,592] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-06 08:38:01,738] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-06 08:38:01,744] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@24a0c58b{/,null,AVAILABLE} -INFO [2017-02-06 08:38:01,753] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-06 08:38:01,753] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-06 08:38:01,761] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1118d539{/,null,AVAILABLE} -INFO [2017-02-06 08:38:01,777] org.eclipse.jetty.server.ServerConnector: Started application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:38:01,780] org.eclipse.jetty.server.ServerConnector: Started admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:38:01,783] org.eclipse.jetty.server.Server: Started @4252ms -DEBUG [2017-02-06 08:39:02,358] com.wso2telco.services.dep.sandbox.service.CreditService: ###CREDIT### /{msisdn}/apply invoked : msisdn - admin -DEBUG [2017-02-06 08:39:02,358] com.wso2telco.services.dep.sandbox.service.CreditService: com.wso2telco.services.dep.sandbox.dao.model.custom.CreditRequestBean@b5bb258 -DEBUG [2017-02-06 08:39:02,360] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING CREDIT CONFIGURATION FACTORY -DEBUG [2017-02-06 08:39:02,361] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditServiceFactory: ###CREDIT### LOADING CREDIT APPLY SERVICE -DEBUG [2017-02-06 08:39:02,375] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: Sandbox user : admin -ERROR [2017-02-06 08:39:02,523] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: ###CREDIT### Error in Validation : com.wso2telco.dep.oneapivalidation.exceptions.CustomException: SVC0002 -DEBUG [2017-02-06 08:39:02,539] com.wso2telco.services.dep.sandbox.servicefactory.credit.CreditApplyRequestHandler: Location parameters are empty -INFO [2017-02-06 08:39:29,778] org.eclipse.jetty.server.ServerConnector: Stopped application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:39:29,779] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:39:29,781] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1118d539{/,null,UNAVAILABLE} -INFO [2017-02-06 08:39:29,784] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24a0c58b{/,null,UNAVAILABLE} -INFO [2017-02-06 08:39:34,855] org.eclipse.jetty.util.log: Logging initialized @2496ms -INFO [2017-02-06 08:39:35,030] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-06 08:39:35,424] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-06 08:39:35,434] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-06 08:39:35,454] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-06 08:39:35,509] org.eclipse.jetty.setuid.SetUIDListener: Opened application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:39:35,509] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:39:35,513] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-06 08:39:36,479] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-06 08:39:36,484] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@24134cbc{/,null,AVAILABLE} -INFO [2017-02-06 08:39:36,492] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-06 08:39:36,492] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-06 08:39:36,501] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@34c7232c{/,null,AVAILABLE} -INFO [2017-02-06 08:39:36,508] org.eclipse.jetty.server.ServerConnector: Started application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:39:36,509] org.eclipse.jetty.server.ServerConnector: Started admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:39:36,510] org.eclipse.jetty.server.Server: Started @4164ms -INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped application@5b3bb1f7{HTTP/1.1}{localhost:8181} -INFO [2017-02-06 08:41:23,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@58d6b7b9{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-06 08:41:23,595] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@34c7232c{/,null,UNAVAILABLE} -INFO [2017-02-06 08:41:23,598] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@24134cbc{/,null,UNAVAILABLE} -INFO [2017-02-07 07:03:36,298] org.eclipse.jetty.util.log: Logging initialized @2937ms -INFO [2017-02-07 07:03:36,473] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:03:36,818] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:03:36,828] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:03:36,850] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 07:03:36,959] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -ERROR [2017-02-07 07:03:36,962] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -INFO [2017-02-07 07:04:05,526] org.eclipse.jetty.util.log: Logging initialized @2616ms -INFO [2017-02-07 07:04:05,671] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:04:05,959] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:04:05,970] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:04:05,990] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:04:06,031] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:04:06,031] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:04:06,035] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:04:07,224] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:04:07,229] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 07:04:07,237] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:04:07,238] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:04:07,246] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 07:04:07,260] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:04:07,261] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:04:07,262] org.eclipse.jetty.server.Server: Started @4354ms -DEBUG [2017-02-07 07:08:46,997] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:08:46,998] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@74575e37 -DEBUG [2017-02-07 07:08:47,000] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:08:47,001] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:08:47,019] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:08:47,340] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:11:23,807] org.eclipse.jetty.util.log: Logging initialized @2822ms -INFO [2017-02-07 07:11:23,966] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:11:24,308] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:11:24,317] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:11:24,337] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 07:11:24,380] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -ERROR [2017-02-07 07:11:24,383] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -INFO [2017-02-07 07:11:38,813] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:11:38,815] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:11:38,816] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 07:11:38,819] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 07:11:47,504] org.eclipse.jetty.util.log: Logging initialized @2664ms -INFO [2017-02-07 07:11:47,655] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:11:47,963] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:11:47,974] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:11:47,994] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:11:48,056] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:11:48,057] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:11:48,062] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:11:49,215] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:11:49,220] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 07:11:49,227] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:11:49,227] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:11:49,233] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 07:11:49,240] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:11:49,241] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:11:49,241] org.eclipse.jetty.server.Server: Started @4403ms -DEBUG [2017-02-07 07:12:37,565] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:12:37,566] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@25b8fbb6 -DEBUG [2017-02-07 07:12:37,568] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:12:37,570] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:12:37,583] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:12:37,843] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:13:28,625] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:13:28,627] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:13:28,629] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 07:13:28,634] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 07:13:34,725] org.eclipse.jetty.util.log: Logging initialized @3483ms -INFO [2017-02-07 07:13:34,958] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:13:35,344] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:13:35,357] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:13:35,382] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:13:35,450] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:13:35,451] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:13:35,456] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:13:36,824] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:13:36,830] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2c9d90fc{/,null,AVAILABLE} -INFO [2017-02-07 07:13:36,841] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:13:36,841] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:13:36,853] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@257f30f7{/,null,AVAILABLE} -INFO [2017-02-07 07:13:36,870] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:13:36,871] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:13:36,872] org.eclipse.jetty.server.Server: Started @5634ms -DEBUG [2017-02-07 07:13:45,902] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:13:45,903] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@2d55a882 -DEBUG [2017-02-07 07:13:45,905] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:13:45,906] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:13:46,009] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:32:07,477] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:32:07,546] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:32:07,554] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:32:07,556] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@257f30f7{/,null,UNAVAILABLE} -INFO [2017-02-07 07:32:07,564] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2c9d90fc{/,null,UNAVAILABLE} -INFO [2017-02-07 07:32:44,232] org.eclipse.jetty.util.log: Logging initialized @3030ms -INFO [2017-02-07 07:32:44,464] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:32:44,849] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:32:44,863] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:32:44,888] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:32:44,959] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:32:44,960] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:32:44,968] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:32:46,245] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:32:46,249] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:32:46,257] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:32:46,257] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:32:46,265] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:32:46,274] org.eclipse.jetty.server.Server: Started @5077ms -DEBUG [2017-02-07 07:32:52,870] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:32:52,870] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@555238b3 -DEBUG [2017-02-07 07:32:52,872] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:32:52,873] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:32:52,900] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:33:57,656] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:33:57,756] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:33:57,761] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:33:57,763] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:33:57,770] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:34:03,103] org.eclipse.jetty.util.log: Logging initialized @3319ms -INFO [2017-02-07 07:34:03,317] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:34:03,751] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:34:03,766] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:34:03,808] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:34:03,904] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:03,904] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:03,911] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:34:06,440] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:34:06,448] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:34:06,461] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:34:06,461] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:34:06,478] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:34:06,492] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:06,496] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:06,497] org.eclipse.jetty.server.Server: Started @6716ms -DEBUG [2017-02-07 07:34:07,175] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:34:07,177] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 -DEBUG [2017-02-07 07:34:07,179] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:34:07,180] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:34:07,446] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:34:28,321] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:34:28,473] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:28,483] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:28,487] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:34:28,505] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:34:35,038] org.eclipse.jetty.util.log: Logging initialized @2963ms -INFO [2017-02-07 07:34:35,247] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:34:35,638] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:34:35,649] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:34:35,671] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:34:35,735] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:35,736] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:35,740] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:34:36,996] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:34:37,001] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:34:37,012] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:34:37,012] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:34:37,023] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:34:37,036] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:34:37,037] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:34:37,037] org.eclipse.jetty.server.Server: Started @4965ms -DEBUG [2017-02-07 07:34:40,228] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:34:40,228] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1b3ca2b -DEBUG [2017-02-07 07:34:40,231] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:34:40,232] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:34:40,532] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:35:25,076] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:35:25,162] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:35:25,165] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:35:25,168] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:35:25,189] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:35:38,582] org.eclipse.jetty.util.log: Logging initialized @3133ms -INFO [2017-02-07 07:35:38,769] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:35:39,137] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:35:39,150] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:35:39,174] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:35:39,233] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:35:39,233] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:35:39,238] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:35:40,519] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:35:40,526] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@7b96de8d{/,null,AVAILABLE} -INFO [2017-02-07 07:35:40,541] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:35:40,542] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:35:40,553] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3dfd6220{/,null,AVAILABLE} -INFO [2017-02-07 07:35:40,565] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:35:40,567] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:35:40,567] org.eclipse.jetty.server.Server: Started @5121ms -DEBUG [2017-02-07 07:35:44,667] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:35:44,667] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 -DEBUG [2017-02-07 07:35:44,669] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:35:44,671] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:35:44,945] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:36:17,403] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:36:17,537] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:36:17,550] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:36:17,552] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3dfd6220{/,null,UNAVAILABLE} -INFO [2017-02-07 07:36:17,570] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@7b96de8d{/,null,UNAVAILABLE} -INFO [2017-02-07 07:36:53,795] org.eclipse.jetty.util.log: Logging initialized @2983ms -INFO [2017-02-07 07:36:53,989] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:36:54,422] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:36:54,437] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:36:54,466] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:36:54,553] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:36:54,554] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:36:54,559] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:36:55,826] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:36:55,832] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:36:55,841] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:36:55,842] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:36:55,850] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:36:55,859] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:36:55,859] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:36:55,860] org.eclipse.jetty.server.Server: Started @5051ms -DEBUG [2017-02-07 07:36:58,768] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:36:58,768] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@555238b3 -DEBUG [2017-02-07 07:36:58,771] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:36:58,772] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:36:58,799] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -ERROR [2017-02-07 07:37:03,066] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error Occured in PAYMENT Service. -! java.lang.NullPointerException: null -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:204) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:44:57,591] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:44:57,593] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:44:57,594] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:44:57,603] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:45:10,263] org.eclipse.jetty.util.log: Logging initialized @2900ms -INFO [2017-02-07 07:45:10,450] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:45:10,838] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:45:10,850] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:45:10,875] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:45:10,936] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:45:10,936] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:45:10,940] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:45:12,139] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:45:12,145] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:45:12,154] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:45:12,154] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:45:12,164] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:45:12,179] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:45:12,180] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:45:12,182] org.eclipse.jetty.server.Server: Started @4823ms -DEBUG [2017-02-07 07:45:18,431] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:45:18,431] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@76e3f574 -DEBUG [2017-02-07 07:45:18,434] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:45:18,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:45:18,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:45:23,343] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:45:23,344] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:45:23,346] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save insertion of clientCorrelator request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveClientCorrelator(PaymentRequestHandler.java:458) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:390) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -DEBUG [2017-02-07 07:45:23,376] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:45:23,377] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:45:23,378] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:49:27,064] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:49:27,065] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:49:27,067] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:49:27,079] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:49:44,465] org.eclipse.jetty.util.log: Logging initialized @2994ms -INFO [2017-02-07 07:49:44,662] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:49:45,023] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:49:45,034] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:49:45,062] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:49:45,130] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:49:45,130] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:49:45,134] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:49:46,411] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:49:46,416] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:49:46,425] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:49:46,426] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:49:46,435] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:49:46,449] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:49:46,450] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:49:46,451] org.eclipse.jetty.server.Server: Started @4983ms -DEBUG [2017-02-07 07:49:52,242] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:49:52,242] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@59095f0f -DEBUG [2017-02-07 07:49:52,244] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:49:52,245] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:49:52,266] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:49:56,357] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:49:56,361] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:49:56,362] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:53:26,239] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:53:26,240] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:53:26,242] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:53:26,249] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:53:31,125] org.eclipse.jetty.util.log: Logging initialized @2980ms -INFO [2017-02-07 07:53:31,328] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:53:31,696] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:53:31,708] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:53:31,731] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:53:31,788] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:53:31,789] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:53:31,794] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:53:32,945] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:53:32,950] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:53:32,960] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:53:32,960] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:53:32,971] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:53:32,982] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:53:32,983] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:53:32,983] org.eclipse.jetty.server.Server: Started @4841ms -DEBUG [2017-02-07 07:53:38,008] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:53:38,008] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@5fcbe282 -DEBUG [2017-02-07 07:53:38,010] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:53:38,011] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:53:38,282] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:55:11,223] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:55:11,225] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:55:11,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:55:29,554] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:55:29,555] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:55:29,557] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:55:29,564] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:55:39,680] org.eclipse.jetty.util.log: Logging initialized @2886ms -INFO [2017-02-07 07:55:39,974] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:55:40,383] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:55:40,394] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:55:40,416] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:55:40,473] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:55:40,473] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:55:40,477] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:55:41,651] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:55:41,657] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 07:55:41,667] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:55:41,667] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:55:41,677] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 07:55:41,692] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:55:41,693] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:55:41,693] org.eclipse.jetty.server.Server: Started @4903ms -DEBUG [2017-02-07 07:55:46,105] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:55:46,105] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@4d88656d -DEBUG [2017-02-07 07:55:46,107] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:55:46,109] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:55:46,133] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:56:53,892] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:56:53,894] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:56:53,896] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:56:53,984] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:56:54,003] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:56:54,005] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 07:56:54,019] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 07:57:00,811] org.eclipse.jetty.util.log: Logging initialized @2732ms -INFO [2017-02-07 07:57:01,038] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 07:57:01,354] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 07:57:01,364] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 07:57:01,387] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 07:57:01,444] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:57:01,444] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:57:01,448] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 07:57:02,519] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 07:57:02,524] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 07:57:02,534] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 07:57:02,535] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 07:57:02,543] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 07:57:02,555] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:57:02,556] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:57:02,557] org.eclipse.jetty.server.Server: Started @4480ms -DEBUG [2017-02-07 07:57:08,458] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 07:57:08,458] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@468272f8 -DEBUG [2017-02-07 07:57:08,460] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 07:57:08,460] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 07:57:08,476] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 07:57:12,312] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:57:12,342] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 07:57:12,345] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 07:59:23,476] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 07:59:23,476] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 07:59:23,478] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 07:59:23,484] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 08:44:39,947] org.eclipse.jetty.util.log: Logging initialized @3039ms -INFO [2017-02-07 08:44:40,133] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:44:40,543] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:44:40,559] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:44:40,584] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:44:40,643] org.eclipse.jetty.setuid.SetUIDListener: Opened application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:44:40,644] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:44:40,649] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:44:41,920] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:44:41,926] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@463afa6e{/,null,AVAILABLE} -INFO [2017-02-07 08:44:41,935] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:44:41,936] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:44:41,946] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@16cb9989{/,null,AVAILABLE} -INFO [2017-02-07 08:44:41,956] org.eclipse.jetty.server.ServerConnector: Started application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:44:41,958] org.eclipse.jetty.server.ServerConnector: Started admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:44:41,958] org.eclipse.jetty.server.Server: Started @5054ms -DEBUG [2017-02-07 08:44:48,187] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 08:44:48,187] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@2e97091c -DEBUG [2017-02-07 08:44:48,189] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 08:44:48,191] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 08:44:48,393] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 08:48:51,832] org.eclipse.jetty.util.log: Logging initialized @3712ms -INFO [2017-02-07 08:48:52,143] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:48:52,649] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:48:52,666] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:48:52,704] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 08:48:52,788] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@3ed34ef5: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 8 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -ERROR [2017-02-07 08:48:52,788] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 8 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -DEBUG [2017-02-07 08:49:00,595] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:49:00,597] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:49:00,599] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 08:49:00,731] org.eclipse.jetty.server.ServerConnector: Stopped application@58d6b7b9{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:49:00,748] org.eclipse.jetty.server.ServerConnector: Stopped admin@3f1a4795{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:49:00,750] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@16cb9989{/,null,UNAVAILABLE} -INFO [2017-02-07 08:49:00,759] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@463afa6e{/,null,UNAVAILABLE} -INFO [2017-02-07 08:49:27,422] org.eclipse.jetty.util.log: Logging initialized @3062ms -INFO [2017-02-07 08:49:27,603] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:49:27,965] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:49:27,977] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:49:28,009] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:49:28,065] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:49:28,066] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:49:28,072] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:49:29,319] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:49:29,324] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@2c9d90fc{/,null,AVAILABLE} -INFO [2017-02-07 08:49:29,334] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:49:29,334] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:49:29,344] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@257f30f7{/,null,AVAILABLE} -INFO [2017-02-07 08:49:29,357] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:49:29,359] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:49:29,359] org.eclipse.jetty.server.Server: Started @5003ms -DEBUG [2017-02-07 08:49:32,548] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 08:49:32,548] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@74116013 -DEBUG [2017-02-07 08:49:32,551] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 08:49:32,552] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 08:49:32,596] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 08:49:51,820] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:49:52,534] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:49:55,524] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 08:50:20,513] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:50:20,514] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:50:20,516] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@257f30f7{/,null,UNAVAILABLE} -INFO [2017-02-07 08:50:20,531] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@2c9d90fc{/,null,UNAVAILABLE} -INFO [2017-02-07 08:53:37,435] org.eclipse.jetty.util.log: Logging initialized @2921ms -INFO [2017-02-07 08:53:37,660] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:53:38,021] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:53:38,032] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:53:38,057] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:53:38,115] org.eclipse.jetty.setuid.SetUIDListener: Opened application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:53:38,115] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:53:38,121] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:53:39,518] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:53:39,523] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@7b96de8d{/,null,AVAILABLE} -INFO [2017-02-07 08:53:39,533] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:53:39,534] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:53:39,552] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@3dfd6220{/,null,AVAILABLE} -INFO [2017-02-07 08:53:39,566] org.eclipse.jetty.server.ServerConnector: Started application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:53:39,567] org.eclipse.jetty.server.ServerConnector: Started admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:53:39,567] org.eclipse.jetty.server.Server: Started @5056ms -DEBUG [2017-02-07 08:53:45,988] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 08:53:45,988] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@5c0ce930 -DEBUG [2017-02-07 08:53:45,990] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 08:53:45,991] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 08:53:46,020] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 08:56:29,854] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:56:29,864] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:56:29,874] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 08:57:16,552] org.eclipse.jetty.server.ServerConnector: Stopped application@3f1a4795{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:57:16,555] org.eclipse.jetty.server.ServerConnector: Stopped admin@6a6f6c7e{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:57:16,561] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@3dfd6220{/,null,UNAVAILABLE} -INFO [2017-02-07 08:57:16,571] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@7b96de8d{/,null,UNAVAILABLE} -INFO [2017-02-07 08:57:23,711] org.eclipse.jetty.util.log: Logging initialized @2631ms -INFO [2017-02-07 08:57:23,891] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:57:24,245] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:57:24,261] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:57:24,291] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:57:24,365] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:57:24,366] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:57:24,370] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:57:26,079] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:57:26,084] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 08:57:26,093] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:57:26,094] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:57:26,102] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 08:57:26,112] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:57:26,113] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:57:26,114] org.eclipse.jetty.server.Server: Started @5035ms -DEBUG [2017-02-07 08:57:31,944] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 08:57:31,944] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1b39936a -DEBUG [2017-02-07 08:57:31,946] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 08:57:31,947] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 08:57:31,960] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 08:57:35,684] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: Error Occured While Saving Object. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:57:35,692] com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO: saveAttributeValue -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -ERROR [2017-02-07 08:57:35,695] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: ###PAYMENT### Error in processing save of referenceCode request. -! java.sql.SQLIntegrityConstraintViolationException: Column 'attributedistributiondid' cannot be null -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:683) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:108) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2061) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1819) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2033) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:1969) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:4953) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at com.mysql.cj.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1954) ~[mysql-connector-java-6.0.2.jar:6.0.2] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! ... 84 common frames omitted -! Causing: org.hibernate.exception.ConstraintViolationException: could not execute statement -! at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2840) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3411) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:619) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:273) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:254) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:299) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:637) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:629) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:624) ~[hibernate-core-5.2.1.Final.jar:5.2.1.Final] -! at com.wso2telco.core.mi.hibernate.HibernateAbstractDAO.saveOrUpdate(HibernateAbstractDAO.java:18) ~[mi-util-2.0.3.jar:2.0.3] -! at com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateCommonDAO.saveAttributeValue(HibernateCommonDAO.java:151) ~[classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.saveReferenceCode(PaymentRequestHandler.java:493) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:392) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler.process(PaymentRequestHandler.java:54) [classes/:na] -! at com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler.execute(AbstractRequestHandler.java:83) [classes/:na] -! at com.wso2telco.services.dep.sandbox.service.PaymentService.makePayment(PaymentService.java:69) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:315) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:297) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.internal.Errors.process(Errors.java:267) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) [jersey-common-2.22.1.jar:na] -! at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [jersey-server-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:471) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:425) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:383) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:336) [jersey-container-servlet-core-2.22.1.jar:na] -! at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:223) [jersey-container-servlet-core-2.22.1.jar:na] -! at io.dropwizard.jetty.NonblockingServletHolder.handle(NonblockingServletHolder.java:49) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.UserAgentFilter.doFilter(UserAgentFilter.java:83) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlets.GzipFilter.doFilter(GzipFilter.java:300) [jetty-servlets-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jetty.BiDiGzipFilter.doFilter(BiDiGzipFilter.java:132) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.servlets.ThreadNameFilter.doFilter(ThreadNameFilter.java:29) [dropwizard-servlets-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.handle(AllowedMethodsFilter.java:43) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at io.dropwizard.jersey.filter.AllowedMethodsFilter.doFilter(AllowedMethodsFilter.java:38) [dropwizard-jersey-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515) [jetty-servlet-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:240) [metrics-jetty9-3.1.2.jar:3.1.2] -! at io.dropwizard.jetty.RoutingHandler.handle(RoutingHandler.java:51) [dropwizard-jetty-0.9.2.jar:0.9.2] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java:95) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.StatisticsHandler.handle(StatisticsHandler.java:159) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.Server.handle(Server.java:499) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) [jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540) [jetty-io-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) [jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121] -INFO [2017-02-07 08:59:44,770] org.eclipse.jetty.util.log: Logging initialized @2513ms -INFO [2017-02-07 08:59:44,928] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:59:45,315] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:59:45,326] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:59:45,348] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 08:59:45,400] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -ERROR [2017-02-07 08:59:45,402] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -INFO [2017-02-07 08:59:49,190] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:59:49,193] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:59:49,195] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 08:59:49,202] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 08:59:56,421] org.eclipse.jetty.util.log: Logging initialized @2847ms -INFO [2017-02-07 08:59:56,627] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 08:59:56,971] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 08:59:56,986] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 08:59:57,014] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 08:59:57,083] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:59:57,084] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:59:57,090] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 08:59:58,322] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 08:59:58,326] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 08:59:58,334] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 08:59:58,334] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 08:59:58,343] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 08:59:58,358] org.eclipse.jetty.server.Server: Started @4790ms -DEBUG [2017-02-07 09:00:02,980] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:00:02,980] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@72d118bb -DEBUG [2017-02-07 09:00:02,981] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:00:02,982] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:00:02,995] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@564727ff -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:00:59,410] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@135d15d6 -DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:01:54,603] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:01:54,604] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@1f1fa0c7 -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:15:40,351] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 09:26:06,769] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 09:26:06,771] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 09:26:06,772] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 09:26:06,783] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 09:26:16,711] org.eclipse.jetty.util.log: Logging initialized @2621ms -INFO [2017-02-07 09:26:16,887] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 09:26:17,235] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 09:26:17,249] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 09:26:17,268] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 09:26:17,310] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 09:26:17,311] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 09:26:17,314] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 09:26:18,262] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 09:26:18,266] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 09:26:18,273] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 09:26:18,273] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 09:26:18,281] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 09:26:18,290] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 09:26:18,291] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 09:26:18,292] org.eclipse.jetty.server.Server: Started @4205ms -DEBUG [2017-02-07 09:26:23,433] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 09:26:23,434] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean@46332b70 -DEBUG [2017-02-07 09:26:23,435] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 09:26:23,436] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 09:26:23,452] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 10:28:24,434] org.eclipse.jetty.util.log: Logging initialized @2588ms -INFO [2017-02-07 10:28:24,628] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 10:28:25,040] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 10:28:25,052] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 10:28:25,078] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -WARN [2017-02-07 10:28:25,146] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED org.eclipse.jetty.server.Server@779de014: java.lang.RuntimeException: java.net.BindException: Address already in use -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -ERROR [2017-02-07 10:28:25,153] io.dropwizard.cli.ServerCommand: Unable to start server, shutting down -! java.net.BindException: Address already in use -! at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_121] -! at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_121] -! at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_121] -! at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:321) ~[jetty-server-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:200) ~[jetty-setuid-java-1.0.3.jar:na] -! ... 13 common frames omitted -! Causing: java.lang.RuntimeException: java.net.BindException: Address already in use -! at org.eclipse.jetty.setuid.SetUIDListener.lifeCycleStarting(SetUIDListener.java:213) ~[jetty-setuid-java-1.0.3.jar:na] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.setStarting(AbstractLifeCycle.java:188) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:67) ~[jetty-util-9.2.13.v20150730.jar:9.2.13.v20150730] -! at io.dropwizard.cli.ServerCommand.run(ServerCommand.java:43) ~[dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.EnvironmentCommand.run(EnvironmentCommand.java:41) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:77) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.cli.Cli.run(Cli.java:70) [dropwizard-core-0.9.2.jar:0.9.2] -! at io.dropwizard.Application.run(Application.java:80) [dropwizard-core-0.9.2.jar:0.9.2] -! at com.wso2telco.services.dep.sandbox.service.Application.main(Application.java:48) [classes/:na] -! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] -! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121] -! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121] -! at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121] -! at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na] -INFO [2017-02-07 10:28:39,163] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:28:39,165] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:28:39,166] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 10:28:39,169] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 10:28:56,758] org.eclipse.jetty.util.log: Logging initialized @2553ms -INFO [2017-02-07 10:28:56,909] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 10:28:57,205] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 10:28:57,215] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 10:28:57,235] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 10:28:57,278] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:28:57,278] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:28:57,282] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 10:28:58,389] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 10:28:58,394] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@75de29c0{/,null,AVAILABLE} -INFO [2017-02-07 10:28:58,401] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 10:28:58,402] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 10:28:58,407] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@1305c126{/,null,AVAILABLE} -INFO [2017-02-07 10:28:58,414] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:28:58,415] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:28:58,416] org.eclipse.jetty.server.Server: Started @4212ms -INFO [2017-02-07 10:34:24,853] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:34:24,854] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:34:24,855] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@1305c126{/,null,UNAVAILABLE} -INFO [2017-02-07 10:34:24,858] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@75de29c0{/,null,UNAVAILABLE} -INFO [2017-02-07 10:34:33,173] org.eclipse.jetty.util.log: Logging initialized @2544ms -INFO [2017-02-07 10:34:33,327] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 10:34:33,622] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 10:34:33,634] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 10:34:33,654] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 10:34:33,696] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:34:33,696] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:34:33,700] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 10:34:34,837] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 10:34:34,841] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 10:34:34,849] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 10:34:34,849] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 10:34:34,855] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 10:34:34,864] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:34:34,865] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:34:34,867] org.eclipse.jetty.server.Server: Started @4240ms -DEBUG [2017-02-07 10:38:35,825] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 10:38:35,826] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@594d863e -DEBUG [2017-02-07 10:38:35,829] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 10:38:35,830] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 10:38:35,846] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 10:51:31,622] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@68150107 -DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 10:51:31,623] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 10:51:31,624] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 10:52:13,029] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 10:52:13,030] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@252eb04 -DEBUG [2017-02-07 10:52:13,031] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 10:52:13,031] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 10:52:13,032] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -DEBUG [2017-02-07 10:52:36,225] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 10:52:36,225] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@a5b178c -DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 10:52:36,226] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 10:58:47,644] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:58:47,651] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:58:47,653] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 10:58:47,656] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 10:59:44,605] org.eclipse.jetty.util.log: Logging initialized @2504ms -INFO [2017-02-07 10:59:44,767] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 10:59:45,071] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 10:59:45,081] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 10:59:45,103] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 10:59:45,145] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:59:45,145] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:59:45,149] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 10:59:46,173] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 10:59:46,177] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 10:59:46,185] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 10:59:46,185] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 10:59:46,193] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 10:59:46,200] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 10:59:46,201] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 10:59:46,202] org.eclipse.jetty.server.Server: Started @4103ms -INFO [2017-02-07 11:00:34,908] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:00:34,909] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:00:34,911] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:00:34,915] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 11:01:59,185] org.eclipse.jetty.util.log: Logging initialized @2520ms -INFO [2017-02-07 11:01:59,355] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 11:01:59,646] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 11:01:59,657] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 11:01:59,678] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 11:01:59,734] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:01:59,735] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:01:59,740] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 11:02:00,740] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 11:02:00,745] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 11:02:00,753] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 11:02:00,754] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 11:02:00,761] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 11:02:00,771] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:02:00,772] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:02:00,773] org.eclipse.jetty.server.Server: Started @4110ms -DEBUG [2017-02-07 11:04:36,735] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 11:04:36,735] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@75d46ab4 -DEBUG [2017-02-07 11:04:36,737] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 11:04:36,737] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 11:04:36,752] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 11:16:14,598] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:16:14,599] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:16:14,601] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:16:14,605] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 11:16:23,267] org.eclipse.jetty.util.log: Logging initialized @2511ms -INFO [2017-02-07 11:16:23,431] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 11:16:23,733] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 11:16:23,747] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 11:16:23,769] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 11:16:23,815] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:16:23,815] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:16:23,819] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 11:16:24,890] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 11:16:24,894] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 11:16:24,902] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 11:16:24,903] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 11:16:24,909] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 11:16:24,916] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:16:24,917] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:16:24,917] org.eclipse.jetty.server.Server: Started @4163ms -DEBUG [2017-02-07 11:19:12,080] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 11:19:12,081] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@43d050da -DEBUG [2017-02-07 11:19:12,084] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 11:19:12,085] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 11:19:12,098] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 11:22:40,167] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:22:40,168] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:22:40,169] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:22:40,173] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 11:31:36,615] org.eclipse.jetty.util.log: Logging initialized @2512ms -INFO [2017-02-07 11:31:36,773] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 11:31:37,121] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 11:31:37,133] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 11:31:37,158] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 11:31:37,215] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:31:37,215] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:31:37,219] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 11:31:38,289] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 11:31:38,294] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 11:31:38,302] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 11:31:38,302] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 11:31:38,309] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 11:31:38,316] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:31:38,317] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:31:38,318] org.eclipse.jetty.server.Server: Started @4216ms -DEBUG [2017-02-07 11:32:43,114] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 11:32:43,114] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@3b1ff77b -DEBUG [2017-02-07 11:32:43,116] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 11:32:43,117] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 11:32:43,133] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 11:33:20,002] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:33:20,006] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:33:20,209] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:33:20,214] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} -INFO [2017-02-07 11:36:36,364] org.eclipse.jetty.util.log: Logging initialized @2502ms -INFO [2017-02-07 11:36:36,521] io.dropwizard.assets.AssetsBundle: Registering AssetBundle with name: swagger-assets for path /swagger-static/* -INFO [2017-02-07 11:36:36,835] io.dropwizard.server.ServerFactory: Starting Application -INFO [2017-02-07 11:36:36,845] io.dropwizard.server.DefaultServerFactory: Registering jersey handler with root path prefix: / -INFO [2017-02-07 11:36:36,865] io.dropwizard.server.DefaultServerFactory: Registering admin handler with root path prefix: / -INFO [2017-02-07 11:36:36,911] org.eclipse.jetty.setuid.SetUIDListener: Opened application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:36:36,911] org.eclipse.jetty.setuid.SetUIDListener: Opened admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:36:36,915] org.eclipse.jetty.server.Server: jetty-9.2.13.v20150730 -INFO [2017-02-07 11:36:37,932] io.dropwizard.jersey.DropwizardResourceConfig: The following paths were found for the configured resources: - - GET /api-docs (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - GET /api-docs/{route: .+} (com.wordnik.swagger.jaxrs.listing.ApiListingResourceJSON) - POST /credit/{v1}/credit/{msisdn}/apply (com.wso2telco.services.dep.sandbox.service.CreditService) - POST /customerinfo/{v1}/config/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - POST /customerinfo/{v1}/config/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoConfigurationService) - GET /customerinfo/{v1}/customer/attribute (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /customerinfo/{v1}/customer/profile (com.wso2telco.services.dep.sandbox.service.CustomerInfoService) - GET /location/{v1}/queries/location (com.wso2telco.services.dep.sandbox.service.SandboxService) - POST /payment/{v1}/{endUserId}/transactions/amount (com.wso2telco.services.dep.sandbox.service.PaymentService) - GET /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/service (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/config/{msisdn}/service/{serviceCode} (com.wso2telco.services.dep.sandbox.service.ProvisionConfigurationService) - POST /provisioning/{v1}/{msisdn} (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/active (com.wso2telco.services.dep.sandbox.service.ProvisionService) - GET /provisioning/{v1}/{msisdn}/list/applicable (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /provisioning/{v1}/{msisdn}/remove (com.wso2telco.services.dep.sandbox.service.ProvisionService) - POST /smsmessaging/{apiVersion}/outbound/{shortCode}/requests (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos (com.wso2telco.services.dep.sandbox.service.SandboxService) - GET /swagger (io.federecio.dropwizard.swagger.SwaggerResource) - GET /user/apiType (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/managenumber (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/serviceType (com.wso2telco.services.dep.sandbox.service.UserService) - GET /user/{apiType}/{serviceType}/attribute (com.wso2telco.services.dep.sandbox.service.UserService) - POST /user/{userName}/register (com.wso2telco.services.dep.sandbox.service.UserService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getAccountStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/config/{apiType}/{serviceType}/getTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addAccountInfo (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - POST /wallet/{v1}/config/{endUserId}/addTransactionStatus (com.wso2telco.services.dep.sandbox.service.WalletConfigurationService) - GET /wallet/{v1}/transaction/{endUserId}/balance (com.wso2telco.services.dep.sandbox.service.WalletService) - GET /wallet/{v1}/transaction/{endUserId}/list (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/payment (com.wso2telco.services.dep.sandbox.service.WalletService) - POST /wallet/{v1}/transaction/{endUserId}/refund (com.wso2telco.services.dep.sandbox.service.WalletService) - -INFO [2017-02-07 11:36:37,937] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@fc807c1{/,null,AVAILABLE} -INFO [2017-02-07 11:36:37,945] io.dropwizard.setup.AdminEnvironment: tasks = - - POST /tasks/log-level (io.dropwizard.servlets.tasks.LogConfigurationTask) - POST /tasks/gc (io.dropwizard.servlets.tasks.GarbageCollectionTask) - -WARN [2017-02-07 11:36:37,945] io.dropwizard.setup.AdminEnvironment: -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -! THIS APPLICATION HAS NO HEALTHCHECKS. THIS MEANS YOU WILL NEVER KNOW ! -! IF IT DIES IN PRODUCTION, WHICH MEANS YOU WILL NEVER KNOW IF YOU'RE ! -! LETTING YOUR USERS DOWN. YOU SHOULD ADD A HEALTHCHECK FOR EACH OF YOUR ! -! APPLICATION'S DEPENDENCIES WHICH FULLY (BUT LIGHTLY) TESTS IT. ! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -INFO [2017-02-07 11:36:37,952] org.eclipse.jetty.server.handler.ContextHandler: Started i.d.j.MutableServletContextHandler@72f9f27c{/,null,AVAILABLE} -INFO [2017-02-07 11:36:37,961] org.eclipse.jetty.server.ServerConnector: Started application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:36:37,962] org.eclipse.jetty.server.ServerConnector: Started admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:36:37,963] org.eclipse.jetty.server.Server: Started @4103ms -DEBUG [2017-02-07 11:37:48,831] com.wso2telco.services.dep.sandbox.service.PaymentService: ###PAYMENT### /{endUserId} invoked : endUserId - tel:+94773524308 -DEBUG [2017-02-07 11:37:48,832] com.wso2telco.services.dep.sandbox.service.PaymentService: com.wso2telco.services.dep.sandbox.dao.model.custom.AmountTransactionRequestBean@413084ea -DEBUG [2017-02-07 11:37:48,834] com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory: LOADING PAYMENT FACTORY -DEBUG [2017-02-07 11:37:48,835] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestFactory: LOADING MAKE PAYMENT SERVICE -DEBUG [2017-02-07 11:37:48,851] com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler: Sandbox user : admin -INFO [2017-02-07 11:38:11,943] org.eclipse.jetty.server.ServerConnector: Stopped application@28952dea{HTTP/1.1}{localhost:8181} -INFO [2017-02-07 11:38:11,946] org.eclipse.jetty.server.ServerConnector: Stopped admin@5a9800f8{HTTP/1.1}{0.0.0.0:8282} -INFO [2017-02-07 11:38:11,948] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@72f9f27c{/,null,UNAVAILABLE} -INFO [2017-02-07 11:38:11,953] org.eclipse.jetty.server.handler.ContextHandler: Stopped i.d.j.MutableServletContextHandler@fc807c1{/,null,UNAVAILABLE} From 6f37cab683d499f781422e6d9b2e1aec35799751 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 8 Feb 2017 17:02:46 +0530 Subject: [PATCH 029/112] WIP refund payment Api --- .../custom/ChargeRefundAmountResponse.java | 53 ++ .../PaymentRefundRequestWrapperDTO.java | 42 ++ .../PaymentRefundTransactionRequestBean.java | 108 ++++ .../PaymentRefundTransactionResponseBean.java | 99 ++++ .../dao/model/custom/RefundPaymentDTO.java | 14 + .../dep/sandbox/service/PaymentService.java | 34 ++ .../payment/PaymentRefundRequestHandler.java | 503 ++++++++++++++++++ .../payment/PaymentRefundResponseWrapper.java | 46 ++ .../payment/PaymentRequestFactory.java | 4 + .../payment/PaymentResponseWrapper.java | 1 - 10 files changed, 903 insertions(+), 1 deletion(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundRequestWrapperDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundPaymentDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java new file mode 100644 index 00000000..68a9ea6e --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class ChargeRefundAmountResponse { + + private PaymentChargingInformation chargingInformation; + + private String totalAmountRefunded; + + private PaymentChargingMetaData chargingMetaData; + + public PaymentChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(PaymentChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + + public PaymentChargingMetaData getChargingMetaData() { + return chargingMetaData; + } + + public void setChargingMetaData(PaymentChargingMetaData chargingMetaData) { + this.chargingMetaData = chargingMetaData; + } + + public String getTotalAmountRefunded() { + return totalAmountRefunded; + } + + public void setTotalAmountRefunded(String totalAmountRefunded) { + this.totalAmountRefunded = totalAmountRefunded; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundRequestWrapperDTO.java new file mode 100644 index 00000000..a83b5234 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundRequestWrapperDTO.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class PaymentRefundRequestWrapperDTO extends RequestDTO { + + /** The endUserId param **/ + private String endUserId; + + /** The request bean **/ + private PaymentRefundTransactionRequestBean refundRequestBean; + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public PaymentRefundTransactionRequestBean getRefundRequestBean() { + return refundRequestBean; + } + + public void setRefundRequestBean(PaymentRefundTransactionRequestBean refundRequestBean) { + this.refundRequestBean = refundRequestBean; + } +} \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java new file mode 100644 index 00000000..42f2b544 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. + * + * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + +public class PaymentRefundTransactionRequestBean { + + private AmountTransaction amountTransaction; + + public AmountTransaction getAmountTransaction() { + return amountTransaction; + } + + public void setAmountTransaction(AmountTransaction amountTransaction) { + this.amountTransaction = amountTransaction; + } + + + public static class AmountTransaction { + + private String clientCorrelator; + + private String endUserId; + + private String originalServerReferenceCode; + + private ChargePaymentAmount paymentAmount; + + private String referenceCode; + + private String transactionOperationStatus; + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + + public String getReferenceCode() { + return referenceCode; + } + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + + public ChargePaymentAmount getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(ChargePaymentAmount paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("Client Correlator : " + getClientCorrelator()); + builder.append("EndUserId : " + getEndUserId()); + builder.append("Reference Code : " + getReferenceCode()); + + if (getPaymentAmount() != null) { + builder.append(" " + getPaymentAmount().toString()); + } + + return builder.toString(); + } + + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java new file mode 100644 index 00000000..2ec3e3fb --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java @@ -0,0 +1,99 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class PaymentRefundTransactionResponseBean { + + + private String clientCorrelator; + + private String endUserId; + + private String originalReferenceCode; + + private String originalServerReferenceCode; + + private ChargeRefundAmountResponse paymentAmount; + + private String referenceCode; + + private String serverReferenceCode; + + private String resourceURL; + + private String transactionOperationStatus; + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public String getOriginalReferenceCode() { + return originalReferenceCode; + } + + public void setOriginalReferenceCode(String originalReferenceCode) { + this.originalReferenceCode = originalReferenceCode; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + + public String getReferenceCode() { + return referenceCode; + } + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public String getServerReferenceCode() { + return serverReferenceCode; + } + + public void setServerReferenceCode(String serverReferenceCode) { + this.serverReferenceCode = serverReferenceCode; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + + public ChargeRefundAmountResponse getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(ChargeRefundAmountResponse paymentAmount) { + this.paymentAmount = paymentAmount; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundPaymentDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundPaymentDTO.java new file mode 100644 index 00000000..63ff4d37 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundPaymentDTO.java @@ -0,0 +1,14 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class RefundPaymentDTO { + + private PaymentRefundTransactionResponseBean amountTransaction; + + public PaymentRefundTransactionResponseBean getAmountTransaction() { + return amountTransaction; + } + + public void setAmountTransaction(PaymentRefundTransactionResponseBean amountTransaction) { + this.amountTransaction = amountTransaction; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 34739d60..d5e7f511 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -76,4 +76,38 @@ public Response makePayment( } } + /** @path should be changed to ("/{endUserId}/transactions/amount") **/ + @POST + @Path("/{endUserId}/transactions/refund") + @ApiOperation(value = "refundService", notes = "refund service", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name= "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) + public Response refundUser(@ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, + PaymentRefundTransactionRequestBean refundRequestBean, @Context HttpServletRequest request) { + LOG.debug("###REFUND### /{endUserId}/refund invoked : endUserId - " + endUserId); + if (refundRequestBean != null) { + LOG.debug(refundRequestBean); + } + PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setRefundRequestBean(refundRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Refund User SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + } + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java new file mode 100644 index 00000000..951a0d0d --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -0,0 +1,503 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.ibm.icu.math.BigDecimal; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; +import com.wso2telco.services.dep.sandbox.dao.NumberDAO; +import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.RefundTransactionRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; +import com.wso2telco.services.dep.sandbox.util.*; +import org.apache.commons.lang.math.NumberUtils; +import org.apache.commons.logging.LogFactory; + +import javax.annotation.Nonnull; +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Currency; +import java.util.Date; +import java.util.List; + +public class PaymentRefundRequestHandler extends AbstractRequestHandler { + + private PaymentDAO paymentDAO; + private LoggingDAO loggingDAO; + private NumberDAO numberDAO; + private PaymentRefundRequestWrapperDTO requestWrapperDTO; + private PaymentRefundResponseWrapper responseWrapper; + private MessageLogHandler logHandler; + private String serviceCallRefund; + private boolean isContainsMetaData; + private Integer transactionId; + + { + LOG = LogFactory.getLog(RefundTransactionRequestHandler.class); + paymentDAO = DaoFactory.getPaymentDAO(); + loggingDAO = DaoFactory.getLoggingDAO(); + numberDAO = DaoFactory.getNumberDAO(); + dao = DaoFactory.getGenaricDAO(); + logHandler = MessageLogHandler.getInstance(); + } + + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + List address = new ArrayList(); + address.add(requestWrapperDTO.getEndUserId()); + return address; + } + + @Override + protected void init(PaymentRefundRequestWrapperDTO extendedRequestDTO) throws Exception { + responseWrapper = new PaymentRefundResponseWrapper(); + requestWrapperDTO = extendedRequestDTO; + } + + @Override + protected boolean validate(PaymentRefundRequestWrapperDTO wrapperDTO) throws Exception { + + PaymentRefundTransactionRequestBean requestBean = wrapperDTO.getRefundRequestBean(); + //Getting Refund Transaction + PaymentRefundTransactionRequestBean.AmountTransaction request = requestBean.getAmountTransaction(); + ChargePaymentAmount paymentAmount = request.getPaymentAmount(); + + PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + PaymentChargingMetaData metaData = paymentAmount.getChargingMetaData(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserID = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); + String msisdn = CommonUtil.getNullOrTrimmedValue(request.getEndUserId()); + String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount().toString()); + String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency().toString()); + String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metaData.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metaData.getChannel()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); + + List validationRulesList = new ArrayList<>(); + + try { + + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, + "endUserID", endUserID)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, + "endUserID", msisdn)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "amount", amount)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "currency", currency)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "description", description)); + if (metaData != null) { + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "onBehalfOf", onBehalfOf)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "categoryCode", categoryCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "channel", channel)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "taxAmount", taxAmount)); + } + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "referenceCode", referenceCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "transactionOperationStatus", transactionOperationStatus)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###REFUND### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + return true; + } + + @Override + protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) throws Exception { + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + try { + PaymentRefundTransactionRequestBean requestBean = extendedRequestDTO.getRefundRequestBean(); + PaymentRefundTransactionRequestBean.AmountTransaction request = requestBean.getAmountTransaction(); + ChargePaymentAmount paymentAmount = request.getPaymentAmount(); + PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); + PaymentChargingMetaData metadata = paymentAmount.getChargingMetaData(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserIdPath = extendedRequestDTO.getEndUserId(); + String endUserIdRequest = request.getEndUserId(); + String endUserId = getLastMobileNumber(endUserIdPath); +// String originalReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String originalServerReferenceCode = CommonUtil + .getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); + String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTaxAmount()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); + serviceCallRefund = ServiceName.RefundPayment.toString(); + // Attribute Name Used in wallet + String accountCurrencyAttribute = AttributeName.Currency.toString().toLowerCase(); + String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); + String userName = extendedRequestDTO.getUser().getUserName(); + Integer userId = extendedRequestDTO.getUser().getId(); + + // Save Request Log + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallRefund); + + Gson gson = new Gson(); + String jsonString = gson.toJson(requestBean); + MessageLog messageLog = new MessageLog(); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setRequest(jsonString); + messageLog.setMessageTimestamp(new Date()); + + int ref_number = loggingDAO.saveMessageLog(messageLog); + String serverReferenceCodeFormat = String.format("%06d", ref_number); + String serverReferenceCode = "PAYMENT_REF" + serverReferenceCodeFormat; + + // check already charge request against client correlator + if (clientCorrelator != null) { + String clientCorrelatorAttribute = AttributeName.clientCorrelatorPayment.toString(); + String tableAttributeValue = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + AttributeValues duplicateClientCorrelator = paymentDAO.checkDuplicateValue(serviceCallRefund, + clientCorrelator, clientCorrelatorAttribute, tableAttributeValue); + if (duplicateClientCorrelator != null) { + APIServiceCalls apiServiceCall = duplicateClientCorrelator.getAttributedid().getAPIServiceCall(); + String serviceCall = apiServiceCall.getServiceName(); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer id = duplicateClientCorrelator.getOwnerdid(); + AttributeValues response = paymentDAO.getResponse(id); + if (serviceCall.equals(serviceCallRefund) && (response.getOwnerdid() == manageNumber.getId())) { + PaymentRefundTransactionResponseBean obj = null; + obj = gson.fromJson(response.getValue(), PaymentRefundTransactionResponseBean.class); + RefundPaymentDTO dto = new RefundPaymentDTO(); + dto.setAmountTransaction(obj); + responseWrapper.setRefundPaymentDTO(dto); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + } else { + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Clientcorrelator is already used")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + } + } + + // check path param endUserId and request body endUserId + if (!(endUserIdPath.equals(endUserIdRequest))) { + LOG.error("###REFUND### two different endUserId provided"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "two different endUserId provided")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check valid amount format + if ((NumberUtils.isNumber(amount) != true)) { + LOG.error("###WALLET### amount should be a valid number"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "amount should be a valid number")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check account amount decimal format + Double chargeAmount = Double.parseDouble(amount); + BigDecimal bigDecimal = new BigDecimal(amount); + Integer decimalDigits = bigDecimal.scale(); + if (!((decimalDigits <= 2) && (decimalDigits >= 0)) || chargeAmount < 0) { + LOG.error("###REFUND### amount should be a whole number or two digit decimal"); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "amount should be a whole or two digit decimal positive number")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + // check valid account currency for endUserId + boolean isValidCurrency = currencySymbol(currency); + if (!isValidCurrency) { + LOG.error("###WALLET### currency code not as per ISO 4217"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "currency code not as per ISO 4217")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + + } + AttributeValues accountCurrencyValue = paymentDAO.getAttributeValue(endUserId, serviceCallBalanceLookUp, + accountCurrencyAttribute, userId); + if (accountCurrencyValue != null) { + String accountCurrency = accountCurrencyValue.getValue(); + if (!(currency.equals(accountCurrency))) { + LOG.error("###REFUND### Valid currecy doesn't exists for the given inputs"); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "Valid currency does not exist for the given input parameters")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + } + + // check channel + if (channel != null && !containsChannel(channel)) { + LOG.error("###WALLET### Valid channel doesn't exists for the given inputs"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Valid channel doesn't exists for the given inputs")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + String referenceCodeAttribute = AttributeName.referenceCodePayment.toString(); + String tableNumber = TableName.NUMBERS.toString().toLowerCase(); + AttributeValues duplicateReferenceCode = paymentDAO.checkDuplicateValue(serviceCallRefund, referenceCode, + referenceCodeAttribute, tableNumber); + if (duplicateReferenceCode != null) { + LOG.error("###REFUND### Already charged for this reference code"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Already charged for this reference code")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + PaymentRefundTransactionResponseBean responseBean = new PaymentRefundTransactionResponseBean(); + ChargeRefundAmountResponse payAmount = new ChargeRefundAmountResponse(); + PaymentChargingInformation chargeInformation = new PaymentChargingInformation(); + PaymentChargingMetaData chargeMetaData = new PaymentChargingMetaData(); + + responseBean.setClientCorrelator(clientCorrelator); + responseBean.setEndUserId(endUserIdPath); + responseBean.setOriginalServerReferenceCode(originalServerReferenceCode); + + chargeInformation.setAmount(amount); + chargeInformation.setCurrency(currency); + chargeInformation.setDescription(description); + + if (onBehalfOf != null || categoryCode != null || channel != null) { + chargeMetaData.setPurchaseCategoryCode(categoryCode); + chargeMetaData.setChannel(channel); + chargeMetaData.setOnBehalfOf(onBehalfOf); + chargeMetaData.setTaxAmount(taxAmount); + isContainsMetaData = true; + } + + responseBean.setReferenceCode(referenceCode); + responseBean.setServerReferenceCode(serverReferenceCode); + responseBean.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); + + // Get the Charged Tax Amount + + Double chargedTaxAmount = Double.parseDouble(taxAmount); + + // set transaction operation status as charged + ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName()); + Double updateBalance = manageNumber.getBalance() + (chargeAmount + chargedTaxAmount); + AttributeValues accountStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallRefund, + AttributeName.transactionStatus.toString(), userId); + // set transaction operation status as refused + manageNumber.setBalance(updateBalance); + + if (accountStatusValue != null) { + String accountStatus = accountStatusValue.getValue(); + // set transaction operation status as Refused // Here wallet Status are Used + if (accountStatus.equals(TransactionStatus.Refused.toString())) { + responseBean.setTransactionOperationStatus(TransactionStatus.Refused.toString()); + + } + } + // set transaction operation status as Refunded + else if (paymentDAO.saveManageNumbers(manageNumber)) { + responseBean.setTransactionOperationStatus(TransactionStatus.Refunded.toString()); + } + + responseWrapper.setHttpStatus(Response.Status.OK); + RefundPaymentDTO refundPaymentDTO = new RefundPaymentDTO(); + payAmount.setChargingInformation(chargingInformation); + payAmount.setChargingMetaData(chargeMetaData); + responseBean.setPaymentAmount(payAmount); + refundPaymentDTO.setAmountTransaction(responseBean); // RefundTransaction + responseWrapper.setRefundPaymentDTO(refundPaymentDTO); + + // save transaction + transactionId = saveTransaction(responseBean, endUserId, userName); + + // save client correlator + if (clientCorrelator != null) { + saveClientCorrelator(endUserId, clientCorrelator, userName); + } + // save client correlator + saveReferenceCode(endUserId, referenceCode, userName); + } catch (Exception ex) { + LOG.error("###REFUND### Error Occured in PAYMENT Service. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); + } + return responseWrapper; + } + + public Integer saveTransaction(PaymentRefundTransactionResponseBean responseBean, String endUserId, String userName) + throws Exception { + Integer transactionId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.Refund.toString().toLowerCase(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + String jsonInString = null; + Gson gson = new Gson(); + + JsonElement je = new JsonParser().parse(gson.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(jsonInString); + transactionId = paymentDAO.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###WALLET### Error in processing save transaction. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + return transactionId; + } + + public void saveClientCorrelator(String endUserId, String clientCorrelator, String userName) throws Exception { + Integer ownerId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + String attributeName = AttributeName.clientCorrelatorWallet.toString(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ownerId = transactionId; + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(clientCorrelator); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###WALLET### Error in processing save insertion of clientCorrelator request. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + private static boolean currencySymbol(@Nonnull final String currencyCode) { + try { + final Currency currency = Currency.getInstance(currencyCode); + return true; + } catch (final IllegalArgumentException x) { + return false; + } + } + + public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.referenceCodeWallet.toString(); + APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); + Attributes attributes = dao.getAttribute(attributeName); + AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), + attributes.getAttributeId()); + ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(dis); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(referenceCode); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + public boolean containsChannel(String channelValue) { + + for (Channel channel : Channel.values()) { + if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { + return true; + } + } + + return false; + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java new file mode 100644 index 00000000..8d626e24 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundPaymentDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class PaymentRefundResponseWrapper extends AbstractReturnWrapperDTO { + + private RefundPaymentDTO refundPaymentDTO; + + public RefundPaymentDTO getRefundPaymentDTO() { + return refundPaymentDTO; + } + + public void setRefundPaymentDTO(RefundPaymentDTO refundPaymentDTO) { + this.refundPaymentDTO = refundPaymentDTO; + } + + @Override + public Object getResponse() { + if (getRequestError() == null) { + return refundPaymentDTO; + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + + } + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index 0c4e89db..67fcdc37 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -29,10 +29,14 @@ public class PaymentRequestFactory { public static RequestHandleable getInstance(final RequestDTO requestDTO) { final String MAKE_PAYMENT = "payment"; + final String REFUND_PAYMENT = "refund"; if (requestDTO.getRequestPath().contains(MAKE_PAYMENT)) { LOG.debug("LOADING MAKE PAYMENT SERVICE"); return new PaymentRequestHandler(); + } else if (requestDTO.getRequestPath().contains(REFUND_PAYMENT)) { + LOG.debug("LOADING REFUND PAYMENT SERVICE"); + return new PaymentRefundRequestHandler(); } return null; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java index 31961956..e1fa2684 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -18,7 +18,6 @@ import com.wso2telco.services.dep.sandbox.dao.model.custom.ChargePaymentDTO; import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentDTO; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; public class PaymentResponseWrapper extends AbstractReturnWrapperDTO { From dad2ea68d0a1aa4d0fa2397a3d72550dd8a4266c Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 9 Feb 2017 15:05:14 +0530 Subject: [PATCH 030/112] Implemented Payment Refund version-1 --- dep-sandbox/dbscripts/dep-sandbox1_5_0.sql | 9 +++-- .../dep/sandbox/service/PaymentService.java | 1 - .../payment/PaymentRefundRequestHandler.java | 33 +++++++++++-------- .../payment/PaymentRequestFactory.java | 2 +- .../payment/PaymentRequestHandler.java | 4 +-- .../servicefactory/wallet/AttributeName.java | 3 +- .../dep/sandbox/util/ServiceName.java | 2 +- 7 files changed, 29 insertions(+), 25 deletions(-) diff --git a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql index e377cd06..c7dce4c5 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql @@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `sbxapiservicecalls` ( -- Dumping data for table `sbxapiservicecalls` -- -INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'); +INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'chargeUser'),(11,4,'RefundUser'); @@ -300,8 +300,7 @@ INSERT INTO `sbxstatus` VALUES (1,'Pending','PRV_PROVISION_PENDING','Provision T -- Dumping data for table `sbtprmsisdnservicessmap` -- -INSERT INTO `sbtprmsisdnservicessmap` VALUES (1,1,1),(2,1,2),(3,2,1),(4,1,3),(5,2,2),(6,2,3),(7,3,3),(8,3,2),(9,3,1); - +sbxapiservicecalls -- -- Table structure for table `sbtprprovisionedservices` -- @@ -376,7 +375,7 @@ CREATE TABLE IF NOT EXISTS `sbxattribute` ( -- Dumping data for table `sbxattribute` -- -INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'); +INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'makePayment'),(30,'clientCorrelatorPayment'),(31,'referenceCodePayment'),(32,'refundUser'); -- -- Table structure for table `sbtattributedistribution` -- @@ -394,7 +393,7 @@ CREATE TABLE IF NOT EXISTS `sbtattributedistribution` ( -- Dumping data for table `sbtattributedistribution` -- -INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6); +INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,10),(33,30,10),(34,31,10),(35,32,11),(36,30,11),(37,31,11); -- diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index d5e7f511..9d51a65e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -76,7 +76,6 @@ public Response makePayment( } } - /** @path should be changed to ("/{endUserId}/transactions/amount") **/ @POST @Path("/{endUserId}/transactions/refund") @ApiOperation(value = "refundService", notes = "refund service", response = Response.class) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 951a0d0d..6b1f278e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -35,7 +35,6 @@ import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; -import com.wso2telco.services.dep.sandbox.servicefactory.wallet.RefundTransactionRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.lang.math.NumberUtils; @@ -61,7 +60,7 @@ public class PaymentRefundRequestHandler extends AbstractRequestHandler Date: Wed, 8 Feb 2017 15:13:26 +0530 Subject: [PATCH 031/112] Rewrite partial credit API --- dep-sandbox/dbscripts/dep-sandbox1_5_0.sql | 7 +- .../services/dep/sandbox/dao/CreditDAO.java | 2 +- .../dao/hibernate/HibernateCreditDAO.java | 8 +- .../model/custom/ChargingMetaDataWithTax.java | 62 ++++ .../custom/PaymentAmountResponseWithTax.java | 29 ++ .../model/custom/PaymentAmountWithTax.java | 44 +++ .../dao/model/custom/RefundRequestBean.java | 85 +++-- .../dao/model/custom/RefundResponseBean.java | 196 ++++++---- .../dep/sandbox/service/CreditService.java | 8 +- .../servicefactory/credit/AttributeName.java | 2 +- .../credit/CreditApplyRequestHandler.java | 2 +- .../credit/OperationStatus.java | 9 + .../credit/PatialRefundRequestHandler.java | 348 ++++++++++++++---- 13 files changed, 618 insertions(+), 184 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/OperationStatus.java diff --git a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql index c7dce4c5..7b7a1102 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql @@ -300,7 +300,8 @@ INSERT INTO `sbxstatus` VALUES (1,'Pending','PRV_PROVISION_PENDING','Provision T -- Dumping data for table `sbtprmsisdnservicessmap` -- -sbxapiservicecalls +INSERT INTO `sbtprmsisdnservicessmap` VALUES (1,1,1),(2,1,2),(3,2,1),(4,1,3),(5,2,2),(6,2,3),(7,3,3),(8,3,2),(9,3,1); + -- -- Table structure for table `sbtprprovisionedservices` -- @@ -375,7 +376,7 @@ CREATE TABLE IF NOT EXISTS `sbxattribute` ( -- Dumping data for table `sbxattribute` -- -INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'makePayment'),(30,'clientCorrelatorPayment'),(31,'referenceCodePayment'),(32,'refundUser'); +INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'patialRefund'); -- -- Table structure for table `sbtattributedistribution` -- @@ -393,7 +394,7 @@ CREATE TABLE IF NOT EXISTS `sbtattributedistribution` ( -- Dumping data for table `sbtattributedistribution` -- -INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,10),(33,30,10),(34,31,10),(35,32,11),(36,30,11),(37,31,11); +INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,9),(33,26,9),(34,25,9); -- diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CreditDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CreditDAO.java index 3b040cb7..f194680b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CreditDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CreditDAO.java @@ -22,7 +22,7 @@ public interface CreditDAO { public AttributeValues checkDuplication(Integer userId, String serviceCall, String attributeValue, String attributeName) throws Exception; - public AttributeValues getTransactionValue(String endUserId, Integer attributeValue, String serviceCall) throws Exception; + public AttributeValues getTransactionValue(String endUserId, Integer attributeValue, String attributeName, String serviceCall) throws Exception; public Integer saveAttributeValue(AttributeValues valueObj) throws Exception; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCreditDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCreditDAO.java index 1a5decd1..cb1c25f2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCreditDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCreditDAO.java @@ -70,12 +70,12 @@ public AttributeValues checkDuplication(Integer userId, String serviceCall, Stri } @Override - public AttributeValues getTransactionValue(String endUserId, Integer attributeValue, String serviceCall) + public AttributeValues getTransactionValue(String endUserId, Integer attributeValue, String attributeName, String serviceCall) throws Exception { Session session = getSession(); AttributeValues resultSet = null; - String service = ServiceName.ApplyCredit.toString(); + //String service = ServiceName.ApplyCredit.toString(); StringBuilder hql = new StringBuilder(); hql.append("SELECT "); @@ -100,9 +100,9 @@ public AttributeValues getTransactionValue(String endUserId, Integer attributeVa Query query = session.createQuery(hql.toString()); query.setParameter("apiName", RequestType.CREDIT.toString()); query.setParameter("tableName", TableName.SBXATTRIBUTEVALUE.toString().toLowerCase()); - query.setParameter("attributeName", serviceCall); + query.setParameter("attributeName", attributeName); query.setParameter("attributeValue", attributeValue); - query.setParameter("serviceCall", service); + query.setParameter("serviceCall", serviceCall); resultSet = (AttributeValues) query.uniqueResult(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java new file mode 100644 index 00000000..d37df8e3 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java @@ -0,0 +1,62 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@JsonInclude(value=Include.NON_NULL) +public class ChargingMetaDataWithTax { + + private String onBehalfOf; + + private String purchaseCategoryCode; + + private String channel; + + private String tax; + + public String getTax() { + return tax; + } + + public void setTax(String tax) { + this.tax = tax; + } + + public String getOnBehalfOf() { + return onBehalfOf; + } + + public void setOnBehalfOf(String onBehalfOf) { + this.onBehalfOf = onBehalfOf; + } + + public String getPurchaseCategoryCode() { + return purchaseCategoryCode; + } + + public void setPurchaseCategoryCode(String purchaseCategoryCode) { + this.purchaseCategoryCode = purchaseCategoryCode; + } + + public String getChannel() { + return channel; + } + + public void setChannel(String channel) { + this.channel = channel; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + builder.append(" onBehalfOf : " + onBehalfOf); + builder.append(" categoryCode : " + purchaseCategoryCode); + builder.append(" channel : " + channel); + builder.append("taxAmount" +tax); + + return builder.toString(); + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java new file mode 100644 index 00000000..a9fda8d5 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java @@ -0,0 +1,29 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +/** + * Created by sidath on 2/7/17. + */ +public class PaymentAmountResponseWithTax { + + private ChargingInformation chargingInformation; + + private ChargingMetaDataWithTax chargingMetaData; + + public ChargingMetaDataWithTax getChargingMetaDataWithTax() { + return chargingMetaData; + } + + public void setChargingMetaDataWithTax(ChargingMetaDataWithTax chargingMetaDataWithTax) { + this.chargingMetaData = chargingMetaDataWithTax; + } + + public ChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(ChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + +} + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java new file mode 100644 index 00000000..d41da0b2 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java @@ -0,0 +1,44 @@ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +/** + * Created by sidath on 2/7/17. + */ +public class PaymentAmountWithTax { + + private ChargingInformation chargingInformation; + + private ChargingMetaDataWithTax chargingMetaData; + + public ChargingMetaDataWithTax getChargingMetaData() { + return chargingMetaData; + } + + public void setChargingMetaData(ChargingMetaDataWithTax chargingMetaData) { + this.chargingMetaData = chargingMetaData; + } + + public ChargingInformation getChargingInformation() { + return chargingInformation; + } + + public void setChargingInformation(ChargingInformation chargingInformation) { + this.chargingInformation = chargingInformation; + } + + public String toString() { + StringBuilder builder = new StringBuilder(); + + if (chargingInformation != null) { + builder.append(" " + getChargingInformation().toString()); + } + + if(chargingMetaData != null){ + builder.append(" "+getChargingMetaData().toString()); + } + + return builder.toString(); + } + + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java index 78a7733e..f371437f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java @@ -17,25 +17,20 @@ public void setRefundRequest(RefundRequest refundRequest) { public static class RefundRequest{ - private double amount; - + private String clientCorrelator; + + private String msisdn; + private String originalServerReferenceCode; + private String reasonForRefund; - - private String merchantIdentification; - - private String serverTransactionReference; - - private CallbackReference receiptRequest; - public double getAmount() { - return amount; - } + private double refundAmount; - public void setAmount(double amount) { - this.amount = amount; - } + private PaymentAmountWithTax paymentAmount; + + private String referenceCode; public String getClientCorrelator() { return clientCorrelator; @@ -45,6 +40,23 @@ public void setClientCorrelator(String clientCorrelator) { this.clientCorrelator = clientCorrelator; } + + public String getMsisdn() { + return msisdn; + } + + public void setMsisdn(String msisdn) { + this.msisdn = msisdn; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + public String getReasonForRefund() { return reasonForRefund; } @@ -53,29 +65,50 @@ public void setReasonForRefund(String reasonForRefund) { this.reasonForRefund = reasonForRefund; } - public String getMerchantIdentification() { - return merchantIdentification; + public double getRefundAmount() { + return refundAmount; } - public void setMerchantIdentification(String merchantIdentification) { - this.merchantIdentification = merchantIdentification; + public void setRefundAmount(double refundAmount) { + this.refundAmount = refundAmount; + } + + + public PaymentAmountWithTax getPaymentAmount() { + return paymentAmount; } - public String getServerTransactionReference() { - return serverTransactionReference; + public void setPaymentAmount(PaymentAmountWithTax paymentAmount) { + this.paymentAmount = paymentAmount; } - public void setServerTransactionReference(String serverTransactionReference) { - this.serverTransactionReference = serverTransactionReference; + + + + public String getReferenceCode() { + return referenceCode; } - public CallbackReference getReceiptRequest() { - return receiptRequest; + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; } - public void setReceiptRequest(CallbackReference receiptRequest) { - this.receiptRequest = receiptRequest; + + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("Client Correlator : " + getClientCorrelator()); + builder.append("msisdn : " + getMsisdn()); + builder.append("OriginalServerReferenceCode : " +getOriginalServerReferenceCode()); + builder.append("reasonForRefund : " + getReasonForRefund()); + builder.append("refundAmount : " + getPaymentAmount()); + + if (getPaymentAmount() != null) { + builder.append(" " + getPaymentAmount().toString()); + } + + return builder.toString(); } + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java index 7c4170d8..8db462b1 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java @@ -1,83 +1,123 @@ package com.wso2telco.services.dep.sandbox.dao.model.custom; public class RefundResponseBean { - - private RefundResponse refundResponse; - - - public RefundResponse getRefundResponse() { - return refundResponse; - } - - - public void setRefundResponse(RefundResponse refundResponse) { - this.refundResponse = refundResponse; - } - - - public static class RefundResponse { - - private double amount; - - private String serverTransactionReference; - - private String clientCorrelator; - - private String reasonForRefund; - - private String merchantIdentification; - - private CallbackReference receiptResponse; - - public double getAmount() { - return amount; - } - - public void setAmount(double amount) { - this.amount = amount; - } - - public String getServerTransactionReference() { - return serverTransactionReference; - } - - public void setServerTransactionReference(String serverTransactionReference) { - this.serverTransactionReference = serverTransactionReference; - } - - public String getClientCorrelator() { - return clientCorrelator; - } - - public void setClientCorrelator(String clientCorrelator) { - this.clientCorrelator = clientCorrelator; - } - - public String getReasonForRefund() { - return reasonForRefund; - } - - public void setReasonForRefund(String reasonForRefund) { - this.reasonForRefund = reasonForRefund; - } - - public String getMerchantIdentification() { - return merchantIdentification; - } - - public void setMerchantIdentification(String merchantIdentification) { - this.merchantIdentification = merchantIdentification; - } - - public CallbackReference getReceiptResponse() { - return receiptResponse; - } - - public void setReceiptResponse(CallbackReference receiptResponse) { - this.receiptResponse = receiptResponse; - } - - - } + + private RefundResponse refundResponse; + + + public RefundResponse getRefundResponse() { + return refundResponse; + } + + + public void setRefundResponse(RefundResponse refundResponse) { + this.refundResponse = refundResponse; + } + + + public static class RefundResponse { + + private String clientCorrelator; + + private String endUserID; + + private String originalServerReferenceCode; + + private String reasonForRefund; + + private double refundAmount; + + private PaymentAmountWithTax paymentAmount; + + private String referenceCode; + + private String resourceURL; + + private String transactionOperationStatus; + + private String serverReferanceCode; + + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getEndUserID() { + return endUserID; + } + + public void setEndUserID(String endUserID) { + this.endUserID = endUserID; + } + + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } + + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } + + public String getReasonForRefund() { + return reasonForRefund; + } + + public void setReasonForRefund(String reasonForRefund) { + this.reasonForRefund = reasonForRefund; + } + + public double getRefundAmount() { + return refundAmount; + } + + public void setRefundAmount(double refundAmount) { + this.refundAmount = refundAmount; + } + + + public String getReferenceCode() { + return referenceCode; + } + + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + + public PaymentAmountWithTax getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(PaymentAmountWithTax paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getServerReferanceCode() { + return serverReferanceCode; + } + + public void setServerReferanceCode(String serverReferanceCode) { + this.serverReferanceCode = serverReferanceCode; + } + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java index 744d6b69..2a676a46 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java @@ -11,6 +11,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -19,9 +20,6 @@ import com.wordnik.swagger.annotations.ApiImplicitParams; import com.wordnik.swagger.annotations.ApiOperation; import com.wordnik.swagger.annotations.ApiParam; -import com.wso2telco.services.dep.sandbox.dao.model.custom.CreditApplyRequestWrapper; -import com.wso2telco.services.dep.sandbox.dao.model.custom.CreditRequestBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; import com.wso2telco.services.dep.sandbox.exception.SandboxException.SandboxErrorType; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; @@ -70,7 +68,7 @@ public Response creditApplyForRequestedService( } } - /*@POST + @POST @Path("/{msisdn}/refund") @ApiOperation(value = "patialRefundForRequestedService", notes = "patial refund requested service", response = Response.class) @ApiImplicitParams({ @@ -102,6 +100,6 @@ public Response patialRefundForRequestedService( Response response = Response.status(Status.BAD_REQUEST).entity(SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxErrorType.SERVICE_ERROR.getMessage()).build(); return response; } - }*/ + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/AttributeName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/AttributeName.java index 19f2b8f0..3354288b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/AttributeName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/AttributeName.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory.credit; public enum AttributeName { - referenceCodeCredit, clientCorrelator, applyCredit + referenceCodeCredit, clientCorrelator, applyCredit, patialRefund } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java index f74f07ae..6e2b9da1 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java @@ -200,7 +200,7 @@ protected Returnable process(CreditApplyRequestWrapper extendedRequestDTO) throw ManageNumber manageNumber = numberDao.getNumber(msisdn, userName); if(ownerId == manageNumber.getId()){ //send the already sent response - AttributeValues applyCreditResponse = creditDAO.getTransactionValue(msisdn,values.getAttributeValueId() ,AttributeName.applyCredit.toString()); + AttributeValues applyCreditResponse = creditDAO.getTransactionValue(msisdn,values.getAttributeValueId() ,AttributeName.applyCredit.toString(), ServiceName.ApplyCredit.toString()); CreditApplyResponseBean bean = new CreditApplyResponseBean(); ObjectMapper mapper = new ObjectMapper(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/OperationStatus.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/OperationStatus.java new file mode 100644 index 00000000..526778b7 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/OperationStatus.java @@ -0,0 +1,9 @@ +package com.wso2telco.services.dep.sandbox.servicefactory.credit; + +/** + * Created by sidath on 2/7/17. + */ +public enum OperationStatus { + + Charged, Denied, Refused, Refunded +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index 4910a83f..f5543724 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -1,11 +1,24 @@ package com.wso2telco.services.dep.sandbox.servicefactory.credit; +import java.io.StringWriter; import java.util.ArrayList; +import java.util.Date; import java.util.List; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.wso2telco.services.dep.sandbox.dao.CreditDAO; +import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.*; +import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.logging.LogFactory; import org.json.simple.JSONObject; @@ -15,43 +28,36 @@ import com.wso2telco.dep.oneapivalidation.util.ValidationRule; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.NumberDAO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.CallbackReference; -import com.wso2telco.services.dep.sandbox.dao.model.custom.PatialRefundRequestWrapper; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundRequestBean; import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundRequestBean.RefundRequest; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundResponseBean; import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundResponseBean.RefundResponse; -import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; -import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; -import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; -import com.wso2telco.services.dep.sandbox.util.CommonUtil; -import com.wso2telco.services.dep.sandbox.util.MessageLogHandler; -import com.wso2telco.services.dep.sandbox.util.RequestType; -import com.wso2telco.services.dep.sandbox.util.ServiceName; public class PatialRefundRequestHandler extends AbstractRequestHandler { private NumberDAO numberDao; + private CreditDAO creditDAO; private MessageLogHandler logHandler; private PatialRefundRequestWrapper requestWrapperDTO; private PatialRefundResponseWrapper responseWrapperDTO; - - final String REFUND_REQUEST = "refundRequest"; + private Integer correlatorid; + private LoggingDAO loggingDao; + final String REFUND_AMOUNT = "refundAmount"; final String MSISDN = "msisdn"; - final String AMOUNT = "amount"; final String CLIENTCORRELATOR = "clientCorrelator"; final String REASON = "reasonForRefund"; - final String ID = "merchantIdentification"; - final String REFERENCE = "serverTransactionReference"; - final String RECEIPT = "receiptRequest"; - final String NOTIFYURL = "notifyURL"; - final String CALLBACKDATA = "callbackData"; + final String REFERENCE = "originalServerReferenceCode"; + final String REFERENCE_CODE = "referenceCode"; + final String PAYMENT_AMOUNT = "paymentAmount"; + final String CHANGING_INFO = "chargingInformation"; + final String CHARGING_META_DATA = "chargingMetaData"; + final String REFUND_REQUEST = "refundRequest"; { LOG = LogFactory.getLog(PatialRefundRequestHandler.class); + loggingDao = DaoFactory.getLoggingDAO(); numberDao = DaoFactory.getNumberDAO(); + creditDAO = DaoFactory.getCreditDAO(); dao = DaoFactory.getGenaricDAO(); logHandler = MessageLogHandler.getInstance(); } @@ -73,38 +79,48 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti RefundRequestBean requestBean = wrapperDTO.getRefundRequestBean(); RefundRequest request = requestBean.getRefundRequest(); + PaymentAmountWithTax paymentAmountWithTax = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); + ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); if (requestBean != null && request != null) { - CallbackReference callRef = request.getReceiptRequest(); - - if (callRef != null) { - double amount = request.getAmount(); - String msisdn = CommonUtil.getNullOrTrimmedValue("+" + wrapperDTO.getMsisdn()); + double amount = request.getRefundAmount(); + String msisdn = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getMsisdn()); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); - String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMerchantIdentification()); + String originalServerReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String serverTransactionReference = CommonUtil - .getNullOrTrimmedValue(request.getServerTransactionReference()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(callRef.getNotifyURL()); - String callbackData = CommonUtil.getNullOrTrimmedValue(callRef.getCallbackData()); + .getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTax()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + try { ValidationRule[] validationRules = { - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_DOUBLE_GT_ZERO, "amount", + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_DOUBLE_GT_ZERO, "refundAmount", amount), new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, "msisdn", msisdn), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "originalServerReferenceCode", + originalServerReferenceCode), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "reasonForRefund", reasonForRefund), - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "merchantIdentification", - merchantIdentification), new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "serverTransactionReference", serverTransactionReference), - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_URL, "notifyURL", notifyURL), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "callbackData", callbackData) }; + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "onBehalfOf", onBehalfOf), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "categoryCode", categoryCode), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "channel", channel), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL,"taxAmount",taxAmount), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL,"referenceCode",referenceCode) + + }; Validation.checkRequestParams(validationRules); } catch (CustomException ex) { @@ -120,39 +136,123 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti ServiceError.INVALID_INPUT_VALUE.getMessage(), wrapperDTO.getMsisdn())); responseWrapperDTO.setHttpStatus(javax.ws.rs.core.Response.Status.BAD_REQUEST); } - - } return false; } @Override protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) throws Exception { + if (responseWrapperDTO.getRequestError() != null) { + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; } RefundRequestBean requestBean = extendedRequestDTO.getRefundRequestBean(); RefundRequest request = requestBean.getRefundRequest(); - + PaymentAmountWithTax paymentAmountWithTax = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); + ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); APITypes apiType = dao.getAPIType(RequestType.CREDIT.toString().toLowerCase()); - APIServiceCalls serviceType = dao.getServiceCall(apiType.getId(), ServiceName.PatialRefund.toString()); + APIServiceCalls serviceType = dao.getServiceCall(apiType.getId(), ServiceName.PartialRefund.toString()); JSONObject obj = buildJSONObject(request); logHandler.saveMessageLog(serviceType.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), MSISDN, extendedRequestDTO.getMsisdn(), obj); - double amount = request.getAmount(); + + double amount = request.getRefundAmount(); String msisdn = CommonUtil.getNullOrTrimmedValue(extendedRequestDTO.getMsisdn()); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); - String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMerchantIdentification()); - String serverTransactionReference = CommonUtil.getNullOrTrimmedValue(request.getServerTransactionReference()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getNotifyURL()); - String callbackData = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getCallbackData()); + String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMsisdn()); + String serverTransactionReference = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String userName = extendedRequestDTO.getUser().getUserName(); + String serviceCreditApply = ServiceName.PartialRefund.toString(); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(String.valueOf(request.getReferenceCode())); + String endUserID = getLastMobileNumber(extendedRequestDTO.getMsisdn()); + + StringWriter out = new StringWriter(); + obj.writeJSONString(out); + String jsonString = out.toString(); + + MessageLog messageLog = new MessageLog(); + messageLog.setServicenameid(serviceType.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference(MSISDN); + messageLog.setValue(extendedRequestDTO.getMsisdn()); + messageLog.setRequest(jsonString); + messageLog.setMessageTimestamp(new Date()); + + //Genarate server reference number. + int ref_number = loggingDao.saveMessageLog(messageLog); + String serverReferenceCode = String.format("%06d",ref_number ); + try { - ManageNumber manageNumber = numberDao.getNumber(msisdn, extendedRequestDTO.getUser().getUserName()); + + String clientCorrelatorAttribute = AttributeName.clientCorrelator.toString(); + Integer userId = extendedRequestDTO.getUser().getId(); + //Null check for client correlator. + if(clientCorrelator != null){ + AttributeValues duplicateClientCorrelator = creditDAO.checkDuplication(userId, serviceCreditApply, clientCorrelator, clientCorrelatorAttribute); + + if(duplicateClientCorrelator != null){ + Integer ownerId = duplicateClientCorrelator.getOwnerdid(); + ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); + if(ownerId == manageNumber.getId()){ + //send the already sent response + AttributeValues partialRefundResponse = creditDAO.getTransactionValue(endUserID,duplicateClientCorrelator.getAttributeValueId() ,AttributeName.patialRefund.toString(),ServiceName.PartialRefund.toString()); + RefundResponseBean bean = new RefundResponseBean(); + + ObjectMapper mapper = new ObjectMapper(); + String responseString = partialRefundResponse.getValue(); + RefundResponse res = mapper.readValue(responseString, RefundResponse.class); + bean.setRefundResponse(res); + responseWrapperDTO.setRefundResponseBean(bean); + responseWrapperDTO.setHttpStatus(Response.Status.OK); + return responseWrapperDTO; + }else{ + buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(),referenceCode,serverReferenceCode,chargingInformation,metadata ); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Clientcorrelator is already used for different msisdn")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } + } + } + + //Check channel. + if (channel != null && !containsChannel(channel)) { + LOG.error("###WALLET### Valid channel doesn't exists for the given inputs"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Valid channel doesn't exists for the given inputs")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } + + //Save reference code. + String referenceCodeAttribute = AttributeName.referenceCodeCredit.toString(); + AttributeValues value = creditDAO.checkDuplication(userId, serviceCreditApply, referenceCode, referenceCodeAttribute); + if(value != null){ + buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(),referenceCode,serverReferenceCode,chargingInformation,metadata ); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Already used reference code for the request")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + }else{ + saveReferenceCode(endUserID, referenceCode, userName); + } + + ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); if (manageNumber != null) { updateBalance(manageNumber, amount); - buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, - serverTransactionReference, callbackData, notifyURL); + RefundResponseBean responseBean = buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(),referenceCode,serverReferenceCode,chargingInformation,metadata ); + if(clientCorrelator != null){ + correlatorid = saveClientCorrelator(endUserID, clientCorrelator, userName); + saveTransaction(responseBean); + } + responseWrapperDTO.setHttpStatus(Response.Status.OK); return responseWrapperDTO; } else { @@ -161,6 +261,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; } + } catch (Exception ex) { LOG.error("###CREDIT### Error in processing credit service request. ", ex); responseWrapperDTO @@ -168,8 +269,8 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; } - } + } @Override protected void init(PatialRefundRequestWrapper extendedRequestDTO) throws Exception { requestWrapperDTO = extendedRequestDTO; @@ -183,23 +284,28 @@ private void updateBalance(ManageNumber manageNumber, double amount) throws Exce numberDao.saveManageNumbers(manageNumber); } - private void buildJsonResponseBody(double amount, String clientCorrelator, String merchantIdentification, - String reason, String serverTransactionReference, String callbackData, String notifyURL) { + private RefundResponseBean buildJsonResponseBody(double amount, String clientCorrelator, String merchantIdentification, + String reason, String serverTransactionReference,String operationStatus, String referenceCode, String serverReferenceCode, ChargingInformation chargingInformation, ChargingMetaDataWithTax chargingMetaDataWithTax) { + + PaymentAmountWithTax paymentAmountWithTax = new PaymentAmountWithTax(); + paymentAmountWithTax.setChargingInformation(chargingInformation); + paymentAmountWithTax.setChargingMetaData(chargingMetaDataWithTax); - CallbackReference receiptResponse = new CallbackReference(); - receiptResponse.setCallbackData(callbackData); - receiptResponse.setNotifyURL(notifyURL); - receiptResponse.setResourceURL(CommonUtil.getResourceUrl(requestWrapperDTO)); RefundResponse refundResponse = new RefundResponse(); - refundResponse.setAmount(amount); - refundResponse.setServerTransactionReference(serverTransactionReference); + refundResponse.setRefundAmount(amount); + refundResponse.setOriginalServerReferenceCode(serverTransactionReference); refundResponse.setClientCorrelator(clientCorrelator); - refundResponse.setMerchantIdentification(merchantIdentification); + refundResponse.setEndUserID(merchantIdentification); refundResponse.setReasonForRefund(reason); - refundResponse.setReceiptResponse(receiptResponse); + refundResponse.setPaymentAmount(paymentAmountWithTax); + refundResponse.setReferenceCode(referenceCode); + refundResponse.setServerReferanceCode(serverReferenceCode); + refundResponse.setResourceURL(CommonUtil.getResourceUrl(requestWrapperDTO)); + refundResponse.setTransactionOperationStatus(operationStatus); RefundResponseBean refundResponseBean = new RefundResponseBean(); refundResponseBean.setRefundResponse(refundResponse); responseWrapperDTO.setRefundResponseBean(refundResponseBean); + return refundResponseBean; } @@ -208,20 +314,132 @@ private JSONObject buildJSONObject(RefundRequest request){ JSONObject obj = new JSONObject(); JSONObject refundRequest = new JSONObject(); - JSONObject receiptRequest = new JSONObject(); - - receiptRequest.put(NOTIFYURL, request.getReceiptRequest().getNotifyURL()); - receiptRequest.put(CALLBACKDATA, request.getReceiptRequest().getCallbackData()); - - refundRequest.put(AMOUNT, request.getAmount()); + JSONObject payment = new JSONObject(); + + payment.put(CHANGING_INFO, request.getPaymentAmount().getChargingInformation()); + payment.put(CHARGING_META_DATA, request.getPaymentAmount().getChargingMetaData()); + refundRequest.put(CLIENTCORRELATOR, request.getClientCorrelator()); + refundRequest.put(MSISDN, request.getMsisdn()); + refundRequest.put(REFERENCE,request.getOriginalServerReferenceCode()); refundRequest.put(REASON, request.getReasonForRefund()); - refundRequest.put(ID, request.getMerchantIdentification()); - refundRequest.put(REFERENCE, request.getServerTransactionReference()); - refundRequest.put(RECEIPT, receiptRequest); + refundRequest.put(REFUND_AMOUNT, request.getRefundAmount()); + refundRequest.put(PAYMENT_AMOUNT, payment); + refundRequest.put(REFERENCE_CODE,request.getReferenceCode()); obj.put(REFUND_REQUEST, refundRequest); return obj; } + + public Integer saveClientCorrelator(String endUserId, String correlator, String userName) throws Exception { + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.clientCorrelator.toString(); + String apiType = RequestType.CREDIT.toString(); + String serviceCallApplyCredit = ServiceName.PartialRefund.toString(); + APITypes api = dao.getAPIType(apiType); + APIServiceCalls serviceCall = dao.getServiceCall(api.getId(), serviceCallApplyCredit); + Attributes attribute = dao.getAttribute(attributeName); + AttributeDistribution distribution = dao.getAttributeDistribution(serviceCall.getApiServiceCallId(), attribute.getAttributeId()); + ManageNumber manageNumber = numberDao.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(distribution); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(correlator); + correlatorid = creditDAO.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PATIAL_REFUND_CREDIT### Error in processing save of clientCorrelator request. ", ex); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + } + return correlatorid; + } + + + public boolean containsChannel(String channelValue) { + + for (Channel channel : Channel.values()) { + if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { + return true; + } + } + + return false; + } + + + + public void saveTransaction(RefundResponseBean responseBean) + throws Exception { + + AttributeDistribution distributionId = null; + Integer ownerId = null; + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); + String attributeName = AttributeName.patialRefund.toString(); + String apiType = RequestType.CREDIT.toString(); + String serviceCallApplyCredit = ServiceName.PartialRefund.toString(); + APITypes api = dao.getAPIType(apiType); + APIServiceCalls serviceCall = dao.getServiceCall(api.getId(), serviceCallApplyCredit); + Attributes attribute = dao.getAttribute(attributeName); + AttributeDistribution distribution = dao.getAttributeDistribution(serviceCall.getApiServiceCallId(), attribute.getAttributeId()); + ownerId = correlatorid; + + Gson gson = new Gson(); + JsonElement je =new JsonParser().parse(gson.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + JsonElement get = asJsonObject.get("refundResponse"); + JsonObject asJsonObjectPayment = get.getAsJsonObject(); + String jsonString = null; + jsonString = gson.toJson(asJsonObjectPayment); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(distribution); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(jsonString); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###PARTIAL_REFUND### Error in processing save transaction. ", ex); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + + + public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { + try { + AttributeValues valueObj = new AttributeValues(); + String tableName = TableName.NUMBERS.toString().toLowerCase(); + String attributeName = AttributeName.referenceCodeCredit.toString(); + String apiType = RequestType.CREDIT.toString(); + String serviceCallApplyCredit = ServiceName.PartialRefund.toString(); + APITypes api = dao.getAPIType(apiType); + APIServiceCalls serviceCall = dao.getServiceCall(api.getId(), serviceCallApplyCredit); + Attributes attribute = dao.getAttribute(attributeName); + AttributeDistribution distribution = dao.getAttributeDistribution(serviceCall.getApiServiceCallId(), attribute.getAttributeId()); + ManageNumber manageNumber = numberDao.getNumber(endUserId, userName); + Integer ownerId = manageNumber.getId(); + + valueObj = new AttributeValues(); + valueObj.setAttributedid(distribution); + valueObj.setOwnerdid(ownerId); + valueObj.setTobject(tableName); + valueObj.setValue(referenceCode); + dao.saveAttributeValue(valueObj); + + } catch (Exception ex) { + LOG.error("###CREDIT### Error in processing save of referenceCode request. ", ex); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + } + } + + } From a8915fc0e8e59cf215f4b7f2bf573921760c3815 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Thu, 9 Feb 2017 15:32:36 +0530 Subject: [PATCH 032/112] Implement filter for payment API --- dep-sandbox/dbscripts/dep-sandbox1_5_0.sql | 6 +- dep-sandbox/deploy/config.yml | 2 +- .../ChargePaymentRequestWrapperDTO.java | 11 +- .../model/custom/ChargingMetaDataWithTax.java | 15 +++ .../custom/PaymentAmountResponseWithTax.java | 18 ++- .../model/custom/PaymentAmountWithTax.java | 18 ++- .../dao/model/custom/RefundRequestBean.java | 15 +++ .../dao/model/custom/RefundResponseBean.java | 15 +++ .../dep/sandbox/service/PaymentService.java | 111 ++++++++++-------- .../credit/PatialRefundRequestHandler.java | 15 +++ .../payment/PaymentRefundRequestHandler.java | 6 +- .../payment/PaymentRequestFactory.java | 22 ++-- .../payment/PaymentRequestHandler.java | 8 +- 13 files changed, 175 insertions(+), 87 deletions(-) diff --git a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql index 7b7a1102..cf4ca17a 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql @@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `sbxapiservicecalls` ( -- Dumping data for table `sbxapiservicecalls` -- -INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'chargeUser'),(11,4,'RefundUser'); +INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'); @@ -376,7 +376,7 @@ CREATE TABLE IF NOT EXISTS `sbxattribute` ( -- Dumping data for table `sbxattribute` -- -INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'patialRefund'); +INSERT INTO `sbxattribute` VALUES (1,'title'),(2,'firstName'),(3,'lastName'),(4,'dob'),(5,'address'),(6,'identificationType'),(7,'status'),(8,'ownerType'),(9,'accountType'),(10,'basic'),(11,'billing'),(12,'identification'),(13,'account'),(14,'additionalInfo'),(15,'identificationNumber'),(16,'clientCorrelatorWallet'),(17,'transactionStatus'),(18,'accountStatus'),(19,'currency'),(20,'payment'),(21,'refund'),(22,'sms'),(23,'data'),(24,'minutes'),(25,'referenceCodeCredit'),(26,'clientCorrelator'),(27,'applyCredit'),(28,'referenceCodeWallet'),(29,'patialRefund'),(30,'makePayment'),(31,'clientCorrelatorPayment'),(32,'referenceCodePayment'),(33,'refundUser'); -- -- Table structure for table `sbtattributedistribution` -- @@ -394,7 +394,7 @@ CREATE TABLE IF NOT EXISTS `sbtattributedistribution` ( -- Dumping data for table `sbtattributedistribution` -- -INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,9),(33,26,9),(34,25,9); +INSERT INTO `sbtattributedistribution` VALUES (1,1,2),(2,2,2),(3,3,2),(4,4,2),(5,5,2),(6,6,2),(7,7,2),(8,8,2),(9,9,2),(10,10,1),(11,11,1),(12,12,1),(13,13,1),(14,14,2),(15,15,2),(16,16,4),(17,16,6),(18,17,4),(19,17,6),(20,18,7),(21,19,7),(22,20,4),(23,21,6),(24,22,8),(25,23,8),(26,24,8),(27,25,8),(28,26,8),(29,27,8),(30,28,4),(31,28,6),(32,29,9),(33,26,9),(34,25,9),(35,30,10),(36,31,10),(37,32,10),(38,33,11),(39,31,11),(40,32,11); -- diff --git a/dep-sandbox/deploy/config.yml b/dep-sandbox/deploy/config.yml index 9c8c72fb..9e42fcc9 100644 --- a/dep-sandbox/deploy/config.yml +++ b/dep-sandbox/deploy/config.yml @@ -1,7 +1,7 @@ database: driverClass: com.mysql.cj.jdbc.Driver user: root - password: secret + password: root url: jdbc:mysql://localhost/sandbox?useSSL=false server: applicationConnectors: diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java index 17eb00a4..040bda18 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentRequestWrapperDTO.java @@ -26,7 +26,7 @@ public class ChargePaymentRequestWrapperDTO extends RequestDTO { /** The endUserId param **/ private String endUserId; - private AmountTransactionRequestBean amountTransactionRequestBean; + private PaymentRefundTransactionRequestBean paymentRefundTransactionRequestBean; public String getEndUserId() { return endUserId; @@ -36,12 +36,11 @@ public void setEndUserId(String endUserId) { this.endUserId = endUserId; } - /** The request bean **/ - public AmountTransactionRequestBean getAmountTransactionRequestBean() { - return amountTransactionRequestBean; + public PaymentRefundTransactionRequestBean getPaymentRefundTransactionRequestBean() { + return paymentRefundTransactionRequestBean; } - public void setAmountTransactionRequestBean(AmountTransactionRequestBean amountTransactionRequestBean) { - this.amountTransactionRequestBean = amountTransactionRequestBean; + public void setPaymentRefundTransactionRequestBean(PaymentRefundTransactionRequestBean paymentRefundTransactionRequestBean) { + this.paymentRefundTransactionRequestBean = paymentRefundTransactionRequestBean; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java index d37df8e3..351cc1f8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingMetaDataWithTax.java @@ -1,3 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java index a9fda8d5..bca5afca 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountResponseWithTax.java @@ -1,8 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; -/** - * Created by sidath on 2/7/17. - */ public class PaymentAmountResponseWithTax { private ChargingInformation chargingInformation; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java index d41da0b2..9d5c93e4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentAmountWithTax.java @@ -1,8 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; -/** - * Created by sidath on 2/7/17. - */ public class PaymentAmountWithTax { private ChargingInformation chargingInformation; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java index f371437f..a23aa814 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java @@ -1,3 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; public class RefundRequestBean { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java index 8db462b1..abcde158 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java @@ -1,3 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; public class RefundResponseBean { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 9d51a65e..5505dc20 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -22,9 +22,13 @@ import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRefundRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler; import com.wso2telco.services.dep.sandbox.util.RequestType; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.json.JSONArray; +import org.json.JSONObject; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.POST; @@ -49,64 +53,67 @@ public class PaymentService { @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) public Response makePayment( @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, - AmountTransactionRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { + PaymentRefundTransactionRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { LOG.debug("###PAYMENT### /{endUserId} invoked : endUserId - " + endUserId); if (makePaymentRequestBean != null) { LOG.debug(makePaymentRequestBean); } - ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); - requestDTO.setHttpRequest(request); - requestDTO.setEndUserId(endUserId); - requestDTO.setAmountTransactionRequestBean(makePaymentRequestBean); - requestDTO.setRequestType(RequestType.PAYMENT); - - RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); - Returnable returnable = null; - - try { - returnable = handler.execute(requestDTO); - Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); - return response; - } catch (Exception ex) { - LOG.error("Make Payment SERVICE ERROR", ex); - Response response = Response.status(Response.Status.BAD_REQUEST).entity( - SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) - .build(); - return response; - } - } - @POST - @Path("/{endUserId}/transactions/refund") - @ApiOperation(value = "refundService", notes = "refund service", response = Response.class) - @ApiImplicitParams({ - @ApiImplicitParam(name= "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) - public Response refundUser(@ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, - PaymentRefundTransactionRequestBean refundRequestBean, @Context HttpServletRequest request) { - LOG.debug("###REFUND### /{endUserId}/refund invoked : endUserId - " + endUserId); - if (refundRequestBean != null) { - LOG.debug(refundRequestBean); - } - PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); - requestDTO.setHttpRequest(request); - requestDTO.setEndUserId(endUserId); - requestDTO.setRefundRequestBean(refundRequestBean); - requestDTO.setRequestType(RequestType.PAYMENT); - - RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); - Returnable returnable = null; - - try { - returnable = handler.execute(requestDTO); - Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); - return response; - } catch (Exception ex) { - LOG.error("Refund User SERVICE ERROR", ex); - Response response = Response.status(Response.Status.BAD_REQUEST).entity( - SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) - .build(); - return response; + + if(makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Charged")){ + + ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setPaymentRefundTransactionRequestBean(makePaymentRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Make Payment SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + + + }else { + + PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setRefundRequestBean(makePaymentRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Make Payment SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + + + } + + + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index f5543724..928988ac 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -1,3 +1,18 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.credit; import java.io.StringWriter; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 6b1f278e..10067a98 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -49,6 +49,7 @@ public class PaymentRefundRequestHandler extends AbstractRequestHandler { + private PaymentDAO paymentDAO; private LoggingDAO loggingDAO; private NumberDAO numberDAO; @@ -192,11 +193,8 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); String userName = extendedRequestDTO.getUser().getUserName(); Integer userId = extendedRequestDTO.getUser().getId(); - // APITypes api = + // Save Request Log -/* - APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); -*/ APITypes apiTypes = dao.getAPIType(RequestType.PAYMENT.toString()); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index 1588c2fa..1c10b1ea 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -27,18 +27,18 @@ public class PaymentRequestFactory { private static Log LOG = LogFactory.getLog(PaymentRequestFactory.class); public static RequestHandleable getInstance(final RequestDTO requestDTO) { -// Todo: end points should be same in Payment Service - final String MAKE_PAYMENT = "payment"; - final String REFUND_PAYMENT = "refund"; - - if (requestDTO.getRequestPath().contains(MAKE_PAYMENT)) { - LOG.debug("LOADING MAKE PAYMENT SERVICE"); - return new PaymentRequestHandler(); - } else if (requestDTO.getRequestPath().contains(REFUND_PAYMENT)) { - LOG.debug("LOADING REFUND PAYMENT SERVICE"); - return new PaymentRefundRequestHandler(); - } + final String MAKE_PAYMENT = "ChargePaymentRequestWrapper"; + final String REFUND_PAYMENT = "PaymentRefundRequestWrapper"; + + if(requestDTO.toString().contains(REFUND_PAYMENT)){ + LOG.debug("LOADING REFUND PAYMENT SERVICE"); + return new PaymentRefundRequestHandler(); + + } else if(requestDTO.toString().contains(MAKE_PAYMENT)){ + LOG.debug("LOADING MAKE PAYMENT SERVICE"); + return new PaymentRequestHandler(); + } return null; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 78927f6d..909a3c1b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -92,8 +92,8 @@ protected void init(ChargePaymentRequestWrapperDTO extendedRequestDTO) throws Ex @Override protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exception { - AmountTransactionRequestBean requestBean = wrapperDTO.getAmountTransactionRequestBean(); - AmountTransactionRequestBean.amountTransaction request = requestBean.getAmountTransaction(); + PaymentRefundTransactionRequestBean requestBean = wrapperDTO.getPaymentRefundTransactionRequestBean(); + PaymentRefundTransactionRequestBean.AmountTransaction request = requestBean.getAmountTransaction(); ChargePaymentAmount paymentAmount = request.getPaymentAmount(); PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); PaymentChargingMetaData metaData = paymentAmount.getChargingMetaData(); @@ -165,8 +165,8 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) } try { - AmountTransactionRequestBean requestBean = extendedRequestDTO.getAmountTransactionRequestBean(); - AmountTransactionRequestBean.amountTransaction request = requestBean.getAmountTransaction(); + PaymentRefundTransactionRequestBean requestBean = extendedRequestDTO.getPaymentRefundTransactionRequestBean(); + PaymentRefundTransactionRequestBean.AmountTransaction request = requestBean.getAmountTransaction(); ChargePaymentAmount paymentAmount = request.getPaymentAmount(); PaymentChargingInformation chargingInformation = paymentAmount.getChargingInformation(); PaymentChargingMetaData metadata = paymentAmount.getChargingMetaData(); From f17978a5696a27c12c58d12be2c4c9a92cc2e786 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Mon, 13 Feb 2017 13:12:58 +0530 Subject: [PATCH 033/112] Recorrect Code --- .../services/dep/sandbox/dao/PaymentDAO.java | 10 +++++----- .../dao/hibernate/HibernatePaymentDAO.java | 12 +++++------ .../custom/AmountTransactionRequestBean.java | 10 +++++----- .../dep/sandbox/service/PaymentService.java | 10 +++++----- .../credit/PatialRefundRequestHandler.java | 3 +++ .../payment/PaymentRefundRequestHandler.java | 20 +++++++++---------- .../payment/PaymentRefundResponseWrapper.java | 10 +++++----- .../payment/PaymentRequestFactory.java | 10 +++++----- .../payment/PaymentRequestHandler.java | 13 +++++++----- .../payment/PaymentResponseWrapper.java | 10 +++++----- 10 files changed, 56 insertions(+), 52 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java index 539af154..041f5fe7 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java index 5504b0d8..74e85661 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.hibernate; @@ -136,7 +136,7 @@ public Integer saveAttributeValue(AttributeValues valueObj) throws Exception { saveOrUpdate(valueObj); values = valueObj.getAttributeValueId(); } catch (Exception e) { - LOG.error("saveAttributeValue", e); + LOG.error("###PAYMENT### Error in save AttributeValue", e); throw e; } return values; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java index 6d64ce8a..2e3dc5fd 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/AmountTransactionRequestBean.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 5505dc20..4ffe20da 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.service; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index 928988ac..f3dceb30 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -371,6 +371,7 @@ public Integer saveClientCorrelator(String endUserId, String correlator, String } catch (Exception ex) { LOG.error("###PATIAL_REFUND_CREDIT### Error in processing save of clientCorrelator request. ", ex); responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } return correlatorid; } @@ -424,6 +425,7 @@ public void saveTransaction(RefundResponseBean responseBean) } catch (Exception ex) { LOG.error("###PARTIAL_REFUND### Error in processing save transaction. ", ex); responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } @@ -453,6 +455,7 @@ public void saveReferenceCode(String endUserId, String referenceCode, String use } catch (Exception ex) { LOG.error("###CREDIT### Error in processing save of referenceCode request. ", ex); responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 10067a98..e0f869b0 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; @@ -175,7 +175,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) String endUserIdPath = extendedRequestDTO.getEndUserId(); String endUserIdRequest = request.getEndUserId(); String endUserId = getLastMobileNumber(endUserIdPath); -// String originalReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); String originalServerReferenceCode = CommonUtil .getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); @@ -196,6 +195,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) // Save Request Log + APITypes apiTypes = dao.getAPIType(RequestType.PAYMENT.toString()); //This has Hardcoded value @@ -345,10 +345,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) responseBean.setServerReferenceCode(serverReferenceCode); responseBean.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); - // Get the Charged Tax Amount - - Double chargedTaxAmount = Double.parseDouble(taxAmount); - // set transaction operation status as charged ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName()); Double updateBalance = manageNumber.getBalance() + (chargeAmount + chargedTaxAmount); @@ -402,7 +398,6 @@ public Integer saveTransaction(PaymentRefundTransactionResponseBean responseBean try { AttributeValues valueObj = new AttributeValues(); String tableName = TableName.NUMBERS.toString().toLowerCase(); -// String attributeName = AttributeName.Refund.toString().toLowerCase(); //original String attributeName = AttributeName.refundUser.toString().toLowerCase(); APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); @@ -428,6 +423,7 @@ public Integer saveTransaction(PaymentRefundTransactionResponseBean responseBean } catch (Exception ex) { LOG.error("###REFUND### Error in processing save transaction. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } return transactionId; } @@ -456,6 +452,7 @@ public void saveClientCorrelator(String endUserId, String clientCorrelator, Stri } catch (Exception ex) { LOG.error("###REFUND### Error in processing save insertion of clientCorrelator request. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } @@ -491,6 +488,7 @@ public void saveReferenceCode(String endUserId, String referenceCode, String use } catch (Exception ex) { LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java index 8d626e24..6443ba1a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundResponseWrapper.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index 1c10b1ea..a577c074 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 909a3c1b..62e5c41e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; @@ -436,6 +436,7 @@ private Integer saveTransaction(ChargePaymentResponseBean responseBean, String e } catch (Exception ex) { LOG.error("###PAYMENT### Error in processing save transaction. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } return transactionId; } @@ -463,6 +464,7 @@ public void saveClientCorrelator(String endUserId, String clientCorrelator) thro } catch (Exception ex) { LOG.error("###PAYMENT### Error in processing save insertion of clientCorrelator request. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } @@ -498,6 +500,7 @@ public void saveReferenceCode(String endUserId, String referenceCode, String use } catch (Exception ex) { LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + throw ex; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java index e1fa2684..ea6fa589 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentResponseWrapper.java @@ -1,18 +1,18 @@ -/* - * Copyright (c) 2017, WSO2 Inc. (http://wso2.com) All Rights Reserved. +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) * - * Licensed under the Apache License, Version 2.0 (the "License"); + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */ + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.payment; From 2121bf097c8f0c1b74f7300cd7f860014b142d6a Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Mon, 13 Feb 2017 10:32:53 +0530 Subject: [PATCH 034/112] alter some classes --- dep-sandbox/deploy/config.yml | 4 ++-- .../services/dep/sandbox/service/PaymentService.java | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dep-sandbox/deploy/config.yml b/dep-sandbox/deploy/config.yml index 9e42fcc9..01d89285 100644 --- a/dep-sandbox/deploy/config.yml +++ b/dep-sandbox/deploy/config.yml @@ -1,8 +1,8 @@ database: driverClass: com.mysql.cj.jdbc.Driver user: root - password: root - url: jdbc:mysql://localhost/sandbox?useSSL=false + password: + url: jdbc:mysql:///?useSSL=false server: applicationConnectors: - type: http diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 4ffe20da..6582b242 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -58,9 +58,8 @@ public Response makePayment( if (makePaymentRequestBean != null) { LOG.debug(makePaymentRequestBean); } - - - if(makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Charged")){ + //Separate Charged and Refunded request calls + if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Charged")) { ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); requestDTO.setHttpRequest(request); @@ -83,8 +82,7 @@ public Response makePayment( return response; } - - }else { + } else { PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); requestDTO.setHttpRequest(request); @@ -115,5 +113,4 @@ public Response makePayment( } - } From 9d0d34700388ddb0583d76da42b26cf92183a636 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Tue, 14 Feb 2017 10:35:20 +0530 Subject: [PATCH 035/112] solve HUBDEV-790 --- dep-sandbox/README.md | 212 ++++++++++++++++-- ...-sandbox1_5_0.sql => dep-sandbox1_6_0.sql} | 0 .../dbscripts/migration1_5_0to1_6_0.sql | 6 + .../dep/sandbox/service/PaymentService.java | 7 - .../payment/PaymentRefundRequestHandler.java | 9 +- .../dep/sandbox/util/ServiceName.java | 2 +- 6 files changed, 206 insertions(+), 30 deletions(-) rename dep-sandbox/dbscripts/{dep-sandbox1_5_0.sql => dep-sandbox1_6_0.sql} (100%) create mode 100644 dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql diff --git a/dep-sandbox/README.md b/dep-sandbox/README.md index 72ef644e..acc4f584 100644 --- a/dep-sandbox/README.md +++ b/dep-sandbox/README.md @@ -849,17 +849,27 @@ http://:/{v1}/credit/{msisdn}/refund Request Body : ``` { - "refundRequest":{ - "amount":0, - "clientCorrelator":"clientCorrelator", - "reasonForRefund":"reasonForRefund", - "merchantIdentification":"merchantIdentification", - "serverTransactionReference":"serverTransactionReference", - "receiptRequest":{ - "notifyURL":"notifyURL", - "callbackData":"callbackData" - } - } + "refundRequest": { + "clientCorrelator":"54321", + "msisdn": "tel:+12345678901", + "originalServerReferenceCode": "ABC-123", + "reasonForRefund": "adjustment", + "refundAmount": 1, + "paymentAmount": { + "chargingInformation": { + "amount": "10", + "currency": "USD", + "description": "Alien Invaders Game" + }, + "chargingMetaData": { + "onBehalfOf": "Example Games Inc", + "purchaseCategoryCode": "Game", + "channel": "WAP", + "tax": "0" + } + }, + "referenceCode": "REF-12345" + } } ``` @@ -867,18 +877,31 @@ Response : ``` { "refundResponse": { - "amount": 0, - "serverTransactionReference": "serverTransactionReference", - "clientCorrelator": "clientCorrelator", - "reasonForRefund": "reasonForRefund", - "merchantIdentification": "merchantIdentification", - "receiptResponse": { - "notifyURL": "notifyURL", - "callbackData": "callbackData", - "resourceURL": "http://:/{v1}/credit/{msisdn}/refund" - } + "clientCorrelator": "54321", + "endUserID": "tel:+12345678901", + "originalServerReferenceCode": "ABC-123", + "reasonForRefund": "adjustment", + "refundAmount": 1, + "paymentAmount": { + "chargingInformation": { + "amount": "10", + "currency": "USD", + "description": "Alien Invaders Game" + }, + "chargingMetaData": { + "onBehalfOf": "Example Games Inc", + "purchaseCategoryCode": "Game", + "channel": "WAP", + "tax": "0" + } + }, + "referenceCode": "REF-12345", + "resourceURL": "", + "transactionOperationStatus": "Refunded", + "serverReferanceCode": "000014" } } + ``` @@ -1178,3 +1201,150 @@ Response : 200 OK will be returned if the service is successfully added for the msisdn. Unless 400 Bad Request will be returned +###6.6 Payment Service + +####6.6.1 Introduction + +Payment service will provide the Service providers a list of payment services available for the given MSISDN and based on the services available service provider can make/refund payment. Basically Payment API supports 2 operations. + +- Charge a User - Charge a subscriber for a service provided by your Web application. +- Refund a User - Refund a end user + +####6.6.2 API features with postman testing + +Request : + +Type - POST + +Request URI: +``` +http://:/payment/{v1}/transaction/{endUserId}/amount +``` + +Request Body : +``` +{ + "amountTransaction":{ + “clientCorrelator”: ”123456:AIN12345”, + "endUserId":"tel:+00123456789", + "paymentAmount":{ + "chargingInformation":{ + "amount":"2", + "currency":"LKR", + "description":"Alien Invaders Game" + }, + "chargingMetaData":{ + "onBehalfOf":"Example Games Inc", + "purchaseCategoryCode":"Game", + "channel":"WAP", + "taxAmount":"0" + } + }, + "referenceCode":"REF-12345", + "transactionOperationStatus":"Charged" + } +} + +``` + +Response : + +``` +{ + "amountTransaction":{ + “clientCorrelator”: ”123456:AIN12345”, + "endUserId":"tel:+00123456789", + "paymentAmount":{ + "chargingInformation":{ + "amount":"10", + "currency":"LKR", + "description":"Alien Invaders Game" + }, + "totalAmountCharged":"12.99", + "chargingMetaData":{ + "onBehalfOf":"Example Games Inc", + "purchaseCategoryCode":"Game", + "channel":"WAP", + "taxAmount":"0" + } + }, + "referenceCode":"REF-12345", + "transactionOperationStatus":"Charged" + } +} + +``` + +- Refund - Refund an end user + +Request : + +Type - POST + +Request URI: +``` +http://:/payment/{v1}/transaction/{endUserId}/amount + +``` +Request Body : +``` + +{ + "amountTransaction":{ + “clientCorrelator”: ”123456:AIN12345”, + "endUserId":"tel:+00123456789", + "originalServerReferenceCode":"ABC-123", + "paymentAmount":{ + "chargingInformation":{ + "amount":"10", + "currency":"USD", + "description":"Alien Invaders Game" + }, + "chargingMetaData":{ + "onBehalfOf":"Example Games Inc", + "purchaseCategoryCode":"Game", + "channel":"WAP", + "taxAmount":"0" + } + }, + "referenceCode":"REF-12345", + "originalServerReferenceCode":"ABC-123", + "transactionOperationStatus":"Refunded" + } +} + +``` + +Response : +``` + +{ + "amountTransaction":{ + “clientCorrelator”: ”123456:AIN12345”, + "endUserId":"tel:+00123456789", + "paymentAmount":{ + "chargingInformation":{ + "amount":"10", + "currency":"USD", + "description":"Alien Invaders" + }, + "chargingMetaData":{ + "onBehalfOf":"Example Games Inc", + "purchaseCategoryCode":"Game", + "channel":"WAP", + "taxAmount":"0" + }, + "totalAmountRefunded":"10" + }, + "referenceCode":"REF-12345", + "originalServerReferenceCode":"ABC-123", + "resourceURL":" tel%3A%2B16309700001/amount/efg789", + "transactionOperationStatus":"Refunded" + } +} + +``` + +Response : +200 OK will be returned if the service is successfully added for the msisdn. +Unless 400 Bad Request will be returned \ No newline at end of file diff --git a/dep-sandbox/dbscripts/dep-sandbox1_5_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql similarity index 100% rename from dep-sandbox/dbscripts/dep-sandbox1_5_0.sql rename to dep-sandbox/dbscripts/dep-sandbox1_6_0.sql diff --git a/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql b/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql new file mode 100644 index 00000000..0f49b1eb --- /dev/null +++ b/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql @@ -0,0 +1,6 @@ + +INSERT INTO `sbxapiservicecalls` VALUES (10,4,'ChargeUser'),(11,4,'RefundUser'); + +INSERT INTO `sbxattribute` VALUES (29,'patialRefund'),(30,'makePayment'),(31,'clientCorrelatorPayment'),(32,'referenceCodePayment'),(33,'refundUser'); + +INSERT INTO `sbtattributedistribution` VALUES (32,29,9),(33,26,9),(34,25,9),(35,30,10),(36,31,10),(37,32,10),(38,33,11),(39,31,11),(40,32,11); \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index 6582b242..b55cc0ed 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -89,7 +89,6 @@ public Response makePayment( requestDTO.setEndUserId(endUserId); requestDTO.setRefundRequestBean(makePaymentRequestBean); requestDTO.setRequestType(RequestType.PAYMENT); - requestDTO.setRequestType(RequestType.PAYMENT); RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); Returnable returnable = null; @@ -105,12 +104,6 @@ public Response makePayment( .build(); return response; } - - - } - - - } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index e0f869b0..b2a1db2b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -345,7 +345,14 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) responseBean.setServerReferenceCode(serverReferenceCode); responseBean.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); - // set transaction operation status as charged + // Get the Charged Tax Amount + Double chargedTaxAmount = Double.parseDouble(taxAmount); + //Total Amount Refunded + Double totalAmountRefunded = chargeAmount+chargedTaxAmount; + // Setting the total Amount Refund + payAmount.setTotalAmountRefunded(totalAmountRefunded.toString()); + + // set transaction operation status as charged ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName()); Double updateBalance = manageNumber.getBalance() + (chargeAmount + chargedTaxAmount); AttributeValues accountStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallRefund, diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index ff75462b..b9744f1f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.util; public enum ServiceName { - GetAttribute, GetProfile, ApplyCredit, PatialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser; + GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser; } From fcefd7ff0892efe53e24e3aed2c8573281fb8b2a Mon Sep 17 00:00:00 2001 From: shahintha Date: Tue, 14 Feb 2017 05:12:31 +0000 Subject: [PATCH 036/112] [maven-release-plugin] prepare release v1_6_0-RC1 --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index 192ac4f6..0282ce21 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.2.0-SNAPSHOT + 1.6.0-RC1 ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index 5d00ec05..3eae2b4e 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.2.0-SNAPSHOT + 1.6.0-RC1 ../../pom.xml diff --git a/pom.xml b/pom.xml index 05d93ad3..9064daa2 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.2.0-SNAPSHOT + 1.6.0-RC1 WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_0_0-rc1 + v1_6_0-RC1 From cbb539b9d4ef1c3ca2ad61b04a7b6ad6b73f0da8 Mon Sep 17 00:00:00 2001 From: shahintha Date: Tue, 14 Feb 2017 05:12:36 +0000 Subject: [PATCH 037/112] [maven-release-plugin] prepare for next development iteration --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index 0282ce21..d53fab8b 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.0-RC1 + 1.6.0-SNAPSHOT ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index 3eae2b4e..d4df6f27 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.0-RC1 + 1.6.0-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index 9064daa2..0e70b14b 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.6.0-RC1 + 1.6.0-SNAPSHOT WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_6_0-RC1 + v1_0_0-rc1 From 1cece73308cf52b9ccec9f35dccfae89b1404460 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Wed, 15 Feb 2017 12:33:05 +0530 Subject: [PATCH 038/112] Location Service implementation --- .../custom/LocationRequestWrapperDTO.java | 3 - .../dep/sandbox/service/Application.java | 9 +- .../dep/sandbox/service/LocationService.java | 74 ++++++++ .../location/LocationRequestFactory.java | 33 +++- .../location/LocationRequestHandler.java | 172 ++++++++++-------- .../location/LocationResponseWrapperDTO.java | 23 ++- .../location/TerminalLocation.java | 41 ++--- .../location/TerminalLocationList.java | 24 ++- 8 files changed, 248 insertions(+), 131 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/LocationRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/LocationRequestWrapperDTO.java index b7b17110..af47ad5e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/LocationRequestWrapperDTO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/LocationRequestWrapperDTO.java @@ -2,9 +2,6 @@ public class LocationRequestWrapperDTO extends RequestDTO { - /** - * - */ private static final long serialVersionUID = -1548321785136669498L; private String address; private String requestedAccuracy; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index b9acba65..bfdd99ac 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -16,14 +16,12 @@ package com.wso2telco.services.dep.sandbox.service; -import java.util.ArrayList; -import java.util.List; - import com.wso2telco.core.mi.AbstractApplication; -import com.wso2telco.core.mi.ConfigDTO; - import io.dropwizard.setup.Environment; +import java.util.ArrayList; +import java.util.List; + public class Application extends AbstractApplication { @Override @@ -39,6 +37,7 @@ protected List getRestFulComponents() { listOfObject.add(new WalletService()); listOfObject.add(new WalletConfigurationService()); listOfObject.add(new PaymentService()); + listOfObject.add(new LocationService()); return listOfObject; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java new file mode 100644 index 00000000..c4056254 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.service; + +import com.wordnik.swagger.annotations.*; +import com.wso2telco.services.dep.sandbox.dao.model.custom.LocationRequestWrapperDTO; +import com.wso2telco.services.dep.sandbox.exception.SandboxException; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("/location") +@Produces({MediaType.APPLICATION_JSON}) +@Api(value = "location", description = "Rest Service for Location API") +public class LocationService { + + Log LOG = LogFactory.getLog(LocationService.class); + + @GET + @ApiOperation(value = "locationService", notes = "locationService", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header") }) + public Response location( + @ApiParam(value = "address", required = true) @QueryParam("address") String address, @ApiParam(value = "requestedAccuracy", required = true) @QueryParam("requestedAccuracy") String requestedAccuracy, + @Context HttpServletRequest request) { + LOG.debug("address={address}&requestedAccuracy={requestedAccuracy} invorked :" + address +" " +requestedAccuracy); + LocationRequestWrapperDTO requestDTO = new LocationRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setAddress(address); + requestDTO.setRequestedAccuracy(requestedAccuracy); + requestDTO.setRequestType(RequestType.LOCATION); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + LOG.debug("Location SERVICE RESPONSE : " + response); + return response; + } catch (Exception ex) { + LOG.error("Location SERVICE ERROR : ", ex); + return Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + } + + } + + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestFactory.java index 8fe907d3..e539759c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestFactory.java @@ -1,17 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.location; import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; public class LocationRequestFactory { - - private static LocationRequestHandler instance =null; - // TODO: based on the json body need to implement request handle + + private static Log LOG = LogFactory.getLog(LocationRequestFactory.class); + @SuppressWarnings("rawtypes") public static synchronized RequestHandleable getInstance(final RequestDTO requestDTO) { - if (instance==null) { - instance = new LocationRequestHandler(); - } - return instance; + + if(requestDTO != null){ + + return new LocationRequestHandler(); + } + return null; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java index 58389b4a..75c4ce8c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java @@ -1,14 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.location; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.ws.rs.core.Response.Status; - -import org.apache.commons.logging.LogFactory; - import com.wso2telco.dep.oneapivalidation.service.impl.location.ValidateLocation; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.LocationDAO; @@ -17,6 +23,13 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.User; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import org.apache.commons.logging.LogFactory; + +import javax.ws.rs.core.Response.Status; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; class LocationRequestHandler extends AbstractRequestHandler{ @@ -35,81 +48,84 @@ class LocationRequestHandler extends AbstractRequestHandler Date: Thu, 23 Feb 2017 14:17:59 +0530 Subject: [PATCH 039/112] Implement abstract level message logger --- dep-sandbox/dbscripts/dep-sandbox1_6_0.sql | 23 ++--- .../sandbox/dao/model/domain/MessageLog.java | 34 ++++--- .../AbstractRequestHandler.java | 89 +++++++++++++++---- .../sandbox/servicefactory/MessageType.java | 36 ++++++++ .../RequestResponseRequestHandleable.java | 28 ++++++ .../location/LocationRequestHandler.java | 70 ++++++++++++++- .../dep/sandbox/util/ServiceName.java | 2 +- 7 files changed, 236 insertions(+), 46 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageType.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestResponseRequestHandleable.java diff --git a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql index cf4ca17a..c185254f 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql @@ -665,16 +665,19 @@ CREATE TABLE IF NOT EXISTS `ussd_transactions` ( -- Table structure for table `sbtmessagelog` -- + CREATE TABLE IF NOT EXISTS `sbtmessagelog` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `request` text, - `servicenameid` int(11) NOT NULL, - `userid` int(11) NOT NULL, - `reference` varchar(100) DEFAULT NULL, - `value` varchar(100) DEFAULT NULL, - `messagetimestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - CONSTRAINT `fk01sbtmessagelog` FOREIGN KEY (`servicenameid`) REFERENCES `sbxapiservicecalls` (`sbxapiservicecallsdid`), - CONSTRAINT `fk02sbtmessagelog` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) +`id` int(11) NOT NULL AUTO_INCREMENT, +`request` text, +`status` varchar(100) DEFAULT '0', +`type` varchar(100) DEFAULT 'undefined', +`servicenameid` int(11) NOT NULL, +`userid` int(11) NOT NULL, +`reference` varchar(100) DEFAULT NULL, +`value` varchar(100) DEFAULT NULL, +`messagetimestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY (`id`), +CONSTRAINT `fk01sbtmessagelog` FOREIGN KEY (`servicenameid`) REFERENCES `sbxapiservicecalls` (`sbxapiservicecallsdid`), +CONSTRAINT `fk02sbtmessagelog` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java index 4e3b6d15..08f32bdd 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java @@ -1,16 +1,9 @@ package com.wso2telco.services.dep.sandbox.dao.model.domain; +import javax.persistence.*; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.Temporal; - @Entity @Table(name = "sbtmessagelog") @@ -24,6 +17,12 @@ public class MessageLog { @Column(name = "request") private String request; + @Column(name = "status") + private String status; + + @Column(name = "type") + private String type; + @Column(name = "servicenameid") private int servicenameid; @@ -95,9 +94,20 @@ public Date getMessageTimestamp() { public void setMessageTimestamp(Date messageTimestamp) { this.messageTimestamp = messageTimestamp; } - - - - + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } } \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java index d1c9d52b..21767f56 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java @@ -1,37 +1,41 @@ package com.wso2telco.services.dep.sandbox.servicefactory; -import java.util.ArrayList; -import java.util.Base64; -import java.util.Base64.Decoder; -import java.util.List; - -import javax.ws.rs.core.Response.Status; - -import org.apache.commons.lang.StringUtils; -import org.apache.commons.logging.Log; -import org.json.JSONException; -import org.json.JSONObject; - import com.wso2telco.core.dbutils.exception.ThrowableError; import com.wso2telco.dep.oneapivalidation.exceptions.PolicyException; import com.wso2telco.dep.oneapivalidation.exceptions.ServiceException; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.GenaricDAO; +import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; import com.wso2telco.services.dep.sandbox.dao.UserDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; -import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; -import com.wso2telco.services.dep.sandbox.dao.model.domain.User; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.util.RequestError; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.json.JSONException; +import org.json.JSONObject; + +import javax.ws.rs.core.Response.Status; +import java.util.ArrayList; +import java.util.Base64; +import java.util.Base64.Decoder; +import java.util.Date; +import java.util.List; public abstract class AbstractRequestHandler implements RequestHandleable { protected Log LOG; protected GenaricDAO dao; protected UserDAO userDAO; + protected User user; + protected LoggingDAO loggingDAO; + private int referenceNumber; { dao =DaoFactory.getGenaricDAO(); userDAO = DaoFactory.getUserDAO(); - } + loggingDAO = DaoFactory.getLoggingDAO(); + + } /** * internally used to indicate the type of exception being stored is a * ServiceException @@ -43,6 +47,7 @@ public abstract class AbstractRequestHandler implements R */ protected static final int POLICYEXCEPTION = 2; + public final Returnable execute(final RequestDTO requestDTO) throws Exception { E2 wrapperDTO = (E2) requestDTO; init(wrapperDTO); @@ -61,7 +66,7 @@ public final Returnable execute(final RequestDTO requestDTO) throws Exception { /** * load user domain object from db */ - final User user = userDAO.getUser(sandboxusr); + user = userDAO.getUser(sandboxusr); requestDTO.setUser(user); validate(wrapperDTO); /** @@ -74,14 +79,24 @@ public final Returnable execute(final RequestDTO requestDTO) throws Exception { LOG.debug("Location parameters are empty"); responseDTO.setRequestError( - constructRequestError(SERVICEEXCEPTION, "SVC0001", "A service error occurred. Error code is %1", - StringUtils.join(userNotWhiteListed.toArray()) + " Not Whitelisted")); + constructRequestError(SERVICEEXCEPTION, "SVC0002", "A service error occurred. Error code is %1", + StringUtils.join(userNotWhiteListed.toArray()))); responseDTO.setHttpStatus(Status.BAD_REQUEST); return responseDTO; } } - return process(wrapperDTO); + /** + * log the request in the DB. + */ + if(this instanceof RequestResponseRequestHandleable){ + + RequestResponseRequestHandleable requestResponseRequestHandleable = (RequestResponseRequestHandleable)this; + String requestType = requestDTO.getRequestType().toString(); + saveMessageLog(requestType,requestResponseRequestHandleable.getApiServiceCalls(), + requestResponseRequestHandleable.getJosonString(requestDTO),requestResponseRequestHandleable.getnumber(requestDTO)); + } + return process(wrapperDTO); } private List getNotWhitelistedNumbers(User user) throws Exception { @@ -169,4 +184,40 @@ protected RequestError constructRequestError(int type,ThrowableError throwableEr } return error; } + + public int getReferenceNumber() { + return referenceNumber; + } + + public void setReferenceNumber(int referenceNumber) { + this.referenceNumber = referenceNumber; + } + + /** + * This method is used for store request on the DB. + * @param requestType type of the request + * @param apiService api name + * @param jsonString request + * @param number msisdn + * @throws Exception + */ + private int saveMessageLog(String requestType,String apiService, String jsonString, String number) throws Exception { + + APITypes apiTypes = dao.getAPIType(requestType); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), apiService); + + MessageLog messageLog = new MessageLog(); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(user.getId()); + messageLog.setReference("msisdn"); + messageLog.setStatus("0"); + messageLog.setType(MessageType.Request.getValue()); + messageLog.setValue(number); + messageLog.setRequest(jsonString); + messageLog.setMessageTimestamp(new Date()); + int ref_number = loggingDAO.saveMessageLog(messageLog); + setReferenceNumber(ref_number); + return ref_number; + + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageType.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageType.java new file mode 100644 index 00000000..a63cb5f9 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageType.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory; + + +public enum MessageType { + + Request("0"),Response("1"); + + private String value; + + private MessageType(String value) { + this.value= value; + } + + public String getValue() { + return value; + } + +} + + + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestResponseRequestHandleable.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestResponseRequestHandleable.java new file mode 100644 index 00000000..baac1560 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestResponseRequestHandleable.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public interface RequestResponseRequestHandleable { + + String getApiServiceCalls() ; + String getJosonString(final E2 requestDTO); + String getnumber(final E2 requestDTO); + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java index 75c4ce8c..b59ce83c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java @@ -15,15 +15,22 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.location; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import com.wso2telco.dep.oneapivalidation.service.impl.location.ValidateLocation; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.LocationDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.LocationRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.domain.Locationparam; -import com.wso2telco.services.dep.sandbox.dao.model.domain.User; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageType; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.ServiceName; import org.apache.commons.logging.LogFactory; +import org.json.JSONObject; import javax.ws.rs.core.Response.Status; import java.text.SimpleDateFormat; @@ -32,7 +39,7 @@ import java.util.List; -class LocationRequestHandler extends AbstractRequestHandler{ +public class LocationRequestHandler extends AbstractRequestHandler implements RequestResponseRequestHandleable { final static String RETRIEVED = "Retrieved"; final static String NOT_RETRIEVED="NotRetrieved"; @@ -50,7 +57,8 @@ class LocationRequestHandler extends AbstractRequestHandler Date: Wed, 15 Feb 2017 11:26:19 +0530 Subject: [PATCH 040/112] Implemented payment List charged operations v1 --- dep-sandbox/dbscripts/dep-sandbox1_6_0.sql | 2 +- .../services/dep/sandbox/dao/PaymentDAO.java | 4 + .../dao/hibernate/HibernatePaymentDAO.java | 51 +++++ .../custom/PaymentListTransactionDTO.java | 29 +++ .../PaymentListTransactionResponseBean.java | 44 +++++ .../dep/sandbox/service/PaymentService.java | 39 +++- .../PaymentListTransactionRequestHandler.java | 176 ++++++++++++++++++ .../PaymentListTransactionRequestWrapper.java | 32 ++++ ...PaymentListTransactionResponseWrapper.java | 43 +++++ .../payment/PaymentRequestFactory.java | 5 +- .../servicefactory/wallet/AttributeName.java | 2 +- 11 files changed, 420 insertions(+), 7 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentListTransactionDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentListTransactionResponseBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionResponseWrapper.java diff --git a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql index c185254f..8dd56d93 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql @@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `sbxapiservicecalls` ( -- Dumping data for table `sbxapiservicecalls` -- -INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'); +INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java index 041f5fe7..6440f634 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java @@ -19,8 +19,12 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; +import java.util.List; + public interface PaymentDAO { + public List getTransactionValue(String endUserId, List attribute, String tableName, + Integer userId) throws Exception; public AttributeValues getAttributeValue(String endUserId, String serviceCall, String attribute, Integer userId) throws Exception; public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java index 74e85661..6bbe78d3 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java @@ -26,6 +26,7 @@ import org.hibernate.query.Query; import javax.persistence.NoResultException; +import java.util.List; public class HibernatePaymentDAO extends AbstractDAO implements PaymentDAO { @@ -33,6 +34,56 @@ public class HibernatePaymentDAO extends AbstractDAO implements PaymentDAO { LOG = LogFactory.getLog(PaymentDAO.class); } + @Override + public List getTransactionValue(String endUserId, List attribute, String tableName, + Integer userId) throws Exception { + + Session session = getSession(); + List resultSet = null; + + StringBuilder hql = new StringBuilder(); + hql.append("SELECT "); + hql.append("val "); + hql.append("FROM "); + hql.append("AttributeValues AS val, "); + hql.append("APIServiceCalls AS calls, "); + hql.append("APITypes AS api, "); + hql.append("AttributeDistribution AS dist, "); + hql.append("Attributes AS att, "); + hql.append("ManageNumber AS number "); + hql.append("WHERE "); + hql.append("api.id = calls.apiType.id "); + hql.append("AND calls.apiServiceCallId = dist.serviceCall.apiServiceCallId "); + hql.append("AND dist.distributionId = val.attributeDistribution.distributionId "); + hql.append("AND att.attributeId = dist.attribute.attributeId "); + hql.append("AND api.apiname =:apiName "); + hql.append("AND val.tobject =:tableName "); + hql.append("AND number.id = val.ownerdid "); + hql.append("AND number.Number =:number "); + hql.append("AND number.user.id =:userId "); + hql.append("AND att.attributeName IN ( :attributeName)"); + + try { + Query query = session.createQuery(hql.toString()); + query.setParameter("apiName", RequestType.PAYMENT.toString().toLowerCase()); + query.setParameter("number", endUserId); + query.setParameter("tableName", tableName); + query.setParameterList("attributeName", attribute); + query.setParameter("userId", userId); + query.setFirstResult(0); + query.setMaxResults(20); + resultSet = (List) query.getResultList(); + + } catch (NoResultException e) { + return null; + } catch (Exception ex) { + LOG.error("###PAYMENT### Error in getListTransaction Service ", ex); + throw ex; + } + return resultSet; + } + + @Override public AttributeValues getAttributeValue(String endUserId, String serviceCall, String attribute, Integer userId) throws Exception { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentListTransactionDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentListTransactionDTO.java new file mode 100644 index 00000000..cc51f807 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentListTransactionDTO.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class PaymentListTransactionDTO { + + private PaymentListTransactionResponseBean paymentTransactionList; + + public PaymentListTransactionResponseBean getPaymentTransactionList() { + return paymentTransactionList; + } + + public void setPaymentTransactionList(PaymentListTransactionResponseBean paymentTransactionList) { + this.paymentTransactionList = paymentTransactionList; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentListTransactionResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentListTransactionResponseBean.java new file mode 100644 index 00000000..6726acb0 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentListTransactionResponseBean.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.databind.JsonNode; + +import java.util.ArrayList; +import java.util.List; + +public class PaymentListTransactionResponseBean { + + private List amountTransaction = new ArrayList(); + + private String resourceURL; + + public List getAmountTransaction() { + return amountTransaction; + } + + public void setAmountTransaction(List amountTransaction) { + this.amountTransaction = amountTransaction; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index b55cc0ed..d80be281 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -22,6 +22,7 @@ import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentListTransactionRequestWrapper; import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRefundRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler; import com.wso2telco.services.dep.sandbox.util.RequestType; @@ -31,10 +32,7 @@ import org.json.JSONObject; import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; +import javax.ws.rs.*; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; @@ -106,4 +104,37 @@ public Response makePayment( } } } + + @GET + @Path("/{endUserId}/transactions") + @ApiOperation(value = "listTransactionService", notes = "listTransactionService", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) + public Response getAttributeServices( + @ApiParam(value = "endUserId", required = false) @PathParam("endUserId") String endUserId, + @Context HttpServletRequest request) { + LOG.debug("/{endUserId}/transactions invorked :" + endUserId); + PaymentListTransactionRequestWrapper requestDTO = new PaymentListTransactionRequestWrapper(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + LOG.debug("List Transaction SERVICE RESPONSE : " + response); + return response; + } catch (Exception ex) { + LOG.error("List Transaction SERVICE ERROR : ", ex); + return Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + } + + } + + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java new file mode 100644 index 00000000..2c2efab5 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java @@ -0,0 +1,176 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.PaymentListTransactionDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.PaymentListTransactionResponseBean; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; +import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; +import com.wso2telco.services.dep.sandbox.util.*; +import org.apache.commons.logging.LogFactory; +import org.json.simple.JSONObject; +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.List; + +public class PaymentListTransactionRequestHandler extends AbstractRequestHandler { + + private PaymentDAO paymentDAO; + private PaymentListTransactionResponseWrapper responseWrapper; + private PaymentListTransactionRequestWrapper requestWrapper; + private MessageLogHandler logHandler; + + { + LOG = LogFactory.getLog(PaymentListTransactionRequestHandler.class); + paymentDAO = DaoFactory.getPaymentDAO(); + dao = DaoFactory.getGenaricDAO(); + logHandler = MessageLogHandler.getInstance(); + + } + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + List address = new ArrayList(); + address.add(requestWrapper.getEndUserId()); + return address; + } + + @Override + protected boolean validate(PaymentListTransactionRequestWrapper wrapperDTO) throws Exception { + + String endUserId = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); + + try { + ValidationRule[] validationRules = {new ValidationRule( + ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, "endUserId", endUserId)}; + + Validation.checkRequestParams(validationRules); + } catch (CustomException ex) { + LOG.error("###PAYMENT### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + + return true; + } + + @Override + protected Returnable process(PaymentListTransactionRequestWrapper extendedRequestDTO) throws Exception { + + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + try { + String msisdn = extendedRequestDTO.getEndUserId(); + String endUserId = getLastMobileNumber(msisdn); + List amountTransaction = null; + List attributeName = new ArrayList(); + attributeName.add(AttributeName.makePayment.toString().toLowerCase()); + attributeName.add(AttributeName.refundUser.toString().toLowerCase()); + Integer userId = extendedRequestDTO.getUser().getId(); + + // Save Request Log + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), ServiceName.ListPayment.toString()); + JSONObject object = new JSONObject(); + object.put("endUserId", msisdn); + logHandler.saveMessageLog(apiServiceCalls.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), + "msisdn", msisdn, object); + + String tableName = TableName.NUMBERS.toString().toLowerCase(); + PaymentListTransactionResponseBean paymentTransaction = new PaymentListTransactionResponseBean(); + amountTransaction = paymentDAO.getTransactionValue(endUserId, attributeName, tableName, userId); + + List listNodes = new ArrayList(); + + if (amountTransaction != null && !amountTransaction.isEmpty()) { + for (AttributeValues values : amountTransaction) { + JsonParser parser = new JsonParser(); + JsonObject jsonObject = parser.parse(values.getValue()).getAsJsonObject(); + JsonElement get = jsonObject.get("paymentAmount"); + JsonObject asJsonObjectPayment = get.getAsJsonObject(); + asJsonObjectPayment.remove("totalAmountCharged"); + asJsonObjectPayment.remove("totalAmountRefunded"); + asJsonObjectPayment.remove("chargingMetaData"); + jsonObject.remove("clientCorrelator"); + jsonObject.remove("notifyURL"); + jsonObject.remove("originalReferenceCode"); + jsonObject.remove("originalServerReferenceCode"); + jsonObject.remove("resourceURL"); + String jsonInString = null; + jsonInString = jsonObject.toString(); + + JsonNode node = null; + ObjectMapper mapper = new ObjectMapper(); + node = mapper.readValue(jsonInString, JsonNode.class); + listNodes.add(node); + } + paymentTransaction.setAmountTransaction(listNodes); + } else { + LOG.error("###PAYMENT### Valid Transaction List Not Available for msisdn: " + endUserId); + responseWrapper.setHttpStatus(Response.Status.NO_CONTENT); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + } + paymentTransaction.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); + + PaymentListTransactionDTO listTransactionDTO = new PaymentListTransactionDTO(); + + listTransactionDTO.setPaymentTransactionList(paymentTransaction); + responseWrapper.setListPaymentDTO(listTransactionDTO); + responseWrapper.setHttpStatus(Response.Status.OK); + + } catch (Exception ex) { + LOG.error("###PAYMENT### Error Occurred in PAYMENT Service. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); + throw ex; + } + + return responseWrapper; + } + + + @Override + protected void init(PaymentListTransactionRequestWrapper extendedRequestDTO) throws Exception { + requestWrapper = extendedRequestDTO; + responseWrapper = new PaymentListTransactionResponseWrapper(); + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestWrapper.java new file mode 100644 index 00000000..6a874112 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestWrapper.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class PaymentListTransactionRequestWrapper extends RequestDTO { + + private String endUserId; + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionResponseWrapper.java new file mode 100644 index 00000000..233e152a --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionResponseWrapper.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.payment; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.PaymentListTransactionDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class PaymentListTransactionResponseWrapper extends AbstractReturnWrapperDTO { + + private PaymentListTransactionDTO listPaymentDTO; + + @Override + public Object getResponse() { + if (getRequestError() == null) { + return getListPaymentDTO(); + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + } + } + + public PaymentListTransactionDTO getListPaymentDTO() { + return listPaymentDTO; + } + + public void setListPaymentDTO(PaymentListTransactionDTO listPaymentDTO) { + this.listPaymentDTO = listPaymentDTO; + } +} \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java index a577c074..955bef6d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestFactory.java @@ -30,14 +30,17 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { final String MAKE_PAYMENT = "ChargePaymentRequestWrapper"; final String REFUND_PAYMENT = "PaymentRefundRequestWrapper"; + final String LIST_PAYMENT = "transactions"; if(requestDTO.toString().contains(REFUND_PAYMENT)){ LOG.debug("LOADING REFUND PAYMENT SERVICE"); return new PaymentRefundRequestHandler(); - } else if(requestDTO.toString().contains(MAKE_PAYMENT)){ LOG.debug("LOADING MAKE PAYMENT SERVICE"); return new PaymentRequestHandler(); + } else if (requestDTO.getRequestPath().contains(LIST_PAYMENT)){ + LOG.debug("LOADING LIST PAYMENT SERVICE"); + return new PaymentListTransactionRequestHandler(); } return null; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java index 1b37a798..e99baf6c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/AttributeName.java @@ -16,5 +16,5 @@ package com.wso2telco.services.dep.sandbox.servicefactory.wallet; public enum AttributeName { - Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet, makePayment, clientCorrelatorPayment, referenceCodePayment,refundUser + Payment, Refund, accountStatus, Currency, clientCorrelatorWallet, transactionStatus, referenceCodeWallet, makePayment, clientCorrelatorPayment, referenceCodePayment,refundUser, } From fe99bba93c8127d636f6fecb15a09c78cf7647c6 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 23 Feb 2017 14:16:14 +0530 Subject: [PATCH 041/112] WIP refactoring payment api --- dep-sandbox/dbscripts/dep-sandbox1_6_0.sql | 29 +- .../dao/hibernate/HibernateLoggingDao.java | 115 +++--- .../dao/hibernate/HibernatePaymentDAO.java | 1 + .../sandbox/dao/model/domain/MessageLog.java | 175 +++++---- .../dep/sandbox/service/PaymentService.java | 2 +- .../payment/PaymentRefundRequestHandler.java | 319 ++++++++------- .../payment/PaymentRequestHandler.java | 366 +++++++++--------- .../dep/sandbox/util/MessageLogHandler.java | 13 +- 8 files changed, 521 insertions(+), 499 deletions(-) diff --git a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql index 8dd56d93..5ac14cf1 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql @@ -1,5 +1,5 @@ -CREATE DATABASE IF NOT EXISTS sandbox; -USE sandbox; +CREATE DATABASE IF NOT EXISTS sandbox1; +USE sandbox1; -- @@ -665,19 +665,18 @@ CREATE TABLE IF NOT EXISTS `ussd_transactions` ( -- Table structure for table `sbtmessagelog` -- - CREATE TABLE IF NOT EXISTS `sbtmessagelog` ( -`id` int(11) NOT NULL AUTO_INCREMENT, -`request` text, -`status` varchar(100) DEFAULT '0', -`type` varchar(100) DEFAULT 'undefined', -`servicenameid` int(11) NOT NULL, -`userid` int(11) NOT NULL, -`reference` varchar(100) DEFAULT NULL, -`value` varchar(100) DEFAULT NULL, -`messagetimestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY (`id`), -CONSTRAINT `fk01sbtmessagelog` FOREIGN KEY (`servicenameid`) REFERENCES `sbxapiservicecalls` (`sbxapiservicecallsdid`), -CONSTRAINT `fk02sbtmessagelog` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) + `id` int(11) NOT NULL AUTO_INCREMENT, + `request` text, + `status` varchar(100) DEFAULT '0', + `type` varchar(100) DEFAULT '0', + `servicenameid` int(11) NOT NULL, + `userid` int(11) NOT NULL, + `reference` varchar(100) DEFAULT NULL, + `value` varchar(100) DEFAULT NULL, + `messagetimestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + CONSTRAINT `fk01sbtmessagelog` FOREIGN KEY (`servicenameid`) REFERENCES `sbxapiservicecalls` (`sbxapiservicecallsdid`), + CONSTRAINT `fk02sbtmessagelog` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateLoggingDao.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateLoggingDao.java index 4239906e..6f1d0d1e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateLoggingDao.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateLoggingDao.java @@ -1,11 +1,6 @@ package com.wso2telco.services.dep.sandbox.dao.hibernate; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; import java.util.Map.Entry; import org.apache.commons.logging.LogFactory; @@ -51,85 +46,67 @@ public List getMessageLogs(int userid, List serviceNameIds, String value = CommonUtil.getNullOrTrimmedValue(val); try { StringBuilder hqlQueryBuilder = new StringBuilder(); - if(userid != 0 || serviceNameIds != null || startTimeStamp != null || endTimeStamp != null || (reference != null && value != null)){ - hqlQueryBuilder.append("from MessageLog ml "); - hqlQueryBuilder.append("where "); - if(userid != 0){ - hqlQueryBuilder.append("ml.userid = :id"); - parameterMap.put("id", userid); - if(serviceNameIds != null) - hqlQueryBuilder.append(" AND ml.servicenameid in (:servicenameidList)"); - if(reference != null && value != null){ - hqlQueryBuilder.append(" AND ml.reference = :reference AND ml.value = :value"); - parameterMap.put("reference", reference); - parameterMap.put("value", value); - } - if(startTimeStamp != null){ - hqlQueryBuilder.append(" AND ml.messageTimestamp >= :startTimeStamp"); - parameterMap.put("startTimeStamp", startTimeStamp); - } - if(endTimeStamp != null){ - hqlQueryBuilder.append(" AND ml.messageTimestamp <= :endTimeStamp"); - parameterMap.put("endTimeStamp", endTimeStamp); - } - }else if(serviceNameIds != null){ - hqlQueryBuilder.append("ml.servicenameid in (:servicenameidList)"); - if(reference != null && value != null){ - hqlQueryBuilder.append(" AND ml.reference = :reference AND ml.value = :value"); - parameterMap.put("reference", reference); - parameterMap.put("value", value); - } - if(startTimeStamp != null){ - hqlQueryBuilder.append(" AND ml.messageTimestamp >= :startTimeStamp"); - parameterMap.put("startTimeStamp", startTimeStamp); - } - if(endTimeStamp != null){ - hqlQueryBuilder.append(" AND ml.messageTimestamp <= :endTimeStamp"); - parameterMap.put("endTimeStamp", endTimeStamp); - } - }else if(reference != null && value != null){ - hqlQueryBuilder.append("ml.reference = :reference AND ml.value = :value"); - parameterMap.put("reference", reference); - parameterMap.put("value", value); - if(startTimeStamp != null){ - hqlQueryBuilder.append(" AND ml.messageTimestamp >= :startTimeStamp"); - parameterMap.put("startTimeStamp", startTimeStamp); - } - if(endTimeStamp != null){ - hqlQueryBuilder.append(" AND ml.messageTimestamp <= :endTimeStamp"); - parameterMap.put("endTimeStamp", endTimeStamp); - } - }else if(startTimeStamp != null){ - hqlQueryBuilder.append("ml.messageTimestamp >= :startTimeStamp"); + hqlQueryBuilder.append("from MessageLog ml "); + hqlQueryBuilder.append("where 1=1 "); + + if(userid != 0){ + hqlQueryBuilder.append(" AND ml.userid = :id"); + parameterMap.put("id", userid); + + } + + if(serviceNameIds != null){ + hqlQueryBuilder.append(" AND ml.servicenameid in (:servicenameidList)"); + parameterMap.put("servicenameidList", serviceNameIds); + } + + if(reference != null && value != null){ + hqlQueryBuilder.append(" AND ml.reference = :reference AND ml.value = :value"); + parameterMap.put("reference", reference); + parameterMap.put("value", value); + } + + if(startTimeStamp != null && endTimeStamp != null){ + hqlQueryBuilder.append(" AND ml.messageTimestamp between :startTimeStamp and :endTimeStamp"); + parameterMap.put("startTimeStamp", startTimeStamp); + parameterMap.put("endTimeStamp", endTimeStamp); + + }else if(startTimeStamp != null){ + hqlQueryBuilder.append(" AND ml.messageTimestamp >= :startTimeStamp"); parameterMap.put("startTimeStamp", startTimeStamp); if(endTimeStamp != null){ hqlQueryBuilder.append(" AND ml.messageTimestamp <= :endTimeStamp"); parameterMap.put("endTimeStamp", endTimeStamp); } - }else if(endTimeStamp != null){ - hqlQueryBuilder.append("ml.messageTimestamp <= :endTimeStamp"); + }else if(endTimeStamp != null){ + hqlQueryBuilder.append(" AND ml.messageTimestamp <= :endTimeStamp"); parameterMap.put("endTimeStamp", endTimeStamp); } - Query query = session.createQuery(hqlQueryBuilder.toString()); - - Set> entrySet = parameterMap.entrySet(); + Query query = session.createQuery(hqlQueryBuilder.toString()); - for (Entry entry : entrySet) { + Set> entrySet = parameterMap.entrySet(); + + for (Entry entry : entrySet) { + if(entry.getValue() instanceof List ){ + query.setParameterList(entry.getKey(), (List)entry.getValue()); + }else{ query.setParameter(entry.getKey(), entry.getValue()); } - if(serviceNameIds != null) - query.setParameterList("servicenameidList", serviceNameIds); - - messageLogs = (List) query.getResultList(); + } + + messageLogs = (List) query.getResultList(); + } catch (Exception ex) { - LOG.error("Error in getMessageLogs " + ex); + LOG.error("Error in getMessageLogs " , ex); throw ex; } + if (messageLogs==null){ + return Collections.emptyList(); + }else{ return messageLogs; + } } - - } \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java index 6bbe78d3..befb6257 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java @@ -19,6 +19,7 @@ import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; +import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; import com.wso2telco.services.dep.sandbox.util.RequestType; import com.wso2telco.services.dep.sandbox.util.TableName; import org.apache.commons.logging.LogFactory; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java index 08f32bdd..28c5bf1a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java @@ -1,113 +1,120 @@ package com.wso2telco.services.dep.sandbox.dao.model.domain; -import javax.persistence.*; import java.util.Date; +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; + @Entity @Table(name = "sbtmessagelog") public class MessageLog { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") - private int id; - - @Column(name = "request") - private String request; - - @Column(name = "status") - private String status; - - @Column(name = "type") - private String type; - - @Column(name = "servicenameid") - private int servicenameid; - - @Column(name = "userid") - private int userid; - - @Column(name = "reference") - private String reference; - - @Column(name = "value") - private String value; - - @Temporal(javax.persistence.TemporalType.TIMESTAMP) - @Column(name="messagetimestamp") + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + private int id; + + @Column(name = "request") + private String request; + + @Column(name = "status") + private String status; + + @Column(name = "type") + private String type; + + @Column(name = "servicenameid") + private int servicenameid; + + @Column(name = "userid") + private int userid; + + @Column(name = "reference") + private String reference; + + @Column(name = "value") + private String value; + + @Temporal(javax.persistence.TemporalType.TIMESTAMP) + @Column(name = "messagetimestamp") private Date messageTimestamp; - public int getId() { - return id; - } + public int getId() { + return id; + } - public void setId(int id) { - this.id = id; - } + public void setId(int id) { + this.id = id; + } - public String getRequest() { - return request; - } + public String getRequest() { + return request; + } - public void setRequest(String request) { - this.request = request; - } + public void setRequest(String request) { + this.request = request; + } - public int getServicenameid() { - return servicenameid; - } + public int getServicenameid() { + return servicenameid; + } - public void setServicenameid(int servicenameid) { - this.servicenameid = servicenameid; - } + public void setServicenameid(int servicenameid) { + this.servicenameid = servicenameid; + } - public int getUserid() { - return userid; - } + public int getUserid() { + return userid; + } - public void setUserid(int userid) { - this.userid = userid; - } + public void setUserid(int userid) { + this.userid = userid; + } - public String getReference() { - return reference; - } + public String getReference() { + return reference; + } - public void setReference(String reference) { - this.reference = reference; - } + public void setReference(String reference) { + this.reference = reference; + } - public String getValue() { - return value; - } + public String getValue() { + return value; + } - public void setValue(String value) { - this.value = value; - } + public void setValue(String value) { + this.value = value; + } - public Date getMessageTimestamp() { - return messageTimestamp; - } + public Date getMessageTimestamp() { + return messageTimestamp; + } - public void setMessageTimestamp(Date messageTimestamp) { - this.messageTimestamp = messageTimestamp; - } + public void setMessageTimestamp(Date messageTimestamp) { + this.messageTimestamp = messageTimestamp; + } - public String getStatus() { - return status; - } + public String getStatus() { + return status; + } - public void setStatus(String status) { - this.status = status; - } + public void setStatus(String status) { + this.status = status; + } - public String getType() { - return type; - } + public String getType() { + return type; + } - public void setType(String type) { - this.type = type; - } + public void setType(String type) { + this.type = type; + } } \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index d80be281..de432d1d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -69,7 +69,7 @@ public Response makePayment( Returnable returnable = null; try { - returnable = handler.execute(requestDTO); + returnable = handler.execute(requestDTO); Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); return response; } catch (Exception ex) { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index b2a1db2b..2c5e45d0 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -39,6 +39,7 @@ import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.logging.LogFactory; +import org.json.JSONObject; import javax.annotation.Nonnull; import javax.ws.rs.core.Response; @@ -58,7 +59,7 @@ public class PaymentRefundRequestHandler extends AbstractRequestHandler li = new ArrayList<>(); + li.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, li, "msisdn", "tel:+" + tel, null, null); - valueObj = new AttributeValues(); - valueObj.setAttributedid(dis); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(jsonInString); - transactionId = paymentDAO.saveAttributeValue(valueObj); + String jsonString = null; - } catch (Exception ex) { - LOG.error("###REFUND### Error in processing save transaction. ", ex); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - throw ex; + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + String responseStatus = response.get(i).getStatus(); + String responseType = response.get(i).getType(); + String responseClientCorrelator; + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + + responseClientCorrelator = null; + + if (json.has("clientCorrelator")) { + responseClientCorrelator = json.get("clientCorrelator").toString(); + } + + responseReferenceCode = json.get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check client correlator + if ((responseClientCorrelator!=null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals("tel:+" + tel)) { + jsonString = json.toString(); + break; + } + } + + } } - return transactionId; + + return jsonString; + } - public void saveClientCorrelator(String endUserId, String clientCorrelator, String userName) throws Exception { - Integer ownerId = null; - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); - // did changed - String attributeName = AttributeName.clientCorrelatorPayment.toString(); - APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); - APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); - Attributes attributes = dao.getAttribute(attributeName); - AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), - attributes.getAttributeId()); - ownerId = transactionId; - - valueObj = new AttributeValues(); - valueObj.setAttributedid(dis); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(clientCorrelator); - dao.saveAttributeValue(valueObj); + //check reference code + private String checkReferenceCode(int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + String responseStatus = response.get(i).getStatus(); + String responseType = response.get(i).getType(); + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + responseReferenceCode = json.get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseReferenceCode.equals(referenceCode)) { + jsonString = responseReferenceCode; + break; + } + } + + } - } catch (Exception ex) { - LOG.error("###REFUND### Error in processing save insertion of clientCorrelator request. ", ex); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - throw ex; } + + return jsonString; + } + + // saving request in message log table + private MessageLog saveRequest(PaymentRefundRequestWrapperDTO extendedRequestDTO, + String endUserIdPath, APIServiceCalls apiServiceCalls, String jsonString, String status) throws Exception { + MessageLog messageLog = new MessageLog(); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setRequest(jsonString); + messageLog.setStatus(status); + messageLog.setType("request"); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + + return messageLog; + } + + + // New method to save Response in messageLog table + private void saveResponse(Integer userId, String endUserIdPath, PaymentRefundTransactionResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { + + String jsonInString = null; + Gson resp = new Gson(); + + JsonElement je = new JsonParser().parse(resp.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + + //setting messagelog responses + MessageLog messageLog1 = new MessageLog(); + messageLog1 = new MessageLog(); + messageLog1.setRequest(jsonInString); + messageLog1.setStatus(status); + messageLog1.setType("response"); + messageLog1.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog1.setUserid(userId); + messageLog1.setReference("msisdn"); + messageLog1.setValue(endUserIdPath); + messageLog1.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog1); } private static boolean currencySymbol(@Nonnull final String currencyCode) { @@ -472,33 +518,6 @@ private static boolean currencySymbol(@Nonnull final String currencyCode) { } } - public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.NUMBERS.toString().toLowerCase(); - String attributeName = AttributeName.referenceCodePayment.toString(); - APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); - APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallRefund); - Attributes attributes = dao.getAttribute(attributeName); - AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), - attributes.getAttributeId()); - ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); - Integer ownerId = manageNumber.getId(); - - valueObj = new AttributeValues(); - valueObj.setAttributedid(dis); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(referenceCode); - dao.saveAttributeValue(valueObj); - - } catch (Exception ex) { - LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - throw ex; - } - } - public boolean containsChannel(String channelValue) { for (Channel channel : Channel.values()) { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 62e5c41e..f325d3ca 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -42,6 +42,8 @@ import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.logging.LogFactory; +import org.json.JSONObject; + import javax.annotation.Nonnull; import javax.ws.rs.core.Response; @@ -52,7 +54,6 @@ public class PaymentRequestHandler extends AbstractRequestHandler { - private PaymentDAO paymentDAO; private LoggingDAO loggingDAO; private NumberDAO numberDAO; @@ -60,8 +61,8 @@ public class PaymentRequestHandler extends AbstractRequestHandler list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + String responseStatus = response.get(i).getStatus(); + String responseType = response.get(i).getType(); + String responseClientCorrelator; + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + responseClientCorrelator = null; + + if (json.has("clientCorrelator")) { + responseClientCorrelator = json.get("clientCorrelator").toString(); + } + + responseReferenceCode = json.get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check client correlator + if ((responseClientCorrelator!=null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals("tel:+" + tel)) { + jsonString = json.toString(); + break; + } + } + + } - } catch (Exception ex) { - LOG.error("###PAYMENT### Error in processing save transaction. ", ex); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - throw ex; } - return transactionId; + + return jsonString; } - public void saveClientCorrelator(String endUserId, String clientCorrelator) throws Exception { - Integer ownerId = null; - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); - String attributeName = AttributeName.clientCorrelatorPayment.toString(); - APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); - APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); - Attributes attributes = dao.getAttribute(attributeName); - AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), - attributes.getAttributeId()); - ownerId = transactionId; - - valueObj = new AttributeValues(); - valueObj.setAttributedid(dis); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(clientCorrelator); - dao.saveAttributeValue(valueObj); + //check reference code + private String checkReferenceCode(int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + + List li = new ArrayList<>(); + li.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, li, "msisdn", "tel:+" + tel, null, null); + + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + String responseStatus = response.get(i).getStatus(); + String responseType = response.get(i).getType(); + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + responseReferenceCode = json.get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseReferenceCode.equals(referenceCode)) { + jsonString = responseReferenceCode; + break; + } + } + + } - } catch (Exception ex) { - LOG.error("###PAYMENT### Error in processing save insertion of clientCorrelator request. ", ex); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - throw ex; } + + return jsonString; + } + + // saving request in message log table + private MessageLog saveRequest(ChargePaymentRequestWrapperDTO extendedRequestDTO, + String endUserIdPath, APIServiceCalls apiServiceCalls, String jsonString, String status) throws Exception { + + MessageLog messageLog = new MessageLog(); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setRequest(jsonString); + messageLog.setStatus(status); + messageLog.setType("0"); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + + return messageLog; + } + + // Save Response in messageLog table + private void saveResponse(ChargePaymentRequestWrapperDTO extendedRequestDTO, + String endUserIdPath, ChargePaymentResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { + + String jsonInString = null; + Gson resp = new Gson(); + + JsonElement je = new JsonParser().parse(resp.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + //setting messagelog responses + MessageLog messageLog1 = new MessageLog(); + messageLog1 = new MessageLog(); + messageLog1.setRequest(jsonInString); + messageLog1.setStatus(status); + messageLog1.setType("1"); + messageLog1.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog1.setUserid(extendedRequestDTO.getUser().getId()); + messageLog1.setReference("msisdn"); + messageLog1.setValue(endUserIdPath); + messageLog1.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog1); } private static boolean currencySymbol(@Nonnull final String currencyCode) { @@ -476,33 +523,6 @@ private static boolean currencySymbol(@Nonnull final String currencyCode) { return false; } } - //changes made - public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.NUMBERS.toString().toLowerCase(); - String attributeName = AttributeName.referenceCodePayment.toString(); - APITypes api = dao.getAPIType(RequestType.PAYMENT.toString()); - APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); - Attributes attributes = dao.getAttribute(attributeName); - AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), - attributes.getAttributeId()); - ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); - Integer ownerId = manageNumber.getId(); - - valueObj = new AttributeValues(); - valueObj.setAttributedid(dis); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(referenceCode); - dao.saveAttributeValue(valueObj); - - } catch (Exception ex) { - LOG.error("###PAYMENT### Error in processing save of referenceCode request. ", ex); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - throw ex; - } - } public boolean containsChannel(String channelValue) { for (Channel channel : Channel.values()) { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/MessageLogHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/MessageLogHandler.java index 759a5dc2..c4d5c19a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/MessageLogHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/MessageLogHandler.java @@ -18,7 +18,7 @@ public class MessageLogHandler { - + private Log log = LogFactory.getLog(MessageLogHandler.class); private ExecutorService executorService; private static MessageLogHandler instance; @@ -28,14 +28,14 @@ private MessageLogHandler() { executorService = Executors.newFixedThreadPool(10); dbservice = new HibernateLoggingDao(); } - + public synchronized static MessageLogHandler getInstance() { if (instance == null) { instance = new MessageLogHandler(); } return instance; } - + public void saveMessageLog(final int servicenameid, final int userid, final String reference, final String value, JSONObject obj) throws Exception { MessageLog messageLog = new MessageLog(); executorService.execute(new Runnable() { @@ -45,7 +45,7 @@ public void run() { obj.writeJSONString(out); String jsonString = out.toString(); log.debug("JSON Sting" + jsonString); - + messageLog.setServicenameid(servicenameid); messageLog.setUserid(userid); messageLog.setReference(reference); @@ -54,17 +54,16 @@ public void run() { messageLog.setMessageTimestamp(new Date()); log.debug("messagelog object has been created"); dbservice.saveMessageLog(messageLog); - + } catch (Exception e) { log.debug("error while inserting data into database", e); } } }); } - public List getMessageLogs(final int userid, final List serviceNameIds, final String reference, final String value, final Date startTimeStamp, final Date endTimeStamp) throws Exception { - + return dbservice.getMessageLogs(userid, serviceNameIds, reference, value, startTimeStamp, endTimeStamp); } From 28c3d4e4e61259ea0cf23f2fc3350cf8a6804a87 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Fri, 24 Feb 2017 13:59:59 +0530 Subject: [PATCH 042/112] added resource URL to payment api response --- .../custom/ChargePaymentResponseBean.java | 139 ++++++++++-------- .../payment/PaymentRefundRequestHandler.java | 39 +++-- .../payment/PaymentRequestHandler.java | 42 ++++-- 3 files changed, 127 insertions(+), 93 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java index 00160fca..064909ee 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargePaymentResponseBean.java @@ -1,12 +1,12 @@ /******************************************************************************* * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com) All Rights Reserved. - * + * * WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -18,88 +18,97 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; -@JsonInclude(value=Include.NON_NULL) +@JsonInclude(value = Include.NON_NULL) public class ChargePaymentResponseBean { - private String clientCorrelator; + private String clientCorrelator; - private String endUserId; - - private String originalReferenceCode; - - private String originalServerReferenceCode; - - private ChargeAmountResponse paymentAmount; + private String endUserId; - private String referenceCode; - - private String serverReferenceCode; + private String originalReferenceCode; - private String transactionOperationStatus; + private String originalServerReferenceCode; - public String getClientCorrelator() { - return clientCorrelator; - } + private ChargeAmountResponse paymentAmount; - public void setClientCorrelator(String clientCorrelator) { - this.clientCorrelator = clientCorrelator; - } + private String referenceCode; - public String getEndUserId() { - return endUserId; - } + private String serverReferenceCode; - public void setEndUserId(String endUserId) { - this.endUserId = endUserId; - } - - public String getOriginalReferenceCode() { - return originalReferenceCode; - } + private String resourceURL; - public void setOriginalReferenceCode(String originalReferenceCode) { - this.originalReferenceCode = originalReferenceCode; - } + private String transactionOperationStatus; - public String getOriginalServerReferenceCode() { - return originalServerReferenceCode; - } + public String getClientCorrelator() { + return clientCorrelator; + } - public void setOriginalServerReferenceCode(String originalServerReferenceCode) { - this.originalServerReferenceCode = originalServerReferenceCode; - } + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } - public String getReferenceCode() { - return referenceCode; - } + public String getEndUserId() { + return endUserId; + } + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } - public void setReferenceCode(String referenceCode) { - this.referenceCode = referenceCode; - } + public String getOriginalReferenceCode() { + return originalReferenceCode; + } - public String getServerReferenceCode() { - return serverReferenceCode; - } + public void setOriginalReferenceCode(String originalReferenceCode) { + this.originalReferenceCode = originalReferenceCode; + } - public void setServerReferenceCode(String serverReferenceCode) { - this.serverReferenceCode = serverReferenceCode; - } + public String getOriginalServerReferenceCode() { + return originalServerReferenceCode; + } - public String getTransactionOperationStatus() { - return transactionOperationStatus; - } + public void setOriginalServerReferenceCode(String originalServerReferenceCode) { + this.originalServerReferenceCode = originalServerReferenceCode; + } - public void setTransactionOperationStatus(String transactionOperationStatus) { - this.transactionOperationStatus = transactionOperationStatus; - } + public String getReferenceCode() { + return referenceCode; + } - public ChargeAmountResponse getPaymentAmount() { - return paymentAmount; - } - public void setPaymentAmount(ChargeAmountResponse paymentAmount) { - this.paymentAmount = paymentAmount; - } + public void setReferenceCode(String referenceCode) { + this.referenceCode = referenceCode; + } + public String getServerReferenceCode() { + return serverReferenceCode; + } + + public void setServerReferenceCode(String serverReferenceCode) { + this.serverReferenceCode = serverReferenceCode; + } + + public String getTransactionOperationStatus() { + return transactionOperationStatus; + } + + public void setTransactionOperationStatus(String transactionOperationStatus) { + this.transactionOperationStatus = transactionOperationStatus; + } + + public ChargeAmountResponse getPaymentAmount() { + return paymentAmount; + } + + public void setPaymentAmount(ChargeAmountResponse paymentAmount) { + this.paymentAmount = paymentAmount; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 2c5e45d0..8d0cb55f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -32,6 +32,7 @@ import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; @@ -48,7 +49,7 @@ import java.util.Date; import java.util.List; -public class PaymentRefundRequestHandler extends AbstractRequestHandler { +public class PaymentRefundRequestHandler extends AbstractRequestHandler implements RequestResponseRequestHandleable { private PaymentDAO paymentDAO; @@ -70,7 +71,6 @@ public class PaymentRefundRequestHandler extends AbstractRequestHandler li = new ArrayList<>(); - li.add(serviceNameId); - List response = loggingDAO.getMessageLogs(userId, li, "msisdn", "tel:+" + tel, null, null); + List list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); String jsonString = null; @@ -482,7 +475,6 @@ private MessageLog saveRequest(PaymentRefundRequestWrapperDTO extendedRequestDTO return messageLog; } - // New method to save Response in messageLog table private void saveResponse(Integer userId, String endUserIdPath, PaymentRefundTransactionResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { @@ -499,7 +491,7 @@ private void saveResponse(Integer userId, String endUserIdPath, PaymentRefundTra messageLog1 = new MessageLog(); messageLog1.setRequest(jsonInString); messageLog1.setStatus(status); - messageLog1.setType("response"); + messageLog1.setType("1"); messageLog1.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog1.setUserid(userId); messageLog1.setReference("msisdn"); @@ -529,4 +521,19 @@ public boolean containsChannel(String channelValue) { return false; } + @Override + public String getApiServiceCalls() { + return ServiceName.RefundUser.toString(); + } + + @Override + public String getJosonString(PaymentRefundRequestWrapperDTO requestDTO) { + Gson gson = new Gson(); + String jsonString = gson.toJson(requestDTO.getRefundRequestBean()); + return jsonString; } + + @Override + public String getnumber(PaymentRefundRequestWrapperDTO requestDTO) { + return requestDTO.getEndUserId(); + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index f325d3ca..9c87c5ae 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -35,6 +35,7 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; @@ -52,7 +53,7 @@ import java.util.Date; import java.util.List; -public class PaymentRequestHandler extends AbstractRequestHandler { +public class PaymentRequestHandler extends AbstractRequestHandler implements RequestResponseRequestHandleable { private PaymentDAO paymentDAO; private LoggingDAO loggingDAO; @@ -201,13 +202,6 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) try { - // Refactor is needed - MessageLog messageLog = saveRequest(extendedRequestDTO, endUserIdPath, apiServiceCalls, jsonString, "1"); - - int ref_number = loggingDAO.saveMessageLog(messageLog); - String serverReferenceCodeFormat = String.format("%06d", ref_number); - String serverReferenceCode = "PAYMENT_REF" + serverReferenceCodeFormat; - int serviceNameId = apiServiceCalls.getApiServiceCallId(); if (clientCorrelator != null) { @@ -328,7 +322,13 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) } responseBean.setReferenceCode(referenceCode); + responseBean.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); + + // Setting the serverReference Code + String serverReferenceCodeFormat = String.format("%06d", getReferenceNumber()); + String serverReferenceCode = "PAYMENT_REF" + serverReferenceCodeFormat; responseBean.setServerReferenceCode(serverReferenceCode); + responseBean.setTransactionOperationStatus(transactionOperationStatus); ManageNumber manageNumber = numberDAO.getNumber(endUserId, @@ -346,7 +346,6 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) "Denied : Account balance insufficient to charge request")); return responseWrapper; } - // set transaction operation status as refused else if (transactionStatusValue != null) { String transactionStatus = transactionStatusValue.getValue(); @@ -375,6 +374,7 @@ else if (transactionStatusValue != null) { saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, "1"); } catch (Exception ex) { + // TODO: save failed messages in message log table saveRequest(extendedRequestDTO, endUserIdPath, apiServiceCalls, jsonString, "0"); saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, "0"); LOG.error("###PAYMENT### Error Occured in PAYMENT Service. ", ex); @@ -435,9 +435,9 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI //check reference code private String checkReferenceCode(int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { - List li = new ArrayList<>(); - li.add(serviceNameId); - List response = loggingDAO.getMessageLogs(userId, li, "msisdn", "tel:+" + tel, null, null); + List list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); String jsonString = null; @@ -532,4 +532,22 @@ public boolean containsChannel(String channelValue) { } return false; } + + @Override + public String getApiServiceCalls() { + return ServiceName.ChargeUser.toString(); + + } + + @Override + public String getJosonString(ChargePaymentRequestWrapperDTO requestDTO) { + Gson gson = new Gson(); + String jsonString = gson.toJson(requestDTO.getPaymentRefundTransactionRequestBean()); + return jsonString; + } + + @Override + public String getnumber(ChargePaymentRequestWrapperDTO requestDTO) { + return requestDTO.getEndUserId(); + } } From 98715d46a02eb81f62ea087c24af8a64b539bf05 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Fri, 24 Feb 2017 14:06:12 +0530 Subject: [PATCH 043/112] made transactionOperationStatus attribute mandatory in refund api --- .../servicefactory/payment/PaymentRefundRequestHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 8d0cb55f..e28c0d3b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -139,7 +139,7 @@ protected boolean validate(PaymentRefundRequestWrapperDTO wrapperDTO) throws Exc } validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "referenceCode", referenceCode)); - validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "transactionOperationStatus", transactionOperationStatus)); ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; From 318effccfd853814e6aff829642448363b48c598 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Fri, 24 Feb 2017 17:09:35 +0530 Subject: [PATCH 044/112] refactor PaymentRequestHandler v2 --- .../servicefactory/payment/PaymentRefundRequestHandler.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index e28c0d3b..2f34200e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -187,7 +187,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) // Attribute Name Used in wallet String accountCurrencyAttribute = AttributeName.Currency.toString().toLowerCase(); String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); -// String userName = extendedRequestDTO.getUser().getUserName(); Integer userId = extendedRequestDTO.getUser().getId(); PaymentRefundTransactionResponseBean responseBean = new PaymentRefundTransactionResponseBean(); @@ -226,7 +225,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) } //check referenceCode - String result = checkReferenceCode(userId, serviceNameId, endUserId, "1", "response", referenceCode); + String result = checkReferenceCode(userId, serviceNameId, endUserId, "1", "1", referenceCode); if((result!=null)){ LOG.error("###PAYMENT### Already charged for this reference code"); From 3182420326907d7554a5d23abbd3585c3ff142b8 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Mon, 27 Feb 2017 19:34:24 +0530 Subject: [PATCH 045/112] WIP refund check with originalServerReferenceCode --- .../payment/PaymentRefundRequestHandler.java | 142 +++++++++++++++--- 1 file changed, 124 insertions(+), 18 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 2f34200e..93ba307c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -61,6 +61,7 @@ public class PaymentRefundRequestHandler extends AbstractRequestHandler list = new ArrayList<>(); + list.add(serviceNameId); + List servercodeList = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + + // remove + APITypes apiTypes = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallRefund); + + int refundId = apiServiceCalls.getApiServiceCallId(); + List list1 = new ArrayList<>(); + list1.add(refundId); + + List originalServerReferenceCodeList = loggingDAO.getMessageLogs(userId, list1, "msisdn", "tel:+" + tel, null, null); + + Double paymentAmount = 0.0; + Double totalAmountRefunded = 0.0; + + for (int i = 0; i < servercodeList.size(); i++) { + + if (servercodeList != null) { + + String responseStatus = servercodeList.get(i).getStatus(); + String responseType = servercodeList.get(i).getType(); + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = servercodeList.get(i).getRequest(); + JSONObject json = new JSONObject(request); + String serverReferenceCode = json.get("serverReferenceCode").toString(); + + int responseUserId = servercodeList.get(i).getUserid(); + String responseTel = servercodeList.get(i).getValue(); + + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && serverReferenceCode.equals(originalServerReferenceCode)) { + isOriginalServerReferenceCode = true; + paymentAmount = Double.valueOf(json.getJSONObject("paymentAmount").get("totalAmountCharged").toString()); + } + } + + } + + } + + if (isOriginalServerReferenceCode == true) { + + for (int i = 0; i< originalServerReferenceCodeList.size(); i++) { + + if (originalServerReferenceCodeList != null) { + + String responseStatus = originalServerReferenceCodeList.get(i).getStatus(); + String responseType = originalServerReferenceCodeList.get(i).getType(); + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = originalServerReferenceCodeList.get(i).getRequest(); + JSONObject json = new JSONObject(request); + String responseOriginalServerReferenceCode = json.get("originalServerReferenceCode").toString(); + + int responseUserId = originalServerReferenceCodeList.get(i).getUserid(); + String responseTel = originalServerReferenceCodeList.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseOriginalServerReferenceCode.equals(originalServerReferenceCode)) { + totalAmountRefunded += Double.valueOf(json.getJSONObject("paymentAmount").get("totalAmountRefunded").toString()); + } + } + + } + + } + + } + return (paymentAmount-totalAmountRefunded); + } + + // saving request in message log table private MessageLog saveRequest(PaymentRefundRequestWrapperDTO extendedRequestDTO, String endUserIdPath, APIServiceCalls apiServiceCalls, String jsonString, String status) throws Exception { @@ -466,7 +572,7 @@ private MessageLog saveRequest(PaymentRefundRequestWrapperDTO extendedRequestDTO messageLog.setValue(endUserIdPath); messageLog.setRequest(jsonString); messageLog.setStatus(status); - messageLog.setType("request"); + messageLog.setType("0"); messageLog.setMessageTimestamp(new Date()); loggingDAO.saveMessageLog(messageLog); From 3e591574e04aca949fb0d327acc9d3cad0d5ea13 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Mon, 27 Feb 2017 11:19:23 +0530 Subject: [PATCH 046/112] HUBDEV-1444 Charge and Refund calls validation --- .../services/dep/sandbox/service/PaymentService.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index de432d1d..abd4e643 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -80,7 +80,7 @@ public Response makePayment( return response; } - } else { + } else if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Refunded")){ PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); requestDTO.setHttpRequest(request); @@ -102,6 +102,12 @@ public Response makePayment( .build(); return response; } + }else { + + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " transactionOperationStatus should be Charged/Refunded") + .build(); + return response; } } From 5cc3fa777e2b21109ea3c4cab84961a891d9280b Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Tue, 28 Feb 2017 09:16:39 +0530 Subject: [PATCH 047/112] Modify PatialRefund API --- .../credit/PatialRefundRequestHandler.java | 807 +++++++++--------- 1 file changed, 403 insertions(+), 404 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index f3dceb30..0fc429f4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -15,7 +15,6 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.credit; -import java.io.StringWriter; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -32,6 +31,7 @@ import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.*; import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.logging.LogFactory; @@ -48,416 +48,415 @@ import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; -public class PatialRefundRequestHandler extends AbstractRequestHandler { - - private NumberDAO numberDao; - private CreditDAO creditDAO; - private MessageLogHandler logHandler; - private PatialRefundRequestWrapper requestWrapperDTO; - private PatialRefundResponseWrapper responseWrapperDTO; - private Integer correlatorid; +public class PatialRefundRequestHandler extends AbstractRequestHandler implements RequestResponseRequestHandleable { + + final String REFUND_AMOUNT = "refundAmount"; + final String MSISDN = "msisdn"; + final String CLIENTCORRELATOR = "clientCorrelator"; + final String REASON = "reasonForRefund"; + final String REFERENCE = "originalServerReferenceCode"; + final String REFERENCE_CODE = "referenceCode"; + final String PAYMENT_AMOUNT = "paymentAmount"; + final String CHANGING_INFO = "chargingInformation"; + final String CHARGING_META_DATA = "chargingMetaData"; + final String REFUND_REQUEST = "refundRequest"; + final String ON_BEHALF_OF = "onBehalfOf"; + final String CATEGORY_CODE="categoryCode"; + final String CHANNEL = "channel"; + final String TAX_AMOUNT = "taxAmount"; + + private NumberDAO numberDao; + private CreditDAO creditDAO; + private MessageLogHandler logHandler; + private PatialRefundRequestWrapper requestWrapperDTO; + private PatialRefundResponseWrapper responseWrapperDTO; + private Integer correlatorid; private LoggingDAO loggingDao; - final String REFUND_AMOUNT = "refundAmount"; - final String MSISDN = "msisdn"; - final String CLIENTCORRELATOR = "clientCorrelator"; - final String REASON = "reasonForRefund"; - final String REFERENCE = "originalServerReferenceCode"; - final String REFERENCE_CODE = "referenceCode"; - final String PAYMENT_AMOUNT = "paymentAmount"; - final String CHANGING_INFO = "chargingInformation"; - final String CHARGING_META_DATA = "chargingMetaData"; - final String REFUND_REQUEST = "refundRequest"; - - { - LOG = LogFactory.getLog(PatialRefundRequestHandler.class); + private String responseReferenceCode; + + + { + LOG = LogFactory.getLog(PatialRefundRequestHandler.class); loggingDao = DaoFactory.getLoggingDAO(); - numberDao = DaoFactory.getNumberDAO(); - creditDAO = DaoFactory.getCreditDAO(); - dao = DaoFactory.getGenaricDAO(); - logHandler = MessageLogHandler.getInstance(); - } - - @Override - protected Returnable getResponseDTO() { - return responseWrapperDTO; - } - - @Override - protected List getAddress() { - List address = new ArrayList(); - address.add(requestWrapperDTO.getMsisdn()); - return address; - } - - @Override - protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Exception { - - RefundRequestBean requestBean = wrapperDTO.getRefundRequestBean(); - RefundRequest request = requestBean.getRefundRequest(); - PaymentAmountWithTax paymentAmountWithTax = request.getPaymentAmount(); - ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); - ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); - - if (requestBean != null && request != null) { - - double amount = request.getRefundAmount(); - String msisdn = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getMsisdn()); - String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); - String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); - String originalServerReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); - - String serverTransactionReference = CommonUtil - .getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); - String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); - String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); - String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); - String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTax()); - String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); - - - try { - ValidationRule[] validationRules = { - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_DOUBLE_GT_ZERO, "refundAmount", - amount), - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, "msisdn", - msisdn), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", - clientCorrelator), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "originalServerReferenceCode", - originalServerReferenceCode), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "reasonForRefund", - reasonForRefund), - new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "serverTransactionReference", - serverTransactionReference), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "onBehalfOf", onBehalfOf), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "categoryCode", categoryCode), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "channel", channel), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL,"taxAmount",taxAmount), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL,"referenceCode",referenceCode) - - }; - - Validation.checkRequestParams(validationRules); - } catch (CustomException ex) { - LOG.error("###CREDIT### Error in Validation : " + ex); - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), - ex.getErrmsg(), wrapperDTO.getMsisdn())); - responseWrapperDTO.setHttpStatus(javax.ws.rs.core.Response.Status.BAD_REQUEST); - } - return true; - } else { - responseWrapperDTO.setRequestError( - constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE.getCode(), - ServiceError.INVALID_INPUT_VALUE.getMessage(), wrapperDTO.getMsisdn())); - responseWrapperDTO.setHttpStatus(javax.ws.rs.core.Response.Status.BAD_REQUEST); - } - return false; - } - - @Override - protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) throws Exception { - - if (responseWrapperDTO.getRequestError() != null) { - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - return responseWrapperDTO; - } - - RefundRequestBean requestBean = extendedRequestDTO.getRefundRequestBean(); - RefundRequest request = requestBean.getRefundRequest(); - PaymentAmountWithTax paymentAmountWithTax = request.getPaymentAmount(); - ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); - ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); - APITypes apiType = dao.getAPIType(RequestType.CREDIT.toString().toLowerCase()); - APIServiceCalls serviceType = dao.getServiceCall(apiType.getId(), ServiceName.PartialRefund.toString()); - JSONObject obj = buildJSONObject(request); - logHandler.saveMessageLog(serviceType.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), MSISDN, extendedRequestDTO.getMsisdn(), obj); - - - double amount = request.getRefundAmount(); - String msisdn = CommonUtil.getNullOrTrimmedValue(extendedRequestDTO.getMsisdn()); - String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); - String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); - String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMsisdn()); - String serverTransactionReference = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); - String userName = extendedRequestDTO.getUser().getUserName(); - String serviceCreditApply = ServiceName.PartialRefund.toString(); - String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); - String referenceCode = CommonUtil.getNullOrTrimmedValue(String.valueOf(request.getReferenceCode())); - String endUserID = getLastMobileNumber(extendedRequestDTO.getMsisdn()); - - StringWriter out = new StringWriter(); - obj.writeJSONString(out); - String jsonString = out.toString(); - - MessageLog messageLog = new MessageLog(); - messageLog.setServicenameid(serviceType.getApiServiceCallId()); - messageLog.setUserid(extendedRequestDTO.getUser().getId()); - messageLog.setReference(MSISDN); - messageLog.setValue(extendedRequestDTO.getMsisdn()); - messageLog.setRequest(jsonString); - messageLog.setMessageTimestamp(new Date()); - - //Genarate server reference number. - int ref_number = loggingDao.saveMessageLog(messageLog); - String serverReferenceCode = String.format("%06d",ref_number ); - - try { - - String clientCorrelatorAttribute = AttributeName.clientCorrelator.toString(); - Integer userId = extendedRequestDTO.getUser().getId(); - //Null check for client correlator. - if(clientCorrelator != null){ - AttributeValues duplicateClientCorrelator = creditDAO.checkDuplication(userId, serviceCreditApply, clientCorrelator, clientCorrelatorAttribute); - - if(duplicateClientCorrelator != null){ - Integer ownerId = duplicateClientCorrelator.getOwnerdid(); - ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); - if(ownerId == manageNumber.getId()){ - //send the already sent response - AttributeValues partialRefundResponse = creditDAO.getTransactionValue(endUserID,duplicateClientCorrelator.getAttributeValueId() ,AttributeName.patialRefund.toString(),ServiceName.PartialRefund.toString()); - RefundResponseBean bean = new RefundResponseBean(); - - ObjectMapper mapper = new ObjectMapper(); - String responseString = partialRefundResponse.getValue(); - RefundResponse res = mapper.readValue(responseString, RefundResponse.class); - bean.setRefundResponse(res); - responseWrapperDTO.setRefundResponseBean(bean); - responseWrapperDTO.setHttpStatus(Response.Status.OK); - return responseWrapperDTO; - }else{ - buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, - serverTransactionReference, OperationStatus.Refunded.toString(),referenceCode,serverReferenceCode,chargingInformation,metadata ); - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Clientcorrelator is already used for different msisdn")); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - return responseWrapperDTO; - } - } - } - - //Check channel. - if (channel != null && !containsChannel(channel)) { - LOG.error("###WALLET### Valid channel doesn't exists for the given inputs"); - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Valid channel doesn't exists for the given inputs")); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - return responseWrapperDTO; - } - - //Save reference code. - String referenceCodeAttribute = AttributeName.referenceCodeCredit.toString(); - AttributeValues value = creditDAO.checkDuplication(userId, serviceCreditApply, referenceCode, referenceCodeAttribute); - if(value != null){ - buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, - serverTransactionReference, OperationStatus.Refunded.toString(),referenceCode,serverReferenceCode,chargingInformation,metadata ); + numberDao = DaoFactory.getNumberDAO(); + creditDAO = DaoFactory.getCreditDAO(); + dao = DaoFactory.getGenaricDAO(); + logHandler = MessageLogHandler.getInstance(); + } + + @Override + protected Returnable getResponseDTO() { + return responseWrapperDTO; + } + + @Override + protected List getAddress() { + List address = new ArrayList(); + address.add(requestWrapperDTO.getMsisdn()); + return address; + } + + @Override + protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Exception { + + RefundRequestBean requestBean = wrapperDTO.getRefundRequestBean(); + RefundRequest request = requestBean.getRefundRequest(); + PaymentAmountWithTax paymentAmountWithTax = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); + ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); + + if (requestBean != null && request != null) { + + double amount = request.getRefundAmount(); + String msisdn = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getMsisdn()); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); + String originalServerReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); + String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTax()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); + + + try { + ValidationRule[] validationRules = { + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_DOUBLE_GT_ZERO, REFUND_AMOUNT, amount), + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, MSISDN, msisdn), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, CLIENTCORRELATOR, clientCorrelator), + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, REFERENCE, originalServerReferenceCode), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, REASON, reasonForRefund), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, ON_BEHALF_OF, onBehalfOf), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, CATEGORY_CODE, categoryCode), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, CHANNEL, channel), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL_DOUBLE_GE_ZERO, TAX_AMOUNT, taxAmount), + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, REFERENCE_CODE, referenceCode) + + }; + + Validation.checkRequestParams(validationRules); + } catch (CustomException ex) { + LOG.error("###CREDIT### Error in Validation : " + ex); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), + ex.getErrmsg(), wrapperDTO.getMsisdn())); + responseWrapperDTO.setHttpStatus(javax.ws.rs.core.Response.Status.BAD_REQUEST); + } + return true; + } else { + responseWrapperDTO.setRequestError( + constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE.getCode(), + ServiceError.INVALID_INPUT_VALUE.getMessage(), wrapperDTO.getMsisdn())); + responseWrapperDTO.setHttpStatus(javax.ws.rs.core.Response.Status.BAD_REQUEST); + } + return false; + } + + @Override + protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) throws Exception { + + if (responseWrapperDTO.getRequestError() != null) { + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } + + RefundRequestBean requestBean = extendedRequestDTO.getRefundRequestBean(); + RefundRequest request = requestBean.getRefundRequest(); + PaymentAmountWithTax paymentAmountWithTax = request.getPaymentAmount(); + ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); + ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); + APITypes apiType = dao.getAPIType(RequestType.CREDIT.toString().toLowerCase()); + APIServiceCalls serviceType = dao.getServiceCall(apiType.getId(), ServiceName.PartialRefund.toString()); + JSONObject obj = buildJSONObject(request); + + + double amount = request.getRefundAmount(); + String msisdn = CommonUtil.getNullOrTrimmedValue(extendedRequestDTO.getMsisdn()); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); + String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMsisdn()); + String serverTransactionReference = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + String userName = extendedRequestDTO.getUser().getUserName(); + String serviceCreditApply = ServiceName.PartialRefund.toString(); + String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); + String referenceCode = CommonUtil.getNullOrTrimmedValue(String.valueOf(request.getReferenceCode())); + String endUserID = getLastMobileNumber(extendedRequestDTO.getMsisdn()); + + + String serverReferenceCodeFormat = String.format("%06d", getReferenceNumber()); + String serverReferenceCode = "PAYMENT_REF" + serverReferenceCodeFormat; + // Save Request Log + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCreditApply); + + try { + + Integer userId = extendedRequestDTO.getUser().getId(); + int serviceNameId = apiServiceCalls.getApiServiceCallId(); + + if (clientCorrelator != null) { + + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserID, "1", "1", referenceCode); + + if (response != null) { + RefundResponseBean bean = new RefundResponseBean(); + org.json.JSONObject json = new org.json.JSONObject(response); + String jasonString = json.getJSONObject("refundResponse").toString(); + ObjectMapper mapper = new ObjectMapper(); + RefundResponse res = mapper.readValue(jasonString, RefundResponse.class); + bean.setRefundResponse(res); + responseWrapperDTO.setRefundResponseBean(bean); + responseWrapperDTO.setHttpStatus(Response.Status.OK); + return responseWrapperDTO; + } + + } + + String result = checkReferenceCode(userId, serviceNameId, endUserID, "1", "1", referenceCode); + + if ((result != null)) { + LOG.error("###CREDIT### Already charged for this reference code"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Already used reference code")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapperDTO; + } + + //Check channel. + if (channel != null && !containsChannel(channel)) { + LOG.error("###CREDIT### Valid channel doesn't exists for the given inputs"); responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Already used reference code for the request")); + ServiceError.INVALID_INPUT_VALUE, "Valid channel doesn't exists for the given inputs")); responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; - }else{ - saveReferenceCode(endUserID, referenceCode, userName); } - ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); - if (manageNumber != null) { - updateBalance(manageNumber, amount); - RefundResponseBean responseBean = buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, - serverTransactionReference, OperationStatus.Refunded.toString(),referenceCode,serverReferenceCode,chargingInformation,metadata ); - if(clientCorrelator != null){ - correlatorid = saveClientCorrelator(endUserID, clientCorrelator, userName); - saveTransaction(responseBean); - } - - responseWrapperDTO.setHttpStatus(Response.Status.OK); - return responseWrapperDTO; - } else { - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Number is not Registered for the Service")); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - return responseWrapperDTO; - } - - } catch (Exception ex) { - LOG.error("###CREDIT### Error in processing credit service request. ", ex); - responseWrapperDTO - .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - return responseWrapperDTO; - } - - } - @Override - protected void init(PatialRefundRequestWrapper extendedRequestDTO) throws Exception { - requestWrapperDTO = extendedRequestDTO; - responseWrapperDTO = new PatialRefundResponseWrapper(); - } - - private void updateBalance(ManageNumber manageNumber, double amount) throws Exception { - - double newBalance = manageNumber.getBalance() + amount; - manageNumber.setBalance(newBalance); - numberDao.saveManageNumbers(manageNumber); - } - - private RefundResponseBean buildJsonResponseBody(double amount, String clientCorrelator, String merchantIdentification, - String reason, String serverTransactionReference,String operationStatus, String referenceCode, String serverReferenceCode, ChargingInformation chargingInformation, ChargingMetaDataWithTax chargingMetaDataWithTax) { - - PaymentAmountWithTax paymentAmountWithTax = new PaymentAmountWithTax(); - paymentAmountWithTax.setChargingInformation(chargingInformation); - paymentAmountWithTax.setChargingMetaData(chargingMetaDataWithTax); - - RefundResponse refundResponse = new RefundResponse(); - refundResponse.setRefundAmount(amount); - refundResponse.setOriginalServerReferenceCode(serverTransactionReference); - refundResponse.setClientCorrelator(clientCorrelator); - refundResponse.setEndUserID(merchantIdentification); - refundResponse.setReasonForRefund(reason); - refundResponse.setPaymentAmount(paymentAmountWithTax); - refundResponse.setReferenceCode(referenceCode); - refundResponse.setServerReferanceCode(serverReferenceCode); - refundResponse.setResourceURL(CommonUtil.getResourceUrl(requestWrapperDTO)); - refundResponse.setTransactionOperationStatus(operationStatus); - RefundResponseBean refundResponseBean = new RefundResponseBean(); - refundResponseBean.setRefundResponse(refundResponse); - responseWrapperDTO.setRefundResponseBean(refundResponseBean); - return refundResponseBean; - - } - - @SuppressWarnings("unchecked") - private JSONObject buildJSONObject(RefundRequest request){ - - JSONObject obj = new JSONObject(); - JSONObject refundRequest = new JSONObject(); - JSONObject payment = new JSONObject(); - - payment.put(CHANGING_INFO, request.getPaymentAmount().getChargingInformation()); - payment.put(CHARGING_META_DATA, request.getPaymentAmount().getChargingMetaData()); - - refundRequest.put(CLIENTCORRELATOR, request.getClientCorrelator()); - refundRequest.put(MSISDN, request.getMsisdn()); - refundRequest.put(REFERENCE,request.getOriginalServerReferenceCode()); - refundRequest.put(REASON, request.getReasonForRefund()); - refundRequest.put(REFUND_AMOUNT, request.getRefundAmount()); - refundRequest.put(PAYMENT_AMOUNT, payment); - refundRequest.put(REFERENCE_CODE,request.getReferenceCode()); - - obj.put(REFUND_REQUEST, refundRequest); - return obj; - } - - - public Integer saveClientCorrelator(String endUserId, String correlator, String userName) throws Exception { - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.NUMBERS.toString().toLowerCase(); - String attributeName = AttributeName.clientCorrelator.toString(); - String apiType = RequestType.CREDIT.toString(); - String serviceCallApplyCredit = ServiceName.PartialRefund.toString(); - APITypes api = dao.getAPIType(apiType); - APIServiceCalls serviceCall = dao.getServiceCall(api.getId(), serviceCallApplyCredit); - Attributes attribute = dao.getAttribute(attributeName); - AttributeDistribution distribution = dao.getAttributeDistribution(serviceCall.getApiServiceCallId(), attribute.getAttributeId()); - ManageNumber manageNumber = numberDao.getNumber(endUserId, userName); - Integer ownerId = manageNumber.getId(); - - valueObj = new AttributeValues(); - valueObj.setAttributedid(distribution); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(correlator); - correlatorid = creditDAO.saveAttributeValue(valueObj); - - } catch (Exception ex) { - LOG.error("###PATIAL_REFUND_CREDIT### Error in processing save of clientCorrelator request. ", ex); - responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); - throw ex; - } - return correlatorid; - } - - - public boolean containsChannel(String channelValue) { - - for (Channel channel : Channel.values()) { - if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { - return true; - } - } - - return false; - } - - - - public void saveTransaction(RefundResponseBean responseBean) - throws Exception { - - AttributeDistribution distributionId = null; - Integer ownerId = null; - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); - String attributeName = AttributeName.patialRefund.toString(); - String apiType = RequestType.CREDIT.toString(); - String serviceCallApplyCredit = ServiceName.PartialRefund.toString(); - APITypes api = dao.getAPIType(apiType); - APIServiceCalls serviceCall = dao.getServiceCall(api.getId(), serviceCallApplyCredit); - Attributes attribute = dao.getAttribute(attributeName); - AttributeDistribution distribution = dao.getAttributeDistribution(serviceCall.getApiServiceCallId(), attribute.getAttributeId()); - ownerId = correlatorid; - - Gson gson = new Gson(); - JsonElement je =new JsonParser().parse(gson.toJson(responseBean)); - JsonObject asJsonObject = je.getAsJsonObject(); - JsonElement get = asJsonObject.get("refundResponse"); - JsonObject asJsonObjectPayment = get.getAsJsonObject(); - String jsonString = null; - jsonString = gson.toJson(asJsonObjectPayment); - - valueObj = new AttributeValues(); - valueObj.setAttributedid(distribution); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(jsonString); - dao.saveAttributeValue(valueObj); - - } catch (Exception ex) { - LOG.error("###PARTIAL_REFUND### Error in processing save transaction. ", ex); - responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); - throw ex; - } - } - - - - public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.NUMBERS.toString().toLowerCase(); - String attributeName = AttributeName.referenceCodeCredit.toString(); - String apiType = RequestType.CREDIT.toString(); - String serviceCallApplyCredit = ServiceName.PartialRefund.toString(); - APITypes api = dao.getAPIType(apiType); - APIServiceCalls serviceCall = dao.getServiceCall(api.getId(), serviceCallApplyCredit); - Attributes attribute = dao.getAttribute(attributeName); - AttributeDistribution distribution = dao.getAttributeDistribution(serviceCall.getApiServiceCallId(), attribute.getAttributeId()); - ManageNumber manageNumber = numberDao.getNumber(endUserId, userName); - Integer ownerId = manageNumber.getId(); - - valueObj = new AttributeValues(); - valueObj.setAttributedid(distribution); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(referenceCode); - dao.saveAttributeValue(valueObj); - - } catch (Exception ex) { - LOG.error("###CREDIT### Error in processing save of referenceCode request. ", ex); - responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); - throw ex; - } - } + ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); + if (manageNumber != null) { + updateBalance(manageNumber, amount); + RefundResponseBean responseBean = buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata); + + + saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, "1"); + responseWrapperDTO.setHttpStatus(Response.Status.OK); + return responseWrapperDTO; + } else { + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Number is not Registered for the Service")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } + + } catch (Exception ex) { + RefundResponseBean responseBean = buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata); + saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, "0"); + LOG.error("###CREDIT### Error in processing credit service request. ", ex); + responseWrapperDTO + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } + + } + + @Override + protected void init(PatialRefundRequestWrapper extendedRequestDTO) throws Exception { + requestWrapperDTO = extendedRequestDTO; + responseWrapperDTO = new PatialRefundResponseWrapper(); + } + + private void updateBalance(ManageNumber manageNumber, double amount) throws Exception { + + double newBalance = manageNumber.getBalance() + amount; + manageNumber.setBalance(newBalance); + numberDao.saveManageNumbers(manageNumber); + } + + private RefundResponseBean buildJsonResponseBody(double amount, String clientCorrelator, String merchantIdentification, + String reason, String serverTransactionReference, String operationStatus, String referenceCode, String serverReferenceCode, ChargingInformation chargingInformation, ChargingMetaDataWithTax chargingMetaDataWithTax) { + + PaymentAmountWithTax paymentAmountWithTax = new PaymentAmountWithTax(); + paymentAmountWithTax.setChargingInformation(chargingInformation); + paymentAmountWithTax.setChargingMetaData(chargingMetaDataWithTax); + + RefundResponse refundResponse = new RefundResponse(); + refundResponse.setRefundAmount(amount); + refundResponse.setOriginalServerReferenceCode(serverTransactionReference); + refundResponse.setClientCorrelator(clientCorrelator); + refundResponse.setEndUserID(merchantIdentification); + refundResponse.setReasonForRefund(reason); + refundResponse.setPaymentAmount(paymentAmountWithTax); + refundResponse.setReferenceCode(referenceCode); + refundResponse.setServerReferanceCode(serverReferenceCode); + refundResponse.setResourceURL(CommonUtil.getResourceUrl(requestWrapperDTO)); + refundResponse.setTransactionOperationStatus(operationStatus); + RefundResponseBean refundResponseBean = new RefundResponseBean(); + refundResponseBean.setRefundResponse(refundResponse); + responseWrapperDTO.setRefundResponseBean(refundResponseBean); + return refundResponseBean; + + } + + @SuppressWarnings("unchecked") + private JSONObject buildJSONObject(RefundRequest request) { + + JSONObject obj = new JSONObject(); + JSONObject refundRequest = new JSONObject(); + JSONObject payment = new JSONObject(); + + payment.put(CHANGING_INFO, request.getPaymentAmount().getChargingInformation()); + payment.put(CHARGING_META_DATA, request.getPaymentAmount().getChargingMetaData()); + + refundRequest.put(CLIENTCORRELATOR, request.getClientCorrelator()); + refundRequest.put(MSISDN, request.getMsisdn()); + refundRequest.put(REFERENCE, request.getOriginalServerReferenceCode()); + refundRequest.put(REASON, request.getReasonForRefund()); + refundRequest.put(REFUND_AMOUNT, request.getRefundAmount()); + refundRequest.put(PAYMENT_AMOUNT, payment); + refundRequest.put(REFERENCE_CODE, request.getReferenceCode()); + + obj.put(REFUND_REQUEST, refundRequest); + return obj; + } + + + public boolean containsChannel(String channelValue) { + + for (Channel channel : Channel.values()) { + if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { + return true; + } + } + + return false; + } + + // Check already existing clientcorrelator return response body + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + String responseStatus = response.get(i).getStatus(); + String responseType = response.get(i).getType(); + String responseClientCorrelator; + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = response.get(i).getRequest(); + org.json.JSONObject json = new org.json.JSONObject(request); + responseClientCorrelator = null; + + if (json.getJSONObject("refundResponse").has("clientCorrelator")) { + responseClientCorrelator = json.getJSONObject("refundResponse").get("clientCorrelator").toString(); + } + + // responseReferenceCode = json.getJSONObject("refundResponse").get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check client correlator + if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals("tel:+" + tel)) { + jsonString = json.toString(); + break; + } + } + + } + + } + + return jsonString; + } + + //check reference code + private String checkReferenceCode(int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + String responseStatus = response.get(i).getStatus(); + String responseType = response.get(i).getType(); + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = response.get(i).getRequest(); + org.json.JSONObject json = new org.json.JSONObject(request); + responseReferenceCode = json.getJSONObject("refundResponse").get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseReferenceCode.equals(referenceCode)) { + jsonString = responseReferenceCode; + break; + } + } + + } + } + + return jsonString; + } + + // Save Response in messageLog table + private void saveResponse(PatialRefundRequestWrapper extendedRequestDTO, + String endUserIdPath, RefundResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { + + String jsonInString = null; + Gson resp = new Gson(); + + JsonElement je = new JsonParser().parse(resp.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + //setting messagelog responses + MessageLog messageLog1 = new MessageLog(); + messageLog1 = new MessageLog(); + messageLog1.setRequest(jsonInString); + messageLog1.setStatus(status); + messageLog1.setType("1"); + messageLog1.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog1.setUserid(extendedRequestDTO.getUser().getId()); + messageLog1.setReference("msisdn"); + messageLog1.setValue(endUserIdPath); + messageLog1.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog1); + } + + + @Override + public String getApiServiceCalls() { + return ServiceName.PartialRefund.toString(); + } + + @Override + public String getJosonString(PatialRefundRequestWrapper requestDTO) { + Gson gson = new Gson(); + String jasonString = gson.toJson(requestDTO.getRefundRequestBean()); + return jasonString; + } + + @Override + public String getnumber(PatialRefundRequestWrapper requestDTO) { + return requestDTO.getMsisdn(); + } } From 40040d4f878c130c8230fd32dcc437bc2f30873e Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 28 Feb 2017 14:33:03 +0530 Subject: [PATCH 048/112] check partial Refund payments --- .../payment/PaymentRefundRequestHandler.java | 62 ++++++++++++++++--- 1 file changed, 54 insertions(+), 8 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 93ba307c..0e85aafa 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -62,6 +62,7 @@ public class PaymentRefundRequestHandler extends AbstractRequestHandler originalServerReferenceCodeList = loggingDAO.getMessageLogs(userId, list1, "msisdn", "tel:+" + tel, null, null); Double paymentAmount = 0.0; - Double totalAmountRefunded = 0.0; + for (int i = 0; i < servercodeList.size(); i++) { @@ -522,7 +536,7 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s if (responseUserId == userId && responseTel.equals("tel:+" + tel) && serverReferenceCode.equals(originalServerReferenceCode)) { isOriginalServerReferenceCode = true; - paymentAmount = Double.valueOf(json.getJSONObject("paymentAmount").get("totalAmountCharged").toString()); + paymentAmount = Double.valueOf(json.getJSONObject("paymentAmount").getJSONObject("chargingInformation").get("amount").toString()); } } @@ -530,7 +544,7 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s } - if (isOriginalServerReferenceCode == true) { + if (isOriginalServerReferenceCode) { for (int i = 0; i< originalServerReferenceCodeList.size(); i++) { @@ -558,6 +572,38 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s } } + + + APIServiceCalls apiServiceCalls1 = dao.getServiceCall(apiTypes.getId(), ServiceName.PartialRefund.toString()); + List refundIdList = new ArrayList<>(); + refundIdList.add(apiServiceCalls1.getApiServiceCallId()); + + List messageLogForPartialRefund = loggingDAO.getMessageLogs(userId, refundIdList, "msisdn", "tel:+" + tel, null, null); + + for (int i = 0; i< messageLogForPartialRefund.size(); i++) { + + String responseStatus = messageLogForPartialRefund.get(i).getStatus(); + String responseType = messageLogForPartialRefund.get(i).getType(); + + if (responseType.equals(type) && responseStatus.equals(status)) { + + String request = messageLogForPartialRefund.get(i).getRequest(); + JSONObject json = new JSONObject(request); + String responseOriginalServerReferenceCode = json.get("originalServerReferenceCode").toString(); + + int responseUserId = originalServerReferenceCodeList.get(i).getUserid(); + String responseTel = originalServerReferenceCodeList.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseOriginalServerReferenceCode.equals(originalServerReferenceCode)) { + totalAmountRefunded += Double.valueOf(json.getJSONObject("refundResponse").get("refundAmount").toString()); + } + } + + + + } + return (paymentAmount-totalAmountRefunded); } From b4c58a25a133f662738a7af2a8a4e5ad6921709f Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Tue, 28 Feb 2017 16:30:20 +0530 Subject: [PATCH 049/112] HUBDEV-1456, HUBDEV-1457, HUBDEV-1449, HUBDEV-1444, HUBDEV-1440 Fixed --- .../credit/PatialRefundRequestHandler.java | 289 ++++++++++++++---- 1 file changed, 235 insertions(+), 54 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index 0fc429f4..4819a640 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -15,38 +15,45 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.credit; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; - import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import com.wso2telco.services.dep.sandbox.dao.CreditDAO; -import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.*; -import com.wso2telco.services.dep.sandbox.dao.model.domain.*; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.wallet.*; -import com.wso2telco.services.dep.sandbox.util.*; -import org.apache.commons.logging.LogFactory; -import org.json.simple.JSONObject; - +import com.ibm.icu.math.BigDecimal; import com.wso2telco.core.dbutils.exception.ServiceError; import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; import com.wso2telco.dep.oneapivalidation.util.Validation; import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.CreditDAO; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; import com.wso2telco.services.dep.sandbox.dao.NumberDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundRequestBean.RefundRequest; import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundResponseBean.RefundResponse; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; +import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; +import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; +import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import com.wso2telco.services.dep.sandbox.util.MessageLogHandler; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import com.wso2telco.services.dep.sandbox.util.ServiceName; +import org.apache.commons.logging.LogFactory; +import org.json.simple.JSONObject; + +import javax.annotation.Nonnull; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.Status; +import java.util.ArrayList; +import java.util.Currency; +import java.util.Date; +import java.util.List; public class PatialRefundRequestHandler extends AbstractRequestHandler implements RequestResponseRequestHandleable { @@ -61,9 +68,12 @@ public class PatialRefundRequestHandler extends AbstractRequestHandler= 0)) || RefundAmount < 0) { + LOG.error("###REFUND### amount should be a whole number or two digit decimal"); + responseWrapperDTO + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "amount should be a whole or two digit decimal positive number")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapperDTO; + } + + // check valid account currency for endUserId + boolean isValidCurrency = currencySymbol(currency); + if (!isValidCurrency) { + LOG.error("###REFUND### currency code not as per ISO 4217"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "currency code not as per ISO 4217")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapperDTO; + + } //Check channel. if (channel != null && !containsChannel(channel)) { - LOG.error("###CREDIT### Valid channel doesn't exists for the given inputs"); + LOG.error("###REFUND### Valid channel doesn't exists for the given inputs"); responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, "Valid channel doesn't exists for the given inputs")); responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; } - ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); - if (manageNumber != null) { - updateBalance(manageNumber, amount); - RefundResponseBean responseBean = buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, - serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata); + if (!isOriginalServerReferenceCode) { + LOG.error("###REFUND### no payment matching for this Refund"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "no payment matching for this Refund")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapperDTO; + } + if (paymentAmount != amount) { + LOG.error("###REFUND### Charging Information amount miss match"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Charging Information amount miss match")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapperDTO; + } - saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, "1"); - responseWrapperDTO.setHttpStatus(Response.Status.OK); + // Check for exceeded Amount + if (validTransaction == 0.0) { + LOG.error("###REFUND### exceeds refund Amount"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "exceeds refund Amount")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); return responseWrapperDTO; + } + + + if (RefundAmount <= validTransaction) { + + + ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); + if (manageNumber != null) { + updateBalance(manageNumber, RefundAmount); + RefundResponseBean responseBean = buildJsonResponseBody(RefundAmount, clientCorrelator, merchantIdentification, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata); + + + saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, "1"); + responseWrapperDTO.setHttpStatus(Response.Status.OK); + return responseWrapperDTO; + } else { + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Number is not Registered for the Service")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } + } else { + LOG.error("###REFUND### Cannot Proceed Refund"); responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Number is not Registered for the Service")); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + ServiceError.INVALID_INPUT_VALUE, "Cannot Proceed Refund")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); return responseWrapperDTO; + } + } catch (Exception ex) { - RefundResponseBean responseBean = buildJsonResponseBody(amount, clientCorrelator, merchantIdentification, reasonForRefund, + RefundResponseBean responseBean = buildJsonResponseBody(RefundAmount, clientCorrelator, merchantIdentification, reasonForRefund, serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata); saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, "0"); - LOG.error("###CREDIT### Error in processing credit service request. ", ex); + LOG.error("###REFUND### Error in processing credit service request. ", ex); responseWrapperDTO .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); @@ -358,8 +450,6 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI responseClientCorrelator = json.getJSONObject("refundResponse").get("clientCorrelator").toString(); } - // responseReferenceCode = json.getJSONObject("refundResponse").get("referenceCode").toString(); - int responseUserId = response.get(i).getUserid(); String responseTel = response.get(i).getValue(); @@ -384,7 +474,6 @@ private String checkReferenceCode(int userId, int serviceNameId, String tel, Str List list = new ArrayList<>(); list.add(serviceNameId); List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); - String jsonString = null; for (int i = 0; i < response.size(); i++) { @@ -416,6 +505,99 @@ private String checkReferenceCode(int userId, int serviceNameId, String tel, Str return jsonString; } + + private double checkOriginalServerReferenceWithServerReference(int userId, String tel, String status, String type, String originalServerReferenceCode) throws Exception { + + double totalAmountRefunded = 0.0; + + APITypes apiTypes = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls apiServiceCallsForMakePayment = dao.getServiceCall(apiTypes.getId(), ServiceName.ChargeUser.toString()); + List list = new ArrayList<>(); + list.add(apiServiceCallsForMakePayment.getApiServiceCallId()); + List servercodeList = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + + for (int i = 0; i < servercodeList.size(); i++) { + + if (servercodeList != null) { + + String responseStatus = servercodeList.get(i).getStatus(); + String responseType = servercodeList.get(i).getType(); + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = servercodeList.get(i).getRequest(); + org.json.JSONObject json = new org.json.JSONObject(request); + String serverReferenceCode = json.get("serverReferenceCode").toString(); + + int responseUserId = servercodeList.get(i).getUserid(); + String responseTel = servercodeList.get(i).getValue(); + + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && serverReferenceCode.equals(originalServerReferenceCode)) { + isOriginalServerReferenceCode = true; + paymentAmount = Double.valueOf(json.getJSONObject("paymentAmount").getJSONObject("chargingInformation").get("amount").toString()); + } + } + } + } + + if (isOriginalServerReferenceCode) { + + APITypes adiTypesForCredit = dao.getAPIType(RequestType.CREDIT.toString()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(adiTypesForCredit.getId(), ServiceName.PartialRefund.toString()); + int refundId = apiServiceCalls.getApiServiceCallId(); + List PartialRefundIdList = new ArrayList<>(); + PartialRefundIdList.add(refundId); + + List originalServerReferenceCodeList = loggingDAO.getMessageLogs(userId, PartialRefundIdList, "msisdn", "tel:+" + tel, null, null); + + for (int i = 0; i < originalServerReferenceCodeList.size(); i++) { + + String responseStatus = originalServerReferenceCodeList.get(i).getStatus(); + String responseType = originalServerReferenceCodeList.get(i).getType(); + + if (responseType.equals(type) && responseStatus.equals(status)) { + String request = originalServerReferenceCodeList.get(i).getRequest(); + org.json.JSONObject json = new org.json.JSONObject(request); + String responseOriginalServerReferenceCode = json.getJSONObject("refundResponse").get("originalServerReferenceCode").toString(); + + int responseUserId = originalServerReferenceCodeList.get(i).getUserid(); + String responseTel = originalServerReferenceCodeList.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseOriginalServerReferenceCode.equals(originalServerReferenceCode)) { + totalAmountRefunded += Double.valueOf(json.getJSONObject("refundResponse").get("refundAmount").toString()); + } + } + } + + APIServiceCalls apiServiceCall = dao.getServiceCall(apiTypes.getId(), ServiceName.RefundUser.toString()); + List refundIdList = new ArrayList<>(); + refundIdList.add(apiServiceCall.getApiServiceCallId()); + + List messageLogsForRefundList = loggingDAO.getMessageLogs(userId, refundIdList, "msisdn", "tel:+" + tel, null, null); + + for (int i = 0; i < messageLogsForRefundList.size(); i++) { + String responseStatus = messageLogsForRefundList.get(i).getStatus(); + String responseType = messageLogsForRefundList.get(i).getType(); + + if (responseType.equals(type) && responseStatus.equals(status)) { + + String request = messageLogsForRefundList.get(i).getRequest(); + org.json.JSONObject json = new org.json.JSONObject(request); + String responseOriginalServerReferenceCode = json.get("originalServerReferenceCode").toString(); + int responseUserId = messageLogsForRefundList.get(i).getUserid(); + String responseTel = messageLogsForRefundList.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseOriginalServerReferenceCode.equals(originalServerReferenceCode)) { + totalAmountRefunded += Double.valueOf(json.getJSONObject("paymentAmount").getJSONObject("chargingInformation").get("amount").toString()); + } + } + } + + } + return (paymentAmount - totalAmountRefunded); + } + // Save Response in messageLog table private void saveResponse(PatialRefundRequestWrapper extendedRequestDTO, String endUserIdPath, RefundResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { @@ -426,20 +608,19 @@ private void saveResponse(PatialRefundRequestWrapper extendedRequestDTO, JsonElement je = new JsonParser().parse(resp.toJson(responseBean)); JsonObject asJsonObject = je.getAsJsonObject(); jsonInString = asJsonObject.toString(); - //setting messagelog responses - MessageLog messageLog1 = new MessageLog(); - messageLog1 = new MessageLog(); - messageLog1.setRequest(jsonInString); - messageLog1.setStatus(status); - messageLog1.setType("1"); - messageLog1.setServicenameid(apiServiceCalls.getApiServiceCallId()); - messageLog1.setUserid(extendedRequestDTO.getUser().getId()); - messageLog1.setReference("msisdn"); - messageLog1.setValue(endUserIdPath); - messageLog1.setMessageTimestamp(new Date()); - - loggingDAO.saveMessageLog(messageLog1); + MessageLog messageLog = new MessageLog(); + messageLog = new MessageLog(); + messageLog.setRequest(jsonInString); + messageLog.setStatus(status); + messageLog.setType("1"); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); } From aca77fd163abae688c770b7381cd442b93db8660 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 28 Feb 2017 16:33:47 +0530 Subject: [PATCH 050/112] WIP setting mandotory feilds --- .../payment/PaymentRefundRequestHandler.java | 20 +++++++++++++------ .../payment/PaymentRequestHandler.java | 3 ++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 0e85aafa..85ea77f8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -136,7 +136,7 @@ protected boolean validate(PaymentRefundRequestWrapperDTO wrapperDTO) throws Exc "categoryCode", categoryCode)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "channel", channel)); - validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL_DOUBLE_GE_ZERO, "taxAmount", taxAmount)); } validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, @@ -335,7 +335,14 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) // Get the Charged Tax Amount Double chargedTaxAmount = Double.parseDouble(taxAmount); - //Total Amount Refunded + if (chargedTaxAmount < 0 ) { + LOG.error("###REFUND### tax amount should a positive number "); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, + "tax amount should a positive number")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } // For inspection Double totalAmountRefundeds = chargeAmount - chargedTaxAmount; @@ -573,13 +580,15 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s } - - APIServiceCalls apiServiceCalls1 = dao.getServiceCall(apiTypes.getId(), ServiceName.PartialRefund.toString()); + APITypes apiTypes1 = dao.getAPIType(RequestType.CREDIT.toString()); + APIServiceCalls apiServiceCalls1 = dao.getServiceCall(apiTypes1.getId(), ServiceName.PartialRefund.toString()); List refundIdList = new ArrayList<>(); refundIdList.add(apiServiceCalls1.getApiServiceCallId()); List messageLogForPartialRefund = loggingDAO.getMessageLogs(userId, refundIdList, "msisdn", "tel:+" + tel, null, null); + if (messageLogForPartialRefund != null) { + for (int i = 0; i< messageLogForPartialRefund.size(); i++) { String responseStatus = messageLogForPartialRefund.get(i).getStatus(); @@ -599,8 +608,7 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s totalAmountRefunded += Double.valueOf(json.getJSONObject("refundResponse").get("refundAmount").toString()); } } - - + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 9c87c5ae..ef998beb 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -136,7 +136,7 @@ protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exc "categoryCode", categoryCode)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "channel", channel)); - validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL_DOUBLE_GE_ZERO, "taxAmount", taxAmount)); } validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, @@ -308,6 +308,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) chargeInformation.setDescription(description); // Get the tax Amount + Double chargeTaxAmount = Double.parseDouble(taxAmount); // Setting the Total Amount Charged From 8ac44012e7c2f4a1a0ea9f1f4282875bf56abf47 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 1 Mar 2017 09:32:05 +0530 Subject: [PATCH 051/112] Implimented List charge operations v2 --- .../PaymentListTransactionRequestHandler.java | 90 ++++++++++++------- 1 file changed, 57 insertions(+), 33 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java index 2c2efab5..b7048c67 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java @@ -31,12 +31,14 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; +import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.logging.LogFactory; import org.json.simple.JSONObject; + import javax.ws.rs.core.Response; import java.util.ArrayList; import java.util.List; @@ -97,49 +99,70 @@ protected Returnable process(PaymentListTransactionRequestWrapper extendedReques } try { + String msisdn = extendedRequestDTO.getEndUserId(); String endUserId = getLastMobileNumber(msisdn); - List amountTransaction = null; - List attributeName = new ArrayList(); - attributeName.add(AttributeName.makePayment.toString().toLowerCase()); - attributeName.add(AttributeName.refundUser.toString().toLowerCase()); Integer userId = extendedRequestDTO.getUser().getId(); - // Save Request Log - APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); - APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), ServiceName.ListPayment.toString()); + String serviceCallPayment = ServiceName.ChargeUser.toString(); + APITypes paymentApi = dao.getAPIType(RequestType.PAYMENT.toString()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(paymentApi.getId(), serviceCallPayment); + + int paymetId = apiServiceCalls.getApiServiceCallId(); + List list = new ArrayList<>(); + list.add(paymetId); + JSONObject object = new JSONObject(); object.put("endUserId", msisdn); - logHandler.saveMessageLog(apiServiceCalls.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), - "msisdn", msisdn, object); - String tableName = TableName.NUMBERS.toString().toLowerCase(); - PaymentListTransactionResponseBean paymentTransaction = new PaymentListTransactionResponseBean(); - amountTransaction = paymentDAO.getTransactionValue(endUserId, attributeName, tableName, userId); +// Todo: save messageLog +// logHandler.saveMessageLog(apiServiceCalls.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), "msisdn", msisdn, object); + PaymentListTransactionResponseBean paymentTransaction = new PaymentListTransactionResponseBean(); List listNodes = new ArrayList(); + List responses = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + endUserId, null, null); + + String jsonString = null; + + if (responses != null && !responses.isEmpty()) { + for (int i = 0; i < responses.size(); i++) { + + String responseStatus = responses.get(i).getStatus(); + String responseType = responses.get(i).getType(); + + + if (responseType.equals("1") && responseStatus.equals("1")) { + String request = responses.get(i).getRequest(); + org.json.JSONObject json = new org.json.JSONObject(request); + + int responseUserId = responses.get(i).getUserid(); + String responseTel = responses.get(i).getValue(); + + // Check client correlator + if (responseUserId == userId && responseTel.equals("tel:+" + endUserId)) { + jsonString = json.toString(); + JsonParser parser = new JsonParser(); + JsonObject jsonObject = (JsonObject) parser.parse(jsonString); + JsonElement get = jsonObject.get("paymentAmount"); + JsonObject asJsonObjectPayment = get.getAsJsonObject(); + asJsonObjectPayment.remove("totalAmountCharged"); + asJsonObjectPayment.remove("totalAmountRefunded"); + asJsonObjectPayment.remove("chargingMetaData"); + jsonObject.remove("clientCorrelator"); + jsonObject.remove("notifyURL"); + jsonObject.remove("originalReferenceCode"); + jsonObject.remove("originalServerReferenceCode"); + String jsonInString = null; + jsonInString = jsonObject.toString(); + + JsonNode node = null; + ObjectMapper mapper = new ObjectMapper(); + node = mapper.readValue(jsonInString, JsonNode.class); + listNodes.add(node); + } + + } - if (amountTransaction != null && !amountTransaction.isEmpty()) { - for (AttributeValues values : amountTransaction) { - JsonParser parser = new JsonParser(); - JsonObject jsonObject = parser.parse(values.getValue()).getAsJsonObject(); - JsonElement get = jsonObject.get("paymentAmount"); - JsonObject asJsonObjectPayment = get.getAsJsonObject(); - asJsonObjectPayment.remove("totalAmountCharged"); - asJsonObjectPayment.remove("totalAmountRefunded"); - asJsonObjectPayment.remove("chargingMetaData"); - jsonObject.remove("clientCorrelator"); - jsonObject.remove("notifyURL"); - jsonObject.remove("originalReferenceCode"); - jsonObject.remove("originalServerReferenceCode"); - jsonObject.remove("resourceURL"); - String jsonInString = null; - jsonInString = jsonObject.toString(); - - JsonNode node = null; - ObjectMapper mapper = new ObjectMapper(); - node = mapper.readValue(jsonInString, JsonNode.class); - listNodes.add(node); } paymentTransaction.setAmountTransaction(listNodes); } else { @@ -148,6 +171,7 @@ protected Returnable process(PaymentListTransactionRequestWrapper extendedReques responseWrapper.setHttpStatus(Response.Status.OK); return responseWrapper; } + paymentTransaction.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); PaymentListTransactionDTO listTransactionDTO = new PaymentListTransactionDTO(); From c348c7e8a6b959b72c3cf465b3a259d73d7353fe Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 1 Mar 2017 14:36:14 +0530 Subject: [PATCH 052/112] added optional feilds to refundbean --- .../PaymentRefundTransactionRequestBean.java | 59 +++++++++++ .../PaymentRefundTransactionResponseBean.java | 60 +++++++++++ .../payment/PaymentRefundRequestHandler.java | 100 ++++++++++-------- .../payment/PaymentRequestHandler.java | 24 +---- 4 files changed, 181 insertions(+), 62 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java index 42f2b544..112e0d7d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionRequestBean.java @@ -43,6 +43,18 @@ public static class AmountTransaction { private String transactionOperationStatus; + private String callbackData; + + private String mandateId; + + private String notificationFormat; + + private String notifyURL; + + private String productID; + + private String serviceID; + public String getClientCorrelator() { return clientCorrelator; } @@ -104,5 +116,52 @@ public String toString() { return builder.toString(); } + public String getCallbackData() { + return callbackData; + } + + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } + + public String getMandateId() { + return mandateId; + } + + public void setMandateId(String mandateId) { + this.mandateId = mandateId; + } + + public String getNotificationFormat() { + return notificationFormat; + } + + public void setNotificationFormat(String notificationFormat) { + this.notificationFormat = notificationFormat; + } + + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + + public String getProductID() { + return productID; + } + + public void setProductID(String productID) { + this.productID = productID; + } + + public String getServiceID() { + return serviceID; + } + + public void setServiceID(String serviceID) { + this.serviceID = serviceID; + } } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java index 2ec3e3fb..b2b2d915 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentRefundTransactionResponseBean.java @@ -25,6 +25,18 @@ public class PaymentRefundTransactionResponseBean { private String transactionOperationStatus; + private String callbackData; + + private String mandateId; + + private String notificationFormat; + + private String notifyURL; + + private String productID; + + private String serviceID; + public String getClientCorrelator() { return clientCorrelator; } @@ -96,4 +108,52 @@ public ChargeRefundAmountResponse getPaymentAmount() { public void setPaymentAmount(ChargeRefundAmountResponse paymentAmount) { this.paymentAmount = paymentAmount; } + + public String getCallbackData() { + return callbackData; + } + + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } + + public String getMandateId() { + return mandateId; + } + + public void setMandateId(String mandateId) { + this.mandateId = mandateId; + } + + public String getNotificationFormat() { + return notificationFormat; + } + + public void setNotificationFormat(String notificationFormat) { + this.notificationFormat = notificationFormat; + } + + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + + public String getProductID() { + return productID; + } + + public void setProductID(String productID) { + this.productID = productID; + } + + public String getServiceID() { + return serviceID; + } + + public void setServiceID(String serviceID) { + this.serviceID = serviceID; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 85ea77f8..f9fe20c3 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -112,6 +112,14 @@ protected boolean validate(PaymentRefundRequestWrapperDTO wrapperDTO) throws Exc String taxAmount = CommonUtil.getNullOrTrimmedValue(metaData.getTaxAmount()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); + String callbackData = CommonUtil.getNullOrTrimmedValue(request.getCallbackData()); + String mandateId = CommonUtil.getNullOrTrimmedValue(request.getMandateId()); + String notificationFormat = CommonUtil.getNullOrTrimmedValue(request.getNotificationFormat()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + String productID = CommonUtil.getNullOrTrimmedValue(request.getProductID()); + String serviceID = CommonUtil.getNullOrTrimmedValue(request.getServiceID()); + String originalServerReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); + List validationRulesList = new ArrayList<>(); @@ -125,7 +133,7 @@ protected boolean validate(PaymentRefundRequestWrapperDTO wrapperDTO) throws Exc "endUserID", msisdn)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "amount", amount)); - validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "currency", currency)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "description", description)); @@ -143,6 +151,21 @@ protected boolean validate(PaymentRefundRequestWrapperDTO wrapperDTO) throws Exc "referenceCode", referenceCode)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "transactionOperationStatus", transactionOperationStatus)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "callbackData", callbackData)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "mandateId", mandateId)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "notificationFormat", notificationFormat)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "notifyURL", notifyURL)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "productID", productID)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "serviceID", serviceID)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "originalServerReferenceCode", originalServerReferenceCode)); + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; validationRules = validationRulesList.toArray(validationRules); @@ -190,16 +213,19 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) String accountCurrencyAttribute = AttributeName.Currency.toString().toLowerCase(); String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); Integer userId = extendedRequestDTO.getUser().getId(); + String callbackData = CommonUtil.getNullOrTrimmedValue(request.getCallbackData()); + String mandateId = CommonUtil.getNullOrTrimmedValue(request.getMandateId()); + String notificationFormat = CommonUtil.getNullOrTrimmedValue(request.getNotificationFormat()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + String productID = CommonUtil.getNullOrTrimmedValue(request.getProductID()); + String serviceID = CommonUtil.getNullOrTrimmedValue(request.getServiceID()); PaymentRefundTransactionResponseBean responseBean = new PaymentRefundTransactionResponseBean(); ChargeRefundAmountResponse payAmount = new ChargeRefundAmountResponse(); PaymentChargingInformation chargeInformation = new PaymentChargingInformation(); PaymentChargingMetaData chargeMetaData = new PaymentChargingMetaData(); - - // Save Request Log APITypes apiTypes = dao.getAPIType(RequestType.PAYMENT.toString()); - //This has Hardcoded value APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallRefund); Gson gson = new Gson(); @@ -237,9 +263,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) return responseWrapper; } - //Todo: remove the hardcoded Value - // check serverReferenceCode against OriginalServerReferenceCode - APIServiceCalls apiServiceCallForMakePayment = dao.getServiceCall(apiTypes.getId(), ServiceName.ChargeUser.toString()); int serviceIdForMakePayment = apiServiceCallForMakePayment.getApiServiceCallId(); @@ -278,14 +301,16 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) } // check valid account currency for endUserId - boolean isValidCurrency = currencySymbol(currency); - if (!isValidCurrency) { - LOG.error("###REFUND### currency code not as per ISO 4217"); - responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "currency code not as per ISO 4217")); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - return responseWrapper; + if (currency != null) { + boolean isValidCurrency = currencySymbol(currency); + if (!isValidCurrency) { + LOG.error("###REFUND### currency code not as per ISO 4217"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "currency code not as per ISO 4217")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } } AttributeValues accountCurrencyValue = paymentDAO.getAttributeValue(endUserId, serviceCallBalanceLookUp, @@ -314,7 +339,12 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) responseBean.setClientCorrelator(clientCorrelator); responseBean.setEndUserId(endUserIdPath); responseBean.setOriginalServerReferenceCode(originalServerReferenceCode); - + responseBean.setCallbackData(callbackData); + responseBean.setMandateId(mandateId); + responseBean.setNotificationFormat(notificationFormat); + responseBean.setNotifyURL(notifyURL); + responseBean.setProductID(productID); + responseBean.setServiceID(serviceID); chargeInformation.setAmount(amount); chargeInformation.setCurrency(currency); @@ -332,7 +362,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) responseBean.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); - // Get the Charged Tax Amount Double chargedTaxAmount = Double.parseDouble(taxAmount); if (chargedTaxAmount < 0 ) { @@ -345,13 +374,12 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) } // For inspection - Double totalAmountRefundeds = chargeAmount - chargedTaxAmount; - totalAmountRefundeds+=totalAmountRefunded; + Double totalAmountToRefund = chargeAmount - chargedTaxAmount; + Double refundAmount = chargeAmount - chargedTaxAmount; + totalAmountToRefund+=totalAmountRefunded; -// Double refundAmount = totalAmountRefunded - chargedTaxAmount; // Setting the total Amount Refund - payAmount.setTotalAmountRefunded(totalAmountRefundeds.toString()); - + payAmount.setTotalAmountRefunded(totalAmountToRefund.toString()); if (!isOriginalServerReferenceCode) { LOG.error("###REFUND### no payment matching for this Refund"); @@ -370,25 +398,14 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) return responseWrapper; } - if (totalAmountRefundeds <= validTransaction) { + if (refundAmount <= validTransaction) { // set transaction operation status as charged ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName()); Double updateBalance = manageNumber.getBalance() + (chargeAmount + chargedTaxAmount); - AttributeValues accountStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallRefund, - AttributeName.transactionStatus.toString(), userId); - // set transaction operation status as refused manageNumber.setBalance(updateBalance); - if (accountStatusValue != null) { - String accountStatus = accountStatusValue.getValue(); - // set transaction operation status as Refused // Here wallet Status are Used - if (accountStatus.equals(TransactionStatus.Refused.toString())) { - responseBean.setTransactionOperationStatus(TransactionStatus.Refused.toString()); - - } - } // set transaction operation status as Refunded - else if (paymentDAO.saveManageNumbers(manageNumber)) { + if (paymentDAO.saveManageNumbers(manageNumber)) { responseBean.setTransactionOperationStatus(TransactionStatus.Refunded.toString()); } } else { @@ -513,7 +530,7 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s list.add(serviceNameId); List servercodeList = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); - // remove + APITypes apiTypes = dao.getAPIType(RequestType.PAYMENT.toString()); APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallRefund); @@ -580,10 +597,10 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s } - APITypes apiTypes1 = dao.getAPIType(RequestType.CREDIT.toString()); - APIServiceCalls apiServiceCalls1 = dao.getServiceCall(apiTypes1.getId(), ServiceName.PartialRefund.toString()); + APITypes apiTypeCredit = dao.getAPIType(RequestType.CREDIT.toString()); + APIServiceCalls apiServiceCallCredit = dao.getServiceCall(apiTypeCredit.getId(), ServiceName.PartialRefund.toString()); List refundIdList = new ArrayList<>(); - refundIdList.add(apiServiceCalls1.getApiServiceCallId()); + refundIdList.add(apiServiceCallCredit.getApiServiceCallId()); List messageLogForPartialRefund = loggingDAO.getMessageLogs(userId, refundIdList, "msisdn", "tel:+" + tel, null, null); @@ -598,10 +615,10 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s String request = messageLogForPartialRefund.get(i).getRequest(); JSONObject json = new JSONObject(request); - String responseOriginalServerReferenceCode = json.get("originalServerReferenceCode").toString(); + String responseOriginalServerReferenceCode = json.getJSONObject("refundResponse").get("originalServerReferenceCode").toString(); - int responseUserId = originalServerReferenceCodeList.get(i).getUserid(); - String responseTel = originalServerReferenceCodeList.get(i).getValue(); + int responseUserId = messageLogForPartialRefund.get(i).getUserid(); + String responseTel = messageLogForPartialRefund.get(i).getValue(); // Check reference CodeDuplication if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseOriginalServerReferenceCode.equals(originalServerReferenceCode)) { @@ -644,7 +661,6 @@ private void saveResponse(Integer userId, String endUserIdPath, PaymentRefundTra JsonObject asJsonObject = je.getAsJsonObject(); jsonInString = asJsonObject.toString(); - //setting messagelog responses MessageLog messageLog1 = new MessageLog(); messageLog1 = new MessageLog(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index ef998beb..e9274d7a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -223,9 +223,9 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) } //check referenceCode - String result = checkReferenceCode(userId, serviceNameId, endUserId, "1", "1", referenceCode); + String duplicateReferenceCode = checkReferenceCode(userId, serviceNameId, endUserId, "1", "1", referenceCode); - if((result!=null)){ + if((duplicateReferenceCode!=null)){ LOG.error("###PAYMENT### Already charged for this reference code"); responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, "Already used reference code")); @@ -275,22 +275,6 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) return responseWrapper; } - String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); - String accountCurrencyAttribute = AttributeName.Currency.toString().toLowerCase(); - AttributeValues accountCurrencyValue = paymentDAO.getAttributeValue(endUserId, serviceCallBalanceLookUp, - accountCurrencyAttribute, userId); - if (accountCurrencyValue != null) { - String accountCurrency = accountCurrencyValue.getValue(); - if (!(currency.equals(accountCurrency))) { - LOG.error("###PAYMENT### Valid currency doesn't exists for the given inputs"); - responseWrapper - .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, - "Valid currency does not exist for the given input parameters")); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - return responseWrapper; - } - } - // check channel if (channel != null && !containsChannel(channel)) { LOG.error("###PAYMENT### Valid channel doesn't exists for the given inputs"); @@ -308,7 +292,6 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) chargeInformation.setDescription(description); // Get the tax Amount - Double chargeTaxAmount = Double.parseDouble(taxAmount); // Setting the Total Amount Charged @@ -347,6 +330,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) "Denied : Account balance insufficient to charge request")); return responseWrapper; } + // set transaction operation status as refused else if (transactionStatusValue != null) { String transactionStatus = transactionStatusValue.getValue(); @@ -355,7 +339,7 @@ else if (transactionStatusValue != null) { } // set transaction status as charged } else if (balance >= chargeAmount) { - balance = balance - (chargeAmount + chargeTaxAmount); + balance = balance - chargeAmount; manageNumber.setBalance(balance); numberDAO.saveManageNumbers(manageNumber); responseBean.setTransactionOperationStatus(TransactionStatus.Charged.toString()); From c95eb58952add35e4823a85b6c0e1d3a8a3e73b4 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Wed, 1 Mar 2017 14:37:01 +0530 Subject: [PATCH 053/112] HUBDEV-1453 fixed --- .../dao/model/custom/RefundRequestBean.java | 37 ++++++++- .../dep/sandbox/service/PaymentService.java | 23 ++++-- .../credit/PatialRefundRequestHandler.java | 76 ++++++++----------- 3 files changed, 80 insertions(+), 56 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java index a23aa814..2bcded28 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java @@ -47,6 +47,12 @@ public static class RefundRequest{ private String referenceCode; + private String callbackData; + + private String notifyURL; + + private String merchantIdentification; + public String getClientCorrelator() { return clientCorrelator; } @@ -97,9 +103,6 @@ public void setPaymentAmount(PaymentAmountWithTax paymentAmount) { this.paymentAmount = paymentAmount; } - - - public String getReferenceCode() { return referenceCode; } @@ -108,14 +111,40 @@ public void setReferenceCode(String referenceCode) { this.referenceCode = referenceCode; } + public String getCallbackData() { + return callbackData; + } + + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } + + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + + public String getMerchantIdentification() { + return merchantIdentification; + } + + public void setMerchantIdentification(String merchantIdentification) { + this.merchantIdentification = merchantIdentification; + } - public String toString() { + public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Client Correlator : " + getClientCorrelator()); builder.append("msisdn : " + getMsisdn()); builder.append("OriginalServerReferenceCode : " +getOriginalServerReferenceCode()); builder.append("reasonForRefund : " + getReasonForRefund()); builder.append("refundAmount : " + getPaymentAmount()); + builder.append("callbackData : " +getCallbackData()); + builder.append("notifyURL : "+getNotifyURL()); + builder.append("merchantIdentification : "+getMerchantIdentification()); if (getPaymentAmount() != null) { builder.append(" " + getPaymentAmount().toString()); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index abd4e643..a5b17618 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -16,7 +16,12 @@ package com.wso2telco.services.dep.sandbox.service; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.gson.Gson; import com.wordnik.swagger.annotations.*; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.PolicyException; import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.exception.SandboxException; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; @@ -25,6 +30,7 @@ import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentListTransactionRequestWrapper; import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRefundRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler; +import com.wso2telco.services.dep.sandbox.util.RequestError; import com.wso2telco.services.dep.sandbox.util.RequestType; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -42,6 +48,8 @@ @Api(value = "payment/{v1}", description = "Rest Service for Payment API") public class PaymentService { + protected static final String POLICYEXCEPTION = "POL0001"; + Log LOG = LogFactory.getLog(PaymentService.class); @POST @@ -102,13 +110,16 @@ public Response makePayment( .build(); return response; } - }else { - - Response response = Response.status(Response.Status.BAD_REQUEST).entity( - SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " transactionOperationStatus should be Charged/Refunded") - .build(); - return response; } + + PolicyException policyException = new PolicyException(POLICYEXCEPTION, (ServiceError.INVALID_INPUT_VALUE).getMessage(), "transactionOperationStatus should be Charged/Refunded"); + RequestError requestError = new RequestError(); + requestError.setPolicyException(policyException); + Gson gson = new Gson(); + String errorMessage = gson.toJson(requestError); + Response response = Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build(); + return response; + } @GET diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index 4819a640..e8e1e085 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -45,7 +45,6 @@ import com.wso2telco.services.dep.sandbox.util.RequestType; import com.wso2telco.services.dep.sandbox.util.ServiceName; import org.apache.commons.logging.LogFactory; -import org.json.simple.JSONObject; import javax.annotation.Nonnull; import javax.ws.rs.core.Response; @@ -63,10 +62,6 @@ public class PatialRefundRequestHandler extends AbstractRequestHandler Date: Wed, 1 Mar 2017 19:54:53 +0530 Subject: [PATCH 054/112] removed unused methods --- .../services/dep/sandbox/dao/PaymentDAO.java | 8 - .../dao/hibernate/HibernatePaymentDAO.java | 188 ------------------ .../dep/sandbox/service/PaymentService.java | 21 +- .../credit/PatialRefundRequestHandler.java | 10 +- .../PaymentListTransactionRequestHandler.java | 6 - .../payment/PaymentRefundRequestHandler.java | 26 +-- .../payment/PaymentRequestHandler.java | 17 -- 7 files changed, 17 insertions(+), 259 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java index 6440f634..d2900d65 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/PaymentDAO.java @@ -23,13 +23,5 @@ public interface PaymentDAO { - public List getTransactionValue(String endUserId, List attribute, String tableName, - Integer userId) throws Exception; - public AttributeValues getAttributeValue(String endUserId, String serviceCall, String attribute, Integer userId) - throws Exception; - public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) - throws Exception; - public Integer saveAttributeValue(AttributeValues valueObj) throws Exception; - public AttributeValues getResponse(Integer id) throws Exception; public boolean saveManageNumbers(ManageNumber manageNumber) throws Exception; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java index befb6257..4c902756 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernatePaymentDAO.java @@ -35,194 +35,6 @@ public class HibernatePaymentDAO extends AbstractDAO implements PaymentDAO { LOG = LogFactory.getLog(PaymentDAO.class); } - @Override - public List getTransactionValue(String endUserId, List attribute, String tableName, - Integer userId) throws Exception { - - Session session = getSession(); - List resultSet = null; - - StringBuilder hql = new StringBuilder(); - hql.append("SELECT "); - hql.append("val "); - hql.append("FROM "); - hql.append("AttributeValues AS val, "); - hql.append("APIServiceCalls AS calls, "); - hql.append("APITypes AS api, "); - hql.append("AttributeDistribution AS dist, "); - hql.append("Attributes AS att, "); - hql.append("ManageNumber AS number "); - hql.append("WHERE "); - hql.append("api.id = calls.apiType.id "); - hql.append("AND calls.apiServiceCallId = dist.serviceCall.apiServiceCallId "); - hql.append("AND dist.distributionId = val.attributeDistribution.distributionId "); - hql.append("AND att.attributeId = dist.attribute.attributeId "); - hql.append("AND api.apiname =:apiName "); - hql.append("AND val.tobject =:tableName "); - hql.append("AND number.id = val.ownerdid "); - hql.append("AND number.Number =:number "); - hql.append("AND number.user.id =:userId "); - hql.append("AND att.attributeName IN ( :attributeName)"); - - try { - Query query = session.createQuery(hql.toString()); - query.setParameter("apiName", RequestType.PAYMENT.toString().toLowerCase()); - query.setParameter("number", endUserId); - query.setParameter("tableName", tableName); - query.setParameterList("attributeName", attribute); - query.setParameter("userId", userId); - query.setFirstResult(0); - query.setMaxResults(20); - resultSet = (List) query.getResultList(); - - } catch (NoResultException e) { - return null; - } catch (Exception ex) { - LOG.error("###PAYMENT### Error in getListTransaction Service ", ex); - throw ex; - } - return resultSet; - } - - - @Override - public AttributeValues getAttributeValue(String endUserId, String serviceCall, String attribute, Integer userId) - throws Exception { - - Session session = getSession(); - AttributeValues resultSet = null; - - StringBuilder hql = new StringBuilder(); - - hql.append("SELECT "); - hql.append("val "); - hql.append("FROM "); - hql.append("AttributeValues as val, "); - hql.append("APIServiceCalls AS calls, "); - hql.append("APITypes AS api, "); - hql.append("AttributeDistribution AS dist, "); - hql.append("Attributes AS att, "); - hql.append("ManageNumber AS number "); - hql.append("WHERE "); - hql.append("api.id = calls.apiType.id "); - hql.append("AND calls.apiServiceCallId = dist.serviceCall.apiServiceCallId "); - hql.append("AND dist.distributionId = val.attributeDistribution.distributionId "); - hql.append("AND att.attributeId = dist.attribute.attributeId "); - hql.append("AND number.id = val.ownerdid "); - hql.append("AND api.apiname =:apiName "); - hql.append("AND calls.serviceName =:serviceName "); - hql.append("AND val.tobject =:tableName "); - hql.append("AND number.Number =:number "); - hql.append("AND att.attributeName =:attName "); - hql.append("AND number.user.id =:userId "); - - try { - Query query = session.createQuery(hql.toString()); - query.setParameter("apiName", RequestType.PAYMENT.toString()); - query.setParameter("serviceName", serviceCall); - query.setParameter("number", endUserId); - query.setParameter("tableName", TableName.NUMBERS.toString().toLowerCase()); - query.setParameter("attName", attribute); - query.setParameter("userId", userId); - resultSet = (AttributeValues) query.uniqueResult(); - - } catch (NoResultException e) { - return null; - } catch (Exception ex) { - LOG.error("###PAYMENT### Error in Make Payment Service ", ex); - throw ex; - } - return resultSet; - } - - - - @Override - public AttributeValues checkDuplicateValue(String serviceCall, String value, String attributeName, String tableName) - throws Exception { - Session session = getSession(); - AttributeValues resultSet = null; - - StringBuilder hql = new StringBuilder(); - - hql.append("SELECT "); - hql.append("val "); - hql.append("FROM "); - hql.append("AttributeValues as val, "); - hql.append("APIServiceCalls AS calls, "); - hql.append("APITypes AS api, "); - hql.append("AttributeDistribution AS dist, "); - hql.append("Attributes AS att, "); - hql.append("ManageNumber AS number "); - hql.append("WHERE "); - hql.append("api.id = calls.apiType.id "); - hql.append("AND calls.apiServiceCallId = dist.serviceCall.apiServiceCallId "); - hql.append("AND dist.distributionId = val.attributeDistribution.distributionId "); - hql.append("AND att.attributeId = dist.attribute.attributeId "); - hql.append("AND api.apiname =:apiName "); - hql.append("AND val.tobject =:tableName "); - hql.append("AND val.value =:attributeValue "); - hql.append("AND att.attributeName =:attributeName "); - - try { - Query query = session.createQuery(hql.toString()); - query.setParameter("apiName", RequestType.PAYMENT.toString()); - query.setParameter("tableName", tableName); - query.setParameter("attributeValue", value); - query.setParameter("attributeName", attributeName); - resultSet = (AttributeValues) query.uniqueResult(); - - } catch (NoResultException e) { - return null; - } catch (Exception ex) { - LOG.error("###PAYMENT### Error in Credit Apply Service ", ex); - throw ex; - } - return resultSet; - } - - @Override - public Integer saveAttributeValue(AttributeValues valueObj) throws Exception { - Integer values; - try { - saveOrUpdate(valueObj); - values = valueObj.getAttributeValueId(); - } catch (Exception e) { - LOG.error("###PAYMENT### Error in save AttributeValue", e); - throw e; - } - return values; - } - - @Override - public AttributeValues getResponse(Integer id) throws Exception { - Session session = getSession(); - AttributeValues resultSet = null; - - StringBuilder hql = new StringBuilder(); - - hql.append("SELECT "); - hql.append("val "); - hql.append("FROM "); - hql.append("AttributeValues as val "); - hql.append("WHERE "); - hql.append("val.attributevalueId =:id "); - - try { - Query query = session.createQuery(hql.toString()); - query.setParameter("id", id); - - resultSet = (AttributeValues) query.uniqueResult(); - - } catch (NoResultException e) { - return null; - } catch (Exception ex) { - LOG.error("###PAYMENT### Error in Make Payment Service ", ex); - throw ex; - } - return resultSet; - } - @Override public boolean saveManageNumbers(ManageNumber manageNumber) throws Exception { try { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java index a5b17618..fad1312a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java @@ -16,8 +16,6 @@ package com.wso2telco.services.dep.sandbox.service; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.Gson; import com.wordnik.swagger.annotations.*; import com.wso2telco.core.dbutils.exception.ServiceError; @@ -28,15 +26,10 @@ import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentListTransactionRequestWrapper; -import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRefundRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.payment.PaymentRequestHandler; import com.wso2telco.services.dep.sandbox.util.RequestError; import com.wso2telco.services.dep.sandbox.util.RequestType; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.json.JSONArray; -import org.json.JSONObject; - import javax.servlet.http.HttpServletRequest; import javax.ws.rs.*; import javax.ws.rs.core.Context; @@ -60,10 +53,12 @@ public class PaymentService { public Response makePayment( @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, PaymentRefundTransactionRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { - LOG.debug("###PAYMENT### /{endUserId} invoked : endUserId - " + endUserId); - if (makePaymentRequestBean != null) { - LOG.debug(makePaymentRequestBean); - } + if (LOG.isDebugEnabled()) { + LOG.debug("###PAYMENT### /{endUserId} invoked : endUserId - " + endUserId); + } + if (LOG.isDebugEnabled() && makePaymentRequestBean != null) { + LOG.debug(makePaymentRequestBean); + } //Separate Charged and Refunded request calls if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Charged")) { @@ -142,7 +137,9 @@ public Response getAttributeServices( try { returnable = handler.execute(requestDTO); Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); - LOG.debug("List Transaction SERVICE RESPONSE : " + response); + if (LOG.isDebugEnabled()) { + LOG.debug("List Transaction SERVICE RESPONSE : " + response); + } return response; } catch (Exception ex) { LOG.error("List Transaction SERVICE ERROR : ", ex); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index e8e1e085..f3b98bd2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -137,10 +137,10 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); String categoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); String channel = CommonUtil.getNullOrTrimmedValue(metadata.getChannel()); - double taxAmount = Double.parseDouble(CommonUtil.getNullOrTrimmedValue(metadata.getTax())); + String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTax()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); - amount = Double.parseDouble(CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount())); + String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); String callbackData = CommonUtil.getNullOrTrimmedValue(request.getCallbackData()); String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMerchantIdentification()); @@ -165,9 +165,7 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, NOTIFY_URL, notifyURL), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, MERCHANT_IDENTIFICATION, merchantIdentification), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, DESCRIPTION, description), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, PURCHASE_CATEGORY_CODE, purchaseCategoryCode), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL_DOUBLE_GE_ZERO, TAX_AMOUNT, taxAmount) - + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, PURCHASE_CATEGORY_CODE, purchaseCategoryCode) }; @@ -175,7 +173,7 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti } catch (CustomException ex) { LOG.error("###CREDIT### Error in Validation : " + ex); responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), - ex.getErrmsg(), wrapperDTO.getMsisdn())); + ex.getErrmsg(), ex.getErrvar()[0])); responseWrapperDTO.setHttpStatus(javax.ws.rs.core.Response.Status.BAD_REQUEST); } return true; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java index b7048c67..5f073872 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java @@ -30,11 +30,9 @@ import com.wso2telco.services.dep.sandbox.dao.model.custom.PaymentListTransactionResponseBean; import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; -import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; -import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.logging.LogFactory; import org.json.simple.JSONObject; @@ -115,8 +113,6 @@ protected Returnable process(PaymentListTransactionRequestWrapper extendedReques JSONObject object = new JSONObject(); object.put("endUserId", msisdn); -// Todo: save messageLog -// logHandler.saveMessageLog(apiServiceCalls.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), "msisdn", msisdn, object); PaymentListTransactionResponseBean paymentTransaction = new PaymentListTransactionResponseBean(); List listNodes = new ArrayList(); @@ -130,7 +126,6 @@ protected Returnable process(PaymentListTransactionRequestWrapper extendedReques String responseStatus = responses.get(i).getStatus(); String responseType = responses.get(i).getType(); - if (responseType.equals("1") && responseStatus.equals("1")) { String request = responses.get(i).getRequest(); org.json.JSONObject json = new org.json.JSONObject(request); @@ -138,7 +133,6 @@ protected Returnable process(PaymentListTransactionRequestWrapper extendedReques int responseUserId = responses.get(i).getUserid(); String responseTel = responses.get(i).getValue(); - // Check client correlator if (responseUserId == userId && responseTel.equals("tel:+" + endUserId)) { jsonString = json.toString(); JsonParser parser = new JsonParser(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index f9fe20c3..f0a3bdaa 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -313,20 +313,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) } } - AttributeValues accountCurrencyValue = paymentDAO.getAttributeValue(endUserId, serviceCallBalanceLookUp, - accountCurrencyAttribute, userId); - if (accountCurrencyValue != null) { - String accountCurrency = accountCurrencyValue.getValue(); - if (!(currency.equals(accountCurrency))) { - LOG.error("###REFUND### Valid currency doesn't exists for the given inputs"); - responseWrapper - .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, - "Valid currency does not exist for the given input parameters")); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - return responseWrapper; - } - } - // check channel if (channel != null && !containsChannel(channel)) { LOG.error("###REFUND### Valid channel doesn't exists for the given inputs"); @@ -374,8 +360,8 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) } // For inspection - Double totalAmountToRefund = chargeAmount - chargedTaxAmount; - Double refundAmount = chargeAmount - chargedTaxAmount; + Double totalAmountToRefund = chargeAmount; + Double refundAmount = chargeAmount; totalAmountToRefund+=totalAmountRefunded; // Setting the total Amount Refund @@ -399,9 +385,8 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) } if (refundAmount <= validTransaction) { - // set transaction operation status as charged ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName()); - Double updateBalance = manageNumber.getBalance() + (chargeAmount + chargedTaxAmount); + Double updateBalance = manageNumber.getBalance() + chargeAmount; manageNumber.setBalance(updateBalance); // set transaction operation status as Refunded @@ -428,9 +413,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) saveResponse(userId, endUserIdPath, responseBean, apiServiceCalls,"1"); } catch (Exception ex) { - // TODO: save failed messages in message log table - saveRequest(extendedRequestDTO, endUserIdPath, apiServiceCalls, jsonString, "0"); - saveResponse(userId, endUserIdPath, responseBean, apiServiceCalls,"0"); LOG.error("###REFUND### Error Occured in PAYMENT Service. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); responseWrapper @@ -587,7 +569,7 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s // Check reference CodeDuplication if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseOriginalServerReferenceCode.equals(originalServerReferenceCode)) { - totalAmountRefunded += Double.valueOf(json.getJSONObject("paymentAmount").get("totalAmountRefunded").toString()); + totalAmountRefunded += Double.valueOf(json.getJSONObject("paymentAmount").getJSONObject("chargingInformation").get("amount").toString()); } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index e9274d7a..74f5bc82 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -31,13 +31,10 @@ import com.wso2telco.services.dep.sandbox.dao.NumberDAO; import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.*; - import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; - import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; -import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; import com.wso2telco.services.dep.sandbox.util.*; @@ -318,8 +315,6 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName().toString()); Double balance = manageNumber.getBalance(); - AttributeValues transactionStatusValue = paymentDAO.getAttributeValue(endUserId, serviceCallPayment, - AttributeName.transactionStatus.toString(), userId); // transaction operation status as denied if ((balance < chargeAmount)) { @@ -329,15 +324,6 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) .setRequestError(constructRequestError(POLICYEXCEPTION, PolicyError.NO_VALID_SERVICES_AVAILABLE, "Denied : Account balance insufficient to charge request")); return responseWrapper; - } - - // set transaction operation status as refused - else if (transactionStatusValue != null) { - String transactionStatus = transactionStatusValue.getValue(); - if (transactionStatus.equals(TransactionStatus.Refused.toString())) { - responseBean.setTransactionOperationStatus(TransactionStatus.Refused.toString()); - } - // set transaction status as charged } else if (balance >= chargeAmount) { balance = balance - chargeAmount; manageNumber.setBalance(balance); @@ -359,9 +345,6 @@ else if (transactionStatusValue != null) { saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, "1"); } catch (Exception ex) { - // TODO: save failed messages in message log table - saveRequest(extendedRequestDTO, endUserIdPath, apiServiceCalls, jsonString, "0"); - saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, "0"); LOG.error("###PAYMENT### Error Occured in PAYMENT Service. ", ex); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); responseWrapper From f3a48675e494ba3344fd05df9d3933ef5ed4ca14 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 1 Mar 2017 19:57:51 +0530 Subject: [PATCH 055/112] added Refund for List Charge Operations --- .../payment/PaymentListTransactionRequestHandler.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java index 5f073872..68dcfb7b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java @@ -103,12 +103,17 @@ protected Returnable process(PaymentListTransactionRequestWrapper extendedReques Integer userId = extendedRequestDTO.getUser().getId(); String serviceCallPayment = ServiceName.ChargeUser.toString(); + String serviceCallRefund = ServiceName.RefundUser.toString(); APITypes paymentApi = dao.getAPIType(RequestType.PAYMENT.toString()); - APIServiceCalls apiServiceCalls = dao.getServiceCall(paymentApi.getId(), serviceCallPayment); + APIServiceCalls apiServiceCallPayment = dao.getServiceCall(paymentApi.getId(), serviceCallPayment); + APIServiceCalls apiServiceCallRefund = dao.getServiceCall(paymentApi.getId(), serviceCallRefund); - int paymetId = apiServiceCalls.getApiServiceCallId(); + + int paymentId = apiServiceCallPayment.getApiServiceCallId(); + int refundId = apiServiceCallRefund.getApiServiceCallId(); List list = new ArrayList<>(); - list.add(paymetId); + list.add(paymentId); + list.add(refundId); JSONObject object = new JSONObject(); object.put("endUserId", msisdn); From 8826c33c13534751d00544d3efadc7b50f798f1d Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 2 Mar 2017 09:17:54 +0530 Subject: [PATCH 056/112] added status,type enums --- .../dep/sandbox/servicefactory/Status.java | 30 ++++++++++++++++ .../PaymentListTransactionRequestHandler.java | 4 ++- .../payment/PaymentRefundRequestHandler.java | 36 +++++-------------- .../payment/PaymentRequestHandler.java | 34 ++++-------------- 4 files changed, 48 insertions(+), 56 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/Status.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/Status.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/Status.java new file mode 100644 index 00000000..7e7fe3d0 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/Status.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.servicefactory; + +public enum Status { + + Failed("0"),Success("1"); + + private String value; + + private Status(String value) { this.value=value; } + + public String getValue() { + return value; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java index 68dcfb7b..52bb200e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java @@ -32,7 +32,9 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageType; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.Status; import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.logging.LogFactory; import org.json.simple.JSONObject; @@ -131,7 +133,7 @@ protected Returnable process(PaymentListTransactionRequestWrapper extendedReques String responseStatus = responses.get(i).getStatus(); String responseType = responses.get(i).getType(); - if (responseType.equals("1") && responseStatus.equals("1")) { + if (responseType.equals(MessageType.Response.getValue()) && responseStatus.equals(Status.Success.getValue())) { String request = responses.get(i).getRequest(); org.json.JSONObject json = new org.json.JSONObject(request); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index f0a3bdaa..4647b725 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -31,9 +31,8 @@ import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.*; +import com.wso2telco.services.dep.sandbox.servicefactory.Status; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; @@ -237,7 +236,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) if (clientCorrelator != null) { - String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId,"1", "1", referenceCode); + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), referenceCode); if (response != null) { @@ -253,7 +252,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) } //check referenceCode - String result = checkReferenceCode(userId, serviceNameId, endUserId, "1", "1", referenceCode); + String result = checkReferenceCode(userId, serviceNameId, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), referenceCode); if((result!=null)){ LOG.error("###PAYMENT### Already charged for this reference code"); @@ -267,7 +266,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) int serviceIdForMakePayment = apiServiceCallForMakePayment.getApiServiceCallId(); - Double validTransaction = checkOriginalServerReferenceWithServerReference(userId, serviceIdForMakePayment, endUserId, "1", "1", originalServerReferenceCode); + Double validTransaction = checkOriginalServerReferenceWithServerReference(userId, serviceIdForMakePayment, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), originalServerReferenceCode); // check path param endUserId and request body endUserId if (!(endUserIdPath.equals(endUserIdRequest))) { @@ -410,7 +409,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) responseWrapper.setRefundPaymentDTO(refundPaymentDTO); // Save Response in message log table - saveResponse(userId, endUserIdPath, responseBean, apiServiceCalls,"1"); + saveResponse(userId, endUserIdPath, responseBean, apiServiceCalls, Status.Success.getValue()); } catch (Exception ex) { LOG.error("###REFUND### Error Occured in PAYMENT Service. ", ex); @@ -614,26 +613,7 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s return (paymentAmount-totalAmountRefunded); } - - // saving request in message log table - private MessageLog saveRequest(PaymentRefundRequestWrapperDTO extendedRequestDTO, - String endUserIdPath, APIServiceCalls apiServiceCalls, String jsonString, String status) throws Exception { - MessageLog messageLog = new MessageLog(); - messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); - messageLog.setUserid(extendedRequestDTO.getUser().getId()); - messageLog.setReference("msisdn"); - messageLog.setValue(endUserIdPath); - messageLog.setRequest(jsonString); - messageLog.setStatus(status); - messageLog.setType("0"); - messageLog.setMessageTimestamp(new Date()); - - loggingDAO.saveMessageLog(messageLog); - - return messageLog; - } - - // New method to save Response in messageLog table + // save Response in messageLog table private void saveResponse(Integer userId, String endUserIdPath, PaymentRefundTransactionResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { String jsonInString = null; @@ -648,7 +628,7 @@ private void saveResponse(Integer userId, String endUserIdPath, PaymentRefundTra messageLog1 = new MessageLog(); messageLog1.setRequest(jsonInString); messageLog1.setStatus(status); - messageLog1.setType("1"); + messageLog1.setType(MessageType.Response.getValue()); messageLog1.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog1.setUserid(userId); messageLog1.setReference("msisdn"); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 74f5bc82..1bac9338 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -32,9 +32,8 @@ import com.wso2telco.services.dep.sandbox.dao.PaymentDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.*; +import com.wso2telco.services.dep.sandbox.servicefactory.Status; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; import com.wso2telco.services.dep.sandbox.util.*; @@ -203,7 +202,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) if (clientCorrelator != null) { - String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, "1", "1", referenceCode); + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), referenceCode); if (response != null) { @@ -220,12 +219,12 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) } //check referenceCode - String duplicateReferenceCode = checkReferenceCode(userId, serviceNameId, endUserId, "1", "1", referenceCode); + String duplicateReferenceCode = checkReferenceCode(userId, serviceNameId, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), referenceCode); if((duplicateReferenceCode!=null)){ LOG.error("###PAYMENT### Already charged for this reference code"); responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Already used reference code")); + ServiceError.INVALID_INPUT_VALUE, "Already charged for this reference code")); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); return responseWrapper; } @@ -342,7 +341,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) responseWrapper.setHttpStatus(Response.Status.OK); // Save Success Response - saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, "1"); + saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, Status.Success.getValue()); } catch (Exception ex) { LOG.error("###PAYMENT### Error Occured in PAYMENT Service. ", ex); @@ -438,25 +437,6 @@ private String checkReferenceCode(int userId, int serviceNameId, String tel, Str return jsonString; } - // saving request in message log table - private MessageLog saveRequest(ChargePaymentRequestWrapperDTO extendedRequestDTO, - String endUserIdPath, APIServiceCalls apiServiceCalls, String jsonString, String status) throws Exception { - - MessageLog messageLog = new MessageLog(); - messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); - messageLog.setUserid(extendedRequestDTO.getUser().getId()); - messageLog.setReference("msisdn"); - messageLog.setValue(endUserIdPath); - messageLog.setRequest(jsonString); - messageLog.setStatus(status); - messageLog.setType("0"); - messageLog.setMessageTimestamp(new Date()); - - loggingDAO.saveMessageLog(messageLog); - - return messageLog; - } - // Save Response in messageLog table private void saveResponse(ChargePaymentRequestWrapperDTO extendedRequestDTO, String endUserIdPath, ChargePaymentResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { @@ -473,7 +453,7 @@ private void saveResponse(ChargePaymentRequestWrapperDTO extendedRequestDTO, messageLog1 = new MessageLog(); messageLog1.setRequest(jsonInString); messageLog1.setStatus(status); - messageLog1.setType("1"); + messageLog1.setType(MessageType.Response.getValue()); messageLog1.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog1.setUserid(extendedRequestDTO.getUser().getId()); messageLog1.setReference("msisdn"); From a07d360858652c25c76adf381f614da8f853e8a2 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 2 Mar 2017 10:07:53 +0530 Subject: [PATCH 057/112] updated Readme.md --- dep-sandbox/README.md | 160 +++++++++++++++++++++++++++++------------- 1 file changed, 110 insertions(+), 50 deletions(-) diff --git a/dep-sandbox/README.md b/dep-sandbox/README.md index acc4f584..0d77d896 100644 --- a/dep-sandbox/README.md +++ b/dep-sandbox/README.md @@ -1209,6 +1209,7 @@ Payment service will provide the Service providers a list of payment services av - Charge a User - Charge a subscriber for a service provided by your Web application. - Refund a User - Refund a end user +- List Transactions - Return all the transactions of the end user for the calling application ####6.6.2 API features with postman testing @@ -1229,7 +1230,7 @@ Request Body : "endUserId":"tel:+00123456789", "paymentAmount":{ "chargingInformation":{ - "amount":"2", + "amount":"10.00", "currency":"LKR", "description":"Alien Invaders Game" }, @@ -1252,15 +1253,15 @@ Response : ``` { "amountTransaction":{ - “clientCorrelator”: ”123456:AIN12345”, - "endUserId":"tel:+00123456789", + "clientCorrelator":"123456:AIN12345", + "endUserId":"tel:+94773524308", "paymentAmount":{ "chargingInformation":{ - "amount":"10", - "currency":"LKR", + "amount":"10.00", + "currency":"USD", "description":"Alien Invaders Game" }, - "totalAmountCharged":"12.99", + "totalAmountCharged":"10.00", "chargingMetaData":{ "onBehalfOf":"Example Games Inc", "purchaseCategoryCode":"Game", @@ -1269,10 +1270,13 @@ Response : } }, "referenceCode":"REF-12345", + "serverReferenceCode":"PAYMENT_REF000057", + "resourceURL":"http://localhost:8181/payment/{v1}/tel:+94773524308/transactions/amount/78999", "transactionOperationStatus":"Charged" } } + ``` - Refund - Refund an end user @@ -1290,61 +1294,117 @@ Request Body : ``` { - "amountTransaction":{ - “clientCorrelator”: ”123456:AIN12345”, - "endUserId":"tel:+00123456789", - "originalServerReferenceCode":"ABC-123", - "paymentAmount":{ - "chargingInformation":{ - "amount":"10", - "currency":"USD", - "description":"Alien Invaders Game" - }, - "chargingMetaData":{ - "onBehalfOf":"Example Games Inc", - "purchaseCategoryCode":"Game", - "channel":"WAP", - "taxAmount":"0" - } - }, - "referenceCode":"REF-12345", - "originalServerReferenceCode":"ABC-123", - "transactionOperationStatus":"Refunded" - } + "amountTransaction":{ + "clientCorrelator":"123456:AIN12345", + "endUserId":"tel:+94773524308", + "paymentAmount":{ + "chargingInformation":{ + "amount":"10", + "currency":"USD", + "description":"Alien Invaders Game" + }, + "chargingMetaData":{ + "onBehalfOf":"Example Games Inc", + "purchaseCategoryCode":"Game", + "channel":"WAP", + "taxAmount":"0" + } + }, + "referenceCode":"REF-1234", + "originalServerReferenceCode":"PAYMENT_REF000057", + "transactionOperationStatus":"Refunded" + } } ``` Response : + ``` -{ - "amountTransaction":{ - “clientCorrelator”: ”123456:AIN12345”, - "endUserId":"tel:+00123456789", - "paymentAmount":{ - "chargingInformation":{ - "amount":"10", - "currency":"USD", - "description":"Alien Invaders" - }, - "chargingMetaData":{ - "onBehalfOf":"Example Games Inc", - "purchaseCategoryCode":"Game", - "channel":"WAP", - "taxAmount":"0" - }, - "totalAmountRefunded":"10" +{ + "amountTransaction": { + "clientCorrelator": "123456:AIN12345", + "endUserId": "tel:+94773524308", + "originalServerReferenceCode": "PAYMENT_REF000057", + "paymentAmount": { + "chargingInformation": { + "amount": "10", + "currency": "USD", + "description": "Alien Invaders Game" }, - "referenceCode":"REF-12345", - "originalServerReferenceCode":"ABC-123", - "resourceURL":" tel%3A%2B16309700001/amount/efg789", - "transactionOperationStatus":"Refunded" - } + "totalAmountRefunded": "10.0", + "chargingMetaData": { + "onBehalfOf": "Example Games Inc", + "purchaseCategoryCode": "Game", + "channel": "WAP", + "taxAmount": "0" + } + }, + "referenceCode": "REF-1234", + "resourceURL": "http://localhost:8181/payment/{v1}/tel:+94773524308/transactions/amount/00060", + "transactionOperationStatus": "Refunded" + } } ``` Response : 200 OK will be returned if the service is successfully added for the msisdn. -Unless 400 Bad Request will be returned \ No newline at end of file +Unless 400 Bad Request will be returned + +- List Transactions - Return all the transactions of the end user for the calling application +Maximum no of returned results is 20 + +Request : + +Type - GET + +Request URI- +``` +http://:/payment/{v1}/{endUserId}/transactions + +``` + +Response : + + +``` + +{ + "paymentTransactionList":{ + "amountTransaction":[ + { + "endUserId":" tel:+00123456789", + "paymentAmount":{ + "chargingInformation":{ + "amount":"9", + "currency":"USD", + "description":"Alien Invaders" + } + }, + "referenceCode":"REF-ASM600-239238", + "serverReferenceCode":"tx-a3c0e4e006da40a8a5b5-045972478cc3", + "resourceURL":, + "transactionOperationStatus":"Charged" + }, + { + "endUserId":" tel:+00123456789", + "paymentAmount":{ + "chargingInformation":{ + "amount":"6", + "currency":"USD", + "description":" Snakes Alive " + } + }, + "referenceCode":"REF-ASM600-2392344", + "serverReferenceCode":"tx-a3c0e4e006da60a8a5b5-044972478cc3", + "resourceURL":“”, + "transactionOperationStatus":"Charged" + } + ], + "resourceURL":”” + } +} + +``` \ No newline at end of file From 8948dd994319f9b3bc3dcbe67327572cc91d83e5 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 2 Mar 2017 12:16:57 +0530 Subject: [PATCH 058/112] changes to db script --- dep-sandbox/dbscripts/dep-sandbox1_6_0.sql | 6 +- .../sandbox/dao/model/domain/MessageLog.java | 12 ++-- .../AbstractRequestHandler.java | 2 +- ...{Status.java => MessageProcessStatus.java} | 10 ++-- .../sandbox/servicefactory/MessageType.java | 8 +-- .../credit/PatialRefundRequestHandler.java | 56 +++++++++---------- .../location/LocationRequestHandler.java | 11 ++-- .../PaymentListTransactionRequestHandler.java | 8 +-- .../payment/PaymentRefundRequestHandler.java | 55 +++++++++--------- .../payment/PaymentRequestHandler.java | 30 +++++----- 10 files changed, 95 insertions(+), 103 deletions(-) rename dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/{Status.java => MessageProcessStatus.java} (84%) diff --git a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql index 542c4e41..531d2424 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql @@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `sbxapiservicecalls` ( -- Dumping data for table `sbxapiservicecalls` -- -INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'); +INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'),(13,1,'Location'); @@ -668,8 +668,8 @@ CREATE TABLE IF NOT EXISTS `ussd_transactions` ( CREATE TABLE IF NOT EXISTS `sbtmessagelog` ( `id` int(11) NOT NULL AUTO_INCREMENT, `request` text, - `status` varchar(100) DEFAULT '0', - `type` varchar(100) DEFAULT '0', + `status` int(11) DEFAULT 0, + `type` int(11) DEFAULT 0, `servicenameid` int(11) NOT NULL, `userid` int(11) NOT NULL, `reference` varchar(100) DEFAULT NULL, diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java index 28c5bf1a..b83a1249 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/MessageLog.java @@ -25,10 +25,10 @@ public class MessageLog { private String request; @Column(name = "status") - private String status; + private int status; @Column(name = "type") - private String type; + private int type; @Column(name = "servicenameid") private int servicenameid; @@ -102,19 +102,19 @@ public void setMessageTimestamp(Date messageTimestamp) { this.messageTimestamp = messageTimestamp; } - public String getStatus() { + public int getStatus() { return status; } - public void setStatus(String status) { + public void setStatus(int status) { this.status = status; } - public String getType() { + public int getType() { return type; } - public void setType(String type) { + public void setType(int type) { this.type = type; } } \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java index 21767f56..08a76fe2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java @@ -210,7 +210,7 @@ private int saveMessageLog(String requestType,String apiService, String jsonStri messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog.setUserid(user.getId()); messageLog.setReference("msisdn"); - messageLog.setStatus("0"); + messageLog.setStatus(0); messageLog.setType(MessageType.Request.getValue()); messageLog.setValue(number); messageLog.setRequest(jsonString); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/Status.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageProcessStatus.java similarity index 84% rename from dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/Status.java rename to dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageProcessStatus.java index 7e7fe3d0..892d1b27 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/Status.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageProcessStatus.java @@ -16,15 +16,15 @@ package com.wso2telco.services.dep.sandbox.servicefactory; -public enum Status { +public enum MessageProcessStatus { - Failed("0"),Success("1"); + Failed(0),Success(1); - private String value; + private int value; - private Status(String value) { this.value=value; } + private MessageProcessStatus(int value) { this.value=value; } - public String getValue() { + public int getValue() { return value; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageType.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageType.java index a63cb5f9..7d217851 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageType.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/MessageType.java @@ -18,15 +18,15 @@ public enum MessageType { - Request("0"),Response("1"); + Request(0),Response(1); - private String value; + private int value; - private MessageType(String value) { + private MessageType(int value) { this.value= value; } - public String getValue() { + public int getValue() { return value; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index f3b98bd2..af06b2b8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -36,9 +36,7 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.*; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; import com.wso2telco.services.dep.sandbox.util.CommonUtil; import com.wso2telco.services.dep.sandbox.util.MessageLogHandler; @@ -228,7 +226,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro if (clientCorrelator != null) { - String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserID, "1", "1", referenceCode); + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserID, MessageProcessStatus.Success, MessageType.Response, referenceCode); if (response != null) { RefundResponseBean bean = new RefundResponseBean(); @@ -244,7 +242,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro } - String result = checkReferenceCode(userId, serviceNameId, endUserID, "1", "1", referenceCode); + String result = checkReferenceCode(userId, serviceNameId, endUserID, MessageProcessStatus.Success, MessageType.Response, referenceCode); if ((result != null)) { LOG.error("###REFUND### Already charged for this reference code"); @@ -255,7 +253,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro } // check serverReferenceCode against OriginalServerReferenceCode - Double validTransaction = checkOriginalServerReferenceWithServerReference(userId, endUserID, "1", "1", serverTransactionReference); + Double validTransaction = checkOriginalServerReferenceWithServerReference(userId, endUserID, MessageProcessStatus.Success, MessageType.Response, serverTransactionReference); // check account amount decimal format BigDecimal bigDecimal = new BigDecimal(RefundAmount); @@ -326,7 +324,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata); - saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, "1"); + saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, MessageProcessStatus.Success); responseWrapperDTO.setHttpStatus(Response.Status.OK); return responseWrapperDTO; } else { @@ -349,7 +347,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro } catch (Exception ex) { RefundResponseBean responseBean = buildJsonResponseBody(RefundAmount, clientCorrelator, merchantIdentification, reasonForRefund, serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata); - saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, "0"); + saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, MessageProcessStatus.Failed); LOG.error("###REFUND### Error in processing credit service request. ", ex); responseWrapperDTO .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); @@ -409,7 +407,7 @@ public boolean containsChannel(String channelValue) { } // Check already existing clientcorrelator return response body - private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, MessageProcessStatus status, MessageType type, String referenceCode) throws Exception { List list = new ArrayList<>(); list.add(serviceNameId); @@ -421,11 +419,11 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI if (response != null) { - String responseStatus = response.get(i).getStatus(); - String responseType = response.get(i).getType(); + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); String responseClientCorrelator; - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = response.get(i).getRequest(); org.json.JSONObject json = new org.json.JSONObject(request); responseClientCorrelator = null; @@ -453,7 +451,7 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI } //check reference code - private String checkReferenceCode(int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + private String checkReferenceCode(int userId, int serviceNameId, String tel, MessageProcessStatus status, MessageType type, String referenceCode) throws Exception { List list = new ArrayList<>(); list.add(serviceNameId); @@ -464,10 +462,10 @@ private String checkReferenceCode(int userId, int serviceNameId, String tel, Str if (response != null) { - String responseStatus = response.get(i).getStatus(); - String responseType = response.get(i).getType(); + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = response.get(i).getRequest(); org.json.JSONObject json = new org.json.JSONObject(request); responseReferenceCode = json.getJSONObject("refundResponse").get("referenceCode").toString(); @@ -490,7 +488,7 @@ private String checkReferenceCode(int userId, int serviceNameId, String tel, Str } - private double checkOriginalServerReferenceWithServerReference(int userId, String tel, String status, String type, String originalServerReferenceCode) throws Exception { + private double checkOriginalServerReferenceWithServerReference(int userId, String tel, MessageProcessStatus status, MessageType type, String originalServerReferenceCode) throws Exception { double totalAmountRefunded = 0.0; @@ -504,10 +502,10 @@ private double checkOriginalServerReferenceWithServerReference(int userId, Strin if (servercodeList != null) { - String responseStatus = servercodeList.get(i).getStatus(); - String responseType = servercodeList.get(i).getType(); + int responseStatus = servercodeList.get(i).getStatus(); + int responseType = servercodeList.get(i).getType(); - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = servercodeList.get(i).getRequest(); org.json.JSONObject json = new org.json.JSONObject(request); String serverReferenceCode = json.get("serverReferenceCode").toString(); @@ -535,10 +533,10 @@ private double checkOriginalServerReferenceWithServerReference(int userId, Strin for (int i = 0; i < originalServerReferenceCodeList.size(); i++) { - String responseStatus = originalServerReferenceCodeList.get(i).getStatus(); - String responseType = originalServerReferenceCodeList.get(i).getType(); + int responseStatus = originalServerReferenceCodeList.get(i).getStatus(); + int responseType = originalServerReferenceCodeList.get(i).getType(); - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = originalServerReferenceCodeList.get(i).getRequest(); org.json.JSONObject json = new org.json.JSONObject(request); String responseOriginalServerReferenceCode = json.getJSONObject("refundResponse").get("originalServerReferenceCode").toString(); @@ -560,10 +558,10 @@ private double checkOriginalServerReferenceWithServerReference(int userId, Strin List messageLogsForRefundList = loggingDAO.getMessageLogs(userId, refundIdList, "msisdn", "tel:+" + tel, null, null); for (int i = 0; i < messageLogsForRefundList.size(); i++) { - String responseStatus = messageLogsForRefundList.get(i).getStatus(); - String responseType = messageLogsForRefundList.get(i).getType(); + int responseStatus = messageLogsForRefundList.get(i).getStatus(); + int responseType = messageLogsForRefundList.get(i).getType(); - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = messageLogsForRefundList.get(i).getRequest(); org.json.JSONObject json = new org.json.JSONObject(request); @@ -584,7 +582,7 @@ private double checkOriginalServerReferenceWithServerReference(int userId, Strin // Save Response in messageLog table private void saveResponse(PatialRefundRequestWrapper extendedRequestDTO, - String endUserIdPath, RefundResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { + String endUserIdPath, RefundResponseBean responseBean, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { Gson resp = new Gson(); JsonElement je = new JsonParser().parse(resp.toJson(responseBean)); @@ -594,8 +592,8 @@ private void saveResponse(PatialRefundRequestWrapper extendedRequestDTO, MessageLog messageLog = new MessageLog(); messageLog = new MessageLog(); messageLog.setRequest(jsonInString); - messageLog.setStatus(status); - messageLog.setType("1"); + messageLog.setStatus(status.getValue()); + messageLog.setType(1); messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog.setUserid(extendedRequestDTO.getUser().getId()); messageLog.setReference("msisdn"); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java index eda6a66d..0a2e2280 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java @@ -24,10 +24,7 @@ import com.wso2telco.services.dep.sandbox.dao.LocationDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.LocationRequestWrapperDTO; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.MessageType; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestResponseRequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.*; import com.wso2telco.services.dep.sandbox.util.ServiceName; import org.apache.commons.logging.LogFactory; import org.json.JSONObject; @@ -98,7 +95,7 @@ protected Returnable process(LocationRequestWrapperDTO extendedRequestDTO) throw responseWrapperDTO.setTerminalLocationList(objTerminalLocationList); responseWrapperDTO.setHttpStatus(Status.OK); - saveResponse(objTerminalLocation,extendedRequestDTO.getAddress(),apiServiceCalls,"1"); + saveResponse(objTerminalLocation,extendedRequestDTO.getAddress(),apiServiceCalls, MessageProcessStatus.Success); } else if (locparam.getLocationRetrieveStatus().equals(NOT_RETRIEVED)) { @@ -199,7 +196,7 @@ public String getnumber(LocationRequestWrapperDTO requestDTO) { * @param status * @throws Exception */ - private void saveResponse(TerminalLocation terminalLocation,String endUserId, APIServiceCalls apiServiceCalls, String status) throws Exception { + private void saveResponse(TerminalLocation terminalLocation,String endUserId, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { String jsonInString = null; Gson resp = new Gson(); @@ -211,7 +208,7 @@ private void saveResponse(TerminalLocation terminalLocation,String endUserId, AP MessageLog messageLog = new MessageLog(); messageLog = new MessageLog(); messageLog.setRequest(jsonInString); - messageLog.setStatus(status); + messageLog.setStatus(status.getValue()); messageLog.setType(MessageType.Response.getValue()); messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog.setUserid(extendedRequestDTO.getUser().getId()); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java index 52bb200e..1c45a484 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentListTransactionRequestHandler.java @@ -34,7 +34,7 @@ import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.MessageType; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; -import com.wso2telco.services.dep.sandbox.servicefactory.Status; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageProcessStatus; import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.logging.LogFactory; import org.json.simple.JSONObject; @@ -130,10 +130,10 @@ protected Returnable process(PaymentListTransactionRequestWrapper extendedReques if (responses != null && !responses.isEmpty()) { for (int i = 0; i < responses.size(); i++) { - String responseStatus = responses.get(i).getStatus(); - String responseType = responses.get(i).getType(); + int responseStatus = responses.get(i).getStatus(); + int responseType = responses.get(i).getType(); - if (responseType.equals(MessageType.Response.getValue()) && responseStatus.equals(Status.Success.getValue())) { + if (responseType == MessageType.Response.getValue() && responseStatus == MessageProcessStatus.Success.getValue()) { String request = responses.get(i).getRequest(); org.json.JSONObject json = new org.json.JSONObject(request); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java index 4647b725..fa430c30 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java @@ -32,7 +32,7 @@ import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.servicefactory.*; -import com.wso2telco.services.dep.sandbox.servicefactory.Status; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageProcessStatus; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; @@ -208,9 +208,6 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); String transactionOperationStatus = CommonUtil.getNullOrTrimmedValue(request.getTransactionOperationStatus()); serviceCallRefund = ServiceName.RefundUser.toString(); - // Attribute Name Used in wallet - String accountCurrencyAttribute = AttributeName.Currency.toString().toLowerCase(); - String serviceCallBalanceLookUp = ServiceName.BalanceLookup.toString(); Integer userId = extendedRequestDTO.getUser().getId(); String callbackData = CommonUtil.getNullOrTrimmedValue(request.getCallbackData()); String mandateId = CommonUtil.getNullOrTrimmedValue(request.getMandateId()); @@ -228,7 +225,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallRefund); Gson gson = new Gson(); - String jsonString = gson.toJson(requestBean); +// String jsonString = gson.toJson(requestBean); try { @@ -236,7 +233,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) if (clientCorrelator != null) { - String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), referenceCode); + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, MessageProcessStatus.Success, MessageType.Response, referenceCode); if (response != null) { @@ -252,7 +249,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) } //check referenceCode - String result = checkReferenceCode(userId, serviceNameId, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), referenceCode); + String result = checkReferenceCode(userId, serviceNameId, endUserId, MessageProcessStatus.Success, MessageType.Response, referenceCode); if((result!=null)){ LOG.error("###PAYMENT### Already charged for this reference code"); @@ -266,7 +263,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) int serviceIdForMakePayment = apiServiceCallForMakePayment.getApiServiceCallId(); - Double validTransaction = checkOriginalServerReferenceWithServerReference(userId, serviceIdForMakePayment, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), originalServerReferenceCode); + Double validTransaction = checkOriginalServerReferenceWithServerReference(userId, serviceIdForMakePayment, endUserId, MessageProcessStatus.Success, MessageType.Response, originalServerReferenceCode); // check path param endUserId and request body endUserId if (!(endUserIdPath.equals(endUserIdRequest))) { @@ -409,7 +406,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) responseWrapper.setRefundPaymentDTO(refundPaymentDTO); // Save Response in message log table - saveResponse(userId, endUserIdPath, responseBean, apiServiceCalls, Status.Success.getValue()); + saveResponse(userId, endUserIdPath, responseBean, apiServiceCalls, MessageProcessStatus.Success); } catch (Exception ex) { LOG.error("###REFUND### Error Occured in PAYMENT Service. ", ex); @@ -421,7 +418,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) return responseWrapper; } - private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, MessageProcessStatus status, MessageType type, String referenceCode) throws Exception { List list = new ArrayList<>(); list.add(serviceNameId); @@ -433,11 +430,11 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI if (response != null) { - String responseStatus = response.get(i).getStatus(); - String responseType = response.get(i).getType(); + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); String responseClientCorrelator; - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = response.get(i).getRequest(); JSONObject json = new JSONObject(request); @@ -468,7 +465,7 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI } //check reference code - private String checkReferenceCode(int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + private String checkReferenceCode(int userId, int serviceNameId, String tel, MessageProcessStatus status, MessageType type, String referenceCode) throws Exception { List list = new ArrayList<>(); list.add(serviceNameId); @@ -480,10 +477,10 @@ private String checkReferenceCode(int userId, int serviceNameId, String tel, Str if (response != null) { - String responseStatus = response.get(i).getStatus(); - String responseType = response.get(i).getType(); + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = response.get(i).getRequest(); JSONObject json = new JSONObject(request); responseReferenceCode = json.get("referenceCode").toString(); @@ -505,7 +502,7 @@ private String checkReferenceCode(int userId, int serviceNameId, String tel, Str return jsonString; } - private double checkOriginalServerReferenceWithServerReference(int userId, int serviceNameId, String tel, String status, String type, String originalServerReferenceCode) throws Exception { + private double checkOriginalServerReferenceWithServerReference(int userId, int serviceNameId, String tel, MessageProcessStatus status, MessageType type, String originalServerReferenceCode) throws Exception { List list = new ArrayList<>(); list.add(serviceNameId); @@ -528,10 +525,10 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s if (servercodeList != null) { - String responseStatus = servercodeList.get(i).getStatus(); - String responseType = servercodeList.get(i).getType(); + int responseStatus = servercodeList.get(i).getStatus(); + int responseType = servercodeList.get(i).getType(); - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = servercodeList.get(i).getRequest(); JSONObject json = new JSONObject(request); String serverReferenceCode = json.get("serverReferenceCode").toString(); @@ -555,10 +552,10 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s if (originalServerReferenceCodeList != null) { - String responseStatus = originalServerReferenceCodeList.get(i).getStatus(); - String responseType = originalServerReferenceCodeList.get(i).getType(); + int responseStatus = originalServerReferenceCodeList.get(i).getStatus(); + int responseType = originalServerReferenceCodeList.get(i).getType(); - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = originalServerReferenceCodeList.get(i).getRequest(); JSONObject json = new JSONObject(request); String responseOriginalServerReferenceCode = json.get("originalServerReferenceCode").toString(); @@ -589,10 +586,10 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s for (int i = 0; i< messageLogForPartialRefund.size(); i++) { - String responseStatus = messageLogForPartialRefund.get(i).getStatus(); - String responseType = messageLogForPartialRefund.get(i).getType(); + int responseStatus = messageLogForPartialRefund.get(i).getStatus(); + int responseType = messageLogForPartialRefund.get(i).getType(); - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = messageLogForPartialRefund.get(i).getRequest(); JSONObject json = new JSONObject(request); @@ -614,7 +611,7 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s } // save Response in messageLog table - private void saveResponse(Integer userId, String endUserIdPath, PaymentRefundTransactionResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { + private void saveResponse(Integer userId, String endUserIdPath, PaymentRefundTransactionResponseBean responseBean, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { String jsonInString = null; Gson resp = new Gson(); @@ -627,7 +624,7 @@ private void saveResponse(Integer userId, String endUserIdPath, PaymentRefundTra MessageLog messageLog1 = new MessageLog(); messageLog1 = new MessageLog(); messageLog1.setRequest(jsonInString); - messageLog1.setStatus(status); + messageLog1.setStatus(status.getValue()); messageLog1.setType(MessageType.Response.getValue()); messageLog1.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog1.setUserid(userId); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 1bac9338..1bece1e2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -33,7 +33,7 @@ import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.servicefactory.*; -import com.wso2telco.services.dep.sandbox.servicefactory.Status; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageProcessStatus; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; import com.wso2telco.services.dep.sandbox.util.*; @@ -194,7 +194,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); Gson gson = new Gson(); - String jsonString = gson.toJson(requestBean); +// String jsonString = gson.toJson(requestBean); try { @@ -202,7 +202,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) if (clientCorrelator != null) { - String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), referenceCode); + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, MessageProcessStatus.Success, MessageType.Response, referenceCode); if (response != null) { @@ -219,7 +219,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) } //check referenceCode - String duplicateReferenceCode = checkReferenceCode(userId, serviceNameId, endUserId, Status.Success.getValue(), MessageType.Response.getValue(), referenceCode); + String duplicateReferenceCode = checkReferenceCode(userId, serviceNameId, endUserId, MessageProcessStatus.Success, MessageType.Response, referenceCode); if((duplicateReferenceCode!=null)){ LOG.error("###PAYMENT### Already charged for this reference code"); @@ -341,7 +341,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) responseWrapper.setHttpStatus(Response.Status.OK); // Save Success Response - saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, Status.Success.getValue()); + saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, MessageProcessStatus.Success); } catch (Exception ex) { LOG.error("###PAYMENT### Error Occured in PAYMENT Service. ", ex); @@ -354,7 +354,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) } // Check already existing clientcorrelator return response body - private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, MessageProcessStatus status, MessageType type, String referenceCode) throws Exception { List list = new ArrayList<>(); list.add(serviceNameId); @@ -366,11 +366,11 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI if (response != null) { - String responseStatus = response.get(i).getStatus(); - String responseType = response.get(i).getType(); + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); String responseClientCorrelator; - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = response.get(i).getRequest(); JSONObject json = new JSONObject(request); responseClientCorrelator = null; @@ -400,7 +400,7 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI } //check reference code - private String checkReferenceCode(int userId, int serviceNameId, String tel, String status, String type, String referenceCode) throws Exception { + private String checkReferenceCode(int userId, int serviceNameId, String tel, MessageProcessStatus status, MessageType type, String referenceCode) throws Exception { List list = new ArrayList<>(); list.add(serviceNameId); @@ -412,10 +412,10 @@ private String checkReferenceCode(int userId, int serviceNameId, String tel, Str if (response != null) { - String responseStatus = response.get(i).getStatus(); - String responseType = response.get(i).getType(); + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); - if (responseType.equals(type) && responseStatus.equals(status)) { + if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = response.get(i).getRequest(); JSONObject json = new JSONObject(request); responseReferenceCode = json.get("referenceCode").toString(); @@ -439,7 +439,7 @@ private String checkReferenceCode(int userId, int serviceNameId, String tel, Str // Save Response in messageLog table private void saveResponse(ChargePaymentRequestWrapperDTO extendedRequestDTO, - String endUserIdPath, ChargePaymentResponseBean responseBean, APIServiceCalls apiServiceCalls, String status) throws Exception { + String endUserIdPath, ChargePaymentResponseBean responseBean, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { String jsonInString = null; Gson resp = new Gson(); @@ -452,7 +452,7 @@ private void saveResponse(ChargePaymentRequestWrapperDTO extendedRequestDTO, MessageLog messageLog1 = new MessageLog(); messageLog1 = new MessageLog(); messageLog1.setRequest(jsonInString); - messageLog1.setStatus(status); + messageLog1.setStatus(status.getValue()); messageLog1.setType(MessageType.Response.getValue()); messageLog1.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog1.setUserid(extendedRequestDTO.getUser().getId()); From b8c9e8960fa76b5582f715a405d54eeed3d225f2 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Fri, 3 Mar 2017 18:11:55 +0530 Subject: [PATCH 059/112] Add compatible versions --- dep-sandbox/README.md | 43 +++++- .../dbscripts/migration1_5_0to1_6_0.sql | 10 +- .../dep/sandbox/service/Application.java | 3 +- .../sandbox/service/PaymentService0_8.java | 122 ++++++++++++++++++ ...entService.java => PaymentService1_3.java} | 10 +- ...va => PaymentRefundRequestHandler0_8.java} | 24 ++-- .../PaymentRefundRequestHandler1_3.java | 28 ++++ .../payment/PaymentRequestFactory.java | 17 ++- .../payment/PaymentRequestHandler.java | 7 +- 9 files changed, 231 insertions(+), 33 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService0_8.java rename dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/{PaymentService.java => PaymentService1_3.java} (97%) rename dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/{PaymentRefundRequestHandler.java => PaymentRefundRequestHandler0_8.java} (96%) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler1_3.java diff --git a/dep-sandbox/README.md b/dep-sandbox/README.md index 0d77d896..6408d652 100644 --- a/dep-sandbox/README.md +++ b/dep-sandbox/README.md @@ -1205,7 +1205,7 @@ Unless 400 Bad Request will be returned ####6.6.1 Introduction -Payment service will provide the Service providers a list of payment services available for the given MSISDN and based on the services available service provider can make/refund payment. Basically Payment API supports 2 operations. +Payment service will provide the Service providers a list of payment services available for the given MSISDN and based on the services available service provider can make/refund payment. Basically Payment API supports 3 operations. - Charge a User - Charge a subscriber for a service provided by your Web application. - Refund a User - Refund a end user @@ -1213,13 +1213,15 @@ Payment service will provide the Service providers a list of payment services av ####6.6.2 API features with postman testing +- Charge - Charge a subscriber for a service provided by your application + Request : Type - POST Request URI: ``` -http://:/payment/{v1}/transaction/{endUserId}/amount +http://:/payment/v1/transaction/{endUserId}/amount ``` Request Body : @@ -1271,7 +1273,7 @@ Response : }, "referenceCode":"REF-12345", "serverReferenceCode":"PAYMENT_REF000057", - "resourceURL":"http://localhost:8181/payment/{v1}/tel:+94773524308/transactions/amount/78999", + "resourceURL":"http://localhost:8181/payment/v1/tel:+94773524308/transactions/amount/78999", "transactionOperationStatus":"Charged" } } @@ -1287,7 +1289,7 @@ Type - POST Request URI: ``` -http://:/payment/{v1}/transaction/{endUserId}/amount +http://:/payment/v1/transaction/{endUserId}/amount ``` Request Body : @@ -1342,7 +1344,7 @@ Response : } }, "referenceCode": "REF-1234", - "resourceURL": "http://localhost:8181/payment/{v1}/tel:+94773524308/transactions/amount/00060", + "resourceURL": "http://localhost:8181/payment/v1/tel:+94773524308/transactions/amount/00060", "transactionOperationStatus": "Refunded" } } @@ -1407,4 +1409,33 @@ Response : } } -``` \ No newline at end of file +``` + +##7 First Genaration APIs + +###7.1 Payment Service + +####7.1.1 Introduction + +Payment service will provide the Service providers a list of payment services available for the given MSISDN and based on the services available service provider can make/refund payment. Basically Payment API supports 2 operations. + +- Charge a User - Charge a subscriber for a service provided by your Web application + +Request : + +Type - POST + +Request URI: +``` +http://:/payment/v0_8/transaction/{endUserId}/amount +``` + +- Refund a User - Refund a end user + +Request : + +Type - POST + +Request URI: +``` +http://:/payment/v0_8/transaction/{endUserId}/amount diff --git a/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql b/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql index 0f49b1eb..e4da4331 100644 --- a/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql +++ b/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql @@ -1,6 +1,12 @@ +USE `sandbox`; -INSERT INTO `sbxapiservicecalls` VALUES (10,4,'ChargeUser'),(11,4,'RefundUser'); +INSERT INTO `sbxapiservicecalls` VALUES (10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'),(13,1,'Location'); INSERT INTO `sbxattribute` VALUES (29,'patialRefund'),(30,'makePayment'),(31,'clientCorrelatorPayment'),(32,'referenceCodePayment'),(33,'refundUser'); -INSERT INTO `sbtattributedistribution` VALUES (32,29,9),(33,26,9),(34,25,9),(35,30,10),(36,31,10),(37,32,10),(38,33,11),(39,31,11),(40,32,11); \ No newline at end of file +INSERT INTO `sbtattributedistribution` VALUES (32,29,9),(33,26,9),(34,25,9),(35,30,10),(36,31,10),(37,32,10),(38,33,11),(39,31,11),(40,32,11); + +ALTER TABLE `sbtmessagelog` ADD ( +`status` int(11) DEFAULT 0, + `type` int(11) DEFAULT 0 + ); \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index bfdd99ac..cd6da1f2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -36,7 +36,8 @@ protected List getRestFulComponents() { listOfObject.add(new CreditService()); listOfObject.add(new WalletService()); listOfObject.add(new WalletConfigurationService()); - listOfObject.add(new PaymentService()); + listOfObject.add(new PaymentService0_8()); + listOfObject.add(new PaymentService1_3()); listOfObject.add(new LocationService()); return listOfObject; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService0_8.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService0_8.java new file mode 100644 index 00000000..d0cb258e --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService0_8.java @@ -0,0 +1,122 @@ + +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.service; + + +import com.google.gson.Gson; +import com.wordnik.swagger.annotations.*; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.PolicyException; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.exception.SandboxException; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.RequestError; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + + +@Path("payment/v0_8") +@Produces({MediaType.APPLICATION_JSON}) +@Api(value = "payment/{v08}", description = "Rest Service for Payment API") + + +public class PaymentService0_8 { + + protected static final String POLICYEXCEPTION = "POL0001"; + + Log LOG = LogFactory.getLog(PaymentService0_8.class); + + @POST + @Path("/{endUserId}/transactions/amount") + @ApiOperation(value = "makePaymentService", notes = "make payment service", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) + public Response makePayment( + @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, + PaymentRefundTransactionRequestBean makePaymentRequestBean, @Context HttpServletRequest request) { + if (LOG.isDebugEnabled()) { + LOG.debug("###PAYMENT### /{endUserId} invoked : endUserId - " + endUserId); + } + if (LOG.isDebugEnabled() && makePaymentRequestBean != null) { + LOG.debug(makePaymentRequestBean); + } + //Separate Charged and Refunded request calls + if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equalsIgnoreCase("charged")) { + + ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setPaymentRefundTransactionRequestBean(makePaymentRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Make Payment SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + } else if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equalsIgnoreCase("refunded")){ + + PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setRefundRequestBean(makePaymentRequestBean); + requestDTO.setRequestType(RequestType.PAYMENT); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("Make Payment SERVICE ERROR", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + } + + PolicyException policyException = new PolicyException(POLICYEXCEPTION, (ServiceError.INVALID_INPUT_VALUE).getMessage(), "transactionOperationStatus should be Charged/Refunded"); + RequestError requestError = new RequestError(); + requestError.setPolicyException(policyException); + Gson gson = new Gson(); + String errorMessage = gson.toJson(requestError); + Response response = Response.status(Response.Status.BAD_REQUEST).entity(errorMessage).build(); + return response; + + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService1_3.java similarity index 97% rename from dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java rename to dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService1_3.java index fad1312a..9e6adad3 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService1_3.java @@ -36,14 +36,14 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -@Path("payment/{v1}") +@Path("payment/v1") @Produces({MediaType.APPLICATION_JSON}) @Api(value = "payment/{v1}", description = "Rest Service for Payment API") -public class PaymentService { +public class PaymentService1_3 { protected static final String POLICYEXCEPTION = "POL0001"; - Log LOG = LogFactory.getLog(PaymentService.class); + Log LOG = LogFactory.getLog(PaymentService1_3.class); @POST @Path("/{endUserId}/transactions/amount") @@ -60,7 +60,7 @@ public Response makePayment( LOG.debug(makePaymentRequestBean); } //Separate Charged and Refunded request calls - if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Charged")) { + if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equalsIgnoreCase("charged")) { ChargePaymentRequestWrapperDTO requestDTO = new ChargePaymentRequestWrapperDTO(); requestDTO.setHttpRequest(request); @@ -83,7 +83,7 @@ public Response makePayment( return response; } - } else if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equals("Refunded")){ + } else if (makePaymentRequestBean.getAmountTransaction().getTransactionOperationStatus().equalsIgnoreCase("refunded")){ PaymentRefundRequestWrapperDTO requestDTO = new PaymentRefundRequestWrapperDTO(); requestDTO.setHttpRequest(request); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java similarity index 96% rename from dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java rename to dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java index fa430c30..146dc7ca 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java @@ -33,7 +33,6 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.servicefactory.*; import com.wso2telco.services.dep.sandbox.servicefactory.MessageProcessStatus; -import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.Channel; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.TransactionStatus; import com.wso2telco.services.dep.sandbox.util.*; @@ -48,7 +47,7 @@ import java.util.Date; import java.util.List; -public class PaymentRefundRequestHandler extends AbstractRequestHandler implements RequestResponseRequestHandleable { +public class PaymentRefundRequestHandler0_8 extends AbstractRequestHandler implements RequestResponseRequestHandleable { private PaymentDAO paymentDAO; @@ -64,7 +63,7 @@ public class PaymentRefundRequestHandler extends AbstractRequestHandler Date: Fri, 3 Mar 2017 18:51:11 +0530 Subject: [PATCH 060/112] Update version numbers --- dep-sandbox/README.md | 12 ++++++------ .../services/dep/sandbox/service/Application.java | 4 ++-- ...ymentService0_8.java => PaymentService_v0_8.java} | 6 +++--- ...ymentService1_3.java => PaymentService_v1_3.java} | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) rename dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/{PaymentService0_8.java => PaymentService_v0_8.java} (97%) rename dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/{PaymentService1_3.java => PaymentService_v1_3.java} (97%) diff --git a/dep-sandbox/README.md b/dep-sandbox/README.md index 6408d652..a34fcf28 100644 --- a/dep-sandbox/README.md +++ b/dep-sandbox/README.md @@ -1221,7 +1221,7 @@ Type - POST Request URI: ``` -http://:/payment/v1/transaction/{endUserId}/amount +http://:/payment/v1_3/transaction/{endUserId}/amount ``` Request Body : @@ -1273,7 +1273,7 @@ Response : }, "referenceCode":"REF-12345", "serverReferenceCode":"PAYMENT_REF000057", - "resourceURL":"http://localhost:8181/payment/v1/tel:+94773524308/transactions/amount/78999", + "resourceURL":"http://localhost:8181/payment/v1_3/tel:+94773524308/transactions/amount/78999", "transactionOperationStatus":"Charged" } } @@ -1289,7 +1289,7 @@ Type - POST Request URI: ``` -http://:/payment/v1/transaction/{endUserId}/amount +http://:/payment/v1_3/transaction/{endUserId}/amount ``` Request Body : @@ -1344,7 +1344,7 @@ Response : } }, "referenceCode": "REF-1234", - "resourceURL": "http://localhost:8181/payment/v1/tel:+94773524308/transactions/amount/00060", + "resourceURL": "http://localhost:8181/payment/v1_3/tel:+94773524308/transactions/amount/00060", "transactionOperationStatus": "Refunded" } } @@ -1364,7 +1364,7 @@ Type - GET Request URI- ``` -http://:/payment/{v1}/{endUserId}/transactions +http://:/payment/v1_3/{endUserId}/transactions ``` @@ -1411,7 +1411,7 @@ Response : ``` -##7 First Genaration APIs +##7 Supported API Versions ###7.1 Payment Service diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index cd6da1f2..1702a5e3 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -36,8 +36,8 @@ protected List getRestFulComponents() { listOfObject.add(new CreditService()); listOfObject.add(new WalletService()); listOfObject.add(new WalletConfigurationService()); - listOfObject.add(new PaymentService0_8()); - listOfObject.add(new PaymentService1_3()); + listOfObject.add(new PaymentService_v0_8()); + listOfObject.add(new PaymentService_v1_3()); listOfObject.add(new LocationService()); return listOfObject; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService0_8.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService_v0_8.java similarity index 97% rename from dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService0_8.java rename to dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService_v0_8.java index d0cb258e..43ab84e6 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService0_8.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService_v0_8.java @@ -39,14 +39,14 @@ @Path("payment/v0_8") @Produces({MediaType.APPLICATION_JSON}) -@Api(value = "payment/{v08}", description = "Rest Service for Payment API") +@Api(value = "payment/v08", description = "Rest Service for Payment API") -public class PaymentService0_8 { +public class PaymentService_v0_8 { protected static final String POLICYEXCEPTION = "POL0001"; - Log LOG = LogFactory.getLog(PaymentService0_8.class); + Log LOG = LogFactory.getLog(PaymentService_v0_8.class); @POST @Path("/{endUserId}/transactions/amount") diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService1_3.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService_v1_3.java similarity index 97% rename from dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService1_3.java rename to dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService_v1_3.java index 9e6adad3..c8fb3bcc 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService1_3.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/PaymentService_v1_3.java @@ -36,14 +36,14 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -@Path("payment/v1") +@Path("payment/v1_3") @Produces({MediaType.APPLICATION_JSON}) -@Api(value = "payment/{v1}", description = "Rest Service for Payment API") -public class PaymentService1_3 { +@Api(value = "payment/v1_3", description = "Rest Service for Payment API") +public class PaymentService_v1_3 { protected static final String POLICYEXCEPTION = "POL0001"; - Log LOG = LogFactory.getLog(PaymentService1_3.class); + Log LOG = LogFactory.getLog(PaymentService_v1_3.class); @POST @Path("/{endUserId}/transactions/amount") From ea8df2532cc2b114725a325816a35b09e9a57649 Mon Sep 17 00:00:00 2001 From: SidathWeerasinghe Date: Mon, 6 Mar 2017 05:30:30 +0000 Subject: [PATCH 061/112] [maven-release-plugin] prepare release v1_6_1 --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index d53fab8b..4cc45777 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.0-SNAPSHOT + 1.6.1 ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index d4df6f27..a69d4c86 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.0-SNAPSHOT + 1.6.1 ../../pom.xml diff --git a/pom.xml b/pom.xml index 0e70b14b..d7c383a3 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.6.0-SNAPSHOT + 1.6.1 WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_0_0-rc1 + v1_6_1 From 55c0d2f187bf9d0084ec0170b7a06dabaf033b86 Mon Sep 17 00:00:00 2001 From: SidathWeerasinghe Date: Mon, 6 Mar 2017 05:30:35 +0000 Subject: [PATCH 062/112] [maven-release-plugin] prepare for next development iteration --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index 4cc45777..b5236df8 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.1 + 1.6.2-SNAPSHOT ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index a69d4c86..6319f21a 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.1 + 1.6.2-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index d7c383a3..f34d7ece 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.6.1 + 1.6.2-SNAPSHOT WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_6_1 + v1_0_0-rc1 From 5ccfd1a43b49de1cd6a4443dbe72746399fd281d Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Thu, 9 Mar 2017 14:55:41 +0530 Subject: [PATCH 063/112] Implement Send SMS API for Gateway and Hub --- dep-sandbox/deploy/config.yml | 2 + .../dao/model/custom/DeliveryInfoList.java | 67 ++++ .../custom/DeliveryReceiptSubscription.java | 45 +++ .../custom/OutboundSMSMessageRequest.java | 63 ++++ .../custom/OutboundSMSMessageRequestBean.java | 110 ------ .../model/custom/OutboundSMSTextMessage.java | 30 ++ .../dao/model/custom/ReceiptRequest.java | 40 +++ .../custom/SendMTSMSRequestWrapperDTO.java | 24 -- .../dao/model/custom/SenderDetails.java | 49 +++ .../dep/sandbox/service/Application.java | 13 +- .../dep/sandbox/service/SandboxDTO.java | 13 +- .../dep/sandbox/service/SandboxService.java | 43 +-- .../sandbox/service/SmsServiceGateway.java | 80 +++++ .../dep/sandbox/service/smsServiceHub.java | 83 +++++ .../RequestBuilderFactoryGateway.java | 48 +++ .../RequestBuilderFactoryHub.java | 49 +++ .../OutboundSMSMessageResponseBean.java | 172 --------- .../smsmessaging/SMSRequestFactory.java | 14 +- .../SendMTSMSResponseWrapper.java | 51 --- .../smsmessaging/SendMTSMSService.java | 209 ----------- .../OutboundSMSMessageRequestBeanGateway.java | 61 ++++ .../OutboundSMSMessageResponseBean.java | 79 +++++ .../gateway/SMSRequestFactoryGateway.java | 51 +++ .../SendMTSMSRequestWrapperDTOGateway.java | 43 +++ .../gateway/SendMTSMSResponseWrapper.java | 48 +++ .../gateway/SendMTSMSService.java | 325 ++++++++++++++++++ ...eliveryNotificationRequestBeanGateway.java | 41 +++ ...ubscribeToDeliveryNotificationService.java | 4 +- .../hub/OutboundSMSMessageResponseBean.java | 54 +++ .../hub/SMSRequestFactoryHub.java | 50 +++ .../hub/SendMTSMSResponseWrapper.java | 33 ++ .../smsmessaging/hub/SendMTSMSService.java | 306 +++++++++++++++++ .../hub/outboundSMSMessageRequestBeanHub.java | 34 ++ .../hub/sendMTSMSRequestWrapperDTOHub.java | 26 ++ .../dep/sandbox/util/ServiceName.java | 2 +- 35 files changed, 1755 insertions(+), 607 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryInfoList.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryReceiptSubscription.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequest.java delete mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequestBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSTextMessage.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptRequest.java delete mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/SendMTSMSRequestWrapperDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/SenderDetails.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/smsServiceHub.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactoryGateway.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactoryHub.java delete mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/OutboundSMSMessageResponseBean.java delete mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SendMTSMSResponseWrapper.java delete mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SendMTSMSService.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageRequestBeanGateway.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageResponseBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSRequestWrapperDTOGateway.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSResponseWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationRequestBeanGateway.java rename dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/{ => gateway}/SubscribeToDeliveryNotificationService.java (82%) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/OutboundSMSMessageResponseBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SMSRequestFactoryHub.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SendMTSMSResponseWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SendMTSMSService.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/outboundSMSMessageRequestBeanHub.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/sendMTSMSRequestWrapperDTOHub.java diff --git a/dep-sandbox/deploy/config.yml b/dep-sandbox/deploy/config.yml index 01d89285..2698b070 100644 --- a/dep-sandbox/deploy/config.yml +++ b/dep-sandbox/deploy/config.yml @@ -39,3 +39,5 @@ logging: timeZone: UTC requestIdentifierSize: 6 + +behaveType: # Gateway or Hub \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryInfoList.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryInfoList.java new file mode 100644 index 00000000..952ae6df --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryInfoList.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + +import java.util.List; + +public class DeliveryInfoList { + + private String resourceURL; + private List deliveryInfo; + + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + + public List getDeliveryInfo() { + return deliveryInfo; + } + + public void setDeliveryInfo(List deliveryInfo) { + this.deliveryInfo = deliveryInfo; + } + + public static class DeliveryInfo { + + private String address; + private String deliveryStatus; + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getDeliveryStatus() { + return deliveryStatus; + } + + public void setDeliveryStatus(String deliveryStatus) { + this.deliveryStatus = deliveryStatus; + } + } +} + + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryReceiptSubscription.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryReceiptSubscription.java new file mode 100644 index 00000000..174acb35 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryReceiptSubscription.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + +public class DeliveryReceiptSubscription { + + + public static class CallbackReference{ + + private String callbackData; + private String notifyURL; + + public String getCallbackData() { + return callbackData; + } + + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } + + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + } + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequest.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequest.java new file mode 100644 index 00000000..1b1d8b23 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequest.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import java.util.ArrayList; +import java.util.List; + + +public class OutboundSMSMessageRequest { + + + private List address = new ArrayList(); + private OutboundSMSTextMessage outboundSMSTextMessage; + private String clientCorrelator; + private ReceiptRequest receiptRequest; + + + public List getAddress() { + return address; + } + + public void setAddress(List address) { + this.address = address; + } + + public OutboundSMSTextMessage getOutboundSMSTextMessage() { + return outboundSMSTextMessage; + } + + public void setOutboundSMSTextMessage(OutboundSMSTextMessage outboundSMSTextMessage) { + this.outboundSMSTextMessage = outboundSMSTextMessage; + } + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public ReceiptRequest getReceiptRequest() { + return receiptRequest; + } + + public void setReceiptRequest(ReceiptRequest receiptRequest) { + this.receiptRequest = receiptRequest; + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequestBean.java deleted file mode 100644 index b16f46ba..00000000 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequestBean.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.wso2telco.services.dep.sandbox.dao.model.custom; - -import java.util.ArrayList; -import java.util.List; - -public class OutboundSMSMessageRequestBean { - - private OutboundSMSMessageRequest outboundSMSMessageRequest = null; - - public OutboundSMSMessageRequest getOutboundSMSMessageRequest() { - return outboundSMSMessageRequest; - } - - public void setOutboundSMSMessageRequest(OutboundSMSMessageRequest outboundSMSMessageRequest) { - this.outboundSMSMessageRequest = outboundSMSMessageRequest; - } - - public static class OutboundSMSMessageRequest { - - private List address = new ArrayList(); - private String senderAddress = null; - private OutboundSMSTextMessage outboundSMSTextMessage = null; - private String clientCorrelator = null; - private ReceiptRequest receiptRequest = null; - private String senderName = null; - - public List getAddress() { - return address; - } - - public void setAddress(List address) { - this.address = address; - } - - public String getSenderAddress() { - return senderAddress; - } - - public void setSenderAddress(String senderAddress) { - this.senderAddress = senderAddress; - } - - public OutboundSMSTextMessage getOutboundSMSTextMessage() { - return outboundSMSTextMessage; - } - - public void setOutboundSMSTextMessage(OutboundSMSTextMessage outboundSMSTextMessage) { - this.outboundSMSTextMessage = outboundSMSTextMessage; - } - - public String getClientCorrelator() { - return clientCorrelator; - } - - public void setClientCorrelator(String clientCorrelator) { - this.clientCorrelator = clientCorrelator; - } - - public ReceiptRequest getReceiptRequest() { - return receiptRequest; - } - - public void setReceiptRequest(ReceiptRequest receiptRequest) { - this.receiptRequest = receiptRequest; - } - - public String getSenderName() { - return senderName; - } - - public void setSenderName(String senderName) { - this.senderName = senderName; - } - - public static class OutboundSMSTextMessage { - - private String message = null; - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - } - - public static class ReceiptRequest { - - private String notifyURL = null; - private String callbackData = null; - - public String getNotifyURL() { - return notifyURL; - } - - public void setNotifyURL(String notifyURL) { - this.notifyURL = notifyURL; - } - - public String getCallbackData() { - return callbackData; - } - - public void setCallbackData(String callbackData) { - this.callbackData = callbackData; - } - } - } -} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSTextMessage.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSTextMessage.java new file mode 100644 index 00000000..243c014b --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSTextMessage.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + +public class OutboundSMSTextMessage { + + private String message; + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptRequest.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptRequest.java new file mode 100644 index 00000000..39274d10 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptRequest.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + +public class ReceiptRequest { + + private String notifyURL; + private String callbackData; + + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + + public String getCallbackData() { + return callbackData; + } + + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/SendMTSMSRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/SendMTSMSRequestWrapperDTO.java deleted file mode 100644 index 5cd3d97b..00000000 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/SendMTSMSRequestWrapperDTO.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.wso2telco.services.dep.sandbox.dao.model.custom; - -public class SendMTSMSRequestWrapperDTO extends RequestDTO { - - private static final long serialVersionUID = 796868921376883562L; - private String shortCode; - private OutboundSMSMessageRequestBean outboundSMSMessageRequestBean; - - public String getShortCode() { - return shortCode; - } - - public void setShortCode(String shortCode) { - this.shortCode = shortCode; - } - - public OutboundSMSMessageRequestBean getOutboundSMSMessageRequestBean() { - return outboundSMSMessageRequestBean; - } - - public void setOutboundSMSMessageRequestBean(OutboundSMSMessageRequestBean outboundSMSMessageRequestBean) { - this.outboundSMSMessageRequestBean = outboundSMSMessageRequestBean; - } -} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/SenderDetails.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/SenderDetails.java new file mode 100644 index 00000000..73b10023 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/SenderDetails.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + +public class SenderDetails { + + private String senderAddress; + private String operatorCode; + private String senderName; + + + public String getSenderAddress() { + return senderAddress; + } + + public void setSenderAddress(String senderAddress) { + this.senderAddress = senderAddress; + } + + public String getOperatorCode() { + return operatorCode; + } + + public void setOperatorCode(String operatorCode) { + this.operatorCode = operatorCode; + } + + public String getSenderName() { + return senderName; + } + + public void setSenderName(String senderName) { + this.senderName = senderName; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index 1702a5e3..13364e09 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -22,13 +22,14 @@ import java.util.ArrayList; import java.util.List; +import static com.wso2telco.services.dep.sandbox.service.SandboxDTO.getBehaveType; + public class Application extends AbstractApplication { @Override protected List getRestFulComponents() { List listOfObject =new ArrayList(); listOfObject.add(new UserService()); - listOfObject.add(new SandboxService()); listOfObject.add(new ProvisionService()); listOfObject.add(new ProvisionConfigurationService()); listOfObject.add(new CustomerInfoService()); @@ -39,10 +40,18 @@ protected List getRestFulComponents() { listOfObject.add(new PaymentService_v0_8()); listOfObject.add(new PaymentService_v1_3()); listOfObject.add(new LocationService()); + + if(getBehaveType().equals("Hub")){ + + listOfObject.add(new smsServiceHub()); + + }else if(getBehaveType().equals("Gateway")) { + + listOfObject.add(new SmsServiceGateway()); + } return listOfObject; } - public static void main(String[] args) { try { new Application().run(args); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SandboxDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SandboxDTO.java index ab1a7016..0307ff5a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SandboxDTO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SandboxDTO.java @@ -26,6 +26,9 @@ public class SandboxDTO extends ConfigDTO{ private static final long serialVersionUID = 4016247712134961725L; @JsonProperty private static int requestIdentifierSize; + + @JsonProperty + private static String behaveType; public static int getRequestIdentifierSize() { return requestIdentifierSize; @@ -33,6 +36,12 @@ public static int getRequestIdentifierSize() { public void setRequestIdentifierSize(int requestIdentifierSize) { SandboxDTO.requestIdentifierSize = requestIdentifierSize; } - - + + public static String getBehaveType() { + return behaveType; + } + + public void setBehaveType(String behaveType) { + SandboxDTO.behaveType = behaveType; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SandboxService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SandboxService.java index 1fc69939..0fe16638 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SandboxService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SandboxService.java @@ -17,25 +17,20 @@ package com.wso2telco.services.dep.sandbox.service; import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; +import javax.ws.rs.*; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiImplicitParam; +import com.wordnik.swagger.annotations.ApiImplicitParams; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.outboundSMSMessageRequestBeanHub; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.sendMTSMSRequestWrapperDTOHub; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.wordnik.swagger.annotations.ApiOperation; -import com.wso2telco.services.dep.sandbox.dao.model.custom.LocationRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.OutboundSMSMessageRequestBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.QuerySMSDeliveryStatusRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.SendMTSMSRequestWrapperDTO; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; @@ -49,13 +44,14 @@ * * @since 1.8.0-SNAPSHOT */ -@Path("/") +@Path("/smsmessaging") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) +@Api(value = "/{v1}/sms", description = "sms") public class SandboxService { Log LOG = LogFactory.getLog(SandboxService.class); - @GET +/* @GET @Path("/location/{v1}/queries/location") @ApiOperation(value = "get Location ", notes = "get Location ", response = Response.class) public Response getLocation(@QueryParam("address") String address, @@ -78,19 +74,24 @@ public Response getLocation(@QueryParam("address") String address, } catch (Exception e) { return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); } - } + }*/ @POST - @Path("/smsmessaging/{apiVersion}/outbound/{shortCode}/requests") + @Path("/{apiVersion}/outbound/{shortCode}/requests") + @ApiOperation(value = "sms", notes = "sms ", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", + required = true, dataType = "string", paramType = "header") + }) public Response handleSendMTSMSRequest(@Context HttpServletRequest httpRequest, @PathParam("apiVersion") String apiVersion, - @PathParam("shortCode") String shortCode, OutboundSMSMessageRequestBean outboundSMSMessageRequestBean) { + @PathParam("shortCode") String shortCode, outboundSMSMessageRequestBeanHub outboundSMSMessageRequestBean_hub) { - SendMTSMSRequestWrapperDTO requestDTO = new SendMTSMSRequestWrapperDTO(); + sendMTSMSRequestWrapperDTOHub requestDTO = new sendMTSMSRequestWrapperDTOHub(); requestDTO.setHttpRequest(httpRequest); requestDTO.setRequestType(RequestType.SMSMESSAGING); requestDTO.setApiVersion(apiVersion); requestDTO.setShortCode(shortCode); - requestDTO.setOutboundSMSMessageRequestBean(outboundSMSMessageRequestBean); + requestDTO.setOutboundSMSMessageRequestBean(outboundSMSMessageRequestBean_hub); RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); @@ -102,11 +103,11 @@ public Response handleSendMTSMSRequest(@Context HttpServletRequest httpRequest, return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); } catch (Exception e) { + e.printStackTrace(); return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); } } - - @GET +/* @GET @Path("/smsmessaging/{apiVersion}/outbound/{shortCode}/requests/{mtSMSTransactionId}/deliveryInfos") public Response handleQuerySMSDeliveryStatusRequest(@Context HttpServletRequest httpRequest, @PathParam("apiVersion") String apiVersion, @PathParam("shortCode") String shortCode, @@ -130,5 +131,5 @@ public Response handleQuerySMSDeliveryStatusRequest(@Context HttpServletRequest } return null; - } + }*/ } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java new file mode 100644 index 00000000..5314ecae --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.service; + + +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiImplicitParam; +import com.wordnik.swagger.annotations.ApiImplicitParams; +import com.wordnik.swagger.annotations.ApiOperation; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactoryGateway; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.OutboundSMSMessageRequestBeanGateway; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.SendMTSMSRequestWrapperDTOGateway; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + + +@Path("smsmessaging") + @Consumes(MediaType.APPLICATION_JSON) + @Produces(MediaType.APPLICATION_JSON) + @Api(value = "/v1_2/sms", description = "sms") + public class SmsServiceGateway { + + Log LOG = LogFactory.getLog(SmsServiceGateway.class); + + @POST + @Path("/v1_2/outbound/{shortCode}/requests") + @ApiOperation(value = "sms", notes = "Send SMS service in Gateway", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", + required = true, dataType = "string", paramType = "header") + }) + public Response handleSendMTSMSRequest(@Context HttpServletRequest httpRequest, + @PathParam("shortCode") String shortCode, OutboundSMSMessageRequestBeanGateway outboundSMSMessageRequestBean_gateway) { + + SendMTSMSRequestWrapperDTOGateway requestDTO = new SendMTSMSRequestWrapperDTOGateway(); + requestDTO.setHttpRequest(httpRequest); + requestDTO.setRequestType(RequestType.SMSMESSAGING); + requestDTO.setApiVersion("v1_2"); + requestDTO.setShortCode(shortCode); + requestDTO.setOutboundSMSMessageRequestBeanGw(outboundSMSMessageRequestBean_gateway); + + RequestHandleable handler = RequestBuilderFactoryGateway.getInstance(requestDTO); + + Returnable returnable = null; + + try { + + returnable = handler.execute(requestDTO); + return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + } catch (Exception e) { + e.printStackTrace(); + return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); + } + } + + + + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/smsServiceHub.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/smsServiceHub.java new file mode 100644 index 00000000..5d1114a3 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/smsServiceHub.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.service; + +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiImplicitParam; +import com.wordnik.swagger.annotations.ApiImplicitParams; +import com.wordnik.swagger.annotations.ApiOperation; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactoryHub; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.outboundSMSMessageRequestBeanHub; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.sendMTSMSRequestWrapperDTOHub; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +import static com.wso2telco.services.dep.sandbox.service.SandboxDTO.getBehaveType; + +@Path("smsmessaging") +@Consumes(MediaType.APPLICATION_JSON) +@Produces(MediaType.APPLICATION_JSON) +@Api(value = "/v1_3/sms", description = "sms") +public class smsServiceHub { + + Log LOG = LogFactory.getLog(smsServiceHub.class); + String mode = getBehaveType(); + + @POST + @Path("/v1_3/outbound/{shortCode}/requests") + @ApiOperation(value = "sms", notes = "sms ", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", + required = true, dataType = "string", paramType = "header") + }) + public Response handleSendMTSMSRequest(@Context HttpServletRequest httpRequest, + @PathParam("shortCode") String shortCode, outboundSMSMessageRequestBeanHub outboundSMSMessageRequestBean_hub) { + + sendMTSMSRequestWrapperDTOHub requestDTO = new sendMTSMSRequestWrapperDTOHub(); + requestDTO.setHttpRequest(httpRequest); + requestDTO.setRequestType(RequestType.SMSMESSAGING); + requestDTO.setApiVersion("v1_3"); + requestDTO.setShortCode(shortCode); + requestDTO.setOutboundSMSMessageRequestBean(outboundSMSMessageRequestBean_hub); + + RequestHandleable handler = RequestBuilderFactoryHub.getInstance(requestDTO); + + Returnable returnable = null; + + try { + + returnable = handler.execute(requestDTO); + return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + } catch (Exception e) { + + e.printStackTrace(); + return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); + } + } + + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactoryGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactoryGateway.java new file mode 100644 index 00000000..ff50ba8d --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactoryGateway.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.SMSRequestFactory; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.SMSRequestFactoryGateway; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class RequestBuilderFactoryGateway { + + + static Log LOG = LogFactory.getLog(RequestBuilderFactoryHub.class); + + @SuppressWarnings("rawtypes") + public static RequestHandleable getInstance(final RequestDTO requestDTO) { + + RequestHandleable requestHandler = null; + + switch (requestDTO.getRequestType()) { + case SMSMESSAGING: + LOG.debug("LOADING SMS MESSAGING FACTORY"); + requestHandler = SMSRequestFactoryGateway.getInstance(requestDTO); + break; + default: + LOG.debug("APPROPIATE FACTORY CLASS NOT FOUND"); + break; + } + return requestHandler; + } + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactoryHub.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactoryHub.java new file mode 100644 index 00000000..cb136d58 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactoryHub.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.servicefactory; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.SMSRequestFactoryHub; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class RequestBuilderFactoryHub { + + + static Log LOG = LogFactory.getLog(RequestBuilderFactoryHub.class); + + @SuppressWarnings("rawtypes") + public static RequestHandleable getInstance(final RequestDTO requestDTO) { + + RequestHandleable requestHandler = null; + + switch (requestDTO.getRequestType()) { + case SMSMESSAGING: + LOG.debug("LOADING SMS MESSAGING FACTORY"); + requestHandler = SMSRequestFactoryHub.getInstance(requestDTO); + break; + default: + LOG.debug("APPROPIATE FACTORY CLASS NOT FOUND"); + break; + } + return requestHandler; + } + + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/OutboundSMSMessageResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/OutboundSMSMessageResponseBean.java deleted file mode 100644 index d19c7bef..00000000 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/OutboundSMSMessageResponseBean.java +++ /dev/null @@ -1,172 +0,0 @@ -package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; - -import java.util.ArrayList; -import java.util.List; - -public class OutboundSMSMessageResponseBean { - - private OutboundSMSMessageRequest outboundSMSMessageRequest = null; - - public OutboundSMSMessageRequest getOutboundSMSMessageRequest() { - return outboundSMSMessageRequest; - } - - public void setOutboundSMSMessageRequest(OutboundSMSMessageRequest outboundSMSMessageRequest) { - this.outboundSMSMessageRequest = outboundSMSMessageRequest; - } - - public static class OutboundSMSMessageRequest { - - private List address = new ArrayList(); - private DeliveryInfoList deliveryInfoList = null; - private String senderAddress = null; - private OutboundSMSTextMessage outboundSMSTextMessage = null; - private String clientCorrelator = null; - private ReceiptRequest receiptRequest = null; - private String senderName = null; - private String resourceURL = null; - - public List getAddress() { - return address; - } - - public void setAddress(List address) { - this.address = address; - } - - public DeliveryInfoList getDeliveryInfoList() { - return deliveryInfoList; - } - - public void setDeliveryInfoList(DeliveryInfoList deliveryInfoList) { - this.deliveryInfoList = deliveryInfoList; - } - - public String getSenderAddress() { - return senderAddress; - } - - public void setSenderAddress(String senderAddress) { - this.senderAddress = senderAddress; - } - - public OutboundSMSTextMessage getOutboundSMSTextMessage() { - return outboundSMSTextMessage; - } - - public void setOutboundSMSTextMessage(OutboundSMSTextMessage outboundSMSTextMessage) { - this.outboundSMSTextMessage = outboundSMSTextMessage; - } - - public String getClientCorrelator() { - return clientCorrelator; - } - - public void setClientCorrelator(String clientCorrelator) { - this.clientCorrelator = clientCorrelator; - } - - public ReceiptRequest getReceiptRequest() { - return receiptRequest; - } - - public void setReceiptRequest(ReceiptRequest receiptRequest) { - this.receiptRequest = receiptRequest; - } - - public String getSenderName() { - return senderName; - } - - public void setSenderName(String senderName) { - this.senderName = senderName; - } - - public String getResourceURL() { - return resourceURL; - } - - public void setResourceURL(String resourceURL) { - this.resourceURL = resourceURL; - } - - public static class DeliveryInfoList { - - private String resourceURL = null; - private List deliveryInfo = new ArrayList(); - - public String getResourceURL() { - return resourceURL; - } - - public void setResourceURL(String resourceURL) { - this.resourceURL = resourceURL; - } - - public List getDeliveryInfo() { - return deliveryInfo; - } - - public void setDeliveryInfo(List deliveryInfo) { - this.deliveryInfo = deliveryInfo; - } - - public static class DeliveryInfo { - - private String address = null; - private String deliveryStatus = null; - - public String getAddress() { - return address; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getDeliveryStatus() { - return deliveryStatus; - } - - public void setDeliveryStatus(String deliveryStatus) { - this.deliveryStatus = deliveryStatus; - } - } - } - - public static class OutboundSMSTextMessage { - - private String message = null; - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - } - - public static class ReceiptRequest { - - private String notifyURL = null; - private String callbackData = null; - - public String getNotifyURL() { - return notifyURL; - } - - public void setNotifyURL(String notifyURL) { - this.notifyURL = notifyURL; - } - - public String getCallbackData() { - return callbackData; - } - - public void setCallbackData(String callbackData) { - this.callbackData = callbackData; - } - } - } -} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java index 9f55b160..9a88aa86 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java @@ -4,16 +4,15 @@ import org.apache.commons.logging.LogFactory; import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.SendMTSMSRequestWrapperDTO; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; + public class SMSRequestFactory { private static Log LOG = LogFactory.getLog(SMSRequestFactory.class); public static RequestHandleable getInstance(final RequestDTO requestDTO) { - SendMTSMSRequestWrapperDTO sendMTSMSRequestWrapperDTO = (SendMTSMSRequestWrapperDTO) requestDTO; final String QUERY_DELIVERY_STATUS = "deliveryInfos"; final String SEND_MT_SMS = "requests"; final String RETRIVE_SMS = "registrations"; @@ -25,21 +24,13 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { LOG.debug("LOADING QUERY SMS DELIVERY STATUS SERVICE"); return new QuerySMSDeliveryStatusService(); - } else if (requestDTO.getRequestPath().toLowerCase().contains(SEND_MT_SMS) - && requestDTO.isPost()) { - LOG.debug("LOADING SEND MT SMS SERVICE"); - return new SendMTSMSService(); } else if (requestDTO.getRequestPath().toLowerCase().contains(RETRIVE_SMS) && requestDTO.isGet()) { LOG.debug("LOADING RETRIEVE SMS MESSAGES SERVICE"); return new RetrieveSMSMessagesService(); - } else if (requestDTO.getRequestPath().toLowerCase().contains(OUTBOUND_REQUEST) - && requestDTO.isPost()) { - LOG.debug("LOADING SUBSCRIBE TO DELIVERY NOTIFICATION SERVICE"); - return new SubscribeToDeliveryNotificationService(); } else if (requestDTO.getRequestPath().toLowerCase().contains(OUTBOUND_REQUEST) && requestDTO.isDelete()) { @@ -55,9 +46,6 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { LOG.debug("LOADING STOP SUBSCRIBE TO MO NOTIFICATION SERVICE"); return new StopSubscribeToMONotificationService(); - } else { - - // should return unsupported api exception } return null; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SendMTSMSResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SendMTSMSResponseWrapper.java deleted file mode 100644 index 67f50d94..00000000 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SendMTSMSResponseWrapper.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; - -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; -import com.wso2telco.services.dep.sandbox.util.RequestError; - -public class SendMTSMSResponseWrapper extends AbstractReturnWrapperDTO { - - private OutboundSMSMessageResponseBean outboundSMSMessageResponseBean = null; - - public OutboundSMSMessageResponseBean getOutboundSMSMessageResponseBean() { - return outboundSMSMessageResponseBean; - } - - public void setOutboundSMSMessageResponseBean(OutboundSMSMessageResponseBean outboundSMSMessageResponseBean) { - this.outboundSMSMessageResponseBean = outboundSMSMessageResponseBean; - } - - @Override - public Object getResponse() { - - SendMTSMSResponse response = new SendMTSMSResponse(getRequestError(), outboundSMSMessageResponseBean); - return response; - } - - class SendMTSMSResponse { - - private RequestError requestError; - private OutboundSMSMessageResponseBean outboundSMSMessageResponseBean; - - SendMTSMSResponse(RequestError requestError, OutboundSMSMessageResponseBean outboundSMSMessageResponseBean) { - this.requestError = requestError; - this.outboundSMSMessageResponseBean = outboundSMSMessageResponseBean; - } - - public RequestError getRequestError() { - return requestError; - } - - public void setRequestError(RequestError requestError) { - this.requestError = requestError; - } - - public OutboundSMSMessageResponseBean getOutboundSMSMessageResponseBean() { - return outboundSMSMessageResponseBean; - } - - public void setOutboundSMSMessageResponseBean(OutboundSMSMessageResponseBean outboundSMSMessageResponseBean) { - this.outboundSMSMessageResponseBean = outboundSMSMessageResponseBean; - } - } -} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SendMTSMSService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SendMTSMSService.java deleted file mode 100644 index bd7febdf..00000000 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SendMTSMSService.java +++ /dev/null @@ -1,209 +0,0 @@ -package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import javax.ws.rs.core.Response.Status; - -import org.apache.commons.logging.LogFactory; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.wso2telco.dep.oneapivalidation.service.impl.smsmessaging.ValidateSendSms; -import com.wso2telco.services.dep.sandbox.dao.DaoFactory; -import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.OutboundSMSMessageRequestBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.SendMTSMSRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSMessagingParam; -import com.wso2telco.services.dep.sandbox.dao.model.domain.User; -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; - -class SendMTSMSService extends AbstractRequestHandler { - - Gson gson = new GsonBuilder().serializeNulls().create(); - SendMTSMSRequestWrapperDTO extendedRequestDTO = null; - SendMTSMSResponseWrapper responseWrapperDTO = null; - private SMSMessagingDAO smsMessagingDAO = null; - - { - LOG = LogFactory.getLog(SendMTSMSService.class); - smsMessagingDAO = DaoFactory.getSMSMessagingDAO(); - } - - @Override - protected Returnable process(SendMTSMSRequestWrapperDTO extendedRequestDTO) throws Exception { - - try { - - User user = extendedRequestDTO.getUser(); - SMSMessagingParam smsMessagingParam = smsMessagingDAO.getSMSMessagingParam(user.getId()); - - String senderAddress = extendedRequestDTO.getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest() - .getSenderAddress(); - if (extendedRequestDTO.getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest().getSenderAddress() - .contains("tel:+")) { - senderAddress = extendedRequestDTO.getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest() - .getSenderAddress().replace("tel:+", "").trim(); - } else if (extendedRequestDTO.getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest() - .getSenderAddress().contains("tel:")) { - senderAddress = extendedRequestDTO.getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest() - .getSenderAddress().replace("tel:", "").trim(); - } - - if (!dao.isWhiteListedSenderAddress(user.getId(), senderAddress)) { - - responseWrapperDTO - .setRequestError( - constructRequestError(SERVICEEXCEPTION, "SVC0001", - "A service error occurred. Error code is %1", - extendedRequestDTO.getOutboundSMSMessageRequestBean() - .getOutboundSMSMessageRequest().getSenderAddress() - + " Not Provisioned")); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else { - - OutboundSMSMessageRequestBean requestBean = extendedRequestDTO.getOutboundSMSMessageRequestBean(); - - String mtSMSTransactionId = smsMessagingDAO.saveSendSMSTransaction( - requestBean.getOutboundSMSMessageRequest().getSenderAddress(), - requestBean.getOutboundSMSMessageRequest().getAddress().toArray().toString(), - requestBean.getOutboundSMSMessageRequest().getOutboundSMSTextMessage().getMessage(), - requestBean.getOutboundSMSMessageRequest().getClientCorrelator(), - requestBean.getOutboundSMSMessageRequest().getSenderName(), - requestBean.getOutboundSMSMessageRequest().getReceiptRequest().getNotifyURL(), - requestBean.getOutboundSMSMessageRequest().getReceiptRequest().getCallbackData(), 0, "success", - 1, null, null, user, smsMessagingParam.getDeliveryStatus()); - - if (mtSMSTransactionId == null) { - - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0001", - "A service error occurred. Error code is %1", "Access failure for API")); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else { - - OutboundSMSMessageResponseBean responseBean = new OutboundSMSMessageResponseBean(); - - OutboundSMSMessageResponseBean.OutboundSMSMessageRequest smsMessageResponse = new OutboundSMSMessageResponseBean.OutboundSMSMessageRequest(); - smsMessageResponse.setAddress(requestBean.getOutboundSMSMessageRequest().getAddress()); - - OutboundSMSMessageResponseBean.OutboundSMSMessageRequest.DeliveryInfoList responseDeliveryInfoList = new OutboundSMSMessageResponseBean.OutboundSMSMessageRequest.DeliveryInfoList(); - - List deliveryInforArrayList = new ArrayList(); - Iterator addressReader = requestBean.getOutboundSMSMessageRequest().getAddress().iterator(); - while (addressReader.hasNext()) { - - OutboundSMSMessageResponseBean.OutboundSMSMessageRequest.DeliveryInfoList.DeliveryInfo responseDeliveryInfo = new OutboundSMSMessageResponseBean.OutboundSMSMessageRequest.DeliveryInfoList.DeliveryInfo(); - responseDeliveryInfo.setAddress(addressReader.next()); - responseDeliveryInfo.setDeliveryStatus(smsMessagingParam.getDeliveryStatus()); - - deliveryInforArrayList.add(responseDeliveryInfo); - } - responseDeliveryInfoList.setDeliveryInfo(deliveryInforArrayList); - responseDeliveryInfoList.setResourceURL(getinSideResourceURL(mtSMSTransactionId).toString()); - smsMessageResponse.setDeliveryInfoList(responseDeliveryInfoList); - - smsMessageResponse.setSenderAddress(requestBean.getOutboundSMSMessageRequest().getSenderAddress()); - OutboundSMSMessageResponseBean.OutboundSMSMessageRequest.OutboundSMSTextMessage responseSMSTextMessage = new OutboundSMSMessageResponseBean.OutboundSMSMessageRequest.OutboundSMSTextMessage(); - responseSMSTextMessage.setMessage( - requestBean.getOutboundSMSMessageRequest().getOutboundSMSTextMessage().getMessage()); - smsMessageResponse.setOutboundSMSTextMessage(responseSMSTextMessage); - - smsMessageResponse - .setClientCorrelator(requestBean.getOutboundSMSMessageRequest().getClientCorrelator()); - - OutboundSMSMessageResponseBean.OutboundSMSMessageRequest.ReceiptRequest responseReceiptRequest = new OutboundSMSMessageResponseBean.OutboundSMSMessageRequest.ReceiptRequest(); - responseReceiptRequest.setNotifyURL( - requestBean.getOutboundSMSMessageRequest().getReceiptRequest().getNotifyURL()); - responseReceiptRequest.setCallbackData( - requestBean.getOutboundSMSMessageRequest().getReceiptRequest().getCallbackData()); - smsMessageResponse.setReceiptRequest(responseReceiptRequest); - - smsMessageResponse.setSenderName(requestBean.getOutboundSMSMessageRequest().getSenderName()); - smsMessageResponse.setResourceURL(getoutSideResourceURL(mtSMSTransactionId).toString()); - - responseBean.setOutboundSMSMessageRequest(smsMessageResponse); - - responseWrapperDTO.setOutboundSMSMessageResponseBean(responseBean); - responseWrapperDTO.setHttpStatus(Status.OK); - } - } - } catch (Exception e) { - - throw e; - } - - return responseWrapperDTO; - } - - @Override - protected boolean validate(SendMTSMSRequestWrapperDTO wrapperDTO) throws Exception { - - ValidateSendSms validator = new ValidateSendSms(); - validator.validate(gson.toJson(wrapperDTO.getOutboundSMSMessageRequestBean())); - return false; - } - - @Override - protected Returnable getResponseDTO() { - - return responseWrapperDTO; - } - - @Override - protected List getAddress() { - - List addresses = new ArrayList(); - addresses = extendedRequestDTO.getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest().getAddress(); - return addresses; - } - - @Override - protected void init(SendMTSMSRequestWrapperDTO extendedRequestDTO) throws Exception { - - responseWrapperDTO = new SendMTSMSResponseWrapper(); - this.extendedRequestDTO = extendedRequestDTO; - } - - private StringBuilder getinSideResourceURL(final String mtSMSTransactionId) { - - StringBuilder inSideResourceURLBuilder = new StringBuilder(); - try { - - inSideResourceURLBuilder.append("http://wso2telco.sandbox.com"); - inSideResourceURLBuilder.append("/smsmessaging/"); - inSideResourceURLBuilder.append(extendedRequestDTO.getApiVersion()); - inSideResourceURLBuilder.append("/outbound/"); - inSideResourceURLBuilder.append(extendedRequestDTO.getShortCode()); - inSideResourceURLBuilder.append("/requests/"); - inSideResourceURLBuilder.append(mtSMSTransactionId); - inSideResourceURLBuilder.append("/deliveryInfos"); - } catch (Exception e) { - - throw e; - } - - return inSideResourceURLBuilder; - } - - private StringBuilder getoutSideResourceURL(final String mtSMSTransactionId) { - - StringBuilder outSideResourceURLBuilder = new StringBuilder(); - try { - - outSideResourceURLBuilder.append("http://wso2telco.sandbox.com"); - outSideResourceURLBuilder.append("/smsmessaging/"); - outSideResourceURLBuilder.append(extendedRequestDTO.getApiVersion()); - outSideResourceURLBuilder.append("/outbound/"); - outSideResourceURLBuilder.append(extendedRequestDTO.getShortCode()); - outSideResourceURLBuilder.append("/requests/"); - outSideResourceURLBuilder.append(mtSMSTransactionId); - } catch (Exception e) { - - throw e; - } - - return outSideResourceURLBuilder; - } -} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageRequestBeanGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageRequestBeanGateway.java new file mode 100644 index 00000000..757a8c55 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageRequestBeanGateway.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.OutboundSMSMessageRequest; + +import java.util.List; + +public class OutboundSMSMessageRequestBeanGateway { + + + private OutboundSMSMessageRequest_Gw outboundSMSMessageRequest; + + + public OutboundSMSMessageRequest_Gw getOutboundSMSMessageRequest() { + return outboundSMSMessageRequest; + } + + public void setOutboundSMSMessageRequest(OutboundSMSMessageRequest_Gw outboundSMSMessageRequest) { + this.outboundSMSMessageRequest = outboundSMSMessageRequest; + } + + public class OutboundSMSMessageRequest_Gw extends OutboundSMSMessageRequest { + + + private String senderAddress; + private String senderName; + + public String getSenderAddress() { + return senderAddress; + } + + public void setSenderAddress(String senderAddress) { + this.senderAddress = senderAddress; + } + + public String getSenderName() { + return senderName; + } + + public void setSenderName(String senderName) { + this.senderName = senderName; + } + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageResponseBean.java new file mode 100644 index 00000000..517c6fa0 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageResponseBean.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryInfoList; +import com.wso2telco.services.dep.sandbox.dao.model.custom.OutboundSMSMessageRequest; + +class OutboundSMSMessageResponseBean { + + + private OutboundSMSMessageResponse_Gw outboundSMSMessageRequest; + + + public OutboundSMSMessageResponse_Gw getOutboundSMSMessageRequest() { + return outboundSMSMessageRequest; + } + + public void setOutboundSMSMessageRequest(OutboundSMSMessageResponse_Gw outboundSMSMessageRequest) { + this.outboundSMSMessageRequest = outboundSMSMessageRequest; + } + + public static class OutboundSMSMessageResponse_Gw extends OutboundSMSMessageRequest { + + + private DeliveryInfoList deliveryInfoList; + private String senderAddress; + private String senderName; + private String resourceURL; + + + public DeliveryInfoList getDeliveryInfoList() { + return deliveryInfoList; + } + + public void setDeliveryInfoList(DeliveryInfoList deliveryInfoList) { + this.deliveryInfoList = deliveryInfoList; + } + + public String getSenderAddress() { + return senderAddress; + } + + public void setSenderAddress(String senderAddress) { + this.senderAddress = senderAddress; + } + + public String getSenderName() { + return senderName; + } + + public void setSenderName(String senderName) { + this.senderName = senderName; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + } + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java new file mode 100644 index 00000000..92497b22 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + + + +public class SMSRequestFactoryGateway { + + private static Log LOG = LogFactory.getLog(SMSRequestFactoryGateway.class); + + public static RequestHandleable getInstance(final RequestDTO requestDTO) { + + final String QUERY_DELIVERY_STATUS = "deliveryInfos"; + final String SEND_MT_SMS = "requests"; + final String RETRIVE_SMS = "registrations"; + final String OUTBOUND_REQUEST = "outbound"; + final String INBOUND_REQUEST = "inbound"; + + + if (requestDTO.getRequestPath().toLowerCase().contains(SEND_MT_SMS) + && requestDTO.isPost()) { + LOG.debug("LOADING SEND MT SMS SERVICE"); + + return new SendMTSMSService(); + } + + else { + return null; + } + + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSRequestWrapperDTOGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSRequestWrapperDTOGateway.java new file mode 100644 index 00000000..f6419e03 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSRequestWrapperDTOGateway.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class SendMTSMSRequestWrapperDTOGateway extends RequestDTO { + + private static final long serialVersionUID = 796868921376883562L; + private String shortCode; + private OutboundSMSMessageRequestBeanGateway outboundSMSMessageRequestBeanGw; + + + public String getShortCode() { + return shortCode; + } + + public void setShortCode(String shortCode) { + this.shortCode = shortCode; + } + + public OutboundSMSMessageRequestBeanGateway getOutboundSMSMessageRequestBeanGw() { + return outboundSMSMessageRequestBeanGw; + } + + public void setOutboundSMSMessageRequestBeanGw(OutboundSMSMessageRequestBeanGateway outboundSMSMessageRequestBeanGw) { + this.outboundSMSMessageRequestBeanGw = outboundSMSMessageRequestBeanGw; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSResponseWrapper.java new file mode 100644 index 00000000..1f0335b4 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSResponseWrapper.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +class SendMTSMSResponseWrapper extends AbstractReturnWrapperDTO { + + + private OutboundSMSMessageResponseBean outboundSMSMessageResponseBeanGw; + + + public OutboundSMSMessageResponseBean getOutboundSMSMessageResponseBeanGw() { + return outboundSMSMessageResponseBeanGw; + } + + public void setOutboundSMSMessageResponseBeanGw(OutboundSMSMessageResponseBean + outboundSMSMessageResponseBeanGw) { + this.outboundSMSMessageResponseBeanGw = outboundSMSMessageResponseBeanGw; + } + + @Override + public Object getResponse() { + + if (getRequestError() == null) { + return outboundSMSMessageResponseBeanGw; + }else{ + ErrorResponseDTO response= new ErrorResponseDTO(getRequestError()); + return response; + } + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java new file mode 100644 index 00000000..748b0f18 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java @@ -0,0 +1,325 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.*; +import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import com.wso2telco.services.dep.sandbox.util.ServiceName; +import org.apache.commons.logging.LogFactory; +import org.json.JSONObject; + +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +class SendMTSMSService extends AbstractRequestHandler implements + RequestResponseRequestHandleable { + + private Gson gson = new GsonBuilder().serializeNulls().create(); + private SendMTSMSRequestWrapperDTOGateway extendedRequestDTO; + private SendMTSMSResponseWrapper responseWrapper; + private SMSMessagingDAO smsMessagingDAO; + + + { + LOG = LogFactory.getLog(SendMTSMSService.class); + smsMessagingDAO = DaoFactory.getSMSMessagingDAO(); + } + + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + List addresses; + addresses = extendedRequestDTO.getOutboundSMSMessageRequestBeanGw().getOutboundSMSMessageRequest().getAddress(); + return addresses; + } + + @Override + protected boolean validate(SendMTSMSRequestWrapperDTOGateway wrapperDTO) throws Exception { + OutboundSMSMessageRequestBeanGateway outboundSMSMessageRequestBean_Gateway = wrapperDTO + .getOutboundSMSMessageRequestBeanGw(); + + String address = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + .getOutboundSMSMessageRequest().getAddress().toString()); + String callBackData = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + .getOutboundSMSMessageRequest().getReceiptRequest().getCallbackData()); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + .getOutboundSMSMessageRequest().getClientCorrelator()); + String message = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + .getOutboundSMSMessageRequest().getOutboundSMSTextMessage().getMessage()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + .getOutboundSMSMessageRequest().getReceiptRequest().getNotifyURL()); + + + List validationRulesList = new ArrayList<>(); + + try { + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "address", address)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "callBackData", + callBackData)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", + clientCorrelator)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "message", message)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "notifyURL", + notifyURL)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###SMS### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + return true; + } + + @Override + protected Returnable process(SendMTSMSRequestWrapperDTOGateway extendedRequestDTO) throws Exception { + + + try { + User user = extendedRequestDTO.getUser(); + SMSMessagingParam smsMessagingParam = smsMessagingDAO.getSMSMessagingParam(user.getId()); + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + String serviceCallPayment = ServiceName.SendSMS.toString(); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(extendedRequestDTO + .getOutboundSMSMessageRequestBeanGw().getOutboundSMSMessageRequest().getClientCorrelator()); + Integer userId = extendedRequestDTO.getUser().getId(); + int serviceNameId = apiServiceCalls.getApiServiceCallId(); + String endUserId = extendedRequestDTO.getOutboundSMSMessageRequestBeanGw().getOutboundSMSMessageRequest() + .getAddress().toString(); + + OutboundSMSMessageRequestBeanGateway requestBean = extendedRequestDTO.getOutboundSMSMessageRequestBeanGw(); + + OutboundSMSMessageResponseBean responseBean = new OutboundSMSMessageResponseBean(); + + OutboundSMSMessageResponseBean.OutboundSMSMessageResponse_Gw smsMessageResponse = new + OutboundSMSMessageResponseBean.OutboundSMSMessageResponse_Gw(); + + + if (clientCorrelator != null) { + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, + MessageProcessStatus.Success, MessageType.Response); + if (response != null) { + + // return already sent response + OutboundSMSMessageResponseBean obj; + obj = gson.fromJson(response, OutboundSMSMessageResponseBean.class); + responseWrapper.setOutboundSMSMessageResponseBeanGw(obj); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + + } + } + + smsMessageResponse.setResourceURL(getoutSideResourceURL(Integer.toString(getReferenceNumber()))); + smsMessageResponse.setSenderAddress(requestBean.getOutboundSMSMessageRequest().getSenderAddress()); + smsMessageResponse.setReceiptRequest(requestBean.getOutboundSMSMessageRequest().getReceiptRequest()); + smsMessageResponse.setSenderAddress(requestBean.getOutboundSMSMessageRequest().getSenderAddress()); + smsMessageResponse.setOutboundSMSTextMessage(requestBean.getOutboundSMSMessageRequest() + .getOutboundSMSTextMessage()); + smsMessageResponse.setClientCorrelator(requestBean.getOutboundSMSMessageRequest().getClientCorrelator()); + smsMessageResponse.setAddress(requestBean.getOutboundSMSMessageRequest().getAddress()); + smsMessageResponse.setSenderName(requestBean.getOutboundSMSMessageRequest().getSenderName()); + + DeliveryInfoList deliveryInfoList = new DeliveryInfoList(); + deliveryInfoList.setResourceURL(getinSideResourceURL(Integer.toString(getReferenceNumber()))); + List infoList = new ArrayList(); + + for (String s : requestBean.getOutboundSMSMessageRequest().getAddress()) { + + DeliveryInfoList.DeliveryInfo deliveryInfo = new DeliveryInfoList.DeliveryInfo(); + deliveryInfo.setAddress(s); + deliveryInfo.setDeliveryStatus(smsMessagingParam.getDeliveryStatus()); + infoList.add(deliveryInfo); + } + + deliveryInfoList.setDeliveryInfo(infoList); + smsMessageResponse.setDeliveryInfoList(deliveryInfoList); + responseBean.setOutboundSMSMessageRequest(smsMessageResponse); + + responseWrapper.setOutboundSMSMessageResponseBeanGw(responseBean); + responseWrapper.setHttpStatus(Response.Status.CREATED); + + // Save Success Response + saveResponse(endUserId, responseBean, apiServiceCalls, MessageProcessStatus.Success); + + } catch (Exception ex) { + LOG.error("###SMS### Error Occurred in SMS Service. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, + "Error Occurred in SMS Service.")); + } + + return responseWrapper; + + + } + + @Override + protected void init(SendMTSMSRequestWrapperDTOGateway extendedRequestDTO) throws Exception { + + responseWrapper = new SendMTSMSResponseWrapper(); + this.extendedRequestDTO = extendedRequestDTO; + + } + + + /** + * Generating inside resource URL. + * + * @param mtSMSTransactionId Unique ID + * @return URL + */ + private String getinSideResourceURL(final String mtSMSTransactionId) { + + return "http://wso2telco.sandbox.com" + + "/smsmessaging/" + + extendedRequestDTO.getApiVersion() + + "/outbound/" + + extendedRequestDTO.getShortCode() + + "/requests/" + + mtSMSTransactionId + + "/deliveryInfos"; + } + + /** + * Genarating outside resource URL. + * + * @param mtSMSTransactionId Unique Id. + * @return URL + */ + private String getoutSideResourceURL(final String mtSMSTransactionId) { + + return "http://wso2telco.sandbox.com" + + "/smsmessaging/" + + extendedRequestDTO.getApiVersion() + + "/outbound/" + + extendedRequestDTO.getShortCode() + + "/requests/" + + mtSMSTransactionId; + } + + + // Save Response in messageLog table + private void saveResponse(String endUserIdPath, OutboundSMSMessageResponseBean responseBean, APIServiceCalls + apiServiceCalls, MessageProcessStatus status) throws Exception { + + Gson gson = new Gson(); + String jsonString = gson.toJson(responseBean); + + //setting messagelog responses + new MessageLog(); + MessageLog messageLog; + messageLog = new MessageLog(); + messageLog.setRequest(jsonString); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } + + + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, + MessageProcessStatus status, MessageType type) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", tel, null, null); + + String jsonString = null; + + for (MessageLog aResponse : response) { + + int responseStatus = aResponse.getStatus(); + int responseType = aResponse.getType(); + String responseClientCorrelator; + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = aResponse.getRequest(); + JSONObject json = new JSONObject(request); + + responseClientCorrelator = json.getJSONObject("outboundSMSMessageRequest").get + ("clientCorrelator").toString(); + + int responseUserId = aResponse.getUserid(); + String responseTel = aResponse.getValue(); + + // check for duplicate clientCorrelators + if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals(tel)) { + jsonString = json.toString(); + break; + } + } + + + } + + return jsonString; + + } + + + @Override + public String getApiServiceCalls() { + try { + return ServiceName.SendSMS.toString(); + } catch (Exception ex) { + return null; + } + } + + @Override + public String getJosonString(SendMTSMSRequestWrapperDTOGateway requestDTO) { + Gson gson = new Gson(); + return gson.toJson(requestDTO.getOutboundSMSMessageRequestBeanGw()); + } + + @Override + public String getnumber(SendMTSMSRequestWrapperDTOGateway requestDTO) { + return requestDTO.getOutboundSMSMessageRequestBeanGw().getOutboundSMSMessageRequest().getAddress().toString(); + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationRequestBeanGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationRequestBeanGateway.java new file mode 100644 index 00000000..69e07998 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationRequestBeanGateway.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +class SubscribeToDeliveryNotificationRequestBeanGateway extends com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryReceiptSubscription { + + + private String filterCriteria; + private SubscribeToDeliveryNotificationRequestBeanGateway DeliveryReceiptSubscription; + + + public String getFilterCriteria() { + return filterCriteria; + } + + public void setFilterCriteria(String filterCriteria) { + this.filterCriteria = filterCriteria; + } + + public SubscribeToDeliveryNotificationRequestBeanGateway getDeliveryReceiptSubscription() { + return DeliveryReceiptSubscription; + } + + public void setDeliveryReceiptSubscription(SubscribeToDeliveryNotificationRequestBeanGateway + deliveryReceiptSubscription) { + DeliveryReceiptSubscription = deliveryReceiptSubscription; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SubscribeToDeliveryNotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java similarity index 82% rename from dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SubscribeToDeliveryNotificationService.java rename to dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java index 82cd5899..e85fae60 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SubscribeToDeliveryNotificationService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java @@ -1,10 +1,10 @@ -package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; -public class SubscribeToDeliveryNotificationService implements RequestHandleable{ + class SubscribeToDeliveryNotificationService implements RequestHandleable{ @Override public Returnable execute(RequestDTO requestDTO) throws Exception { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/OutboundSMSMessageResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/OutboundSMSMessageResponseBean.java new file mode 100644 index 00000000..c8652226 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/OutboundSMSMessageResponseBean.java @@ -0,0 +1,54 @@ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryInfoList; +import com.wso2telco.services.dep.sandbox.dao.model.custom.OutboundSMSMessageRequest; +import com.wso2telco.services.dep.sandbox.dao.model.custom.SenderDetails; + +import java.util.ArrayList; +import java.util.List; + + class OutboundSMSMessageResponseBean { + + private OutboundSMSMessageResponse outboundSMSMessageRequest; + + public OutboundSMSMessageResponse getOutboundSMSMessageRequest() { + return outboundSMSMessageRequest; + } + + public void setOutboundSMSMessageRequest(OutboundSMSMessageResponse outboundSMSMessageResponse) { + this.outboundSMSMessageRequest = outboundSMSMessageResponse; + } + + static class OutboundSMSMessageResponse extends OutboundSMSMessageRequest { + + + private DeliveryInfoList deliveryInfoList; + private List senderAddress; + private String resourceURL; + + + public DeliveryInfoList getDeliveryInfoList() { + return deliveryInfoList; + } + + public void setDeliveryInfoList(DeliveryInfoList deliveryInfoList) { + this.deliveryInfoList = deliveryInfoList; + } + + public List getSenderAddress() { + return senderAddress; + } + + public void setSenderAddress(List senderAddress) { + this.senderAddress = senderAddress; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SMSRequestFactoryHub.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SMSRequestFactoryHub.java new file mode 100644 index 00000000..b327f913 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SMSRequestFactoryHub.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.SMSRequestFactoryGateway; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + + public class SMSRequestFactoryHub { + + private static Log LOG = LogFactory.getLog(SMSRequestFactoryGateway.class); + + public static RequestHandleable getInstance(final RequestDTO requestDTO) { + + final String QUERY_DELIVERY_STATUS = "deliveryInfos"; + final String SEND_MT_SMS = "requests"; + final String RETRIVE_SMS = "registrations"; + final String OUTBOUND_REQUEST = "outbound"; + final String INBOUND_REQUEST = "inbound"; + + + if (requestDTO.getRequestPath().toLowerCase().contains(SEND_MT_SMS) + && requestDTO.isPost()) { + LOG.debug("LOADING SEND MT SMS SERVICE"); + + return new SendMTSMSService(); + } + + else { + return null; + } + + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SendMTSMSResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SendMTSMSResponseWrapper.java new file mode 100644 index 00000000..bf7f9ece --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SendMTSMSResponseWrapper.java @@ -0,0 +1,33 @@ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + + class SendMTSMSResponseWrapper extends AbstractReturnWrapperDTO { + + private OutboundSMSMessageResponseBean outboundSMSMessageResponseBeanHub; + + public OutboundSMSMessageResponseBean getOutboundSMSMessageResponseBeanHub() { + return outboundSMSMessageResponseBeanHub; + } + + public void setOutboundSMSMessageResponseBeanHub(OutboundSMSMessageResponseBean outboundSMSMessageResponseBeanHub) { + this.outboundSMSMessageResponseBeanHub = outboundSMSMessageResponseBeanHub; + } + + @Override + public Object getResponse() { + + + if (getRequestError() == null) { + return outboundSMSMessageResponseBeanHub; + }else{ + ErrorResponseDTO response= new ErrorResponseDTO(getRequestError()); + return response; + } + + } + + + } + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SendMTSMSService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SendMTSMSService.java new file mode 100644 index 00000000..09c0a3d7 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/SendMTSMSService.java @@ -0,0 +1,306 @@ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.Response.Status; +import com.google.gson.*; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.*; +import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import com.wso2telco.services.dep.sandbox.util.ServiceName; +import org.apache.commons.logging.LogFactory; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import org.json.JSONObject; + + class SendMTSMSService extends AbstractRequestHandler implements + RequestResponseRequestHandleable { + + private Gson gson = new GsonBuilder().serializeNulls().create(); + private sendMTSMSRequestWrapperDTOHub extendedRequestDTO; + private SendMTSMSResponseWrapper responseWrapper; + private SMSMessagingDAO smsMessagingDAO; + + { + LOG = LogFactory.getLog(SendMTSMSService.class); + smsMessagingDAO = DaoFactory.getSMSMessagingDAO(); + } + + + @Override + protected Returnable getResponseDTO() { + + return responseWrapper; + } + + @Override + protected List getAddress() { + + List addresses; + addresses = extendedRequestDTO.getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest().getAddress(); + return addresses; + } + + @Override + protected void init(sendMTSMSRequestWrapperDTOHub extendedRequestDTO) throws Exception { + + responseWrapper = new SendMTSMSResponseWrapper(); + this.extendedRequestDTO = extendedRequestDTO; + } + + + @Override + protected boolean validate(sendMTSMSRequestWrapperDTOHub wrapperDTO) throws Exception { + + outboundSMSMessageRequestBeanHub outboundSMSMessageRequestBean_hub = wrapperDTO + .getOutboundSMSMessageRequestBean(); + + String address = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_hub + .getOutboundSMSMessageRequest().getAddress().toString()); + String callBackData = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_hub + .getOutboundSMSMessageRequest().getReceiptRequest().getCallbackData()); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_hub + .getOutboundSMSMessageRequest().getClientCorrelator()); + String message = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_hub + .getOutboundSMSMessageRequest().getOutboundSMSTextMessage().getMessage()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_hub + .getOutboundSMSMessageRequest().getReceiptRequest().getNotifyURL()); + + + List validationRulesList = new ArrayList<>(); + + try { + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "address", address)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "callBackData", + callBackData)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", + clientCorrelator)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "message", message)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "notifyURL", + notifyURL)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###SMS### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + return true; + } + + + @Override + protected Returnable process(sendMTSMSRequestWrapperDTOHub extendedRequestDTO) throws Exception { + + try { + User user = extendedRequestDTO.getUser(); + SMSMessagingParam smsMessagingParam = smsMessagingDAO.getSMSMessagingParam(user.getId()); + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + String serviceCallPayment = ServiceName.SendSMS.toString(); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(extendedRequestDTO + .getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest().getClientCorrelator()); + Integer userId = extendedRequestDTO.getUser().getId(); + int serviceNameId = apiServiceCalls.getApiServiceCallId(); + String endUserId = extendedRequestDTO.getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest() + .getAddress().toString(); + + outboundSMSMessageRequestBeanHub requestBean = extendedRequestDTO.getOutboundSMSMessageRequestBean(); + + OutboundSMSMessageResponseBean responseBean = new OutboundSMSMessageResponseBean(); + + OutboundSMSMessageResponseBean.OutboundSMSMessageResponse smsMessageResponse = new + OutboundSMSMessageResponseBean.OutboundSMSMessageResponse(); + + + if (clientCorrelator != null) { + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, + MessageProcessStatus.Success, MessageType.Response); + if (response != null) { + + // return already sent response + OutboundSMSMessageResponseBean obj; + obj = gson.fromJson(response, OutboundSMSMessageResponseBean.class); + responseWrapper.setOutboundSMSMessageResponseBeanHub(obj); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + + } + } + + smsMessageResponse.setResourceURL(getoutSideResourceURL(Integer.toString(getReferenceNumber()))); + smsMessageResponse.setSenderAddress(requestBean.getOutboundSMSMessageRequest().getSenderAddress()); + smsMessageResponse.setReceiptRequest(requestBean.getOutboundSMSMessageRequest().getReceiptRequest()); + smsMessageResponse.setSenderAddress(requestBean.getOutboundSMSMessageRequest().getSenderAddress()); + smsMessageResponse.setOutboundSMSTextMessage(requestBean.getOutboundSMSMessageRequest() + .getOutboundSMSTextMessage()); + smsMessageResponse.setClientCorrelator(requestBean.getOutboundSMSMessageRequest().getClientCorrelator()); + smsMessageResponse.setAddress(requestBean.getOutboundSMSMessageRequest().getAddress()); + + DeliveryInfoList deliveryInfoList = new DeliveryInfoList(); + deliveryInfoList.setResourceURL(getinSideResourceURL(Integer.toString(getReferenceNumber()))); + List infoList = new ArrayList(); + + for (String s : requestBean.getOutboundSMSMessageRequest().getAddress()) { + + DeliveryInfoList.DeliveryInfo deliveryInfo = new DeliveryInfoList.DeliveryInfo(); + deliveryInfo.setAddress(s); + deliveryInfo.setDeliveryStatus(smsMessagingParam.getDeliveryStatus()); + infoList.add(deliveryInfo); + } + + deliveryInfoList.setDeliveryInfo(infoList); + smsMessageResponse.setDeliveryInfoList(deliveryInfoList); + responseBean.setOutboundSMSMessageRequest(smsMessageResponse); + + responseWrapper.setOutboundSMSMessageResponseBeanHub(responseBean); + responseWrapper.setHttpStatus(Status.CREATED); + + // Save Success Response + saveResponse(endUserId, responseBean, apiServiceCalls, MessageProcessStatus.Success); + + } catch (Exception ex) { + LOG.error("###SMS### Error Occurred in SMS Service. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, + "Error Occurred in SMS Service.")); + } + + return responseWrapper; + } + + /** + * Generating inside resource URL. + * + * @param mtSMSTransactionId Unique ID + * @return URL + */ + private String getinSideResourceURL(final String mtSMSTransactionId) { + + return "http://wso2telco.sandbox.com" + + "/smsmessaging/" + + extendedRequestDTO.getApiVersion() + + "/outbound/" + + extendedRequestDTO.getShortCode() + + "/requests/" + + mtSMSTransactionId + + "/deliveryInfos"; + } + + /** + * Genarating outside resource URL. + * + * @param mtSMSTransactionId Unique Id. + * @return URL + */ + private String getoutSideResourceURL(final String mtSMSTransactionId) { + + return "http://wso2telco.sandbox.com" + + "/smsmessaging/" + + extendedRequestDTO.getApiVersion() + + "/outbound/" + + extendedRequestDTO.getShortCode() + + "/requests/" + + mtSMSTransactionId; + } + + + // Save Response in messageLog table + private void saveResponse(String endUserIdPath, OutboundSMSMessageResponseBean responseBean, APIServiceCalls + apiServiceCalls, MessageProcessStatus status) throws Exception { + + Gson gson = new Gson(); + String jsonString = gson.toJson(responseBean); + + //setting messagelog responses + new MessageLog(); + MessageLog messageLog; + messageLog = new MessageLog(); + messageLog.setRequest(jsonString); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } + + + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, + MessageProcessStatus status, MessageType type) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", tel, null, null); + + String jsonString = null; + + for (MessageLog aResponse : response) { + + int responseStatus = aResponse.getStatus(); + int responseType = aResponse.getType(); + String responseClientCorrelator; + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = aResponse.getRequest(); + JSONObject json = new JSONObject(request); + + responseClientCorrelator = json.getJSONObject("outboundSMSMessageRequest").get + ("clientCorrelator").toString(); + + int responseUserId = aResponse.getUserid(); + String responseTel = aResponse.getValue(); + + // check for duplicate clientCorrelators + if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals(tel)) { + jsonString = json.toString(); + break; + } + } + + + } + + return jsonString; + + } + + + @Override + public String getApiServiceCalls() { + try { + return ServiceName.SendSMS.toString(); + } catch (Exception ex) { + return null; + } + } + + @Override + public String getJosonString(sendMTSMSRequestWrapperDTOHub requestDTO) { + Gson gson = new Gson(); + return gson.toJson(requestDTO.getOutboundSMSMessageRequestBean()); + } + + @Override + public String getnumber(sendMTSMSRequestWrapperDTOHub requestDTO) { + return requestDTO.getOutboundSMSMessageRequestBean().getOutboundSMSMessageRequest().getAddress().toString(); + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/outboundSMSMessageRequestBeanHub.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/outboundSMSMessageRequestBeanHub.java new file mode 100644 index 00000000..915e4410 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/outboundSMSMessageRequestBeanHub.java @@ -0,0 +1,34 @@ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.OutboundSMSMessageRequest; +import com.wso2telco.services.dep.sandbox.dao.model.custom.SenderDetails; + +import java.util.ArrayList; +import java.util.List; + +public class outboundSMSMessageRequestBeanHub { + + private OutboundSMSMessageRequest_Hub outboundSMSMessageRequest; + + public OutboundSMSMessageRequest_Hub getOutboundSMSMessageRequest() { + return outboundSMSMessageRequest; + } + + public void setOutboundSMSMessageRequest(OutboundSMSMessageRequest_Hub outboundSMSMessageRequestHub) { + this.outboundSMSMessageRequest = outboundSMSMessageRequestHub; + } + + public class OutboundSMSMessageRequest_Hub extends OutboundSMSMessageRequest { + + + private List senderAddress; + + public List getSenderAddress() { + return senderAddress; + } + + public void setSenderAddress(List senderAddress) { + this.senderAddress = senderAddress; + } + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/sendMTSMSRequestWrapperDTOHub.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/sendMTSMSRequestWrapperDTOHub.java new file mode 100644 index 00000000..618336a7 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/hub/sendMTSMSRequestWrapperDTOHub.java @@ -0,0 +1,26 @@ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class sendMTSMSRequestWrapperDTOHub extends RequestDTO { + + private static final long serialVersionUID = 796868921376883562L; + private String shortCode; + private com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.outboundSMSMessageRequestBeanHub outboundSMSMessageRequestBeanHub; + + public String getShortCode() { + return shortCode; + } + + public void setShortCode(String shortCode) { + this.shortCode = shortCode; + } + + public com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.outboundSMSMessageRequestBeanHub getOutboundSMSMessageRequestBean() { + return outboundSMSMessageRequestBeanHub; + } + + public void setOutboundSMSMessageRequestBean(com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.outboundSMSMessageRequestBeanHub outboundSMSMessageRequestBeanHub) { + this.outboundSMSMessageRequestBeanHub = outboundSMSMessageRequestBeanHub; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index 935804b2..5642b34f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.util; public enum ServiceName { - GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location; + GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location, SendSMS; } From ed4c5362df42ab77f3411fbb90e29b2cd1218641 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Mon, 13 Mar 2017 12:36:21 +0530 Subject: [PATCH 064/112] Update Send SMS API logic --- .../OutboundSMSMessageResponseBean.java | 8 ++-- .../gateway/SendMTSMSService.java | 48 ++++++++++++------- 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageResponseBean.java index 517c6fa0..e83a947d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/OutboundSMSMessageResponseBean.java @@ -22,18 +22,18 @@ class OutboundSMSMessageResponseBean { - private OutboundSMSMessageResponse_Gw outboundSMSMessageRequest; + private OutboundSMSMessageResponseGateway outboundSMSMessageRequest; - public OutboundSMSMessageResponse_Gw getOutboundSMSMessageRequest() { + public OutboundSMSMessageResponseGateway getOutboundSMSMessageRequest() { return outboundSMSMessageRequest; } - public void setOutboundSMSMessageRequest(OutboundSMSMessageResponse_Gw outboundSMSMessageRequest) { + public void setOutboundSMSMessageRequest(OutboundSMSMessageResponseGateway outboundSMSMessageRequest) { this.outboundSMSMessageRequest = outboundSMSMessageRequest; } - public static class OutboundSMSMessageResponse_Gw extends OutboundSMSMessageRequest { + public static class OutboundSMSMessageResponseGateway extends OutboundSMSMessageRequest { private DeliveryInfoList deliveryInfoList; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java index 748b0f18..fef0569d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java @@ -66,32 +66,35 @@ protected List getAddress() { @Override protected boolean validate(SendMTSMSRequestWrapperDTOGateway wrapperDTO) throws Exception { - OutboundSMSMessageRequestBeanGateway outboundSMSMessageRequestBean_Gateway = wrapperDTO + OutboundSMSMessageRequestBeanGateway outboundSMSMessageRequestBeanGateway = wrapperDTO .getOutboundSMSMessageRequestBeanGw(); - String address = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + String address = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBeanGateway .getOutboundSMSMessageRequest().getAddress().toString()); - String callBackData = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + String callBackData = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBeanGateway .getOutboundSMSMessageRequest().getReceiptRequest().getCallbackData()); - String clientCorrelator = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBeanGateway .getOutboundSMSMessageRequest().getClientCorrelator()); - String message = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + String message = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBeanGateway .getOutboundSMSMessageRequest().getOutboundSMSTextMessage().getMessage()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBean_Gateway + String notifyURL = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBeanGateway .getOutboundSMSMessageRequest().getReceiptRequest().getNotifyURL()); + String senderAddress = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBeanGateway + .getOutboundSMSMessageRequest().getSenderAddress()); + String senderName = CommonUtil.getNullOrTrimmedValue(outboundSMSMessageRequestBeanGateway + .getOutboundSMSMessageRequest().getSenderName()); List validationRulesList = new ArrayList<>(); try { validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "address", address)); - validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "callBackData", - callBackData)); - validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", - clientCorrelator)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "callBackData", callBackData)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "message", message)); - validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "notifyURL", - notifyURL)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "notifyURL", notifyURL)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "senderName", senderName)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "senderAddress", senderAddress)); ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; validationRules = validationRulesList.toArray(validationRules); @@ -102,6 +105,7 @@ protected boolean validate(SendMTSMSRequestWrapperDTOGateway wrapperDTO) throws LOG.error("###SMS### Error in Validations. ", ex); responseWrapper.setRequestError( constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); return false; } return true; @@ -124,12 +128,17 @@ protected Returnable process(SendMTSMSRequestWrapperDTOGateway extendedRequestDT String endUserId = extendedRequestDTO.getOutboundSMSMessageRequestBeanGw().getOutboundSMSMessageRequest() .getAddress().toString(); + String senderAddress = extendedRequestDTO.getOutboundSMSMessageRequestBeanGw().getOutboundSMSMessageRequest().getSenderAddress(); + String senderAddressOnly= senderAddress.replaceAll("[^0-9]", ""); + + + OutboundSMSMessageRequestBeanGateway requestBean = extendedRequestDTO.getOutboundSMSMessageRequestBeanGw(); OutboundSMSMessageResponseBean responseBean = new OutboundSMSMessageResponseBean(); - OutboundSMSMessageResponseBean.OutboundSMSMessageResponse_Gw smsMessageResponse = new - OutboundSMSMessageResponseBean.OutboundSMSMessageResponse_Gw(); + OutboundSMSMessageResponseBean.OutboundSMSMessageResponseGateway smsMessageResponse = new + OutboundSMSMessageResponseBean.OutboundSMSMessageResponseGateway(); if (clientCorrelator != null) { @@ -147,6 +156,14 @@ protected Returnable process(SendMTSMSRequestWrapperDTOGateway extendedRequestDT } } + if(!dao.isWhiteListedSenderAddress(user.getId(), senderAddressOnly)){ + LOG.error("###SMS### sender address is not WhiteListed "); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Sender Address is not WhiteListed")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + smsMessageResponse.setResourceURL(getoutSideResourceURL(Integer.toString(getReferenceNumber()))); smsMessageResponse.setSenderAddress(requestBean.getOutboundSMSMessageRequest().getSenderAddress()); smsMessageResponse.setReceiptRequest(requestBean.getOutboundSMSMessageRequest().getReceiptRequest()); @@ -295,11 +312,8 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI } } - } - return jsonString; - } From d93234a5a19b06ca199da44ae39297ff99faa57e Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Tue, 14 Mar 2017 10:19:55 +0530 Subject: [PATCH 065/112] Implement Receiving SMS API --- .../dep/sandbox/dao/SMSMessagingDAO.java | 9 +- .../hibernate/HibernateSMSMessagingDAO.java | 18 +- .../dao/model/custom/InboundSMSMessage.java | 75 +++++++ .../model/domain/SendSMSToApplication.java | 3 +- .../sandbox/service/SmsServiceGateway.java | 52 ++++- .../gateway/ReceivingSMSHandler.java | 190 ++++++++++++++++++ .../ReceivingSMSRequestWrapperGateway.java | 42 ++++ .../gateway/ReceivingSMSResponseBean.java | 78 +++++++ .../gateway/ReceivingSMSResponseWrapper.java | 45 +++++ .../gateway/SMSRequestFactoryGateway.java | 7 + .../gateway/SendMTSMSService.java | 19 +- .../hub/SMSRequestFactoryHub.java | 3 +- .../dep/sandbox/util/ServiceName.java | 2 +- 13 files changed, 511 insertions(+), 32 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/InboundSMSMessage.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSRequestWrapperGateway.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseWrapper.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index ca4dbba6..20e86755 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -1,9 +1,8 @@ package com.wso2telco.services.dep.sandbox.dao; -import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSDeliveryStatus; -import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSMessagingParam; -import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSRequestLog; -import com.wso2telco.services.dep.sandbox.dao.model.domain.User; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; + +import java.util.List; public interface SMSMessagingDAO { public SMSDeliveryStatus getPreviousSMSDeliveryDetailsByMtSMSTransactionId(String mtSMSTransactionId); @@ -17,5 +16,5 @@ public String saveSendSMSTransaction(String senderAddress, String addresses, Str String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, String status, Integer txntype, String criteria, String notificationFormat, User user, String deliveryStatus) ; - + public List getMessageInbound(String regid, Integer userid); } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index 8621356c..58caeab2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -1,16 +1,14 @@ package com.wso2telco.services.dep.sandbox.dao.hibernate; import java.util.Date; +import java.util.List; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import org.apache.commons.logging.LogFactory; import org.hibernate.Session; import org.hibernate.Transaction; import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; -import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSDeliveryStatus; -import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSMessagingParam; -import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSRequestLog; -import com.wso2telco.services.dep.sandbox.dao.model.domain.User; class HibernateSMSMessagingDAO extends HibernateCommonDAO implements SMSMessagingDAO{ @@ -114,6 +112,18 @@ public String saveSendSMSTransaction(String senderAddress, String addresses, Str return mtSMSTransactionId; } + @Override + public List getMessageInbound(String registrationID, Integer userid) { + + List sendSMSToApplicationList; + Session session = getSession(); + + sendSMSToApplicationList = session.createQuery("from SendSMSToApplication where destinationAddress = ? and user.id = ?").setString(0, registrationID).setInteger(1, userid).list(); + + return sendSMSToApplicationList; + + } + public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, String status, Integer txntype, String criteria, String notificationFormat, User user, String requestId) { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/InboundSMSMessage.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/InboundSMSMessage.java new file mode 100644 index 00000000..a606a88d --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/InboundSMSMessage.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + + +public class InboundSMSMessage { + + private String dateTime; + private String destinationAddress; + private int messageId; + private String message; + private String resourceURL; + private String senderAddress; + + public String getDateTime() { + return dateTime; + } + + public void setDateTime(String dateTime) { + this.dateTime = dateTime; + } + + public String getDestinationAddress() { + return destinationAddress; + } + + public void setDestinationAddress(String destinationAddress) { + this.destinationAddress = destinationAddress; + } + + public int getMessageId() { + return messageId; + } + + public void setMessageId(int messageId) { + this.messageId = messageId; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + + public String getSenderAddress() { + return senderAddress; + } + + public void setSenderAddress(String senderAddress) { + this.senderAddress = senderAddress; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/SendSMSToApplication.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/SendSMSToApplication.java index 14cb321d..79b9d991 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/SendSMSToApplication.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/SendSMSToApplication.java @@ -36,7 +36,8 @@ public class SendSMSToApplication { @Column(name="destination_address") private String destinationAddress; - + + @Column(name="message") private String message; @Temporal(javax.persistence.TemporalType.DATE) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java index 5314ecae..c81acea8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java @@ -16,12 +16,11 @@ package com.wso2telco.services.dep.sandbox.service; -import com.wordnik.swagger.annotations.Api; -import com.wordnik.swagger.annotations.ApiImplicitParam; -import com.wordnik.swagger.annotations.ApiImplicitParams; -import com.wordnik.swagger.annotations.ApiOperation; +import com.wordnik.swagger.annotations.*; +import com.wso2telco.services.dep.sandbox.exception.SandboxException; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactoryGateway; import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.OutboundSMSMessageRequestBeanGateway; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.ReceivingSMSRequestWrapperGateway; import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.SendMTSMSRequestWrapperDTOGateway; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; @@ -76,5 +75,50 @@ public Response handleSendMTSMSRequest(@Context HttpServletRequest httpRequest, } + @GET + @Path("/v1_2/inbound/registrations/{registrationId}/messages") + @ApiOperation(value = "SMS Service", notes = "SMS Service", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header") }) + public Response location( + @ApiParam(value = "registrationId", required = true) @PathParam("registrationId") String registrationID, @ApiParam(value = "maxBatchSize", required = true) @QueryParam("maxBatchSize") int maxBatchSize, + @Context HttpServletRequest request) { + + LOG.debug("registrationId={registrationId}&maxBatchSize={maxBatchSize} invorked :" + registrationID +" " +maxBatchSize); + + ReceivingSMSRequestWrapperGateway requestDTO = new ReceivingSMSRequestWrapperGateway(); + requestDTO.setHttpRequest(request); + requestDTO.setRegistrationID(registrationID); + requestDTO.setMaxBatchSize(maxBatchSize); + requestDTO.setRequestType(RequestType.SMSMESSAGING); + + RequestHandleable handler = RequestBuilderFactoryGateway.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + LOG.debug("SMS RECEIVING SERVICE RESPONSE : " + response); + return response; + } catch (Exception ex) { + LOG.error("SMS RECEIVING SERVICE ERROR : ", ex); + return Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + } + + } + + + + + + + + + + + + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java new file mode 100644 index 00000000..e16cd072 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java @@ -0,0 +1,190 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.google.gson.Gson; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.InboundSMSMessage; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; +import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; +import com.wso2telco.services.dep.sandbox.dao.model.domain.SendSMSToApplication; +import com.wso2telco.services.dep.sandbox.servicefactory.*; +import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import com.wso2telco.services.dep.sandbox.util.ServiceName; +import org.apache.commons.logging.LogFactory; +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + + class ReceivingSMSHandler extends AbstractRequestHandler implements + AddressIgnorerable { + + private ReceivingSMSResponseWrapper responseWrapper; + private ReceivingSMSRequestWrapperGateway requestWrapper; + private SMSMessagingDAO smsMessagingDAO; + private String resourceURL; + + + { + LOG = LogFactory.getLog(ReceivingSMSHandler.class); + smsMessagingDAO = DaoFactory.getSMSMessagingDAO(); + } + + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + return null; + } + + @Override + protected boolean validate(ReceivingSMSRequestWrapperGateway wrapperDTO) throws Exception { + + + String registrationId = wrapperDTO.getRegistrationID(); + int maxBatchSize = wrapperDTO.getMaxBatchSize(); + + try { + ValidationRule[] rules = { + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "registrationId", registrationId), + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, "maxBatchSize", + maxBatchSize)}; + + + Validation.checkRequestParams(rules); + + } catch (CustomException ex) { + LOG.error("###SMS### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return false; + } + return true; + } + + @Override + protected Returnable process(ReceivingSMSRequestWrapperGateway extendedRequestDTO) throws Exception { + + try { + String registrationId = extendedRequestDTO.getRegistrationID(); + int maxBatchSize = extendedRequestDTO.getMaxBatchSize(); + + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + String serviceCallPayment = ServiceName.ReceivingSMS.toString(); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); + + if (!dao.isWhiteListedSenderAddress(user.getId(), registrationId)) { + LOG.error("###SMS### Destination address is not WhiteListed "); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Destination Address is not WhiteListed")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + + List smsMessageList = smsMessagingDAO.getMessageInbound(registrationId, user.getId()); + List inboundSMSMessageList = new ArrayList<>(); + + if (maxBatchSize > smsMessageList.size()) { + + maxBatchSize = smsMessageList.size(); + } + + for (int i = 0; i < maxBatchSize; i++) { + + InboundSMSMessage inboundSMSMessage = new InboundSMSMessage(); + inboundSMSMessage.setDateTime((smsMessageList.get(i).getDate()).toString()); + inboundSMSMessage.setDestinationAddress(smsMessageList.get(i).getDestinationAddress()); + inboundSMSMessage.setMessage(smsMessageList.get(i).getMessage()); + inboundSMSMessage.setMessageId(smsMessageList.get(i).getSmsId()); + inboundSMSMessage.setSenderAddress(smsMessageList.get(i).getSenderAddress()); + inboundSMSMessage.setResourceURL(resourceURL + "/" + smsMessageList.get(i).getSmsId()); + inboundSMSMessageList.add(inboundSMSMessage); + } + + ReceivingSMSResponseBean responseBean = new ReceivingSMSResponseBean(); + ReceivingSMSResponseBean.InboundSMSMessageList list = new ReceivingSMSResponseBean + .InboundSMSMessageList(); + list.setInboundSMSMessages(inboundSMSMessageList); + + responseBean.setInboundSMSMessageList(list); + responseBean.setNumberOfMessagesInThisBatch(maxBatchSize); + responseBean.setResourceURL(resourceURL); + responseBean.setTotalNumberOfPendingMessages(smsMessageList.size()-maxBatchSize); + + responseWrapper.setReceivingSMSResponseBean(responseBean); + responseWrapper.setHttpStatus(Response.Status.CREATED); + + // Save Success Response + saveResponse(registrationId, responseBean, apiServiceCalls, MessageProcessStatus.Success); + + }catch (Exception ex){ + LOG.error("###SMS### Error Occurred in SMS Receiving Service. ", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, + "Error Occurred in SMS Receiving Service.")); + } + + return responseWrapper; + } + + @Override + protected void init(ReceivingSMSRequestWrapperGateway extendedRequestDTO) throws Exception { + + requestWrapper = extendedRequestDTO; + responseWrapper = new ReceivingSMSResponseWrapper(); + resourceURL = CommonUtil.getResourceUrl(requestWrapper); + + } + + + // Save Response in messageLog table + private void saveResponse(String endUserIdPath, ReceivingSMSResponseBean responseBean, APIServiceCalls + apiServiceCalls, MessageProcessStatus status) throws Exception { + + Gson gson = new Gson(); + String jsonString = gson.toJson(responseBean); + + //setting messagelog responses + new MessageLog(); + MessageLog messageLog; + messageLog = new MessageLog(); + messageLog.setRequest(jsonString); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(user.getId()); + messageLog.setReference("shortCode"); + messageLog.setValue(endUserIdPath); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSRequestWrapperGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSRequestWrapperGateway.java new file mode 100644 index 00000000..d6851775 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSRequestWrapperGateway.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class ReceivingSMSRequestWrapperGateway extends RequestDTO { + + + private String registrationID; + private int maxBatchSize; + + public String getRegistrationID() { + return registrationID; + } + + public void setRegistrationID(String registrationID) { + this.registrationID = registrationID; + } + + public int getMaxBatchSize() { + return maxBatchSize; + } + + public void setMaxBatchSize(int maxBatchSize) { + this.maxBatchSize = maxBatchSize; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseBean.java new file mode 100644 index 00000000..729d0d53 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseBean.java @@ -0,0 +1,78 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.InboundSMSMessage; + +import java.util.List; + + class ReceivingSMSResponseBean { + + private InboundSMSMessageList inboundSMSMessageList; + private int numberOfMessagesInThisBatch; + private String resourceURL; + private int totalNumberOfPendingMessages; + + public InboundSMSMessageList getInboundSMSMessageList() { + return inboundSMSMessageList; + } + + public void setInboundSMSMessageList(InboundSMSMessageList inboundSMSMessageList) { + this.inboundSMSMessageList = inboundSMSMessageList; + } + + public int getNumberOfMessagesInThisBatch() { + return numberOfMessagesInThisBatch; + } + + public void setNumberOfMessagesInThisBatch(int numberOfMessagesInThisBatch) { + this.numberOfMessagesInThisBatch = numberOfMessagesInThisBatch; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + + public int getTotalNumberOfPendingMessages() { + return totalNumberOfPendingMessages; + } + + public void setTotalNumberOfPendingMessages(int totalNumberOfPendingMessages) { + this.totalNumberOfPendingMessages = totalNumberOfPendingMessages; + } + + public static class InboundSMSMessageList{ + + private List inboundSMSMessages; + + public List getInboundSMSMessages() { + return inboundSMSMessages; + } + + public void setInboundSMSMessages(List inboundSMSMessages) { + this.inboundSMSMessages = inboundSMSMessages; + } + + + + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseWrapper.java new file mode 100644 index 00000000..90bedd78 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseWrapper.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + + class ReceivingSMSResponseWrapper extends AbstractReturnWrapperDTO { + + + private ReceivingSMSResponseBean receivingSMSResponseBean; + + public ReceivingSMSResponseBean getReceivingSMSResponseBean() { + return receivingSMSResponseBean; + } + + public void setReceivingSMSResponseBean(ReceivingSMSResponseBean receivingSMSResponseBean) { + this.receivingSMSResponseBean = receivingSMSResponseBean; + } + + @Override + public Object getResponse() { + if (getRequestError() == null) { + return receivingSMSResponseBean; + }else{ + ErrorResponseDTO response= new ErrorResponseDTO(getRequestError()); + return response; + } + + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java index 92497b22..556008eb 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java @@ -43,6 +43,13 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { return new SendMTSMSService(); } + else if (requestDTO.getRequestPath().toLowerCase().contains(RETRIVE_SMS) + && requestDTO.isGet()) { + LOG.debug("LOADING RETRIVE SMS SERVICE"); + + return new ReceivingSMSHandler(); + } + else { return null; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java index fef0569d..c9441765 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java @@ -44,6 +44,7 @@ class SendMTSMSService extends AbstractRequestHandler Date: Wed, 15 Mar 2017 10:18:50 +0530 Subject: [PATCH 066/112] Implement Subscribe to notifications of messages sent to your application API --- .../dep/sandbox/dao/SMSMessagingDAO.java | 1 + .../hibernate/HibernateSMSMessagingDAO.java | 40 +++ .../custom/DeliveryReceiptSubscription.java | 9 + .../custom/OutboundSMSMessageRequest.java | 4 +- .../dao/model/domain/SubscribeSMSRequest.java | 3 +- .../sandbox/service/SmsServiceGateway.java | 33 +- .../gateway/ReceivingSMSResponseBean.java | 4 +- .../gateway/SMSRequestFactoryGateway.java | 7 + .../gateway/SendMTSMSService.java | 9 +- ...scribeApplicationNotificationsHandler.java | 294 ++++++++++++++++++ ...cationNotificationsRequestBeanGateway.java | 75 +++++ ...ionNotificationsRequestWrapperGateway.java | 33 ++ ...eApplicationNotificationsResponseBean.java | 84 +++++ ...plicationNotificationsResponseWrapper.java | 43 +++ .../dep/sandbox/util/ServiceName.java | 2 +- 15 files changed, 624 insertions(+), 17 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsRequestBeanGateway.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsRequestWrapperGateway.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsResponseBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsResponseWrapper.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index 20e86755..12fbee75 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -17,4 +17,5 @@ public String saveSendSMSTransaction(String senderAddress, String addresses, Str String status, Integer txntype, String criteria, String notificationFormat, User user, String deliveryStatus) ; public List getMessageInbound(String regid, Integer userid); + public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, String callbackData, String criteria, String clientCorrelator, User user) throws Exception; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index 58caeab2..12fee978 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -124,6 +124,46 @@ public List getMessageInbound(String registrationID, Integ } + @Override + public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, String callbackData, String + criteria, String clientCorrelator, User user) throws Exception { + + + Session session = null; + Transaction transaction = null; + Integer subsid = null; + + try { + + session = getSession(); + transaction = session.beginTransaction(); + + SubscribeSMSRequest subscribeSMSRequest = new SubscribeSMSRequest(); + subscribeSMSRequest.setCallbackData(callbackData); + subscribeSMSRequest.setClientCorrelator(clientCorrelator); + subscribeSMSRequest.setCriteria(criteria); + subscribeSMSRequest.setDestinationAddress(destinationAddress); + subscribeSMSRequest.setNotifyURL(notifyURL); + subscribeSMSRequest.setUser(user); + subscribeSMSRequest.setDate(new Date()); + subscribeSMSRequest.setNotificationFormat("JSON"); + session.save(subscribeSMSRequest); + subsid = subscribeSMSRequest.getSubscribeId(); + + transaction.commit(); + + } catch (Exception e) { + transaction.rollback(); + e.printStackTrace(); + } finally { + session.close(); + } + + return subsid; + + } + + public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, String status, Integer txntype, String criteria, String notificationFormat, User user, String requestId) { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryReceiptSubscription.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryReceiptSubscription.java index 174acb35..4176e7ce 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryReceiptSubscription.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/DeliveryReceiptSubscription.java @@ -18,6 +18,15 @@ public class DeliveryReceiptSubscription { + private CallbackReference callbackReference; + + public CallbackReference getCallbackReference() { + return callbackReference; + } + + public void setCallbackReference(CallbackReference callbackReference) { + this.callbackReference = callbackReference; + } public static class CallbackReference{ diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequest.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequest.java index 1b1d8b23..6adbb610 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequest.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/OutboundSMSMessageRequest.java @@ -15,10 +15,12 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; +import com.fasterxml.jackson.annotation.JsonInclude; + import java.util.ArrayList; import java.util.List; - +@JsonInclude(value = JsonInclude.Include.NON_NULL) public class OutboundSMSMessageRequest { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/SubscribeSMSRequest.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/SubscribeSMSRequest.java index aa17ed0f..cd34a493 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/SubscribeSMSRequest.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/SubscribeSMSRequest.java @@ -41,7 +41,8 @@ public class SubscribeSMSRequest implements Serializable { @Column(name="callback_data") private String callbackData; - + + @Column(name="criteria") private String criteria; @Column(name="notification_format") diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java index c81acea8..03a3f9f2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java @@ -19,9 +19,7 @@ import com.wordnik.swagger.annotations.*; import com.wso2telco.services.dep.sandbox.exception.SandboxException; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactoryGateway; -import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.OutboundSMSMessageRequestBeanGateway; -import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.ReceivingSMSRequestWrapperGateway; -import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.SendMTSMSRequestWrapperDTOGateway; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.*; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import com.wso2telco.services.dep.sandbox.util.RequestType; @@ -111,14 +109,31 @@ public Response location( + @POST + @Path("/v1_2/inbound/subscriptions") + @ApiOperation(value = "sms", notes = "SMS subscriptions service in Gateway", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", + required = true, dataType = "string", paramType = "header") + }) + public Response subscribeToApplication(@Context HttpServletRequest httpRequest, SubscribeApplicationNotificationsRequestBeanGateway subscribeApplicationNotificationsRequestBean) { + SubscribeApplicationNotificationsRequestWrapperGateway requestDTO = new SubscribeApplicationNotificationsRequestWrapperGateway(); + requestDTO.setHttpRequest(httpRequest); + requestDTO.setRequestType(RequestType.SMSMESSAGING); + requestDTO.setApiVersion("v1_2"); + requestDTO.setSubscribeApplicationNotificationsRequestBean(subscribeApplicationNotificationsRequestBean); + RequestHandleable handler = RequestBuilderFactoryGateway.getInstance(requestDTO); + Returnable returnable = null; + try { - - - - - - + returnable = handler.execute(requestDTO); + return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + } catch (Exception e) { + e.printStackTrace(); + return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); + } + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseBean.java index 729d0d53..abe30c0a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSResponseBean.java @@ -16,10 +16,11 @@ package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; +import com.fasterxml.jackson.annotation.JsonInclude; import com.wso2telco.services.dep.sandbox.dao.model.custom.InboundSMSMessage; - import java.util.List; +@JsonInclude(value = JsonInclude.Include.NON_NULL) class ReceivingSMSResponseBean { private InboundSMSMessageList inboundSMSMessageList; @@ -59,6 +60,7 @@ public void setTotalNumberOfPendingMessages(int totalNumberOfPendingMessages) { this.totalNumberOfPendingMessages = totalNumberOfPendingMessages; } + @JsonInclude(value = JsonInclude.Include.NON_NULL) public static class InboundSMSMessageList{ private List inboundSMSMessages; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java index 556008eb..736ea230 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java @@ -34,6 +34,7 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { final String RETRIVE_SMS = "registrations"; final String OUTBOUND_REQUEST = "outbound"; final String INBOUND_REQUEST = "inbound"; + final String SUBSCRIPTIONS = "subscriptions"; if (requestDTO.getRequestPath().toLowerCase().contains(SEND_MT_SMS) @@ -50,6 +51,12 @@ else if (requestDTO.getRequestPath().toLowerCase().contains(RETRIVE_SMS) return new ReceivingSMSHandler(); } + else if (requestDTO.getRequestPath().toLowerCase().contains(SUBSCRIPTIONS) + && requestDTO.isPost()) { + LOG.debug("LOADING SUBSCRIPTIONS SMS SERVICE"); + + return new SubscribeApplicationNotificationsHandler(); + } else { return null; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java index c9441765..6feb43d4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java @@ -281,15 +281,16 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI int responseStatus = aResponse.getStatus(); int responseType = aResponse.getType(); - String responseClientCorrelator; + String responseClientCorrelator = null; if (responseType == type.getValue() && responseStatus == status.getValue()) { String request = aResponse.getRequest(); JSONObject json = new JSONObject(request); - responseClientCorrelator = json.getJSONObject("outboundSMSMessageRequest").get - ("clientCorrelator").toString(); - + if(json.getJSONObject("outboundSMSMessageRequest").has("clientCorrelator")) { + responseClientCorrelator = json.getJSONObject("outboundSMSMessageRequest").get + ("clientCorrelator").toString(); + } int responseUserId = aResponse.getUserid(); String responseTel = aResponse.getValue(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java new file mode 100644 index 00000000..5af2c214 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java @@ -0,0 +1,294 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryReceiptSubscription; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.*; +import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import com.wso2telco.services.dep.sandbox.util.ServiceName; +import org.apache.commons.logging.LogFactory; +import org.json.JSONObject; + +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +class SubscribeApplicationNotificationsHandler extends + AbstractRequestHandler implements AddressIgnorerable { + + private SubscribeApplicationNotificationsResponseWrapper responseWrapper; + private SubscribeApplicationNotificationsRequestWrapperGateway requestWrapper; + private SMSMessagingDAO smsMessagingDAO; + private Gson gson = new GsonBuilder().serializeNulls().create(); + + + { + LOG = LogFactory.getLog(SubscribeApplicationNotificationsHandler.class); + smsMessagingDAO = DaoFactory.getSMSMessagingDAO(); + } + + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + return null; + } + + @Override + protected boolean validate(SubscribeApplicationNotificationsRequestWrapperGateway wrapperDTO) throws Exception { + + SubscribeApplicationNotificationsRequestBeanGateway subscribeApplicationNotificationsRequestBean = wrapperDTO + .getSubscribeApplicationNotificationsRequestBean(); + + String callbackData = CommonUtil.getNullOrTrimmedValue(subscribeApplicationNotificationsRequestBean + .getSubscription().getCallbackReference().getCallbackData()); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(subscribeApplicationNotificationsRequestBean + .getSubscription().getClientCorrelator()); + String criteria = CommonUtil.getNullOrTrimmedValue(subscribeApplicationNotificationsRequestBean + .getSubscription().getCriteria()); + String destinationAddress = CommonUtil.getNullOrTrimmedValue(subscribeApplicationNotificationsRequestBean + .getSubscription().getDestinationAddress()); + String notificationFormat = CommonUtil.getNullOrTrimmedValue(subscribeApplicationNotificationsRequestBean + .getSubscription().getNotificationFormat()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(subscribeApplicationNotificationsRequestBean + .getSubscription().getCallbackReference().getNotifyURL()); + + List validationRulesList = new ArrayList<>(); + + try { + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "callbackData", + callbackData)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "criteria", criteria)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", + clientCorrelator)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "destinationAddress", destinationAddress)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "notifyURL", + notifyURL)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "notificationFormat", + notificationFormat)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###SMS### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return false; + } + return true; + } + + @Override + protected Returnable process(SubscribeApplicationNotificationsRequestWrapperGateway extendedRequestDTO) throws Exception { + + try { + + User user = extendedRequestDTO.getUser(); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(extendedRequestDTO + .getSubscribeApplicationNotificationsRequestBean().getSubscription().getClientCorrelator()); + Integer userId = extendedRequestDTO.getUser().getId(); + + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + String serviceCallPayment = ServiceName.SubscribeToApplication.toString(); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); + int serviceNameId = apiServiceCalls.getApiServiceCallId(); + String endUserId = extendedRequestDTO.getSubscribeApplicationNotificationsRequestBean().getSubscription() + .getDestinationAddress(); + + String destinationAddress = extendedRequestDTO.getSubscribeApplicationNotificationsRequestBean() + .getSubscription().getDestinationAddress(); + String criteria = extendedRequestDTO.getSubscribeApplicationNotificationsRequestBean().getSubscription() + .getCriteria(); + String notifyURL = extendedRequestDTO.getSubscribeApplicationNotificationsRequestBean().getSubscription() + .getCallbackReference().getNotifyURL(); + String callbackData = extendedRequestDTO.getSubscribeApplicationNotificationsRequestBean() + .getSubscription().getCallbackReference().getCallbackData(); + + String notificationFormat = extendedRequestDTO.getSubscribeApplicationNotificationsRequestBean().getSubscription().getNotificationFormat(); + + + if (clientCorrelator != null) { + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, + MessageProcessStatus.Success, MessageType.Response); + if (response != null) { + // return already sent response + SubscribeApplicationNotificationsResponseBean obj; + obj = gson.fromJson(response, SubscribeApplicationNotificationsResponseBean.class); + responseWrapper.setResponseBean(obj); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + + } + } + + if (!dao.isWhiteListedSenderAddress(user.getId(), destinationAddress)) { + LOG.error("###SMS### Destination Address is not WhiteListed "); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Destination Address is not WhiteListed")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + for (int i = 0; i < user.getSubscribeSMSRequestList().size(); i++) { + + if (destinationAddress.equals(user.getSubscribeSMSRequestList().get(i).getDestinationAddress()) && + criteria.equals(user.getSubscribeSMSRequestList().get(i).getCriteria())) { + LOG.error("###SMS### Overlapped criteria "); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Overlapped criteria")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + } + + Integer subsId = smsMessagingDAO.saveSubscribeSMSRequest(destinationAddress, notifyURL, callbackData, + criteria, clientCorrelator, user); + String resourceURLMaker = CommonUtil.getResourceUrl(extendedRequestDTO); + int index = resourceURLMaker.lastIndexOf('/'); + String resourceURL = resourceURLMaker.substring(0, index) + "/" + subsId; + + SubscribeApplicationNotificationsResponseBean responseBean = new + SubscribeApplicationNotificationsResponseBean(); + SubscribeApplicationNotificationsResponseBean.SubscribeApplicationNotificationsResponse + applicationNotificationsResponse = new SubscribeApplicationNotificationsResponseBean + .SubscribeApplicationNotificationsResponse(); + + applicationNotificationsResponse.setClientCorrelator(clientCorrelator); + applicationNotificationsResponse.setCriteria(criteria); + applicationNotificationsResponse.setDestinationAddress(destinationAddress); + applicationNotificationsResponse.setResourceURL(resourceURL); + applicationNotificationsResponse.setNotificationFormat(notificationFormat); + + SubscribeApplicationNotificationsResponseBean.SubscribeApplicationNotificationsResponse.CallbackReference + callbackReference = new DeliveryReceiptSubscription.CallbackReference(); + callbackReference.setCallbackData(callbackData); + callbackReference.setNotifyURL(notifyURL); + + applicationNotificationsResponse.setCallbackReference(callbackReference); + + responseBean.setSubscription(applicationNotificationsResponse); + + responseWrapper.setResponseBean(responseBean); + responseWrapper.setHttpStatus(Response.Status.CREATED); + + // Save Success Response + saveResponse(endUserId, responseBean, apiServiceCalls, MessageProcessStatus.Success); + + } catch (Exception ex) { + LOG.error("###SMS### Error Occurred in Subscribe Application Notifications.", ex); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + responseWrapper + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, + "###SMS### Error Occurred in Subscribe Application Notifications.")); + } + + + return responseWrapper; + } + + @Override + protected void init(SubscribeApplicationNotificationsRequestWrapperGateway extendedRequestDTO) throws Exception { + + responseWrapper = new SubscribeApplicationNotificationsResponseWrapper(); + this.requestWrapper = extendedRequestDTO; + + } + + + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, + MessageProcessStatus status, MessageType type) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + + List response = loggingDAO.getMessageLogs(userId, list, "destinationAddress", tel, null, null); + + String jsonString = null; + + for (MessageLog aResponse : response) { + + int responseStatus = aResponse.getStatus(); + int responseType = aResponse.getType(); + String responseClientCorrelator = null; + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = aResponse.getRequest(); + JSONObject json = new JSONObject(request); + + if(json.getJSONObject("subscription").has("clientCorrelator")) { + + responseClientCorrelator = json.getJSONObject("subscription").get("clientCorrelator").toString(); + } + int responseUserId = aResponse.getUserid(); + String responseTel = aResponse.getValue(); + + // check for duplicate clientCorrelators + if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals(tel)) { + jsonString = json.toString(); + break; + } + } + + } + return jsonString; + } + + + private void saveResponse(String endUserIdPath, SubscribeApplicationNotificationsResponseBean responseBean, + APIServiceCalls + apiServiceCalls, MessageProcessStatus status) throws Exception { + + Gson gson = new Gson(); + String jsonString = gson.toJson(responseBean); + + //setting messagelog responses + new MessageLog(); + MessageLog messageLog; + messageLog = new MessageLog(); + messageLog.setRequest(jsonString); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(user.getId()); + messageLog.setReference("destinationAddress"); + messageLog.setValue(endUserIdPath); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsRequestBeanGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsRequestBeanGateway.java new file mode 100644 index 00000000..795590e4 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsRequestBeanGateway.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryReceiptSubscription; + +public class SubscribeApplicationNotificationsRequestBeanGateway { + + private Subscription subscription; + + + public Subscription getSubscription() { + return subscription; + } + + public void setSubscription(Subscription subscription) { + this.subscription = subscription; + } + + static class Subscription extends DeliveryReceiptSubscription{ + + private String criteria; + private String destinationAddress; + private String notificationFormat; + private String clientCorrelator; + + public String getCriteria() { + return criteria; + } + + public void setCriteria(String criteria) { + this.criteria = criteria; + } + + public String getDestinationAddress() { + return destinationAddress; + } + + public void setDestinationAddress(String destinationAddress) { + this.destinationAddress = destinationAddress; + } + + public String getNotificationFormat() { + return notificationFormat; + } + + public void setNotificationFormat(String notificationFormat) { + this.notificationFormat = notificationFormat; + } + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + } + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsRequestWrapperGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsRequestWrapperGateway.java new file mode 100644 index 00000000..47df6c2e --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsRequestWrapperGateway.java @@ -0,0 +1,33 @@ + +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class SubscribeApplicationNotificationsRequestWrapperGateway extends RequestDTO { + + private SubscribeApplicationNotificationsRequestBeanGateway subscribeApplicationNotificationsRequestBean; + + public SubscribeApplicationNotificationsRequestBeanGateway getSubscribeApplicationNotificationsRequestBean() { + return subscribeApplicationNotificationsRequestBean; + } + + public void setSubscribeApplicationNotificationsRequestBean(SubscribeApplicationNotificationsRequestBeanGateway + subscribeApplicationNotificationsRequestBean) { + this.subscribeApplicationNotificationsRequestBean = subscribeApplicationNotificationsRequestBean; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsResponseBean.java new file mode 100644 index 00000000..9db9b2d7 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsResponseBean.java @@ -0,0 +1,84 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryReceiptSubscription; + + class SubscribeApplicationNotificationsResponseBean { + + + private SubscribeApplicationNotificationsResponse subscription; + + public SubscribeApplicationNotificationsResponse getSubscription() { + return subscription; + } + + public void setSubscription(SubscribeApplicationNotificationsResponse subscription) { + this.subscription = subscription; + } + + @JsonInclude(value = JsonInclude.Include.NON_NULL) + public static class SubscribeApplicationNotificationsResponse extends DeliveryReceiptSubscription { + + private String criteria; + private String destinationAddress; + private String notificationFormat; + private String clientCorrelator; + private String resourceURL; + + public String getCriteria() { + return criteria; + } + + public void setCriteria(String criteria) { + this.criteria = criteria; + } + + public String getDestinationAddress() { + return destinationAddress; + } + + public void setDestinationAddress(String destinationAddress) { + this.destinationAddress = destinationAddress; + } + + public String getNotificationFormat() { + return notificationFormat; + } + + public void setNotificationFormat(String notificationFormat) { + this.notificationFormat = notificationFormat; + } + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsResponseWrapper.java new file mode 100644 index 00000000..836ed582 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsResponseWrapper.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +class SubscribeApplicationNotificationsResponseWrapper extends AbstractReturnWrapperDTO { + + + private SubscribeApplicationNotificationsResponseBean responseBean; + + public SubscribeApplicationNotificationsResponseBean getResponseBean() { + return responseBean; + } + + public void setResponseBean(SubscribeApplicationNotificationsResponseBean responseBean) { + this.responseBean = responseBean; + } + + @Override + public Object getResponse() { + if (getRequestError() == null) { + return responseBean; + }else{ + ErrorResponseDTO response= new ErrorResponseDTO(getRequestError()); + return response; + } + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index dde434d6..5e7dac04 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.util; public enum ServiceName { - GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location, SendSMS, ReceivingSMS; + GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location, SendSMS, ReceivingSMS, SubscribeToApplication; } From b4f10ac92f4350fb118d6fd2e57f335213c964f7 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Wed, 15 Mar 2017 15:23:34 +0530 Subject: [PATCH 067/112] Implement Stop the subscription to message notifications --- .../dep/sandbox/dao/SMSMessagingDAO.java | 4 +- .../hibernate/HibernateSMSMessagingDAO.java | 58 ++++--- .../sandbox/service/SmsServiceGateway.java | 42 ++++- .../gateway/ReceivingSMSHandler.java | 2 +- .../gateway/SMSRequestFactoryGateway.java | 8 + ...ubscriptionMessageNotificationHandler.java | 143 ++++++++++++++++++ ...tionMessageNotificationRequestWrapper.java | 32 ++++ ...ionMessageNotificationResponseWrapper.java | 41 +++++ ...scribeApplicationNotificationsHandler.java | 45 +++++- .../dep/sandbox/util/ServiceName.java | 2 +- 10 files changed, 341 insertions(+), 36 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationRequestWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationResponseWrapper.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index 12fbee75..924fa9fc 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -17,5 +17,7 @@ public String saveSendSMSTransaction(String senderAddress, String addresses, Str String status, Integer txntype, String criteria, String notificationFormat, User user, String deliveryStatus) ; public List getMessageInbound(String regid, Integer userid); - public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, String callbackData, String criteria, String clientCorrelator, User user) throws Exception; + public int saveSubscribeSMSRequest(SubscribeSMSRequest subscribeSMSRequest) throws Exception; + + public boolean removeSubscriptionToMessage(String subscriptionID) throws Exception; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index 12fee978..d576b2d1 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -9,6 +9,7 @@ import org.hibernate.Transaction; import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import org.hibernate.query.Query; class HibernateSMSMessagingDAO extends HibernateCommonDAO implements SMSMessagingDAO{ @@ -125,37 +126,25 @@ public List getMessageInbound(String registrationID, Integ } @Override - public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, String callbackData, String - criteria, String clientCorrelator, User user) throws Exception { - + public int saveSubscribeSMSRequest(SubscribeSMSRequest SubscribeSMSRequest) throws Exception { Session session = null; Transaction transaction = null; Integer subsid = null; try { - session = getSession(); transaction = session.beginTransaction(); - - SubscribeSMSRequest subscribeSMSRequest = new SubscribeSMSRequest(); - subscribeSMSRequest.setCallbackData(callbackData); - subscribeSMSRequest.setClientCorrelator(clientCorrelator); - subscribeSMSRequest.setCriteria(criteria); - subscribeSMSRequest.setDestinationAddress(destinationAddress); - subscribeSMSRequest.setNotifyURL(notifyURL); - subscribeSMSRequest.setUser(user); - subscribeSMSRequest.setDate(new Date()); - subscribeSMSRequest.setNotificationFormat("JSON"); - session.save(subscribeSMSRequest); - subsid = subscribeSMSRequest.getSubscribeId(); - + session.save(SubscribeSMSRequest); + subsid = SubscribeSMSRequest.getSubscribeId(); transaction.commit(); } catch (Exception e) { transaction.rollback(); - e.printStackTrace(); - } finally { + LOG.error("Error occurred When save subscribe SMS request",e); + throw e; + + } finally { session.close(); } @@ -163,6 +152,37 @@ public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, } + @Override + public boolean removeSubscriptionToMessage(String subscriptionID) throws Exception { + + boolean isExists = false; + Session session = null; + Transaction transaction = null; + + try { + session = getSession(); + transaction = session.beginTransaction(); + Query query= session.createQuery("delete FROM SubscribeSMSRequest WHERE subscribe_id = :id"); + query.setInteger("id", Integer.parseInt(subscriptionID)); + int i = query.executeUpdate(); + + if (i >0) { + isExists = true; + } + transaction.commit(); + + } catch (Exception e) { + transaction.rollback(); + LOG.error("Error occurred when remove subscription to message",e); + throw e; + + } finally { + session.close(); + } + + return isExists; + } + public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java index 03a3f9f2..41486bd4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java @@ -36,14 +36,14 @@ @Path("smsmessaging") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @Api(value = "/v1_2/sms", description = "sms") + @Api(value = "/v1_2/sms", description = " Rest Service for SMS API") public class SmsServiceGateway { Log LOG = LogFactory.getLog(SmsServiceGateway.class); @POST @Path("/v1_2/outbound/{shortCode}/requests") - @ApiOperation(value = "sms", notes = "Send SMS service in Gateway", response = Response.class) + @ApiOperation(value = "Send SMS Service", notes = "Send SMS service in Gateway", response = Response.class) @ApiImplicitParams({ @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header") @@ -67,7 +67,6 @@ public Response handleSendMTSMSRequest(@Context HttpServletRequest httpRequest, returnable = handler.execute(requestDTO); return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); } catch (Exception e) { - e.printStackTrace(); return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); } } @@ -75,10 +74,10 @@ public Response handleSendMTSMSRequest(@Context HttpServletRequest httpRequest, @GET @Path("/v1_2/inbound/registrations/{registrationId}/messages") - @ApiOperation(value = "SMS Service", notes = "SMS Service", response = Response.class) + @ApiOperation(value = "Receiving SMS Service", notes = "Receiving SMS API", response = Response.class) @ApiImplicitParams({ @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header") }) - public Response location( + public Response ReceivingSMS( @ApiParam(value = "registrationId", required = true) @PathParam("registrationId") String registrationID, @ApiParam(value = "maxBatchSize", required = true) @QueryParam("maxBatchSize") int maxBatchSize, @Context HttpServletRequest request) { @@ -111,7 +110,7 @@ public Response location( @POST @Path("/v1_2/inbound/subscriptions") - @ApiOperation(value = "sms", notes = "SMS subscriptions service in Gateway", response = Response.class) + @ApiOperation(value = "Subscribe to Notifications of Messages Sent to Your Application Service", notes = "SMS subscriptions service in Gateway", response = Response.class) @ApiImplicitParams({ @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header") @@ -131,9 +130,38 @@ public Response subscribeToApplication(@Context HttpServletRequest httpRequest, returnable = handler.execute(requestDTO); return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); } catch (Exception e) { - e.printStackTrace(); return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); } } + + + @DELETE + @Path("/v1_2/inbound/subscriptions/{subscriptionID}") + @ApiOperation(value = "Stop the Subscription to Message Notifications", notes = "SMS subscriptions service in Gateway", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", + required = true, dataType = "string", paramType = "header") + }) + public Response deleteSubscribeToApplication(@ApiParam(value = "subscriptionID", required = true) @PathParam("subscriptionID") String subscriptionID,@Context HttpServletRequest httpRequest) { + + StopSubscriptionMessageNotificationRequestWrapper requestDTO = new StopSubscriptionMessageNotificationRequestWrapper(); + requestDTO.setHttpRequest(httpRequest); + requestDTO.setRequestType(RequestType.SMSMESSAGING); + requestDTO.setApiVersion("v1_2"); + requestDTO.setSubscriptionID(subscriptionID); + RequestHandleable handler = RequestBuilderFactoryGateway.getInstance(requestDTO); + Returnable returnable = null; + + try { + + returnable = handler.execute(requestDTO); + return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + } catch (Exception e) { + return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); + } + } + + + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java index e16cd072..8eb5fb0d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java @@ -138,7 +138,7 @@ protected Returnable process(ReceivingSMSRequestWrapperGateway extendedRequestDT responseBean.setTotalNumberOfPendingMessages(smsMessageList.size()-maxBatchSize); responseWrapper.setReceivingSMSResponseBean(responseBean); - responseWrapper.setHttpStatus(Response.Status.CREATED); + responseWrapper.setHttpStatus(Response.Status.OK); // Save Success Response saveResponse(registrationId, responseBean, apiServiceCalls, MessageProcessStatus.Success); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java index 736ea230..5b0965eb 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java @@ -57,6 +57,14 @@ else if (requestDTO.getRequestPath().toLowerCase().contains(SUBSCRIPTIONS) return new SubscribeApplicationNotificationsHandler(); } + + else if (requestDTO.getRequestPath().toLowerCase().contains(SUBSCRIPTIONS) + && requestDTO.isDelete()) { + LOG.debug("LOADING SUBSCRIPTIONS SMS SERVICE"); + + return new StopSubscriptionMessageNotificationHandler(); + } + else { return null; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationHandler.java new file mode 100644 index 00000000..d2fab446 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationHandler.java @@ -0,0 +1,143 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.google.gson.Gson; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; +import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; +import com.wso2telco.services.dep.sandbox.servicefactory.*; +import com.wso2telco.services.dep.sandbox.util.ServiceName; +import org.apache.commons.logging.LogFactory; + +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StopSubscriptionMessageNotificationHandler extends AbstractRequestHandler implements AddressIgnorerable { + + + private StopSubscriptionMessageNotificationRequestWrapper requestWrapper; + private StopSubscriptionMessageNotificationResponseWrapper responseWrapper; + private SMSMessagingDAO smsMessagingDAO; + + + { + LOG = LogFactory.getLog(StopSubscriptionMessageNotificationHandler.class); + smsMessagingDAO = DaoFactory.getSMSMessagingDAO(); + } + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + return null; + } + + @Override + protected boolean validate(StopSubscriptionMessageNotificationRequestWrapper wrapperDTO) throws Exception { + + String subscriptionID = wrapperDTO.getSubscriptionID(); + + List validationRulesList = new ArrayList<>(); + + try { + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "subscriptionID", subscriptionID)); + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###SMS### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return false; + } + return true; + } + + + @Override + protected Returnable process(StopSubscriptionMessageNotificationRequestWrapper extendedRequestDTO) throws Exception { + + String subscriptionID = extendedRequestDTO.getSubscriptionID(); + + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + String serviceCallPayment = ServiceName.SubscribeToApplication.toString(); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); + + + boolean delete = smsMessagingDAO.removeSubscriptionToMessage(subscriptionID); + if (delete) { + responseWrapper.setStatus("NO CONTENT"); + responseWrapper.setHttpStatus(Response.Status.NO_CONTENT); + + // Save Success Response + saveResponse(subscriptionID, apiServiceCalls, MessageProcessStatus.Success); + + } else { + LOG.error("###SMS SUBSCRIPTION### NO Subscriber found"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "NO Subscriber found")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + + } + return responseWrapper; + } + + @Override + protected void init(StopSubscriptionMessageNotificationRequestWrapper extendedRequestDTO) throws Exception { + + responseWrapper = new StopSubscriptionMessageNotificationResponseWrapper(); + this.requestWrapper = extendedRequestDTO; + + } + + + private void saveResponse(String subscriptionID, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { + + String jsonString = "Stop the subscription to subscriptionID: "+subscriptionID; + + //setting messagelog responses + new MessageLog(); + MessageLog messageLog; + messageLog = new MessageLog(); + messageLog.setRequest(jsonString); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(user.getId()); + messageLog.setReference("subscriptionID"); + messageLog.setValue(subscriptionID); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationRequestWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationRequestWrapper.java new file mode 100644 index 00000000..f3388b5b --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationRequestWrapper.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class StopSubscriptionMessageNotificationRequestWrapper extends RequestDTO { + + private String subscriptionID; + + public String getSubscriptionID() { + return subscriptionID; + } + + public void setSubscriptionID(String subscriptionID) { + this.subscriptionID = subscriptionID; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationResponseWrapper.java new file mode 100644 index 00000000..63278a29 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationResponseWrapper.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + + +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class StopSubscriptionMessageNotificationResponseWrapper extends AbstractReturnWrapperDTO { + + private String status; + + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public Object getResponse() { + if (getRequestError() != null) { + return getRequestError(); + } + return getStatus(); + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java index 5af2c214..4ec0b528 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java @@ -38,7 +38,8 @@ import java.util.List; class SubscribeApplicationNotificationsHandler extends - AbstractRequestHandler implements AddressIgnorerable { + AbstractRequestHandler implements AddressIgnorerable, + RequestResponseRequestHandleable { private SubscribeApplicationNotificationsResponseWrapper responseWrapper; private SubscribeApplicationNotificationsRequestWrapperGateway requestWrapper; @@ -112,7 +113,8 @@ protected boolean validate(SubscribeApplicationNotificationsRequestWrapperGatewa } @Override - protected Returnable process(SubscribeApplicationNotificationsRequestWrapperGateway extendedRequestDTO) throws Exception { + protected Returnable process(SubscribeApplicationNotificationsRequestWrapperGateway extendedRequestDTO) throws + Exception { try { @@ -137,7 +139,8 @@ protected Returnable process(SubscribeApplicationNotificationsRequestWrapperGate String callbackData = extendedRequestDTO.getSubscribeApplicationNotificationsRequestBean() .getSubscription().getCallbackReference().getCallbackData(); - String notificationFormat = extendedRequestDTO.getSubscribeApplicationNotificationsRequestBean().getSubscription().getNotificationFormat(); + String notificationFormat = extendedRequestDTO.getSubscribeApplicationNotificationsRequestBean() + .getSubscription().getNotificationFormat(); if (clientCorrelator != null) { @@ -174,8 +177,17 @@ protected Returnable process(SubscribeApplicationNotificationsRequestWrapperGate } } - Integer subsId = smsMessagingDAO.saveSubscribeSMSRequest(destinationAddress, notifyURL, callbackData, - criteria, clientCorrelator, user); + SubscribeSMSRequest subscribeSMSRequest = new SubscribeSMSRequest(); + subscribeSMSRequest.setCallbackData(callbackData); + subscribeSMSRequest.setClientCorrelator(clientCorrelator); + subscribeSMSRequest.setCriteria(criteria); + subscribeSMSRequest.setDestinationAddress(destinationAddress); + subscribeSMSRequest.setNotifyURL(notifyURL); + subscribeSMSRequest.setUser(user); + subscribeSMSRequest.setDate(new Date()); + subscribeSMSRequest.setNotificationFormat("JSON"); + Integer subsId = smsMessagingDAO.saveSubscribeSMSRequest(subscribeSMSRequest); + String resourceURLMaker = CommonUtil.getResourceUrl(extendedRequestDTO); int index = resourceURLMaker.lastIndexOf('/'); String resourceURL = resourceURLMaker.substring(0, index) + "/" + subsId; @@ -248,7 +260,7 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI String request = aResponse.getRequest(); JSONObject json = new JSONObject(request); - if(json.getJSONObject("subscription").has("clientCorrelator")) { + if (json.getJSONObject("subscription").has("clientCorrelator")) { responseClientCorrelator = json.getJSONObject("subscription").get("clientCorrelator").toString(); } @@ -270,7 +282,7 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI private void saveResponse(String endUserIdPath, SubscribeApplicationNotificationsResponseBean responseBean, APIServiceCalls - apiServiceCalls, MessageProcessStatus status) throws Exception { + apiServiceCalls, MessageProcessStatus status) throws Exception { Gson gson = new Gson(); String jsonString = gson.toJson(responseBean); @@ -291,4 +303,23 @@ private void saveResponse(String endUserIdPath, SubscribeApplicationNotification loggingDAO.saveMessageLog(messageLog); } + @Override + public String getApiServiceCalls() { + try { + return ServiceName.SubscribeToApplication.toString(); + } catch (Exception ex) { + return null; + } + } + + @Override + public String getJosonString(SubscribeApplicationNotificationsRequestWrapperGateway requestDTO) { + Gson gson = new Gson(); + return gson.toJson(requestDTO.getSubscribeApplicationNotificationsRequestBean()); + } + + @Override + public String getnumber(SubscribeApplicationNotificationsRequestWrapperGateway requestDTO) { + return requestDTO.getSubscribeApplicationNotificationsRequestBean().getSubscription().getDestinationAddress(); + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index 5e7dac04..cd2410c0 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.util; public enum ServiceName { - GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location, SendSMS, ReceivingSMS, SubscribeToApplication; + GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location, SendSMS, ReceivingSMS, SubscribeToApplication, StopSubscribeToApplication; } From e10b2fe6f2db48575c5c2adbebc53191b9c490b0 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Mar 2017 12:03:54 +0530 Subject: [PATCH 068/112] set up basic classes for ussd --- .../dao/model/custom/USSDSessionDTO.java | 29 +++++ .../USSDSessionInitiatorRequestBean.java | 106 ++++++++++++++++ .../USSDSessionInitiatorResponseBean.java | 116 +++++++++++++++++ .../custom/USSDSessionRequestWrapperDTO.java | 39 ++++++ .../custom/USSDSessionResponseRequest.java | 42 ++++++ .../dep/sandbox/service/Application.java | 1 + .../dep/sandbox/service/USSDService.java | 82 ++++++++++++ .../InitiateUSSDSessionRequestHandler.java | 120 ++++++++++++++++++ .../ussd/USSDRequestFactory.java | 21 ++- .../ussd/USSDSessionResponseWrapper.java | 44 +++++++ 10 files changed, 596 insertions(+), 4 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorRequestBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionRequestWrapperDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionResponseRequest.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDSessionResponseWrapper.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionDTO.java new file mode 100644 index 00000000..262087f1 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionDTO.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class USSDSessionDTO { + + private USSDSessionInitiatorResponseBean outboundUSSDMessageRequest; + + public USSDSessionInitiatorResponseBean getOutboundUSSDMessageRequest() { + return outboundUSSDMessageRequest; + } + + public void setOutboundUSSDMessageRequest(USSDSessionInitiatorResponseBean outboundUSSDMessageRequest) { + this.outboundUSSDMessageRequest = outboundUSSDMessageRequest; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorRequestBean.java new file mode 100644 index 00000000..820f0b61 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorRequestBean.java @@ -0,0 +1,106 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class USSDSessionInitiatorRequestBean { + + private OutboundUSSDMessageRequest outboundUSSDMessageRequest; + + public OutboundUSSDMessageRequest getOutboundUSSDMessageRequest() { + return outboundUSSDMessageRequest; + } + + public void setOutboundUSSDMessageRequest(OutboundUSSDMessageRequest outboundUSSDMessageRequest) { + this.outboundUSSDMessageRequest = outboundUSSDMessageRequest; + } + + public static class OutboundUSSDMessageRequest { + + private String address; + + private String shortCode; + + private String keyword; + + private String outboundUSSDMessage; + + private String clientCorrelator; + + // same or + private USSDSessionResponseRequest responseRequest; + + private String ussdAction; + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getShortCode() { + return shortCode; + } + + public void setShortCode(String shortCode) { + this.shortCode = shortCode; + } + + public String getKeyword() { + return keyword; + } + + public void setKeyword(String keyword) { + this.keyword = keyword; + } + + public String getOutboundUSSDMessage() { + return outboundUSSDMessage; + } + + public void setOutboundUSSDMessage(String outboundUSSDMessage) { + this.outboundUSSDMessage = outboundUSSDMessage; + } + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public USSDSessionResponseRequest getResponseRequest() { + return responseRequest; + } + + public void setResponseRequest(USSDSessionResponseRequest responseRequest) { + this.responseRequest = responseRequest; + } + + public String getUssdAction() { + return ussdAction; + } + + public void setUssdAction(String ussdAction) { + this.ussdAction = ussdAction; + } + } + + +} + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java new file mode 100644 index 00000000..ac6e4755 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java @@ -0,0 +1,116 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class USSDSessionInitiatorResponseBean { + + private OutboundUSSDMessageRequest outboundUSSDMessageRequest; + + public OutboundUSSDMessageRequest getOutboundUSSDMessageRequest() { + return outboundUSSDMessageRequest; + } + + public void setOutboundUSSDMessageRequest(OutboundUSSDMessageRequest outboundUSSDMessageRequest) { + this.outboundUSSDMessageRequest = outboundUSSDMessageRequest; + } + + public static class OutboundUSSDMessageRequest { + + private String address; + + private String keyword; + + private String shortCode; + + private String outboundUSSDMessage; + + private String clientCorrelator; + + private USSDSessionResponseRequest responseRequest; + + private String ussdAction; + + private String deliveryStatus; + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getKeyword() { + return keyword; + } + + public void setKeyword(String keyword) { + this.keyword = keyword; + } + + public String getShortCode() { + return shortCode; + } + + public void setShortCode(String shortCode) { + this.shortCode = shortCode; + } + + public String getOutboundUSSDMessage() { + return outboundUSSDMessage; + } + + public void setOutboundUSSDMessage(String outboundUSSDMessage) { + this.outboundUSSDMessage = outboundUSSDMessage; + } + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public USSDSessionResponseRequest getResponseRequest() { + return responseRequest; + } + + public void setResponseRequest(USSDSessionResponseRequest responseRequest) { + this.responseRequest = responseRequest; + } + + public String getUssdAction() { + return ussdAction; + } + + public void setUssdAction(String ussdAction) { + this.ussdAction = ussdAction; + } + + public String getDeliveryStatus() { + return deliveryStatus; + } + + public void setDeliveryStatus(String deliveryStatus) { + this.deliveryStatus = deliveryStatus; + } + } + +} \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionRequestWrapperDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionRequestWrapperDTO.java new file mode 100644 index 00000000..f7c97bf8 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionRequestWrapperDTO.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +public class USSDSessionRequestWrapperDTO extends RequestDTO { + + private String endUserId; + + private USSDSessionInitiatorRequestBean ussdSessionRequestBean; + + public String getEndUserId() { + return endUserId; + } + + public void setEndUserId(String endUserId) { + this.endUserId = endUserId; + } + + public USSDSessionInitiatorRequestBean getUssdSessionRequestBean() { + return ussdSessionRequestBean; + } + + public void setUssdSessionRequestBean(USSDSessionInitiatorRequestBean ussdSessionRequestBean) { + this.ussdSessionRequestBean = ussdSessionRequestBean; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionResponseRequest.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionResponseRequest.java new file mode 100644 index 00000000..f263173f --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionResponseRequest.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(value= JsonInclude.Include.NON_NULL) +public class USSDSessionResponseRequest { + + private String notifyURL; + + private String callbackData; + + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + + public String getCallbackData() { + return callbackData; + } + + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index 13364e09..d33e225e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -40,6 +40,7 @@ protected List getRestFulComponents() { listOfObject.add(new PaymentService_v0_8()); listOfObject.add(new PaymentService_v1_3()); listOfObject.add(new LocationService()); + listOfObject.add(new USSDService()); if(getBehaveType().equals("Hub")){ diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java new file mode 100644 index 00000000..67cf3fa3 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.service; + +import com.wordnik.swagger.annotations.*; +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionRequestWrapperDTO; +import com.wso2telco.services.dep.sandbox.exception.SandboxException; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("ussd/{v1}") +@Produces({MediaType.APPLICATION_JSON}) +@Api(value = "ussd/v1", description = "Rest Service for USSD API") +public class USSDService { + + Log LOG = LogFactory.getLog(USSDService.class); + + @POST + @Path("/ussd/v1/outbound/{endUserId}") + @ApiOperation(value = "ussdSession", notes = "initiate ussd session with endUser", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) + public Response ussdSession( + @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, + USSDSessionRequestBean ussdSessionRequestBean, @Context HttpServletRequest request) { + if (LOG.isDebugEnabled()) { + LOG.debug("###USSD### /{endUserId} invoked : endUserId - " + endUserId); + } + if (LOG.isDebugEnabled() && ussdSessionRequestBean != null) { + LOG.debug(ussdSessionRequestBean); + } + + USSDSessionRequestWrapperDTO requestDTO = new USSDSessionRequestWrapperDTO(); + requestDTO.setHttpRequest(request); + requestDTO.setEndUserId(endUserId); + requestDTO.setUssdSessionRequestBean(ussdSessionRequestBean); + requestDTO.setRequestType(RequestType.USSD); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + LOG.error("USSD initializing session Error", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java new file mode 100644 index 00000000..b7e9ac7d --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java @@ -0,0 +1,120 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.ussd; + +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionInitiatorRequestBean; +import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionRequestWrapperDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionResponseRequest; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import org.apache.commons.logging.LogFactory; + +import java.util.ArrayList; +import java.util.List; + +public class InitiateUSSDSessionRequestHandler extends AbstractRequestHandler { + + private USSDSessionRequestWrapperDTO requestWrapperDTO; + private USSDSessionResponseWrapper responseWrapper; + + + { + LOG = LogFactory.getLog(InitiateUSSDSessionRequestHandler.class); + } + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + List address = new ArrayList(); + address.add(requestWrapperDTO.getEndUserId()); + return address; + } + + @Override + protected void init(USSDSessionRequestWrapperDTO extendedRequestDTO) throws Exception { + responseWrapper = new USSDSessionResponseWrapper(); + requestWrapperDTO = extendedRequestDTO; + } + + @Override + protected boolean validate(USSDSessionRequestWrapperDTO wrapperDTO) throws Exception { + + USSDSessionInitiatorRequestBean requestBean = wrapperDTO.getUssdSessionRequestBean(); + USSDSessionInitiatorRequestBean.OutboundUSSDMessageRequest request = requestBean + .getOutboundUSSDMessageRequest(); + USSDSessionResponseRequest responseRequest = request.getResponseRequest(); + + String address = CommonUtil.getNullOrTrimmedValue(request.getAddress()); + String shortCode = CommonUtil.getNullOrTrimmedValue(request.getShortCode()); + String keyword = CommonUtil.getNullOrTrimmedValue(request.getKeyword()); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserId = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); + String outboundUSSDMessage = CommonUtil.getNullOrTrimmedValue(request.getOutboundUSSDMessage()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(responseRequest.getNotifyURL()); + String callbackData = CommonUtil.getNullOrTrimmedValue(responseRequest.getCallbackData()); + String ussdAction = CommonUtil.getNullOrTrimmedValue(request.getUssdAction()); + + List validationRulesList = new ArrayList<>(); + + try { + + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "address", address)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "shortCode", shortCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "clientCorrelator", clientCorrelator)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "keyword", keyword)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "outboundUSSDMessage", outboundUSSDMessage)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "ussdAction", ussdAction)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, + "notifyURL", notifyURL)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "callbackData", callbackData)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, + "endUserId", endUserId)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###USSD### Error in Validations", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + + return true; + } + + @Override + protected Returnable process(USSDSessionRequestWrapperDTO extendedRequestDTO) throws Exception { + return null; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDRequestFactory.java index e6d51f2e..dfd97f99 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDRequestFactory.java @@ -2,11 +2,24 @@ import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; public class USSDRequestFactory { - // TODO: based on the json body need to implement request handle - public static RequestHandleable getInstance(final RequestDTO requestDTO) { + private static Log LOG = LogFactory.getLog(USSDRequestFactory.class); - return null; - } + public static RequestHandleable getInstance(final RequestDTO requestDTO) { + + final String INITIATE_USSD_SESSION = "initUssd"; + + if (requestDTO.getRequestPath().contains(INITIATE_USSD_SESSION)) { + if (LOG.isDebugEnabled()) { + LOG.debug("Loading Initiate USSD Session"); + return new InitiateUSSDSessionRequestHandler(); + } + } + return null; + } } + + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDSessionResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDSessionResponseWrapper.java new file mode 100644 index 00000000..89486ecd --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDSessionResponseWrapper.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.ussd; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class USSDSessionResponseWrapper extends AbstractReturnWrapperDTO { + + private USSDSessionDTO ussdSessionDTO; + + public USSDSessionDTO getUssdSessionDTO() { + return ussdSessionDTO; + } + + public void setUssdSessionDTO(USSDSessionDTO ussdSessionDTO) { + this.ussdSessionDTO = ussdSessionDTO; + } + + @Override + public Object getResponse() { + if (getRequestError() == null) { + return ussdSessionDTO; + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + } + + } +} From 10550a73a5ba1caffef649414b9bf6c72fda65d4 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Mar 2017 12:28:29 +0530 Subject: [PATCH 069/112] table for ussd shortcode and keyword --- dep-sandbox/dbscripts/dep-sandbox1_6_0.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql index 531d2424..0951ae83 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql @@ -680,3 +680,15 @@ CREATE TABLE IF NOT EXISTS `sbtmessagelog` ( CONSTRAINT `fk02sbtmessagelog` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) ); +-- +-- Table structure for table `ussd_applications` +-- + +CREATE TABLE IF NOT EXISTS `ussd_applications` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `userid` int(11) NOT NULL, + `shortCode` varchar(255) DEFAULT NULL, + `keyword` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + CONSTRAINT `fk01ussd_application` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) +); \ No newline at end of file From cdc8fcc147efcd88277bbe848048487bd1d6dad8 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Tue, 7 Mar 2017 18:22:53 +0530 Subject: [PATCH 070/112] check for dublicate clientCorrelatores --- .../USSDSessionInitiatorResponseBean.java | 24 +-- .../dep/sandbox/service/USSDService.java | 3 +- .../servicefactory/RequestBuilderFactory.java | 2 + .../InitiateUSSDSessionRequestHandler.java | 174 +++++++++++++++++- .../servicefactory/ussd/USSDAction.java | 21 +++ .../ussd/USSDRequestFactory.java | 4 +- 6 files changed, 205 insertions(+), 23 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDAction.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java index ac6e4755..9035c2d4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java @@ -20,17 +20,17 @@ @JsonInclude(value = JsonInclude.Include.NON_NULL) public class USSDSessionInitiatorResponseBean { - private OutboundUSSDMessageRequest outboundUSSDMessageRequest; - - public OutboundUSSDMessageRequest getOutboundUSSDMessageRequest() { - return outboundUSSDMessageRequest; - } - - public void setOutboundUSSDMessageRequest(OutboundUSSDMessageRequest outboundUSSDMessageRequest) { - this.outboundUSSDMessageRequest = outboundUSSDMessageRequest; - } - - public static class OutboundUSSDMessageRequest { +// private OutboundUSSDMessageRequest outboundUSSDMessageRequest; +// +// public OutboundUSSDMessageRequest getOutboundUSSDMessageRequest() { +// return outboundUSSDMessageRequest; +// } +// +// public void setOutboundUSSDMessageRequest(OutboundUSSDMessageRequest outboundUSSDMessageRequest) { +// this.outboundUSSDMessageRequest = outboundUSSDMessageRequest; +// } + +// public static class OutboundUSSDMessageRequest { private String address; @@ -113,4 +113,4 @@ public void setDeliveryStatus(String deliveryStatus) { } } -} \ No newline at end of file +//} \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java index 67cf3fa3..3dc2ca75 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java @@ -17,6 +17,7 @@ import com.wordnik.swagger.annotations.*; import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionInitiatorRequestBean; import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionRequestWrapperDTO; import com.wso2telco.services.dep.sandbox.exception.SandboxException; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; @@ -49,7 +50,7 @@ public class USSDService { @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) public Response ussdSession( @ApiParam(value = "endUserId", required = true) @PathParam("endUserId") String endUserId, - USSDSessionRequestBean ussdSessionRequestBean, @Context HttpServletRequest request) { + USSDSessionInitiatorRequestBean ussdSessionRequestBean, @Context HttpServletRequest request) { if (LOG.isDebugEnabled()) { LOG.debug("###USSD### /{endUserId} invoked : endUserId - " + endUserId); } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java index 4bd5c2b4..5f1cfc8e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java @@ -1,5 +1,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory; +import com.wso2telco.services.dep.sandbox.servicefactory.ussd.USSDRequestFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -39,6 +40,7 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { break; case USSD: LOG.debug("LOADING USSD FACTORY"); + requestHandler = USSDRequestFactory.getInstance(requestDTO); break; case PAYMENT: LOG.debug("LOADING PAYMENT FACTORY"); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java index b7e9ac7d..3925af1f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java @@ -15,25 +15,35 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.ussd; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; import com.wso2telco.dep.oneapivalidation.util.Validation; import com.wso2telco.dep.oneapivalidation.util.ValidationRule; -import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionInitiatorRequestBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.USSDSessionResponseRequest; -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; +import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; +import com.wso2telco.services.dep.sandbox.servicefactory.*; import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import com.wso2telco.services.dep.sandbox.util.ServiceName; import org.apache.commons.logging.LogFactory; +import org.json.JSONObject; +import javax.ws.rs.core.Response; import java.util.ArrayList; +import java.util.Date; import java.util.List; -public class InitiateUSSDSessionRequestHandler extends AbstractRequestHandler { +public class InitiateUSSDSessionRequestHandler extends AbstractRequestHandler + implements RequestResponseRequestHandleable { private USSDSessionRequestWrapperDTO requestWrapperDTO; private USSDSessionResponseWrapper responseWrapper; - + private String serviceCallUSSD; { LOG = LogFactory.getLog(InitiateUSSDSessionRequestHandler.class); @@ -115,6 +125,154 @@ protected boolean validate(USSDSessionRequestWrapperDTO wrapperDTO) throws Excep @Override protected Returnable process(USSDSessionRequestWrapperDTO extendedRequestDTO) throws Exception { - return null; + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + USSDSessionInitiatorRequestBean requestBean = extendedRequestDTO.getUssdSessionRequestBean(); + USSDSessionInitiatorRequestBean.OutboundUSSDMessageRequest request = requestBean + .getOutboundUSSDMessageRequest(); + USSDSessionResponseRequest responseRequest = request.getResponseRequest(); + + String shortCode = CommonUtil.getNullOrTrimmedValue(request.getShortCode()); + String keyword = CommonUtil.getNullOrTrimmedValue(request.getKeyword()); + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String endUserIdPath = extendedRequestDTO.getEndUserId(); + String endUserIdRequest = request.getAddress(); + String address = getLastMobileNumber(endUserIdPath); + String outboundUSSDMessage = CommonUtil.getNullOrTrimmedValue(request.getOutboundUSSDMessage()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(responseRequest.getNotifyURL()); + String callbackData = CommonUtil.getNullOrTrimmedValue(responseRequest.getCallbackData()); + String ussdAction = CommonUtil.getNullOrTrimmedValue(request.getUssdAction()); + Integer userId = extendedRequestDTO.getUser().getId(); + serviceCallUSSD = ServiceName.InitUSSD.toString(); + + USSDSessionInitiatorResponseBean responseBean = new USSDSessionInitiatorResponseBean(); + USSDSessionResponseRequest responseRequestBean = new USSDSessionResponseRequest(); + + + APITypes apiTypes = dao.getAPIType(RequestType.USSD.toString()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallUSSD); + + // Todo: Exception Handling + + int serviceNameId = apiServiceCalls.getApiServiceCallId(); + Gson gson = new Gson(); + + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserIdPath, + MessageProcessStatus.Success, MessageType.Response); + + if (response != null) { + USSDSessionInitiatorResponseBean object; + object = gson.fromJson(response, USSDSessionInitiatorResponseBean.class); + USSDSessionDTO dto = new USSDSessionDTO(); + dto.setOutboundUSSDMessageRequest(object); + responseWrapper.setUssdSessionDTO(dto); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + } + + responseBean.setAddress(address); + responseBean.setKeyword(keyword); + responseBean.setShortCode(shortCode); + responseBean.setOutboundUSSDMessage(outboundUSSDMessage); + responseBean.setClientCorrelator(clientCorrelator); + responseBean.setUssdAction(ussdAction); + + responseRequestBean.setNotifyURL(notifyURL); + responseRequestBean.setCallbackData(callbackData); + responseBean.setResponseRequest(responseRequestBean); + responseWrapper.setHttpStatus(Response.Status.OK); + USSDSessionDTO ussdSessionDTO = new USSDSessionDTO(); + responseBean.setDeliveryStatus("SENT"); + ussdSessionDTO.setOutboundUSSDMessageRequest(responseBean); + responseWrapper.setUssdSessionDTO(ussdSessionDTO); + + saveResponse(userId, endUserIdPath, responseBean, apiServiceCalls, MessageProcessStatus.Success); + + return responseWrapper; + } + + private void saveResponse(Integer userid, String endUserIdPath, USSDSessionInitiatorResponseBean responseBean, + APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { + + String jsonInString = null; + Gson gson = new Gson(); + + JsonElement je = new JsonParser().parse(gson.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + MessageLog messageLog = new MessageLog(); + messageLog.setRequest(jsonInString); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(userid); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } + + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, + MessageProcessStatus status, MessageType type) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", tel, null, null); + + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + if (response != null) { + + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); + String responseClientCorrelator; + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + + responseClientCorrelator = json.get("clientCorrelator").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // check for duplicate clientCorrelators + if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals(tel)) { + jsonString = json.toString(); + break; + } + } + + + } + } + + return jsonString; + + } + + @Override + public String getApiServiceCalls() { + return ServiceName.InitUSSD.toString(); + } + + @Override + public String getJosonString(USSDSessionRequestWrapperDTO requestDTO) { + Gson gson = new Gson(); + String jsonString = gson.toJson(requestDTO.getUssdSessionRequestBean()); + return jsonString; + } + + @Override + public String getnumber(USSDSessionRequestWrapperDTO requestDTO) { + return requestDTO.getEndUserId(); } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDAction.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDAction.java new file mode 100644 index 00000000..b249a298 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDAction.java @@ -0,0 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.servicefactory.ussd; + +public enum USSDAction { + mtinit, mtcont, moinit, mocont, mtfin, +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDRequestFactory.java index dfd97f99..2830e474 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDRequestFactory.java @@ -10,9 +10,9 @@ public class USSDRequestFactory { public static RequestHandleable getInstance(final RequestDTO requestDTO) { - final String INITIATE_USSD_SESSION = "initUssd"; + final String INITIATE_USSD_SESSION = "USSD"; - if (requestDTO.getRequestPath().contains(INITIATE_USSD_SESSION)) { + if (requestDTO.getRequestPath().contains(INITIATE_USSD_SESSION.toLowerCase())) { if (LOG.isDebugEnabled()) { LOG.debug("Loading Initiate USSD Session"); return new InitiateUSSDSessionRequestHandler(); From ed4c6fd1b146c546406be91d34fd932ebdd501c8 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 9 Mar 2017 10:35:09 +0530 Subject: [PATCH 071/112] WIP ussd init mobile terminated --- dep-sandbox/dbscripts/dep-sandbox1_6_0.sql | 2 +- .../services/dep/sandbox/dao/DaoFactory.java | 4 + .../services/dep/sandbox/dao/USSDDAO.java | 27 +++++ .../dao/hibernate/HibernateFactory.java | 4 + .../dao/hibernate/HibernateUSSDDAO.java | 69 ++++++++++++ .../USSDSessionInitiatorRequestBean.java | 1 - .../USSDSessionInitiatorResponseBean.java | 14 --- .../dao/model/domain/UssdApplication.java | 69 ++++++++++++ .../dep/sandbox/service/USSDService.java | 2 +- .../InitiateUSSDSessionRequestHandler.java | 103 ++++++++++++++---- dep-sandbox/src/main/java/hibernate.cfg.xml | 1 + 11 files changed, 256 insertions(+), 40 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/UssdApplication.java diff --git a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql index 0951ae83..83e16cfa 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql @@ -687,7 +687,7 @@ CREATE TABLE IF NOT EXISTS `sbtmessagelog` ( CREATE TABLE IF NOT EXISTS `ussd_applications` ( `id` int(11) NOT NULL AUTO_INCREMENT, `userid` int(11) NOT NULL, - `shortCode` varchar(255) DEFAULT NULL, + `shortCode` varchar(255) NOT NULL, `keyword` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `fk01ussd_application` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java index c4bbdd7b..16938d7d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/DaoFactory.java @@ -48,4 +48,8 @@ public static CreditDAO getCreditDAO(){ return new HibernateFactory().getHibernateCreditDAO(); } + + public static USSDDAO getUSSDDAO() { + return new HibernateFactory().getHibernateUSSDDAO(); + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java new file mode 100644 index 00000000..78b9e69e --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.dao; + +import com.wso2telco.services.dep.sandbox.dao.model.domain.UssdApplication; + +import java.util.List; + +public interface USSDDAO { + + List getUssdApplications(int userid, String shortCode, String keyWord); + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java index b10d5bda..db0682f7 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateFactory.java @@ -45,4 +45,8 @@ public HibernateLoggingDao getHibernateLoggingDao() { public HibernateCreditDAO getHibernateCreditDAO() { return new HibernateCreditDAO(); } + + public HibernateUSSDDAO getHibernateUSSDDAO() { + return new HibernateUSSDDAO(); + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java new file mode 100644 index 00000000..9644a0c8 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.hibernate; + +import com.wso2telco.services.dep.sandbox.dao.USSDDAO; +import com.wso2telco.services.dep.sandbox.dao.model.domain.UssdApplication; +import org.apache.commons.logging.LogFactory; +import org.hibernate.Session; +import org.hibernate.query.Query; + +import java.util.*; + +public class HibernateUSSDDAO extends AbstractDAO implements USSDDAO { + + { + LOG = LogFactory.getLog(HibernateUSSDDAO.class); + } + + @Override + public List getUssdApplications(int userid, String shortCode, String keyWord) { + + Session session = getSession(); + Map parameterMap = new HashMap(); + List appdistributionList = new ArrayList(); + + StringBuilder hqlQueryBuilder = new StringBuilder(); + hqlQueryBuilder.append("FROM UssdApplication distlist"); + hqlQueryBuilder.append(" WHERE"); + hqlQueryBuilder.append(" distlist.userid = :id AND"); + parameterMap.put("id", userid); + hqlQueryBuilder.append(" distlist.shortCode = :shortCode"); + parameterMap.put("shortCode", shortCode); + + if (keyWord != null) { + hqlQueryBuilder.append(" AND distlist.keyword = :keyword"); + parameterMap.put("keyword", keyWord); + } + + Query query = session.createQuery(hqlQueryBuilder.toString()); + + Set> entrySet = parameterMap.entrySet(); + + for (Map.Entry entry : entrySet) { + if (entry.getValue() instanceof List) { + query.setParameterList(entry.getKey(), (List) entry.getValue()); + } else { + query.setParameter(entry.getKey(), entry.getValue()); + } + + } + + appdistributionList = (List) query.getResultList(); + + return appdistributionList; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorRequestBean.java index 820f0b61..6d251db8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorRequestBean.java @@ -39,7 +39,6 @@ public static class OutboundUSSDMessageRequest { private String clientCorrelator; - // same or private USSDSessionResponseRequest responseRequest; private String ussdAction; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java index 9035c2d4..17f4a205 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/USSDSessionInitiatorResponseBean.java @@ -20,18 +20,6 @@ @JsonInclude(value = JsonInclude.Include.NON_NULL) public class USSDSessionInitiatorResponseBean { -// private OutboundUSSDMessageRequest outboundUSSDMessageRequest; -// -// public OutboundUSSDMessageRequest getOutboundUSSDMessageRequest() { -// return outboundUSSDMessageRequest; -// } -// -// public void setOutboundUSSDMessageRequest(OutboundUSSDMessageRequest outboundUSSDMessageRequest) { -// this.outboundUSSDMessageRequest = outboundUSSDMessageRequest; -// } - -// public static class OutboundUSSDMessageRequest { - private String address; private String keyword; @@ -112,5 +100,3 @@ public void setDeliveryStatus(String deliveryStatus) { this.deliveryStatus = deliveryStatus; } } - -//} \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/UssdApplication.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/UssdApplication.java new file mode 100644 index 00000000..09893707 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/UssdApplication.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.domain; + +import javax.persistence.*; + +@Entity +@Table(name = "ussd_applications") +public class UssdApplication { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + private int id; + + @Column(name = "userid") + private int userid; + + @Column(name = "shortCode") + private String shortCode; + + @Column(name = "keyword") + private String keyword; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public int getUserid() { + return userid; + } + + public void setUserid(int userid) { + this.userid = userid; + } + + public String getShortCode() { + return shortCode; + } + + public void setShortCode(String shortCode) { + this.shortCode = shortCode; + } + + public String getKeyword() { + return keyword; + } + + public void setKeyword(String keyword) { + this.keyword = keyword; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java index 3dc2ca75..d2e63b45 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java @@ -65,7 +65,7 @@ public Response ussdSession( requestDTO.setRequestType(RequestType.USSD); RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); - Returnable returnable = null; + Returnable returnable; try { returnable = handler.execute(requestDTO); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java index 3925af1f..39b730e2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/InitiateUSSDSessionRequestHandler.java @@ -19,13 +19,17 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; +import com.wso2telco.core.dbutils.exception.ServiceError; import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; import com.wso2telco.dep.oneapivalidation.util.Validation; import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.USSDDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.*; import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; +import com.wso2telco.services.dep.sandbox.dao.model.domain.UssdApplication; import com.wso2telco.services.dep.sandbox.servicefactory.*; import com.wso2telco.services.dep.sandbox.util.CommonUtil; import com.wso2telco.services.dep.sandbox.util.RequestType; @@ -43,10 +47,13 @@ public class InitiateUSSDSessionRequestHandler extends AbstractRequestHandler getAddress() { - List address = new ArrayList(); + List address = new ArrayList<>(); address.add(requestWrapperDTO.getEndUserId()); return address; } @@ -139,7 +146,7 @@ protected Returnable process(USSDSessionRequestWrapperDTO extendedRequestDTO) th String keyword = CommonUtil.getNullOrTrimmedValue(request.getKeyword()); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String endUserIdPath = extendedRequestDTO.getEndUserId(); - String endUserIdRequest = request.getAddress(); +// String endUserIdRequest = request.getAddress(); String address = getLastMobileNumber(endUserIdPath); String outboundUSSDMessage = CommonUtil.getNullOrTrimmedValue(request.getOutboundUSSDMessage()); String notifyURL = CommonUtil.getNullOrTrimmedValue(responseRequest.getNotifyURL()); @@ -157,6 +164,8 @@ protected Returnable process(USSDSessionRequestWrapperDTO extendedRequestDTO) th // Todo: Exception Handling + // Todo: Handle ussdAction + int serviceNameId = apiServiceCalls.getApiServiceCallId(); Gson gson = new Gson(); @@ -164,6 +173,7 @@ protected Returnable process(USSDSessionRequestWrapperDTO extendedRequestDTO) th MessageProcessStatus.Success, MessageType.Response); if (response != null) { + // Send already sent response USSDSessionInitiatorResponseBean object; object = gson.fromJson(response, USSDSessionInitiatorResponseBean.class); USSDSessionDTO dto = new USSDSessionDTO(); @@ -173,6 +183,17 @@ protected Returnable process(USSDSessionRequestWrapperDTO extendedRequestDTO) th return responseWrapper; } + boolean test = checkForRegisteredApplications(userId, shortCode, keyword); + + if (!test) { + LOG.error("###USSD### No Applications Registered for Provided ShortCode"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "No Applications Registered for Provided ShortCode")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + + } + responseBean.setAddress(address); responseBean.setKeyword(keyword); responseBean.setShortCode(shortCode); @@ -185,7 +206,7 @@ protected Returnable process(USSDSessionRequestWrapperDTO extendedRequestDTO) th responseBean.setResponseRequest(responseRequestBean); responseWrapper.setHttpStatus(Response.Status.OK); USSDSessionDTO ussdSessionDTO = new USSDSessionDTO(); - responseBean.setDeliveryStatus("SENT"); + responseBean.setDeliveryStatus(DELIVERY_STATUS); ussdSessionDTO.setOutboundUSSDMessageRequest(responseBean); responseWrapper.setUssdSessionDTO(ussdSessionDTO); @@ -197,7 +218,7 @@ protected Returnable process(USSDSessionRequestWrapperDTO extendedRequestDTO) th private void saveResponse(Integer userid, String endUserIdPath, USSDSessionInitiatorResponseBean responseBean, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { - String jsonInString = null; + String jsonInString; Gson gson = new Gson(); JsonElement je = new JsonParser().parse(gson.toJson(responseBean)); @@ -228,37 +249,74 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI String jsonString = null; for (int i = 0; i < response.size(); i++) { - if (response != null) { - int responseStatus = response.get(i).getStatus(); - int responseType = response.get(i).getType(); - String responseClientCorrelator; + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); + String responseClientCorrelator; - if (responseType == type.getValue() && responseStatus == status.getValue()) { - String request = response.get(i).getRequest(); - JSONObject json = new JSONObject(request); + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); - responseClientCorrelator = json.get("clientCorrelator").toString(); + responseClientCorrelator = json.get("clientCorrelator").toString(); - int responseUserId = response.get(i).getUserid(); - String responseTel = response.get(i).getValue(); + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); - // check for duplicate clientCorrelators - if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && - responseUserId == userId && responseTel.equals(tel)) { - jsonString = json.toString(); - break; - } + // check for duplicate clientCorrelators + if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals(tel)) { + jsonString = json.toString(); + break; } + } - } } return jsonString; } + private boolean checkForRegisteredApplications(int userId, String shortCode, String keyword) { + + List applicationList = ussdDAO.getUssdApplications(userId, shortCode, keyword); + boolean flag = false; + + if (applicationList.size() == 0) { + flag = false; + + } else { + + if (applicationList.size() > 1 && keyword == null) { + flag = false; + } + + for (int i = 0; i < applicationList.size(); i++) { + + int responseUserId = applicationList.get(i).getUserid(); + String responseKeyWord = applicationList.get(i).getKeyword(); + String responseShortCode = applicationList.get(i).getShortCode(); + + + if (keyword == null) { + if (userId == responseUserId && shortCode.equals(responseShortCode)) { + flag = true; + } + } else { + if (userId == responseUserId && shortCode.equals(responseShortCode) && keyword.equals + (responseKeyWord)) { + flag = true; + } + } + } + } + + return flag; + + } + + @Override public String getApiServiceCalls() { return ServiceName.InitUSSD.toString(); @@ -267,8 +325,7 @@ public String getApiServiceCalls() { @Override public String getJosonString(USSDSessionRequestWrapperDTO requestDTO) { Gson gson = new Gson(); - String jsonString = gson.toJson(requestDTO.getUssdSessionRequestBean()); - return jsonString; + return gson.toJson(requestDTO.getUssdSessionRequestBean()); } @Override diff --git a/dep-sandbox/src/main/java/hibernate.cfg.xml b/dep-sandbox/src/main/java/hibernate.cfg.xml index 18a84dbd..c8608b71 100644 --- a/dep-sandbox/src/main/java/hibernate.cfg.xml +++ b/dep-sandbox/src/main/java/hibernate.cfg.xml @@ -56,5 +56,6 @@ + \ No newline at end of file From bcaa40d797e0f71eacffb0d5305591b838630dee Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 9 Mar 2017 17:00:57 +0530 Subject: [PATCH 072/112] changed status codes --- .../servicefactory/credit/CreditApplyRequestHandler.java | 6 +++--- .../servicefactory/credit/PatialRefundRequestHandler.java | 2 +- .../payment/PaymentRefundRequestHandler0_8.java | 2 +- .../servicefactory/payment/PaymentRequestHandler.java | 2 +- .../servicefactory/wallet/MakePaymentRequestHandler.java | 2 +- .../wallet/RefundTransactionRequestHandler.java | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java index 6e2b9da1..4c271c81 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java @@ -245,7 +245,7 @@ protected Returnable process(CreditApplyRequestWrapper extendedRequestDTO) throw clientCorrelatorid = saveClientCorrelator(msisdn, clientCorrelator, userName); saveTransaction(responseBean); } - responseWrapperDTO.setHttpStatus(Response.Status.OK); + responseWrapperDTO.setHttpStatus(Response.Status.CREATED); return responseWrapperDTO; } else { @@ -270,7 +270,7 @@ protected Returnable process(CreditApplyRequestWrapper extendedRequestDTO) throw clientCorrelatorid = saveClientCorrelator(msisdn, clientCorrelator,userName); saveTransaction(responseBean); } - responseWrapperDTO.setHttpStatus(Response.Status.OK); + responseWrapperDTO.setHttpStatus(Response.Status.CREATED); return responseWrapperDTO; } else { attributeValues = new AttributeValues(); @@ -285,7 +285,7 @@ protected Returnable process(CreditApplyRequestWrapper extendedRequestDTO) throw clientCorrelatorid = saveClientCorrelator(msisdn, clientCorrelator,userName); saveTransaction(responseBean); } - responseWrapperDTO.setHttpStatus(Response.Status.OK); + responseWrapperDTO.setHttpStatus(Response.Status.CREATED); return responseWrapperDTO; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index af06b2b8..ba851b50 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -325,7 +325,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro saveResponse(extendedRequestDTO, extendedRequestDTO.getMsisdn(), responseBean, apiServiceCalls, MessageProcessStatus.Success); - responseWrapperDTO.setHttpStatus(Response.Status.OK); + responseWrapperDTO.setHttpStatus(Response.Status.CREATED); return responseWrapperDTO; } else { responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java index 146dc7ca..d729fb84 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java @@ -389,7 +389,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) return responseWrapper; } - responseWrapper.setHttpStatus(Response.Status.OK); + responseWrapper.setHttpStatus(Response.Status.CREATED); RefundPaymentDTO refundPaymentDTO = new RefundPaymentDTO(); payAmount.setChargingInformation(chargingInformation); payAmount.setChargingMetaData(chargeMetaData); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index 0b6cd741..71cbbc6a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -341,7 +341,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) responseBean.setPaymentAmount(payAmount); makePaymentDTO.setAmountTransaction(responseBean); responseWrapper.setMakePaymentDTO(makePaymentDTO); - responseWrapper.setHttpStatus(Response.Status.OK); + responseWrapper.setHttpStatus(Response.Status.CREATED); // Save Success Response saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, MessageProcessStatus.Success); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java index e51b19c5..47b05c5d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java @@ -368,7 +368,7 @@ else if (transactionStatusValue != null) { responseBean.setPaymentAmount(payAmount); makePaymentDTO.setmakePayment(responseBean); responseWrapper.setMakePaymentDTO(makePaymentDTO); - responseWrapper.setHttpStatus(Response.Status.OK); + responseWrapper.setHttpStatus(Response.Status.CREATED); // save payment transaction transactionId = saveTransaction(responseBean, endUserId, userName); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java index 730a9da0..c4e28928 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java @@ -357,7 +357,7 @@ else if (walletDAO.saveManageNumbers(manageNumber)) { responseBean.setTransactionOperationStatus(TransactionStatus.Refunded.toString()); } - responseWrapper.setHttpStatus(Response.Status.OK); + responseWrapper.setHttpStatus(Response.Status.CREATED); RefundTransactionDTO refundPaymentDTO = new RefundTransactionDTO(); payAmount.setChargingInformation(chargeInformation); payAmount.setChargingMetaData(chargeMetaData); From 9ee77884722e59f7abc5a31758fe17eb0e34b451 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Wed, 15 Mar 2017 14:37:45 +0530 Subject: [PATCH 073/112] stop subscription to delivery SMS --- .../dep/sandbox/dao/SMSMessagingDAO.java | 6 + .../hibernate/HibernateSMSMessagingDAO.java | 110 +++++++ .../sandbox/service/SmsServiceGateway.java | 88 ++++++ .../smsmessaging/SMSRequestFactory.java | 2 + ...ubscribeToDeliveryNotificationService.java | 14 - .../gateway/CallReferenceResponse.java | 41 +++ .../gateway/SMSRequestFactoryGateway.java | 10 +- ...ubscribeToDeliveryNotificationService.java | 143 +++++++++ ...ubscriptionNotificationRequestWrapper.java | 41 +++ ...bscriptionNotificationResponseWrapper.java | 43 +++ .../gateway/SubscribeToDeliveryDTO.java | 30 ++ ...eliveryNotificationRequestBeanGateway.java | 41 ++- ...ibeToDeliveryNotificationResponseBean.java | 59 ++++ ...ToDeliveryNotificationResponseWrapper.java | 43 +++ ...ubscribeToDeliveryNotificationService.java | 278 +++++++++++++++++- ...DeliveryNotificationWrapperDTOGateway.java | 42 +++ 16 files changed, 954 insertions(+), 37 deletions(-) delete mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/StopSubscribeToDeliveryNotificationService.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/CallReferenceResponse.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscribeToDeliveryNotificationService.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionNotificationRequestWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionNotificationResponseWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryDTO.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationResponseBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationResponseWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationWrapperDTOGateway.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index 924fa9fc..c9dab7e7 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -17,6 +17,12 @@ public String saveSendSMSTransaction(String senderAddress, String addresses, Str String status, Integer txntype, String criteria, String notificationFormat, User user, String deliveryStatus) ; public List getMessageInbound(String regid, Integer userid); + public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, String callbackData, String criteria, String clientCorrelator, User user) throws Exception; + boolean saveDeliverySubscription(User userId, String sender_address, int sub_status, String notify_url, String filter, + String callbackData, String clinetCorrelator, String request); + + boolean isSubscriptionExists(String filterCriteria, String notifyUrl, String callbackData, String clientCorrelator); + boolean removeSubscription(int userId, String senderAddress); public int saveSubscribeSMSRequest(SubscribeSMSRequest subscribeSMSRequest) throws Exception; public boolean removeSubscriptionToMessage(String subscriptionID) throws Exception; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index d576b2d1..1341ab41 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -1,10 +1,14 @@ package com.wso2telco.services.dep.sandbox.dao.hibernate; +import java.util.ArrayList; import java.util.Date; import java.util.List; +import com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryReceiptSubscription; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import org.apache.commons.logging.LogFactory; +import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; @@ -187,6 +191,112 @@ public boolean removeSubscriptionToMessage(String subscriptionID) throws Excepti public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, String status, Integer txntype, String criteria, String notificationFormat, User user, String requestId) { + @Override + public boolean saveDeliverySubscription(User userId, String sender_address, int sub_status, String notify_url, + String filter, String callbackData, String clinetCorrelator, String + request) { + + Session session = null; + Transaction transaction = null; + DeliverySubscription deliverySubscription = new DeliverySubscription(); + + try { + + session = getSession(); + transaction = session.beginTransaction(); + + deliverySubscription.setUser(userId); + deliverySubscription.setSenderAddress(sender_address); + deliverySubscription.setSubStatus(sub_status); + deliverySubscription.setNotifyUrl(notify_url); + deliverySubscription.setFilterCriteria(filter); + deliverySubscription.setCallbackData(callbackData); + deliverySubscription.setClientCorrelator(clinetCorrelator); + deliverySubscription.setRequestData(request); + + session.save(deliverySubscription); + + transaction.commit(); + + } catch (Exception ex) { + transaction.rollback(); + return false; + } finally { + session.close(); + } + + return true; + } + + @Override + public boolean isSubscriptionExists(String filterCriteria, String notifyUrl, String callbackData, String + clientCorrelator) { + + boolean isExists = false; + Session session = getSession(); + + List resultedList = new ArrayList<>(); + + try { + + StringBuilder hqlQueryBuilder = new StringBuilder(); + hqlQueryBuilder.append("FROM DeliverySubscription AS ds WHERE ds.filterCriteria = :filter AND ds" + + ".notifyUrl = :notify AND ds.callbackData = :callback AND ds.clientCorrelator = :client"); + + resultedList = session. + createQuery(hqlQueryBuilder.toString()) + .setParameter("filter", filterCriteria) + .setParameter("notify", notifyUrl) + .setParameter("callback", callbackData) + .setParameter("client", clientCorrelator).getResultList(); + + if (resultedList.size() > 0) { + isExists = true; + } + } catch (Exception e) { + System.out.println("isSubscriptionExists : " + e); + } finally { + session.close(); + } + return isExists; + } + + @Override + public boolean removeSubscription(int userId, String senderAddress) { + + boolean isExists = false; + Session session = null; + Transaction tx = null; + + try { + session = getSession(); + tx = session.beginTransaction(); + Query q = session.createQuery("delete FROM DeliverySubscription AS ds WHERE ds.id = :id AND ds.senderAddress = :sender_address"); + q.setInteger("id", userId); + q.setParameter("sender_address", senderAddress); + + int i = q.executeUpdate(); + + if (i == 1) { + isExists = true; + } + tx.commit(); + + + } catch (Exception e) { + e.printStackTrace(); + } finally { + session.close(); + } + + return isExists; + }} + + public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, + String clientCorrelator, String senderName, String notifyURL, + String callbackData, Integer batchsize, + String status, Integer txntype, String criteria, String + notificationFormat, User user, String requestId) { Session session = null; Transaction tx = null; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java index 41486bd4..66f75e82 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java @@ -162,6 +162,94 @@ public Response deleteSubscribeToApplication(@ApiParam(value = "subscriptionID", } } + @POST + @Path("/v1_2/outbound/{senderAddress}/subscriptions") + @ApiOperation(value = "sms", notes = "Subscribe SMS service in Gateway", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", + required = true, dataType = "string", paramType = "header") + }) + public Response handleSubscribeToDeliveryNotifications( + @Context HttpServletRequest httpRequest, + @ApiParam(value = "senderAddress", required = true) + @PathParam("senderAddress") String senderAddress, + SubscribeToDeliveryNotificationRequestBeanGateway subscribeToDeliveryNotificationRequestBeanGateway) { + if (LOG.isDebugEnabled()) { + LOG.debug("###SMS### /{senderAddress} invoked : senderAddress - " + senderAddress); + } + if (LOG.isDebugEnabled() && subscribeToDeliveryNotificationRequestBeanGateway != null) { + LOG.debug(subscribeToDeliveryNotificationRequestBeanGateway); + } + SubscribeToDeliveryNotificationWrapperDTOGateway requestDTO = new + SubscribeToDeliveryNotificationWrapperDTOGateway(); + requestDTO.setHttpRequest(httpRequest); + requestDTO.setRequestType(RequestType.SMSMESSAGING); + requestDTO.setApiVersion("v1_2"); + requestDTO.setSenderAddress(senderAddress); + requestDTO.setSubscribeToDeliveryNotificationRequestBeanGateway + (subscribeToDeliveryNotificationRequestBeanGateway); + + RequestHandleable handler = RequestBuilderFactoryGateway.getInstance(requestDTO); + + Returnable returnable = null; + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception e) { + e.printStackTrace(); + LOG.error("Subscribe to Notification SERVICE ERROR", e); + return Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException + .SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + } } + + @DELETE + @Path("/v1_2/outbound/{senderAddress}/subscription/{subscriptionID}") + @ApiOperation(value = "sms", notes = "Stop subscribing to delivery status noti:cations", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", + required = true, dataType = "string", paramType = "header") + }) + public Response handleDeleteSubscriptionNotification( + @Context HttpServletRequest httpRequest, + @ApiParam(value = "senderAddress", required = true) + @PathParam("senderAddress") String senderAddress, @PathParam("subscriptionID") int subscriptionID) { + + if (LOG.isDebugEnabled()) { + LOG.debug("###SMS### /{senderAddress} invoked : senderAddress - " + senderAddress); + } + + StopSubscriptionNotificationRequestWrapper requestDTO = new StopSubscriptionNotificationRequestWrapper(); + + requestDTO.setHttpRequest(httpRequest); + requestDTO.setApiVersion("v1_2"); + requestDTO.setSenderAddress(senderAddress); + requestDTO.setSubscriptionID(subscriptionID); + requestDTO.setRequestType(RequestType.SMSMESSAGING); + + RequestHandleable handler = RequestBuilderFactoryGateway.getInstance(requestDTO); + + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception e) { + e.printStackTrace(); + LOG.error("Subscribe to Notification SERVICE ERROR", e); + return Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException + .SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + } + } + +} + + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java index 9a88aa86..3577b3a9 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java @@ -1,5 +1,7 @@ package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway + .StopSubscribeToDeliveryNotificationService; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/StopSubscribeToDeliveryNotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/StopSubscribeToDeliveryNotificationService.java deleted file mode 100644 index 8561f6a9..00000000 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/StopSubscribeToDeliveryNotificationService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; - -import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; - -public class StopSubscribeToDeliveryNotificationService implements RequestHandleable{ - - @Override - public Returnable execute(RequestDTO requestDTO) throws Exception { - // TODO Auto-generated method stub - return null; - } -} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/CallReferenceResponse.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/CallReferenceResponse.java new file mode 100644 index 00000000..27050d13 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/CallReferenceResponse.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class CallReferenceResponse { + + private String callbackData; + private String notifyURL; + + public String getCallbackData() { + return callbackData; + } + + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } + + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java index 5b0965eb..bcb09aaf 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java @@ -34,6 +34,8 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { final String RETRIVE_SMS = "registrations"; final String OUTBOUND_REQUEST = "outbound"; final String INBOUND_REQUEST = "inbound"; + final String SUBSCRIBE_TO_DELEVERY_NOTIFICATION = "subscriptions"; + final String STOP_DELIVERY_SUBSCRIPTION_NOTIFICATION = "subscription"; final String SUBSCRIPTIONS = "subscriptions"; @@ -42,7 +44,13 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { LOG.debug("LOADING SEND MT SMS SERVICE"); return new SendMTSMSService(); - } + } else if (requestDTO.getRequestPath().toLowerCase().contains(SUBSCRIBE_TO_DELEVERY_NOTIFICATION)) { + LOG.debug("LOADING NOTIFICATION SUBSCRIPTION SERVICE"); + return new SubscribeToDeliveryNotificationService(); + } else if (requestDTO.getRequestPath().toLowerCase().contains(STOP_DELIVERY_SUBSCRIPTION_NOTIFICATION)) { + LOG.debug("LOADING STOP SUBSCRIPTION NOTIFICATION SERVICE"); + return new StopSubscribeToDeliveryNotificationService(); + } else if (requestDTO.getRequestPath().toLowerCase().contains(RETRIVE_SMS) && requestDTO.isGet()) { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscribeToDeliveryNotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscribeToDeliveryNotificationService.java new file mode 100644 index 00000000..23de1261 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscribeToDeliveryNotificationService.java @@ -0,0 +1,143 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.google.gson.Gson; +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; +import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; +import com.wso2telco.services.dep.sandbox.servicefactory.*; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import com.wso2telco.services.dep.sandbox.util.ServiceName; +import org.apache.commons.logging.LogFactory; + +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StopSubscribeToDeliveryNotificationService extends + AbstractRequestHandler + implements AddressIgnorerable { + + private StopSubscriptionNotificationRequestWrapper requestWrapper; + private SMSMessagingDAO smsMessagingDAO; + private StopSubscriptionNotificationResponseWrapper responseWrapper; + private String serviceCallSMS; + + { + LOG = LogFactory.getLog(StopSubscribeToDeliveryNotificationService.class); + smsMessagingDAO = DaoFactory.getSMSMessagingDAO(); + } + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + return null; + } + + @Override + protected void init(StopSubscriptionNotificationRequestWrapper extendedRequestDTO) throws Exception { + responseWrapper = new StopSubscriptionNotificationResponseWrapper(); + requestWrapper = extendedRequestDTO; + } + + @Override + protected boolean validate(StopSubscriptionNotificationRequestWrapper wrapperDTO) throws Exception { + + String senderAddress = requestWrapper.getSenderAddress(); + int subscriptionID = requestWrapper.getSubscriptionID(); + + List validationRulesList = new ArrayList<>(); + + try { + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "senderAddress", senderAddress)); + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "subscriptionID", subscriptionID)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###PAYMENT### Error in Validations. ", ex); + return false; + } + + return true; + } + + @Override + protected Returnable process(StopSubscriptionNotificationRequestWrapper extendedRequestDTO) throws Exception { + + serviceCallSMS = ServiceName.StopSubscriptionDelivery.toString(); + APITypes apiTypes = dao.getAPIType(RequestType.SMSMESSAGING.toString()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallSMS); + + + String senderAddress = requestWrapper.getSenderAddress(); + int subscriptionID = requestWrapper.getSubscriptionID(); + + // check for existing subscription + boolean isDelete = smsMessagingDAO.removeSubscription(subscriptionID, senderAddress); + + String deletedMessage = "Subscriber "+subscriptionID+ "removed from subscription"; + + if (isDelete) { + responseWrapper.setStatus("NO CONTENT"); + responseWrapper.setHttpStatus(Response.Status.NO_CONTENT); + saveResponse(senderAddress, deletedMessage,apiServiceCalls, extendedRequestDTO.getUser().getId(), MessageProcessStatus.Success); + } else { + LOG.error("###SUBSCRIPTION### NO Subscriber found"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.SERVICE_ERROR_OCCURED, "NO Subscriber found")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + + return responseWrapper; + } + + // Save Response in messageLog table + private void saveResponse(String senderAddress, String request, APIServiceCalls + apiServiceCalls, int userId, MessageProcessStatus status) throws Exception { + + new MessageLog(); + MessageLog messageLog; + messageLog = new MessageLog(); + messageLog.setRequest(request); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(userId); + messageLog.setReference("msisdn"); + messageLog.setValue(senderAddress); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionNotificationRequestWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionNotificationRequestWrapper.java new file mode 100644 index 00000000..b78c1fc7 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionNotificationRequestWrapper.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class StopSubscriptionNotificationRequestWrapper extends RequestDTO { + + private String senderAddress; + + private int subscriptionID; + + public String getSenderAddress() { + return senderAddress; + } + + public void setSenderAddress(String senderAddress) { + this.senderAddress = senderAddress; + } + + public int getSubscriptionID() { + return subscriptionID; + } + + public void setSubscriptionID(int subscriptionID) { + this.subscriptionID = subscriptionID; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionNotificationResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionNotificationResponseWrapper.java new file mode 100644 index 00000000..63325b86 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionNotificationResponseWrapper.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class StopSubscriptionNotificationResponseWrapper extends AbstractReturnWrapperDTO { + + private String status; + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public Object getResponse() { + + if (getRequestError() != null) { + return getRequestError(); + } + return getStatus(); + } + +} + + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryDTO.java new file mode 100644 index 00000000..c837c691 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryDTO.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +public class SubscribeToDeliveryDTO { + + private SubscribeToDeliveryNotificationResponseBean deliveryReceiptSubscription; + + public SubscribeToDeliveryNotificationResponseBean getDeliveryReceiptSubscription() { + return deliveryReceiptSubscription; + } + + public void setDeliveryReceiptSubscription(SubscribeToDeliveryNotificationResponseBean + deliveryReceiptSubscription) { + this.deliveryReceiptSubscription = deliveryReceiptSubscription; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationRequestBeanGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationRequestBeanGateway.java index 69e07998..f7848a77 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationRequestBeanGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationRequestBeanGateway.java @@ -15,27 +15,42 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; -class SubscribeToDeliveryNotificationRequestBeanGateway extends com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryReceiptSubscription { +import com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryReceiptSubscription; - private String filterCriteria; - private SubscribeToDeliveryNotificationRequestBeanGateway DeliveryReceiptSubscription; +public class SubscribeToDeliveryNotificationRequestBeanGateway { + private DeliveryReceiptSubscriptionBean deliveryReceiptSubscription; - public String getFilterCriteria() { - return filterCriteria; + public DeliveryReceiptSubscriptionBean getDeliveryReceiptSubscription() { + return deliveryReceiptSubscription; } - public void setFilterCriteria(String filterCriteria) { - this.filterCriteria = filterCriteria; + public void setDeliveryReceiptSubscription(DeliveryReceiptSubscriptionBean deliveryReceiptSubscription) { + this.deliveryReceiptSubscription = deliveryReceiptSubscription; } - public SubscribeToDeliveryNotificationRequestBeanGateway getDeliveryReceiptSubscription() { - return DeliveryReceiptSubscription; - } + public static class DeliveryReceiptSubscriptionBean extends DeliveryReceiptSubscription { + + private String filterCriteria; + private String clientCorrelator; + + public String getFilterCriteria() { + return filterCriteria; + } + + public void setFilterCriteria(String filterCriteria) { + this.filterCriteria = filterCriteria; + } + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + - public void setDeliveryReceiptSubscription(SubscribeToDeliveryNotificationRequestBeanGateway - deliveryReceiptSubscription) { - DeliveryReceiptSubscription = deliveryReceiptSubscription; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationResponseBean.java new file mode 100644 index 00000000..498b12d8 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationResponseBean.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(value = JsonInclude.Include.NON_NULL) +public class SubscribeToDeliveryNotificationResponseBean { + + private CallReferenceResponse callbackReference; + private String clientCorrelator; + private String filterCriteria; + private String resourceURL; + + public String getClientCorrelator() { + return clientCorrelator; + } + + public void setClientCorrelator(String clientCorrelator) { + this.clientCorrelator = clientCorrelator; + } + + public String getFilterCriteria() { + return filterCriteria; + } + + public void setFilterCriteria(String filterCriteria) { + this.filterCriteria = filterCriteria; + } + + public String getResourceURL() { + return resourceURL; + } + + public void setResourceURL(String resourceURL) { + this.resourceURL = resourceURL; + } + + public CallReferenceResponse getCallbackReference() { + return callbackReference; + } + + public void setCallbackReference(CallReferenceResponse callbackReference) { + this.callbackReference = callbackReference; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationResponseWrapper.java new file mode 100644 index 00000000..6b6e88b4 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationResponseWrapper.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class SubscribeToDeliveryNotificationResponseWrapper extends AbstractReturnWrapperDTO { + + private SubscribeToDeliveryDTO subcribeToDeliveryDTO; + + public SubscribeToDeliveryDTO getSubcribeToDeliveryDTO() { + return subcribeToDeliveryDTO; + } + + public void setSubcribeToDeliveryDTO(SubscribeToDeliveryDTO subcribeToDeliveryDTO) { + this.subcribeToDeliveryDTO = subcribeToDeliveryDTO; + } + + @Override + public Object getResponse() { + if (getRequestError() == null) { + return subcribeToDeliveryDTO; + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + + } + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java index e85fae60..01fa0005 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java @@ -1,14 +1,274 @@ package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import com.wso2telco.services.dep.sandbox.dao.model.custom.DeliveryReceiptSubscription; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; +import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; +import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; +import com.wso2telco.services.dep.sandbox.dao.model.domain.User; +import com.wso2telco.services.dep.sandbox.servicefactory.*; +import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import com.wso2telco.services.dep.sandbox.util.ServiceName; +import org.apache.commons.logging.LogFactory; +import org.json.JSONObject; - class SubscribeToDeliveryNotificationService implements RequestHandleable{ +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; - @Override - public Returnable execute(RequestDTO requestDTO) throws Exception { - // TODO Auto-generated method stub - return null; - } +class SubscribeToDeliveryNotificationService extends + AbstractRequestHandler implements AddressIgnorerable, + RequestResponseRequestHandleable { + + private SMSMessagingDAO smsMessagingDAO; + private SubscribeToDeliveryNotificationWrapperDTOGateway requestWrapperDTOGateway; + private SubscribeToDeliveryNotificationResponseWrapper responseWrapper; + private String serviceCallSMS; + private String jsonRequest; + private static final int SUBSCRIPTION_STATUS = 1; + + { + LOG = LogFactory.getLog(SubscribeToDeliveryNotificationService.class); + smsMessagingDAO = DaoFactory.getSMSMessagingDAO(); + } + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + return null; + } + + @Override + protected void init(SubscribeToDeliveryNotificationWrapperDTOGateway extendedRequestDTO) throws Exception { + responseWrapper = new SubscribeToDeliveryNotificationResponseWrapper(); + requestWrapperDTOGateway = extendedRequestDTO; + } + + @Override + protected boolean validate(SubscribeToDeliveryNotificationWrapperDTOGateway wrapperDTO) throws Exception { + SubscribeToDeliveryNotificationRequestBeanGateway requestBean = wrapperDTO + .getSubscribeToDeliveryNotificationRequestBeanGateway(); + SubscribeToDeliveryNotificationRequestBeanGateway.DeliveryReceiptSubscriptionBean request = requestBean + .getDeliveryReceiptSubscription(); + DeliveryReceiptSubscription.CallbackReference callbackReference = request.getCallbackReference(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String filterCriteria = CommonUtil.getNullOrTrimmedValue(request.getFilterCriteria()); + String callbackData = CommonUtil.getNullOrTrimmedValue(callbackReference.getCallbackData()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(callbackReference.getNotifyURL()); + + List validationRulesList = new ArrayList<>(); + + try { + + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "clientCorrelator", clientCorrelator)); + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "filterCriteria", filterCriteria)); + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "callbackData", callbackData)); + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "notifyURL", notifyURL)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###SMS SUBSCRIPTION### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + + return true; + } + + @Override + protected Returnable process(SubscribeToDeliveryNotificationWrapperDTOGateway extendedRequestDTO) throws Exception { + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + SubscribeToDeliveryNotificationRequestBeanGateway requestBean = extendedRequestDTO + .getSubscribeToDeliveryNotificationRequestBeanGateway(); + SubscribeToDeliveryNotificationRequestBeanGateway.DeliveryReceiptSubscriptionBean request = requestBean + .getDeliveryReceiptSubscription(); + DeliveryReceiptSubscription.CallbackReference callbackReference = request.getCallbackReference(); + + serviceCallSMS = ServiceName.SubscribeToSMSDelivery.toString(); + APITypes apiTypes = dao.getAPIType(RequestType.SMSMESSAGING.toString()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallSMS); + + Gson gson = new Gson(); + + jsonRequest = gson.toJson(requestBean); + + int serviceNameId = apiServiceCalls.getApiServiceCallId(); + + String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); + String senderAddress = requestWrapperDTOGateway.getSenderAddress(); + String filterCriteria = CommonUtil.getNullOrTrimmedValue(request.getFilterCriteria()); + String callbackData = CommonUtil.getNullOrTrimmedValue(callbackReference.getCallbackData()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(callbackReference.getNotifyURL()); + User user = extendedRequestDTO.getUser(); + Integer userId = extendedRequestDTO.getUser().getId(); + + if (clientCorrelator != null) { + + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, senderAddress, + MessageProcessStatus.Success, MessageType.Response); + + if (response != null) { + + SubscribeToDeliveryNotificationResponseBean object = null; + object = gson.fromJson(response, SubscribeToDeliveryNotificationResponseBean.class); + SubscribeToDeliveryDTO dto = new SubscribeToDeliveryDTO(); + dto.setDeliveryReceiptSubscription(object); + responseWrapper.setSubcribeToDeliveryDTO(dto); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + + } + } + + SubscribeToDeliveryNotificationResponseBean responseBean = new SubscribeToDeliveryNotificationResponseBean(); + CallReferenceResponse response = new CallReferenceResponse(); + + responseBean.setClientCorrelator(clientCorrelator); + responseBean.setFilterCriteria(filterCriteria); + responseBean.setResourceURL(CommonUtil.getResourceUrl(extendedRequestDTO)); + response.setCallbackData(callbackData); + response.setNotifyURL(notifyURL); + + responseWrapper.setHttpStatus(Response.Status.CREATED); + SubscribeToDeliveryDTO dto = new SubscribeToDeliveryDTO(); + dto.setDeliveryReceiptSubscription(responseBean); + response.setNotifyURL(notifyURL); + response.setCallbackData(callbackData); + responseBean.setCallbackReference(response); + responseWrapper.setSubcribeToDeliveryDTO(dto); + + SubscribeToDeliveryDTO toDeliveryDTO = new SubscribeToDeliveryDTO(); + toDeliveryDTO.setDeliveryReceiptSubscription(responseBean); + + if (smsMessagingDAO.isSubscriptionExists(filterCriteria, notifyURL, callbackData, clientCorrelator)) { + + String resp = gson.toJson(responseBean); + + SubscribeToDeliveryNotificationResponseBean object = null; + + object = gson.fromJson(resp, SubscribeToDeliveryNotificationResponseBean.class); + SubscribeToDeliveryDTO dto1 = new SubscribeToDeliveryDTO(); + dto1.setDeliveryReceiptSubscription(object); + responseWrapper.setSubcribeToDeliveryDTO(dto); + responseWrapper.setHttpStatus(Response.Status.CREATED); + return responseWrapper; + } else { + smsMessagingDAO.saveDeliverySubscription(user, senderAddress, SUBSCRIPTION_STATUS, notifyURL, + filterCriteria, + callbackData, clientCorrelator, jsonRequest); + saveResponse(userId, senderAddress, responseBean, apiServiceCalls, MessageProcessStatus.Success); + } + + return responseWrapper; + } + + private void saveResponse(Integer userId, String senderAddress, SubscribeToDeliveryNotificationResponseBean + responseBean, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { + + String jsonInString = null; + Gson resp = new Gson(); + + JsonElement je = new JsonParser().parse(resp.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + MessageLog messageLog = new MessageLog(); + messageLog = new MessageLog(); + messageLog.setRequest(jsonInString); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(userId); + messageLog.setReference("msisdn"); + messageLog.setValue(senderAddress); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } + + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String + senderAddress, MessageProcessStatus status, MessageType type) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", senderAddress, null, null); + + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); + String responseClientCorrelator; + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + + responseClientCorrelator = null; + + if (json.has("clientCorrelator")) { + responseClientCorrelator = json.get("clientCorrelator").toString(); + } + + int responseUserId = response.get(i).getUserid(); + + // Check client correlator + if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId) { + jsonString = json.toString(); + break; + } + } + + } + } + return jsonString; + } + + @Override + public String getApiServiceCalls() { + return ServiceName.SubscribeToSMSDelivery.toString(); + } + + @Override + public String getJosonString(SubscribeToDeliveryNotificationWrapperDTOGateway requestDTO) { + Gson gson = new Gson(); + return gson.toJson(requestDTO.getSubscribeToDeliveryNotificationRequestBeanGateway()); + } + + @Override + public String getnumber(SubscribeToDeliveryNotificationWrapperDTOGateway requestDTO) { + return requestDTO.getSenderAddress(); + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationWrapperDTOGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationWrapperDTOGateway.java new file mode 100644 index 00000000..3eee2d09 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationWrapperDTOGateway.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class SubscribeToDeliveryNotificationWrapperDTOGateway extends RequestDTO{ + + private static final long serialVersionUID = 796868921376883562L; + private String senderAddress; + private SubscribeToDeliveryNotificationRequestBeanGateway subscribeToDeliveryNotificationRequestBeanGateway; + + public String getSenderAddress() { + return senderAddress; + } + + public void setSenderAddress(String senderAddress) { + this.senderAddress = senderAddress; + } + + public SubscribeToDeliveryNotificationRequestBeanGateway getSubscribeToDeliveryNotificationRequestBeanGateway() { + return subscribeToDeliveryNotificationRequestBeanGateway; + } + + public void setSubscribeToDeliveryNotificationRequestBeanGateway + (SubscribeToDeliveryNotificationRequestBeanGateway subscribeToDeliveryNotificationRequestBeanGateway) { + this.subscribeToDeliveryNotificationRequestBeanGateway = subscribeToDeliveryNotificationRequestBeanGateway; + } +} From 60b5e20aea01153d4fcdfef5bb0e5cdd26698018 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 16 Mar 2017 10:25:31 +0530 Subject: [PATCH 074/112] resolve merge conflicts --- .../hibernate/HibernateSMSMessagingDAO.java | 54 ++++++++++--------- ...ubscribeToDeliveryNotificationService.java | 5 +- ...ubscribeToDeliveryNotificationService.java | 2 +- 3 files changed, 31 insertions(+), 30 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index 1341ab41..d2deea61 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -13,7 +13,6 @@ import org.hibernate.Transaction; import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; -import org.hibernate.query.Query; class HibernateSMSMessagingDAO extends HibernateCommonDAO implements SMSMessagingDAO{ @@ -220,7 +219,7 @@ public boolean saveDeliverySubscription(User userId, String sender_address, int } catch (Exception ex) { transaction.rollback(); - return false; + throw ex; } finally { session.close(); } @@ -254,43 +253,46 @@ public boolean isSubscriptionExists(String filterCriteria, String notifyUrl, Str isExists = true; } } catch (Exception e) { - System.out.println("isSubscriptionExists : " + e); + LOG.error("###SUSCRIPTION### Error in retrieving subscriptions" , e); + throw e; } finally { session.close(); } return isExists; } - @Override - public boolean removeSubscription(int userId, String senderAddress) { + @Override + public boolean removeSubscription(int userId, String senderAddress) { - boolean isExists = false; - Session session = null; - Transaction tx = null; + boolean isExists = false; + Session session = null; + Transaction tx = null; - try { - session = getSession(); - tx = session.beginTransaction(); - Query q = session.createQuery("delete FROM DeliverySubscription AS ds WHERE ds.id = :id AND ds.senderAddress = :sender_address"); - q.setInteger("id", userId); - q.setParameter("sender_address", senderAddress); + try { + session = getSession(); + tx = session.beginTransaction(); + Query q = session.createQuery("delete FROM DeliverySubscription AS ds WHERE ds.id = :id AND ds" + + ".senderAddress = :sender_address"); + q.setInteger("id", userId); + q.setParameter("sender_address", senderAddress); - int i = q.executeUpdate(); + int i = q.executeUpdate(); - if (i == 1) { - isExists = true; - } - tx.commit(); + if (i == 1) { + isExists = true; + } + tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - session.close(); - } + } catch (Exception e) { + tx.rollback(); + throw e; + } finally { + session.close(); + } - return isExists; - }} + return isExists; + } public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, String clientCorrelator, String senderName, String notifyURL, diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscribeToDeliveryNotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscribeToDeliveryNotificationService.java index 23de1261..d53ff3b1 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscribeToDeliveryNotificationService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscribeToDeliveryNotificationService.java @@ -15,7 +15,6 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway; -import com.google.gson.Gson; import com.wso2telco.core.dbutils.exception.ServiceError; import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; import com.wso2telco.dep.oneapivalidation.util.Validation; @@ -85,7 +84,7 @@ protected boolean validate(StopSubscriptionNotificationRequestWrapper wrapperDTO Validation.checkRequestParams(validationRules); } catch (CustomException ex) { - LOG.error("###PAYMENT### Error in Validations. ", ex); + LOG.error("###SUBSCRIPTION### Error in Validations. ", ex); return false; } @@ -106,7 +105,7 @@ protected Returnable process(StopSubscriptionNotificationRequestWrapper extended // check for existing subscription boolean isDelete = smsMessagingDAO.removeSubscription(subscriptionID, senderAddress); - String deletedMessage = "Subscriber "+subscriptionID+ "removed from subscription"; + String deletedMessage = "Subscriber "+subscriptionID+ " removed from subscription"; if (isDelete) { responseWrapper.setStatus("NO CONTENT"); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java index 01fa0005..5904457d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java @@ -136,7 +136,7 @@ protected Returnable process(SubscribeToDeliveryNotificationWrapperDTOGateway ex MessageProcessStatus.Success, MessageType.Response); if (response != null) { - + // send already saved response SubscribeToDeliveryNotificationResponseBean object = null; object = gson.fromJson(response, SubscribeToDeliveryNotificationResponseBean.class); SubscribeToDeliveryDTO dto = new SubscribeToDeliveryDTO(); From e422ec2d9f12bedae827abba973f6592590eb933 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 16 Mar 2017 12:27:40 +0530 Subject: [PATCH 075/112] endpont filter --- .../dep/sandbox/service/SmsServiceGateway.java | 14 ++++++-------- .../gateway/SMSRequestFactoryGateway.java | 11 +++++------ .../SubscribeToDeliveryNotificationService.java | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java index 66f75e82..22a1c5b8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java @@ -125,16 +125,14 @@ public Response subscribeToApplication(@Context HttpServletRequest httpRequest, RequestHandleable handler = RequestBuilderFactoryGateway.getInstance(requestDTO); Returnable returnable = null; - try { + try { - returnable = handler.execute(requestDTO); - return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); - } catch (Exception e) { - return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); + returnable = handler.execute(requestDTO); + return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + } catch (Exception e) { + return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); + } } - } - - @DELETE @Path("/v1_2/inbound/subscriptions/{subscriptionID}") diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java index bcb09aaf..1c518e9c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SMSRequestFactoryGateway.java @@ -42,23 +42,22 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { if (requestDTO.getRequestPath().toLowerCase().contains(SEND_MT_SMS) && requestDTO.isPost()) { LOG.debug("LOADING SEND MT SMS SERVICE"); - return new SendMTSMSService(); - } else if (requestDTO.getRequestPath().toLowerCase().contains(SUBSCRIBE_TO_DELEVERY_NOTIFICATION)) { + + } else if (requestDTO.getRequestPath().toLowerCase().contains(SUBSCRIBE_TO_DELEVERY_NOTIFICATION) && requestDTO.getRequestPath().toLowerCase().contains(OUTBOUND_REQUEST)&& requestDTO.isPost()) { LOG.debug("LOADING NOTIFICATION SUBSCRIPTION SERVICE"); return new SubscribeToDeliveryNotificationService(); - } else if (requestDTO.getRequestPath().toLowerCase().contains(STOP_DELIVERY_SUBSCRIPTION_NOTIFICATION)) { + + } else if (requestDTO.getRequestPath().toLowerCase().contains(STOP_DELIVERY_SUBSCRIPTION_NOTIFICATION) && requestDTO.getRequestPath().toLowerCase().contains(OUTBOUND_REQUEST)&& requestDTO.isDelete()) { LOG.debug("LOADING STOP SUBSCRIPTION NOTIFICATION SERVICE"); return new StopSubscribeToDeliveryNotificationService(); } - else if (requestDTO.getRequestPath().toLowerCase().contains(RETRIVE_SMS) && requestDTO.isGet()) { - LOG.debug("LOADING RETRIVE SMS SERVICE"); + LOG.debug("LOADING RETRIVE SMS SERVICE"); return new ReceivingSMSHandler(); } - else if (requestDTO.getRequestPath().toLowerCase().contains(SUBSCRIPTIONS) && requestDTO.isPost()) { LOG.debug("LOADING SUBSCRIPTIONS SMS SERVICE"); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java index 5904457d..6f01f828 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java @@ -207,7 +207,7 @@ private void saveResponse(Integer userId, String senderAddress, SubscribeToDeliv messageLog.setType(MessageType.Response.getValue()); messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog.setUserid(userId); - messageLog.setReference("msisdn"); + messageLog.setReference("senderAddress"); messageLog.setValue(senderAddress); messageLog.setMessageTimestamp(new Date()); From 111a532c2000c17ba4363f85485edefdf18c86b0 Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 16 Mar 2017 14:05:38 +0530 Subject: [PATCH 076/112] resolve merge conflicts --- .../dep/sandbox/dao/SMSMessagingDAO.java | 1 - .../hibernate/HibernateSMSMessagingDAO.java | 161 +++++++++--------- .../sandbox/service/SmsServiceGateway.java | 6 +- .../dep/sandbox/util/ServiceName.java | 3 +- 4 files changed, 83 insertions(+), 88 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index c9dab7e7..5e64a5f7 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -17,7 +17,6 @@ public String saveSendSMSTransaction(String senderAddress, String addresses, Str String status, Integer txntype, String criteria, String notificationFormat, User user, String deliveryStatus) ; public List getMessageInbound(String regid, Integer userid); - public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, String callbackData, String criteria, String clientCorrelator, User user) throws Exception; boolean saveDeliverySubscription(User userId, String sender_address, int sub_status, String notify_url, String filter, String callbackData, String clinetCorrelator, String request); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index d2deea61..9a7be314 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -187,112 +187,109 @@ public boolean removeSubscriptionToMessage(String subscriptionID) throws Excepti } - public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, - String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, - String status, Integer txntype, String criteria, String notificationFormat, User user, String requestId) { - @Override - public boolean saveDeliverySubscription(User userId, String sender_address, int sub_status, String notify_url, - String filter, String callbackData, String clinetCorrelator, String - request) { + public boolean saveDeliverySubscription (User userId, String sender_address,int sub_status, String notify_url, + String filter, String callbackData, String clinetCorrelator, String + request){ - Session session = null; - Transaction transaction = null; - DeliverySubscription deliverySubscription = new DeliverySubscription(); + Session session = null; + Transaction transaction = null; + DeliverySubscription deliverySubscription = new DeliverySubscription(); - try { + try { - session = getSession(); - transaction = session.beginTransaction(); + session = getSession(); + transaction = session.beginTransaction(); - deliverySubscription.setUser(userId); - deliverySubscription.setSenderAddress(sender_address); - deliverySubscription.setSubStatus(sub_status); - deliverySubscription.setNotifyUrl(notify_url); - deliverySubscription.setFilterCriteria(filter); - deliverySubscription.setCallbackData(callbackData); - deliverySubscription.setClientCorrelator(clinetCorrelator); - deliverySubscription.setRequestData(request); + deliverySubscription.setUser(userId); + deliverySubscription.setSenderAddress(sender_address); + deliverySubscription.setSubStatus(sub_status); + deliverySubscription.setNotifyUrl(notify_url); + deliverySubscription.setFilterCriteria(filter); + deliverySubscription.setCallbackData(callbackData); + deliverySubscription.setClientCorrelator(clinetCorrelator); + deliverySubscription.setRequestData(request); - session.save(deliverySubscription); + session.save(deliverySubscription); - transaction.commit(); + transaction.commit(); - } catch (Exception ex) { - transaction.rollback(); - throw ex; - } finally { - session.close(); - } + } catch (Exception ex) { + transaction.rollback(); + throw ex; + } finally { + session.close(); + } - return true; - } + return true; + } - @Override - public boolean isSubscriptionExists(String filterCriteria, String notifyUrl, String callbackData, String - clientCorrelator) { + @Override + public boolean isSubscriptionExists (String filterCriteria, String notifyUrl, String callbackData, String + clientCorrelator){ - boolean isExists = false; - Session session = getSession(); + boolean isExists = false; + Session session = getSession(); - List resultedList = new ArrayList<>(); + List resultedList = new ArrayList<>(); - try { + try { - StringBuilder hqlQueryBuilder = new StringBuilder(); - hqlQueryBuilder.append("FROM DeliverySubscription AS ds WHERE ds.filterCriteria = :filter AND ds" + - ".notifyUrl = :notify AND ds.callbackData = :callback AND ds.clientCorrelator = :client"); + StringBuilder hqlQueryBuilder = new StringBuilder(); + hqlQueryBuilder.append("FROM DeliverySubscription AS ds WHERE ds.filterCriteria = :filter AND ds" + + ".notifyUrl = :notify AND ds.callbackData = :callback AND ds.clientCorrelator = :client"); - resultedList = session. - createQuery(hqlQueryBuilder.toString()) - .setParameter("filter", filterCriteria) - .setParameter("notify", notifyUrl) - .setParameter("callback", callbackData) - .setParameter("client", clientCorrelator).getResultList(); + resultedList = session. + createQuery(hqlQueryBuilder.toString()) + .setParameter("filter", filterCriteria) + .setParameter("notify", notifyUrl) + .setParameter("callback", callbackData) + .setParameter("client", clientCorrelator).getResultList(); - if (resultedList.size() > 0) { - isExists = true; - } - } catch (Exception e) { - LOG.error("###SUSCRIPTION### Error in retrieving subscriptions" , e); - throw e; - } finally { - session.close(); - } - return isExists; - } + if (resultedList.size() > 0) { + isExists = true; + } + } catch (Exception e) { + LOG.error("###SUSCRIPTION### Error in retrieving subscriptions", e); + throw e; + } finally { + session.close(); + } + return isExists; + } - @Override - public boolean removeSubscription(int userId, String senderAddress) { + @Override + public boolean removeSubscription ( int userId, String senderAddress){ - boolean isExists = false; - Session session = null; - Transaction tx = null; + boolean isExists = false; + Session session = null; + Transaction tx = null; - try { - session = getSession(); - tx = session.beginTransaction(); - Query q = session.createQuery("delete FROM DeliverySubscription AS ds WHERE ds.id = :id AND ds" + - ".senderAddress = :sender_address"); - q.setInteger("id", userId); - q.setParameter("sender_address", senderAddress); + try { + session = getSession(); + tx = session.beginTransaction(); + Query q = session.createQuery("delete FROM DeliverySubscription AS ds WHERE ds.id = :id AND ds" + + ".senderAddress = :sender_address"); + q.setInteger("id", userId); + q.setParameter("sender_address", senderAddress); - int i = q.executeUpdate(); + int i = q.executeUpdate(); - if (i == 1) { - isExists = true; - } - tx.commit(); + if (i == 1) { + isExists = true; + } + tx.commit(); - } catch (Exception e) { - tx.rollback(); - throw e; - } finally { - session.close(); + } catch (Exception e) { + tx.rollback(); + throw e; + } finally { + session.close(); + } + + return isExists; } - return isExists; - } public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, String clientCorrelator, String senderName, String notifyURL, diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java index 22a1c5b8..9118628f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java @@ -162,7 +162,7 @@ public Response deleteSubscribeToApplication(@ApiParam(value = "subscriptionID", @POST @Path("/v1_2/outbound/{senderAddress}/subscriptions") - @ApiOperation(value = "sms", notes = "Subscribe SMS service in Gateway", response = Response.class) + @ApiOperation(value = "Subscribe to delivery status notifications sent by SMS", notes = "Subscribe SMS service in Gateway", response = Response.class) @ApiImplicitParams({ @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header") @@ -197,7 +197,6 @@ public Response handleSubscribeToDeliveryNotifications( Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); return response; } catch (Exception e) { - e.printStackTrace(); LOG.error("Subscribe to Notification SERVICE ERROR", e); return Response.status(Response.Status.BAD_REQUEST).entity( SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException @@ -208,7 +207,7 @@ public Response handleSubscribeToDeliveryNotifications( @DELETE @Path("/v1_2/outbound/{senderAddress}/subscription/{subscriptionID}") - @ApiOperation(value = "sms", notes = "Stop subscribing to delivery status noti:cations", response = Response.class) + @ApiOperation(value = "Stop subscribing to delivery status notifications", notes = "Stop subscribing to delivery status notifications", response = Response.class) @ApiImplicitParams({ @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header") @@ -239,7 +238,6 @@ public Response handleDeleteSubscriptionNotification( Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); return response; } catch (Exception e) { - e.printStackTrace(); LOG.error("Subscribe to Notification SERVICE ERROR", e); return Response.status(Response.Status.BAD_REQUEST).entity( SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index cd2410c0..1d3a0959 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -1,6 +1,7 @@ package com.wso2telco.services.dep.sandbox.util; public enum ServiceName { - GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location, SendSMS, ReceivingSMS, SubscribeToApplication, StopSubscribeToApplication; + GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location, SendSMS, ReceivingSMS, SubscribeToApplication, StopSubscribeToApplication, + SubscribeToSMSDelivery, StopSubscriptionDelivery, InitUSSD; } From 3016df6f1549a3f1e62fc2936a4ead468a713f5f Mon Sep 17 00:00:00 2001 From: Rajithkonara Date: Thu, 16 Mar 2017 15:37:21 +0530 Subject: [PATCH 077/112] added error loggings --- .../dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index 9a7be314..604c0f91 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -215,6 +215,7 @@ public boolean saveDeliverySubscription (User userId, String sender_address,int } catch (Exception ex) { transaction.rollback(); + LOG.error("Error occurred while trying to save subscription ",ex); throw ex; } finally { session.close(); @@ -282,6 +283,7 @@ public boolean removeSubscription ( int userId, String senderAddress){ } catch (Exception e) { tx.rollback(); + LOG.error("Error occurred while removing subscription",e); throw e; } finally { session.close(); From 0fb83a5e58bf751f9d44fe5c8836da74dbdc12a4 Mon Sep 17 00:00:00 2001 From: Bimla Date: Wed, 15 Mar 2017 11:15:19 +0530 Subject: [PATCH 078/112] Query SMS Delivery Status --- .../dep/sandbox/dao/SMSMessagingDAO.java | 14 +- .../hibernate/HibernateSMSMessagingDAO.java | 45 +++- .../sandbox/service/SmsServiceGateway.java | 40 ++- .../dep/sandbox/service/smsServiceHub.java | 4 + ...QuerySMSDeliveryStatusResponseWrapper.java | 14 +- .../QuerySMSDeliveryStatusService.java | 237 +++++++++++++----- .../smsmessaging/SMSRequestFactory.java | 2 +- .../gateway/SMSRequestFactoryGateway.java | 2 +- 8 files changed, 287 insertions(+), 71 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index 5e64a5f7..89fe8754 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -2,16 +2,21 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.*; + import java.util.List; + public interface SMSMessagingDAO { - public SMSDeliveryStatus getPreviousSMSDeliveryDetailsByMtSMSTransactionId(String mtSMSTransactionId); + + public MessageLog getPreviousSMSDeliveryDetailsByMtSMSTransactionId(int mtSMSTransactionId); public SMSRequestLog getPreviousSMSRequestDetailsBySMSId(int smsId); public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, String status, Integer txntype, String criteria, String notificationFormat, User user, String requestId) ; public SMSMessagingParam getSMSMessagingParam(int userId); - + public boolean saveDeliveryStatusResponse(String requestUrl,int status, int type, int serviceId, int userId, + String reference, String referenceValue); + public String saveSendSMSTransaction(String senderAddress, String addresses, String message, String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, String status, Integer txntype, String criteria, String notificationFormat, User user, @@ -25,4 +30,9 @@ boolean saveDeliverySubscription(User userId, String sender_address, int sub_sta public int saveSubscribeSMSRequest(SubscribeSMSRequest subscribeSMSRequest) throws Exception; public boolean removeSubscriptionToMessage(String subscriptionID) throws Exception; + + + public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, String callbackData, String criteria, String clientCorrelator, User user) throws Exception; + + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index 604c0f91..bff2f6b3 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -19,8 +19,8 @@ class HibernateSMSMessagingDAO extends HibernateCommonDAO implements SMSMessagi { LOG = LogFactory.getLog(HibernateSMSMessagingDAO.class); } - - + + public SMSMessagingParam getSMSMessagingParam(int userId) { SMSMessagingParam smsMessagingParam = null; @@ -33,17 +33,18 @@ public SMSMessagingParam getSMSMessagingParam(int userId) { return smsMessagingParam; } - public SMSDeliveryStatus getPreviousSMSDeliveryDetailsByMtSMSTransactionId(String mtSMSTransactionId) { + public MessageLog getPreviousSMSDeliveryDetailsByMtSMSTransactionId(int mtSMSTransactionId) { - SMSDeliveryStatus smsDeliveryStatus = null; + MessageLog smsDeliveryStatus = null; Session session = getSession(); - smsDeliveryStatus = (SMSDeliveryStatus) session.get(SMSDeliveryStatus.class, mtSMSTransactionId); + smsDeliveryStatus = (MessageLog) session.get(MessageLog.class, mtSMSTransactionId); return smsDeliveryStatus; } + public SMSRequestLog getPreviousSMSRequestDetailsBySMSId(int smsId) { SMSRequestLog smsRequestLog = null; @@ -336,4 +337,38 @@ public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String a return true; } + + public boolean saveDeliveryStatusResponse(String requestUrl,int status, int type, int serviceId, int userId, + String reference, String referenceValue) + { + Session session = null; + Transaction tx = null; + MessageLog messageLog = new MessageLog(); + try { + session = getSession(); + tx = session.beginTransaction(); + messageLog.setRequest(requestUrl); + messageLog.setStatus(status); + messageLog.setType(type); + messageLog.setServicenameid(serviceId); + messageLog.setUserid(userId); + messageLog.setReference(reference); + messageLog.setValue(referenceValue); + session.save(messageLog); + tx.commit(); + } + catch (Exception ex) + { + tx.rollback(); + return false; + }finally { + + session.close(); + } + + + return true; + } + + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java index 9118628f..f08ad947 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java @@ -16,8 +16,16 @@ package com.wso2telco.services.dep.sandbox.service; + import com.wordnik.swagger.annotations.*; import com.wso2telco.services.dep.sandbox.exception.SandboxException; + +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiImplicitParam; +import com.wordnik.swagger.annotations.ApiImplicitParams; +import com.wordnik.swagger.annotations.ApiOperation; +import com.wso2telco.services.dep.sandbox.dao.model.custom.QuerySMSDeliveryStatusRequestWrapperDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactoryGateway; import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.gateway.*; import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; @@ -106,8 +114,6 @@ public Response ReceivingSMS( } - - @POST @Path("/v1_2/inbound/subscriptions") @ApiOperation(value = "Subscribe to Notifications of Messages Sent to Your Application Service", notes = "SMS subscriptions service in Gateway", response = Response.class) @@ -246,6 +252,34 @@ public Response handleDeleteSubscriptionNotification( } } -} + @GET + @Path("/v1_2/outbound/{shortCode}/requests/{smsTransactionId}/deliveryInfos") + @ApiOperation(value = "querySMSDeliveryStatusRequest", notes = "Request SMS Delivary Status", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) + + public Response handleQuerySmsDelivaryStatusRequest(@Context HttpServletRequest httpServletRequest, @PathParam("shortCode") String shortCode, @PathParam("smsTransactionId") String smsTransactionId) + { + QuerySMSDeliveryStatusRequestWrapperDTO requestWrapperDTO = new QuerySMSDeliveryStatusRequestWrapperDTO(); + requestWrapperDTO.setShortCode(shortCode); + requestWrapperDTO.setApiVersion("v1_2"); + requestWrapperDTO.setMtSMSTransactionId(smsTransactionId); + requestWrapperDTO.setHttpRequest(httpServletRequest); + requestWrapperDTO.setRequestType(RequestType.SMSMESSAGING); + RequestHandleable requestHandler = RequestBuilderFactory.getInstance(requestWrapperDTO); + Returnable returnable = null; + try { + returnable = requestHandler.execute(requestWrapperDTO); + return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + } catch (Exception e) { + e.printStackTrace(); + return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); + } + } + + + +} + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/smsServiceHub.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/smsServiceHub.java index 5d1114a3..3f018117 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/smsServiceHub.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/smsServiceHub.java @@ -20,6 +20,8 @@ import com.wordnik.swagger.annotations.ApiImplicitParam; import com.wordnik.swagger.annotations.ApiImplicitParams; import com.wordnik.swagger.annotations.ApiOperation; +import com.wso2telco.services.dep.sandbox.dao.model.custom.QuerySMSDeliveryStatusRequestWrapperDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactoryHub; import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.outboundSMSMessageRequestBeanHub; import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.hub.sendMTSMSRequestWrapperDTOHub; @@ -80,4 +82,6 @@ public Response handleSendMTSMSRequest(@Context HttpServletRequest httpRequest, + + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusResponseWrapper.java index 0b21c3df..3570fb11 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusResponseWrapper.java @@ -16,6 +16,7 @@ package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; import com.wso2telco.dep.oneapivalidation.exceptions.RequestError; +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; public class QuerySMSDeliveryStatusResponseWrapper extends AbstractReturnWrapperDTO { @@ -33,8 +34,17 @@ public void setQuerySMSDeliveryStatusResponseBean( @Override public Object getResponse() { - // TODO Auto-generated method stub - return null; + + + if(getRequestError() == null) + { + return getQuerySMSDeliveryStatusResponseBean(); + } + else + { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + } } class QuerySMSDeliveryStatusResponse { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java index 3b79c2af..7649ff5a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java @@ -1,10 +1,19 @@ package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; import java.util.List; import javax.ws.rs.core.Response.Status; +import com.google.gson.JsonObject; +import com.google.gson.JsonSerializer; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; +import com.wso2telco.services.dep.sandbox.servicefactory.AddressIgnorerable; +import com.wso2telco.services.dep.sandbox.util.CommonUtil; import org.apache.commons.logging.LogFactory; import com.google.gson.Gson; @@ -18,8 +27,10 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.User; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import org.json.JSONArray; +import org.json.JSONObject; -class QuerySMSDeliveryStatusService extends AbstractRequestHandler { +class QuerySMSDeliveryStatusService extends AbstractRequestHandler implements AddressIgnorerable { Gson gson = new GsonBuilder().serializeNulls().create(); QuerySMSDeliveryStatusRequestWrapperDTO extendedRequestDTO = null; @@ -34,10 +45,26 @@ class QuerySMSDeliveryStatusService extends AbstractRequestHandler validationRulesList = new ArrayList<>(); + + try + { + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY,"sender_address",shortCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY,"transaction_id",transactionId)); + } + catch (CustomException ex) + { + + LOG.error("###QuerySMSDeliveryStatus### Error in Validations. ", ex); + responseWrapperDTO.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + + + return true; } @Override @@ -46,98 +73,194 @@ protected Returnable process(QuerySMSDeliveryStatusRequestWrapperDTO extendedReq try { User user = extendedRequestDTO.getUser(); + int userId = user.getId(); + String id = Integer.toString(userId); + SMSRequestLog previousSMSRequestDetails = null; + MessageLog previousSMSDeliveryDetails = null; + ArrayList> deliveryStatusArraylist = new ArrayList(); String mtSMSTransactionIdParts[] = extendedRequestDTO.getMtSMSTransactionId().split("-"); - String previousShortCode = null; - String previousDeliveryStatus = null; + String sendersAddress = null; + String deliveryStat = null; + String resourceUrl = null; + String recieverAddress = null; String senderAddress = extendedRequestDTO.getShortCode(); if (extendedRequestDTO.getShortCode().contains("tel:+")) { senderAddress = extendedRequestDTO.getShortCode().replace("tel:+", "").trim(); + } else if (extendedRequestDTO.getShortCode().contains("tel:")) { senderAddress = extendedRequestDTO.getShortCode().replace("tel:", "").trim(); + } - SMSDeliveryStatus previousSMSDeliveryDetails = smsMessagingDAO - .getPreviousSMSDeliveryDetailsByMtSMSTransactionId(extendedRequestDTO.getMtSMSTransactionId()); - if (previousSMSDeliveryDetails != null) { - previousShortCode = previousSMSDeliveryDetails.getSenderAddress(); - previousDeliveryStatus = previousSMSDeliveryDetails.getDeliveryStatus(); + int deliveryStatus = 0; + int type = 0; + int apiId = 0; + String jsonRequestString = null; + + if(mtSMSTransactionIdParts.length !=2) + { + previousSMSDeliveryDetails = smsMessagingDAO.getPreviousSMSDeliveryDetailsByMtSMSTransactionId(Integer.valueOf(mtSMSTransactionIdParts[0])); } + else if (mtSMSTransactionIdParts.length ==2) + { + previousSMSDeliveryDetails = smsMessagingDAO.getPreviousSMSDeliveryDetailsByMtSMSTransactionId(Integer.valueOf(mtSMSTransactionIdParts[1])); + } + - if (mtSMSTransactionIdParts.length != 2) { + if(previousSMSDeliveryDetails != null) + { + deliveryStatus = previousSMSDeliveryDetails.getStatus(); + type = previousSMSDeliveryDetails.getType(); + apiId = previousSMSDeliveryDetails.getServicenameid(); + + int messageLogId = previousSMSDeliveryDetails.getId(); + + String transactionId[] =extendedRequestDTO.getMtSMSTransactionId().split("-"); + String newTransactionId = null; + if(transactionId.length != 2) + { + newTransactionId = transactionId[0]; + } + if(transactionId.length == 2) + { + newTransactionId = transactionId[1]; + } + + if(deliveryStatus == 1 && type == 1 && apiId == 14 && messageLogId== Integer.valueOf(newTransactionId)) + { + //ToDo use enums for the hard coded values in JSON objects + jsonRequestString = previousSMSDeliveryDetails.getRequest(); + JSONObject jsonObject = new JSONObject(jsonRequestString); + JSONObject jsonChildObj = (JSONObject) jsonObject.getJSONObject("outboundSMSMessageRequest"); + JSONObject jsoninnerChild = (JSONObject) jsonChildObj.getJSONObject("deliveryInfoList"); + + String address = null; + String status = null; + + JSONArray deliveryListArray = jsoninnerChild.getJSONArray("deliveryInfo"); + String arrayList = deliveryListArray.toString(); + for (int i = 0; i < deliveryListArray.length(); i++) { + HashMap delivaryStatusHashmap = new HashMap<>(); + JSONObject jsonArrayList = deliveryListArray.getJSONObject(i); + address = jsonArrayList.optString("address"); + status = jsonArrayList.optString("deliveryStatus"); + delivaryStatusHashmap.put("address", address); + delivaryStatusHashmap.put("deliveryStatus", status); + deliveryStatusArraylist.add(delivaryStatusHashmap); + + } + + deliveryStat = status; + recieverAddress = address; + //deliveryStatuss = jsonObject.getString("deliveryStatus"); + resourceUrl = jsonChildObj.getString("resourceURL"); + + sendersAddress = jsonChildObj.getString("senderAddress"); + //sendersAddress = address.toString(); + + + + } + } + + + if(mtSMSTransactionIdParts.length != 2) + { + previousSMSRequestDetails = smsMessagingDAO + .getPreviousSMSRequestDetailsBySMSId(Integer.parseInt(mtSMSTransactionIdParts[0])); + } + if(mtSMSTransactionIdParts.length == 2) + { + previousSMSRequestDetails = smsMessagingDAO + .getPreviousSMSRequestDetailsBySMSId(Integer.parseInt(mtSMSTransactionIdParts[1])); + } + + + if (previousSMSRequestDetails == null) { responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", "Invalid input value for message part %1", extendedRequestDTO.getMtSMSTransactionId())); responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else { + } else if (!dao.isWhiteListedSenderAddress(user.getId(), senderAddress)) { - SMSRequestLog previousSMSRequestDetails = smsMessagingDAO - .getPreviousSMSRequestDetailsBySMSId(Integer.parseInt(mtSMSTransactionIdParts[1])); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0001", + "A service error occurred. Error code is %1", + extendedRequestDTO.getShortCode() + " Not Provisioned")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + } else if (previousSMSDeliveryDetails == null) { - if (previousSMSRequestDetails == null) { + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", + "Invalid input value for message part %1", extendedRequestDTO.getMtSMSTransactionId())); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + } else if (!senderAddress.equals(sendersAddress)) { - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", - "Invalid input value for message part %1", extendedRequestDTO.getMtSMSTransactionId())); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else if (!dao.isWhiteListedSenderAddress(user.getId(), senderAddress)) { + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0004", + "No valid addresses provided in message part %1", extendedRequestDTO.getShortCode())); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + } else { - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0001", - "A service error occurred. Error code is %1", - extendedRequestDTO.getShortCode() + " Not Provisioned")); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else if (previousSMSDeliveryDetails == null) { + boolean queryDeliveryStatusTransactionStatus = smsMessagingDAO.saveQueryDeliveryStatusTransaction( + extendedRequestDTO.getShortCode(), null, null, null, null, null, null, 0, "success", 5, + null, null, user, extendedRequestDTO.getMtSMSTransactionId()); + boolean delivaryStatusResponseStatus = smsMessagingDAO.saveDeliveryStatusResponse(jsonRequestString,deliveryStatus,type,apiId, + userId,"shortcode",sendersAddress); + if(!delivaryStatusResponseStatus) + { responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", - "Invalid input value for message part %1", extendedRequestDTO.getMtSMSTransactionId())); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else if (!extendedRequestDTO.getShortCode().equals(previousShortCode)) { + "A service error occurred. Error code is %1", "process failure of Response of the QuerySMSDeliveryStatus")); + } + if (!queryDeliveryStatusTransactionStatus ) { - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0004", - "No valid addresses provided in message part %1", extendedRequestDTO.getShortCode())); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0001", + "A service error occurred. Error code is %1", "Access failure for API")); responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); } else { - boolean queryDeliveryStatusTransactionStatus = smsMessagingDAO.saveQueryDeliveryStatusTransaction( - extendedRequestDTO.getShortCode(), null, null, null, null, null, null, 0, "success", 5, - null, null, user, extendedRequestDTO.getMtSMSTransactionId()); - if (!queryDeliveryStatusTransactionStatus) { - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0001", - "A service error occurred. Error code is %1", "Access failure for API")); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else { - String shortCodes[] = previousSMSRequestDetails.getAddresses().replace("[", "").replace("]", "") - .split(","); + String shortCodes[] = recieverAddress.replace("[", "").replace("]", "") + .split(","); + String deliveryStatusArray[] = deliveryStat.split(","); - QuerySMSDeliveryStatusResponseBean responseBean = new QuerySMSDeliveryStatusResponseBean(); + QuerySMSDeliveryStatusResponseBean responseBean = new QuerySMSDeliveryStatusResponseBean(); - QuerySMSDeliveryStatusResponseBean.DeliveryInfoList responseDeliveryInfoList = new QuerySMSDeliveryStatusResponseBean.DeliveryInfoList(); + QuerySMSDeliveryStatusResponseBean.DeliveryInfoList responseDeliveryInfoList = new QuerySMSDeliveryStatusResponseBean.DeliveryInfoList(); - List deliveryInforArrayList = new ArrayList(); + List deliveryInforArrayList = new ArrayList(); - for (int i = 0; i < shortCodes.length; i++) { - QuerySMSDeliveryStatusResponseBean.DeliveryInfoList.DeliveryInfo responseDeliveryInfo = new QuerySMSDeliveryStatusResponseBean.DeliveryInfoList.DeliveryInfo(); - responseDeliveryInfo.setAddress(shortCodes[i]); - responseDeliveryInfo.setDeliveryStatus(previousDeliveryStatus); + for(int i=0; i Date: Wed, 15 Mar 2017 14:52:41 +0530 Subject: [PATCH 079/112] Updates of Query SMS Delivery Status --- .../dep/sandbox/dao/SMSMessagingDAO.java | 4 +-- .../hibernate/HibernateSMSMessagingDAO.java | 31 ------------------- .../QuerySMSDeliveryStatusService.java | 9 ++++-- 3 files changed, 8 insertions(+), 36 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index 89fe8754..7ee51b8a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -14,8 +14,8 @@ public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String a String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, String status, Integer txntype, String criteria, String notificationFormat, User user, String requestId) ; public SMSMessagingParam getSMSMessagingParam(int userId); - public boolean saveDeliveryStatusResponse(String requestUrl,int status, int type, int serviceId, int userId, - String reference, String referenceValue); + /*public boolean saveDeliveryStatusResponse(String requestUrl,int status, int type, int serviceId, int userId, + String reference, String referenceValue);*/ public String saveSendSMSTransaction(String senderAddress, String addresses, String message, String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index bff2f6b3..e87de7dd 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -338,37 +338,6 @@ public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String a return true; } - public boolean saveDeliveryStatusResponse(String requestUrl,int status, int type, int serviceId, int userId, - String reference, String referenceValue) - { - Session session = null; - Transaction tx = null; - MessageLog messageLog = new MessageLog(); - try { - session = getSession(); - tx = session.beginTransaction(); - messageLog.setRequest(requestUrl); - messageLog.setStatus(status); - messageLog.setType(type); - messageLog.setServicenameid(serviceId); - messageLog.setUserid(userId); - messageLog.setReference(reference); - messageLog.setValue(referenceValue); - session.save(messageLog); - tx.commit(); - } - catch (Exception ex) - { - tx.rollback(); - return false; - }finally { - - session.close(); - } - - - return true; - } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java index 7649ff5a..f128a25e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java @@ -11,6 +11,7 @@ import com.google.gson.JsonSerializer; import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateLoggingDao; import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; import com.wso2telco.services.dep.sandbox.servicefactory.AddressIgnorerable; import com.wso2telco.services.dep.sandbox.util.CommonUtil; @@ -206,9 +207,11 @@ else if (mtSMSTransactionIdParts.length ==2) extendedRequestDTO.getShortCode(), null, null, null, null, null, null, 0, "success", 5, null, null, user, extendedRequestDTO.getMtSMSTransactionId()); - boolean delivaryStatusResponseStatus = smsMessagingDAO.saveDeliveryStatusResponse(jsonRequestString,deliveryStatus,type,apiId, - userId,"shortcode",sendersAddress); - if(!delivaryStatusResponseStatus) + /*boolean messageLogId = smsMessagingDAO.saveDeliveryStatusResponse(jsonRequestString,deliveryStatus,type,apiId, + userId,"shortcode",sendersAddress);*/ + HibernateLoggingDao x = new HibernateLoggingDao(); + int messageLogId = x.saveMessageLog(previousSMSDeliveryDetails); + if(messageLogId == 0) { responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", "A service error occurred. Error code is %1", "process failure of Response of the QuerySMSDeliveryStatus")); From a9226bdfcd09ec438eecdedfbd475a88a4d18b23 Mon Sep 17 00:00:00 2001 From: Bimla Date: Wed, 15 Mar 2017 18:20:28 +0530 Subject: [PATCH 080/112] Edits of Query SMS Delivery Status API --- .../sandbox/service/SmsServiceGateway.java | 2 +- .../QuerySMSDeliveryStatusService.java | 37 ++++++++++++------- 2 files changed, 25 insertions(+), 14 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java index f08ad947..29f659cc 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SmsServiceGateway.java @@ -272,7 +272,7 @@ public Response handleQuerySmsDelivaryStatusRequest(@Context HttpServletRequest returnable = requestHandler.execute(requestWrapperDTO); return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); } catch (Exception e) { - e.printStackTrace(); + LOG.error("SMS QUERY DELIVERY STATUS ERROR"+e); return Response.status(Response.Status.BAD_REQUEST).entity(returnable.getResponse()).build(); } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java index f128a25e..cd21c0d4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java @@ -33,6 +33,16 @@ class QuerySMSDeliveryStatusService extends AbstractRequestHandler implements AddressIgnorerable { + + public static final String OUTBOUND_SMS_MESSAGE_REQUEST= "outboundSMSMessageRequest"; + public static final String DELIVERY_INFO_LIST = "deliveryInfoList"; + public static final String DELIVERY_INFO = "deliveryInfo"; + public static final String ADDRESS = "address"; + public static final String DELIVERY_STATUS = "deliveryStatus"; + public static final String RESOURCE_URL="resourceURL"; + public static final String SENDER_ADDRESS ="senderAddress"; + public static final String PARAM_SENDER_ADDRESS = "sender_address"; + public static final String PARAM_TRANSACTION_ID ="transaction_id"; Gson gson = new GsonBuilder().serializeNulls().create(); QuerySMSDeliveryStatusRequestWrapperDTO extendedRequestDTO = null; QuerySMSDeliveryStatusResponseWrapper responseWrapperDTO = null; @@ -52,8 +62,8 @@ protected boolean validate(QuerySMSDeliveryStatusRequestWrapperDTO wrapperDTO) t try { - validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY,"sender_address",shortCode)); - validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY,"transaction_id",transactionId)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY,PARAM_SENDER_ADDRESS,shortCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY,PARAM_TRANSACTION_ID,transactionId)); } catch (CustomException ex) { @@ -78,6 +88,7 @@ protected Returnable process(QuerySMSDeliveryStatusRequestWrapperDTO extendedReq String id = Integer.toString(userId); SMSRequestLog previousSMSRequestDetails = null; MessageLog previousSMSDeliveryDetails = null; + ArrayList> deliveryStatusArraylist = new ArrayList(); String mtSMSTransactionIdParts[] = extendedRequestDTO.getMtSMSTransactionId().split("-"); @@ -135,21 +146,21 @@ else if (mtSMSTransactionIdParts.length ==2) //ToDo use enums for the hard coded values in JSON objects jsonRequestString = previousSMSDeliveryDetails.getRequest(); JSONObject jsonObject = new JSONObject(jsonRequestString); - JSONObject jsonChildObj = (JSONObject) jsonObject.getJSONObject("outboundSMSMessageRequest"); - JSONObject jsoninnerChild = (JSONObject) jsonChildObj.getJSONObject("deliveryInfoList"); + JSONObject jsonChildObj = (JSONObject) jsonObject.getJSONObject(OUTBOUND_SMS_MESSAGE_REQUEST); + JSONObject jsoninnerChild = (JSONObject) jsonChildObj.getJSONObject(DELIVERY_INFO_LIST); String address = null; String status = null; - JSONArray deliveryListArray = jsoninnerChild.getJSONArray("deliveryInfo"); + JSONArray deliveryListArray = jsoninnerChild.getJSONArray(DELIVERY_INFO); String arrayList = deliveryListArray.toString(); for (int i = 0; i < deliveryListArray.length(); i++) { HashMap delivaryStatusHashmap = new HashMap<>(); JSONObject jsonArrayList = deliveryListArray.getJSONObject(i); - address = jsonArrayList.optString("address"); - status = jsonArrayList.optString("deliveryStatus"); - delivaryStatusHashmap.put("address", address); - delivaryStatusHashmap.put("deliveryStatus", status); + address = jsonArrayList.optString(ADDRESS); + status = jsonArrayList.optString(DELIVERY_STATUS); + delivaryStatusHashmap.put(ADDRESS, address); + delivaryStatusHashmap.put(DELIVERY_STATUS, status); deliveryStatusArraylist.add(delivaryStatusHashmap); } @@ -157,9 +168,9 @@ else if (mtSMSTransactionIdParts.length ==2) deliveryStat = status; recieverAddress = address; //deliveryStatuss = jsonObject.getString("deliveryStatus"); - resourceUrl = jsonChildObj.getString("resourceURL"); + resourceUrl = jsonChildObj.getString(RESOURCE_URL); - sendersAddress = jsonChildObj.getString("senderAddress"); + sendersAddress = jsonChildObj.getString(SENDER_ADDRESS); //sendersAddress = address.toString(); @@ -241,8 +252,8 @@ else if (mtSMSTransactionIdParts.length ==2) for(int i=0; i Date: Thu, 16 Mar 2017 17:09:35 +0530 Subject: [PATCH 081/112] Fixation of Query Sms Delivery Status --- .../dep/sandbox/dao/SMSMessagingDAO.java | 15 +-- .../hibernate/HibernateSMSMessagingDAO.java | 30 ++++++ .../QuerySMSDeliveryStatusService.java | 98 +++++++++---------- .../dep/sandbox/util/ServiceName.java | 1 + 4 files changed, 79 insertions(+), 65 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index 7ee51b8a..c3498f75 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -10,29 +10,18 @@ public interface SMSMessagingDAO { public MessageLog getPreviousSMSDeliveryDetailsByMtSMSTransactionId(int mtSMSTransactionId); public SMSRequestLog getPreviousSMSRequestDetailsBySMSId(int smsId); - public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, - String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, - String status, Integer txntype, String criteria, String notificationFormat, User user, String requestId) ; public SMSMessagingParam getSMSMessagingParam(int userId); - /*public boolean saveDeliveryStatusResponse(String requestUrl,int status, int type, int serviceId, int userId, - String reference, String referenceValue);*/ - - public String saveSendSMSTransaction(String senderAddress, String addresses, String message, - String clientCorrelator, String senderName, String notifyURL, String callbackData, Integer batchsize, - String status, Integer txntype, String criteria, String notificationFormat, User user, - String deliveryStatus) ; public List getMessageInbound(String regid, Integer userid); + boolean saveDeliverySubscription(User userId, String sender_address, int sub_status, String notify_url, String filter, String callbackData, String clinetCorrelator, String request); boolean isSubscriptionExists(String filterCriteria, String notifyUrl, String callbackData, String clientCorrelator); boolean removeSubscription(int userId, String senderAddress); public int saveSubscribeSMSRequest(SubscribeSMSRequest subscribeSMSRequest) throws Exception; - public boolean removeSubscriptionToMessage(String subscriptionID) throws Exception; - - public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, String callbackData, String criteria, String clientCorrelator, User user) throws Exception; + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index e87de7dd..7ea524ac 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -337,7 +337,37 @@ public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String a return true; } + public boolean saveDeliveryStatusResponse(String requestUrl,int status, int type, int serviceId, int userId, + String reference, String referenceValue) + { + Session session = null; + Transaction tx = null; + MessageLog messageLog = new MessageLog(); + try { + session = getSession(); + tx = session.beginTransaction(); + messageLog.setRequest(requestUrl); + messageLog.setStatus(status); + messageLog.setType(type); + messageLog.setServicenameid(serviceId); + messageLog.setUserid(userId); + messageLog.setReference(reference); + messageLog.setValue(referenceValue); + session.save(messageLog); + tx.commit(); + } + catch (Exception ex) + { + tx.rollback(); + return false; + }finally { + + session.close(); + } + + return true; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java index cd21c0d4..0a8d2d92 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java @@ -1,9 +1,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; +import java.util.*; import javax.ws.rs.core.Response.Status; @@ -12,9 +9,10 @@ import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; import com.wso2telco.dep.oneapivalidation.util.ValidationRule; import com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateLoggingDao; -import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; -import com.wso2telco.services.dep.sandbox.servicefactory.AddressIgnorerable; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.*; import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import com.wso2telco.services.dep.sandbox.util.ServiceName; import org.apache.commons.logging.LogFactory; import com.google.gson.Gson; @@ -23,11 +21,6 @@ import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.QuerySMSDeliveryStatusRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSDeliveryStatus; -import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSRequestLog; -import com.wso2telco.services.dep.sandbox.dao.model.domain.User; -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import org.json.JSONArray; import org.json.JSONObject; @@ -88,6 +81,14 @@ protected Returnable process(QuerySMSDeliveryStatusRequestWrapperDTO extendedReq String id = Integer.toString(userId); SMSRequestLog previousSMSRequestDetails = null; MessageLog previousSMSDeliveryDetails = null; + QuerySMSDeliveryStatusResponseWrapper wrapper = null; + JSONObject jsonObject = null; + QuerySMSDeliveryStatusResponseBean responseBean = new QuerySMSDeliveryStatusResponseBean(); + APITypes apiType = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + String serviceCall = ServiceName.QuerySMSStatus.toString(); + APIServiceCalls apiService = dao.getServiceCall(apiType.getId(), serviceCall); + String smsServiceCall = ServiceName.SendSMS.toString(); + APIServiceCalls x = dao.getServiceCall(apiType.getId(),smsServiceCall); ArrayList> deliveryStatusArraylist = new ArrayList(); @@ -141,11 +142,11 @@ else if (mtSMSTransactionIdParts.length ==2) newTransactionId = transactionId[1]; } - if(deliveryStatus == 1 && type == 1 && apiId == 14 && messageLogId== Integer.valueOf(newTransactionId)) + if(deliveryStatus == MessageProcessStatus.Success.getValue() && type == MessageType.Response.getValue() && apiId == x.getApiServiceCallId() && messageLogId== Integer.valueOf(newTransactionId)) { - //ToDo use enums for the hard coded values in JSON objects + jsonRequestString = previousSMSDeliveryDetails.getRequest(); - JSONObject jsonObject = new JSONObject(jsonRequestString); + jsonObject = new JSONObject(jsonRequestString); JSONObject jsonChildObj = (JSONObject) jsonObject.getJSONObject(OUTBOUND_SMS_MESSAGE_REQUEST); JSONObject jsoninnerChild = (JSONObject) jsonChildObj.getJSONObject(DELIVERY_INFO_LIST); @@ -167,13 +168,8 @@ else if (mtSMSTransactionIdParts.length ==2) deliveryStat = status; recieverAddress = address; - //deliveryStatuss = jsonObject.getString("deliveryStatus"); resourceUrl = jsonChildObj.getString(RESOURCE_URL); - sendersAddress = jsonChildObj.getString(SENDER_ADDRESS); - //sendersAddress = address.toString(); - - } } @@ -214,38 +210,17 @@ else if (mtSMSTransactionIdParts.length ==2) responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); } else { - boolean queryDeliveryStatusTransactionStatus = smsMessagingDAO.saveQueryDeliveryStatusTransaction( - extendedRequestDTO.getShortCode(), null, null, null, null, null, null, 0, "success", 5, - null, null, user, extendedRequestDTO.getMtSMSTransactionId()); - - /*boolean messageLogId = smsMessagingDAO.saveDeliveryStatusResponse(jsonRequestString,deliveryStatus,type,apiId, - userId,"shortcode",sendersAddress);*/ - HibernateLoggingDao x = new HibernateLoggingDao(); - int messageLogId = x.saveMessageLog(previousSMSDeliveryDetails); - if(messageLogId == 0) - { - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", - "A service error occurred. Error code is %1", "process failure of Response of the QuerySMSDeliveryStatus")); - } - if (!queryDeliveryStatusTransactionStatus ) { - - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0001", - "A service error occurred. Error code is %1", "Access failure for API")); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else { - - String shortCodes[] = recieverAddress.replace("[", "").replace("]", "") .split(","); String deliveryStatusArray[] = deliveryStat.split(","); - QuerySMSDeliveryStatusResponseBean responseBean = new QuerySMSDeliveryStatusResponseBean(); + //QuerySMSDeliveryStatusResponseBean responseBean = new QuerySMSDeliveryStatusResponseBean(); QuerySMSDeliveryStatusResponseBean.DeliveryInfoList responseDeliveryInfoList = new QuerySMSDeliveryStatusResponseBean.DeliveryInfoList(); - List deliveryInforArrayList = new ArrayList(); + List deliveryInforArrayList = new ArrayList(); @@ -257,25 +232,27 @@ else if (mtSMSTransactionIdParts.length ==2) deliveryInforArrayList.add(responseDeliveryInfos); } - /* for (int i = 0; i < shortCodes.length; i++) { - - QuerySMSDeliveryStatusResponseBean.DeliveryInfoList.DeliveryInfo responseDeliveryInfo = new QuerySMSDeliveryStatusResponseBean.DeliveryInfoList.DeliveryInfo(); - - responseDeliveryInfo.setAddress(shortCodes[i]); - responseDeliveryInfo.setDeliveryStatus(deliveryStatusArray[i]); - - deliveryInforArrayList.add(responseDeliveryInfo); - }*/ responseDeliveryInfoList.setDeliveryInfo(deliveryInforArrayList); responseDeliveryInfoList .setResourceURL(resourceUrl); + responseBean.setDeliveryInfoList(responseDeliveryInfoList); + responseWrapperDTO.setQuerySMSDeliveryStatusResponseBean(responseBean); responseWrapperDTO.setHttpStatus(Status.OK); + + int messageLogId = saveResponse(senderAddress,responseWrapperDTO.getQuerySMSDeliveryStatusResponseBean(),apiService,MessageProcessStatus.Success); + /*boolean delivaryStatusResponseStatus = smsMessagingDAO.saveDeliveryStatusResponse(jsonRequestString,deliveryStatus,type,apiId, + userId,"shortcode",sendersAddress);8*/ + if(messageLogId == 0) + { + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", + "A service error occurred. Error code is %1", "process failure of Response of the QuerySMSDeliveryStatus")); } + } } catch (Exception e) { @@ -293,7 +270,6 @@ protected Returnable getResponseDTO() { @Override protected List getAddress() { - // TODO Auto-generated method stub return null; } @@ -324,4 +300,22 @@ private StringBuilder getresourceURL(final String mtSMSTransactionId) { return resourceURLBuilder; } + + private int saveResponse(String endUserIdPath, QuerySMSDeliveryStatusResponseBean responseBean, APIServiceCalls + apiServiceCalls, MessageProcessStatus status) throws Exception { + Gson gson = new Gson(); + String jsonString = gson.toJson(responseBean); + MessageLog messageLog =new MessageLog(); + messageLog.setRequest(jsonString); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setValue(endUserIdPath); + messageLog.setReference("shortcode"); + messageLog.setMessageTimestamp(new Date()); + messageLog.setStatus(status.getValue()); + int i = loggingDAO.saveMessageLog(messageLog); + return i; + + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index 1d3a0959..39720639 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -1,6 +1,7 @@ package com.wso2telco.services.dep.sandbox.util; public enum ServiceName { + GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location, SendSMS, ReceivingSMS, SubscribeToApplication, StopSubscribeToApplication, SubscribeToSMSDelivery, StopSubscriptionDelivery, InitUSSD; From 122c7d955ea4d64c1edb381d68caf5bbc2fbfa2e Mon Sep 17 00:00:00 2001 From: Bimla Date: Thu, 16 Mar 2017 18:04:04 +0530 Subject: [PATCH 082/112] Updated Query SMS Delivery Status API according to the PR comments --- .../dep/sandbox/dao/SMSMessagingDAO.java | 6 +- .../hibernate/HibernateSMSMessagingDAO.java | 76 +------------------ .../QuerySMSDeliveryStatusService.java | 24 ++---- .../dep/sandbox/util/ServiceName.java | 2 +- 4 files changed, 14 insertions(+), 94 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index c3498f75..b158a308 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -8,8 +8,8 @@ public interface SMSMessagingDAO { - public MessageLog getPreviousSMSDeliveryDetailsByMtSMSTransactionId(int mtSMSTransactionId); - public SMSRequestLog getPreviousSMSRequestDetailsBySMSId(int smsId); + public MessageLog getPrevSMSDeliveryDataByTransId(int transactionId); + public SMSRequestLog getPrevSMSRequestDataById(int smsId); public SMSMessagingParam getSMSMessagingParam(int userId); public List getMessageInbound(String regid, Integer userid); @@ -20,7 +20,7 @@ boolean saveDeliverySubscription(User userId, String sender_address, int sub_sta boolean removeSubscription(int userId, String senderAddress); public int saveSubscribeSMSRequest(SubscribeSMSRequest subscribeSMSRequest) throws Exception; public boolean removeSubscriptionToMessage(String subscriptionID) throws Exception; - public int saveSubscribeSMSRequest(String destinationAddress, String notifyURL, String callbackData, String criteria, String clientCorrelator, User user) throws Exception; + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index 7ea524ac..c42bf424 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -33,7 +33,7 @@ public SMSMessagingParam getSMSMessagingParam(int userId) { return smsMessagingParam; } - public MessageLog getPreviousSMSDeliveryDetailsByMtSMSTransactionId(int mtSMSTransactionId) { + public MessageLog getPrevSMSDeliveryDataByTransId(int mtSMSTransactionId) { MessageLog smsDeliveryStatus = null; @@ -45,7 +45,7 @@ public MessageLog getPreviousSMSDeliveryDetailsByMtSMSTransactionId(int mtSMSTra } - public SMSRequestLog getPreviousSMSRequestDetailsBySMSId(int smsId) { + public SMSRequestLog getPrevSMSRequestDataById(int smsId) { SMSRequestLog smsRequestLog = null; @@ -294,80 +294,8 @@ public boolean removeSubscription ( int userId, String senderAddress){ } - public boolean saveQueryDeliveryStatusTransaction(String senderAddress, String addresses, String message, - String clientCorrelator, String senderName, String notifyURL, - String callbackData, Integer batchsize, - String status, Integer txntype, String criteria, String - notificationFormat, User user, String requestId) { - - Session session = null; - Transaction tx = null; - SMSRequestLog smsRequest = new SMSRequestLog(); - - try { - session = getSession(); - tx = session.beginTransaction(); - - smsRequest.setSenderAddress(senderAddress); - smsRequest.setAddresses((String) addresses); - smsRequest.setMessage(message); - smsRequest.setClientCorrelator(clientCorrelator); - smsRequest.setSenderName(senderName); - smsRequest.setNotifyURL(notifyURL); - smsRequest.setCallbackData(callbackData); - smsRequest.setUser(user); - smsRequest.setDate(new Date()); - smsRequest.setBatchsize(batchsize); - smsRequest.setTransactionstatus(status); - smsRequest.setTxntype(txntype); - smsRequest.setCriteria(criteria); - smsRequest.setNotificationFormat(notificationFormat); - smsRequest.setRequestId(requestId); - session.save(smsRequest); - - tx.commit(); - } catch (Exception e) { - - tx.rollback(); - return false; - } finally { - - session.close(); - } - - return true; - } - public boolean saveDeliveryStatusResponse(String requestUrl,int status, int type, int serviceId, int userId, - String reference, String referenceValue) - { - Session session = null; - Transaction tx = null; - MessageLog messageLog = new MessageLog(); - try { - session = getSession(); - tx = session.beginTransaction(); - messageLog.setRequest(requestUrl); - messageLog.setStatus(status); - messageLog.setType(type); - messageLog.setServicenameid(serviceId); - messageLog.setUserid(userId); - messageLog.setReference(reference); - messageLog.setValue(referenceValue); - session.save(messageLog); - tx.commit(); - } - catch (Exception ex) - { - tx.rollback(); - return false; - }finally { - - session.close(); - } - return true; - } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java index 0a8d2d92..22182a38 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java @@ -4,11 +4,8 @@ import javax.ws.rs.core.Response.Status; -import com.google.gson.JsonObject; -import com.google.gson.JsonSerializer; import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; import com.wso2telco.dep.oneapivalidation.util.ValidationRule; -import com.wso2telco.services.dep.sandbox.dao.hibernate.HibernateLoggingDao; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.servicefactory.*; import com.wso2telco.services.dep.sandbox.util.CommonUtil; @@ -17,7 +14,6 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import com.wso2telco.dep.oneapivalidation.service.impl.smsmessaging.ValidateDeliveryStatus; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.QuerySMSDeliveryStatusRequestWrapperDTO; @@ -81,14 +77,13 @@ protected Returnable process(QuerySMSDeliveryStatusRequestWrapperDTO extendedReq String id = Integer.toString(userId); SMSRequestLog previousSMSRequestDetails = null; MessageLog previousSMSDeliveryDetails = null; - QuerySMSDeliveryStatusResponseWrapper wrapper = null; JSONObject jsonObject = null; QuerySMSDeliveryStatusResponseBean responseBean = new QuerySMSDeliveryStatusResponseBean(); APITypes apiType = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); String serviceCall = ServiceName.QuerySMSStatus.toString(); APIServiceCalls apiService = dao.getServiceCall(apiType.getId(), serviceCall); - String smsServiceCall = ServiceName.SendSMS.toString(); - APIServiceCalls x = dao.getServiceCall(apiType.getId(),smsServiceCall); + String previousServiceCall = ServiceName.SendSMS.toString(); + APIServiceCalls previousApiService = dao.getServiceCall(apiType.getId(),previousServiceCall); ArrayList> deliveryStatusArraylist = new ArrayList(); @@ -115,11 +110,11 @@ protected Returnable process(QuerySMSDeliveryStatusRequestWrapperDTO extendedReq if(mtSMSTransactionIdParts.length !=2) { - previousSMSDeliveryDetails = smsMessagingDAO.getPreviousSMSDeliveryDetailsByMtSMSTransactionId(Integer.valueOf(mtSMSTransactionIdParts[0])); + previousSMSDeliveryDetails = smsMessagingDAO.getPrevSMSDeliveryDataByTransId(Integer.valueOf(mtSMSTransactionIdParts[0])); } else if (mtSMSTransactionIdParts.length ==2) { - previousSMSDeliveryDetails = smsMessagingDAO.getPreviousSMSDeliveryDetailsByMtSMSTransactionId(Integer.valueOf(mtSMSTransactionIdParts[1])); + previousSMSDeliveryDetails = smsMessagingDAO.getPrevSMSDeliveryDataByTransId(Integer.valueOf(mtSMSTransactionIdParts[1])); } @@ -142,7 +137,7 @@ else if (mtSMSTransactionIdParts.length ==2) newTransactionId = transactionId[1]; } - if(deliveryStatus == MessageProcessStatus.Success.getValue() && type == MessageType.Response.getValue() && apiId == x.getApiServiceCallId() && messageLogId== Integer.valueOf(newTransactionId)) + if(deliveryStatus == MessageProcessStatus.Success.getValue() && type == MessageType.Response.getValue() && apiId == previousApiService.getApiServiceCallId() && messageLogId== Integer.valueOf(newTransactionId)) { jsonRequestString = previousSMSDeliveryDetails.getRequest(); @@ -178,12 +173,12 @@ else if (mtSMSTransactionIdParts.length ==2) if(mtSMSTransactionIdParts.length != 2) { previousSMSRequestDetails = smsMessagingDAO - .getPreviousSMSRequestDetailsBySMSId(Integer.parseInt(mtSMSTransactionIdParts[0])); + .getPrevSMSRequestDataById(Integer.parseInt(mtSMSTransactionIdParts[0])); } if(mtSMSTransactionIdParts.length == 2) { previousSMSRequestDetails = smsMessagingDAO - .getPreviousSMSRequestDetailsBySMSId(Integer.parseInt(mtSMSTransactionIdParts[1])); + .getPrevSMSRequestDataById(Integer.parseInt(mtSMSTransactionIdParts[1])); } @@ -216,8 +211,6 @@ else if (mtSMSTransactionIdParts.length ==2) .split(","); String deliveryStatusArray[] = deliveryStat.split(","); - //QuerySMSDeliveryStatusResponseBean responseBean = new QuerySMSDeliveryStatusResponseBean(); - QuerySMSDeliveryStatusResponseBean.DeliveryInfoList responseDeliveryInfoList = new QuerySMSDeliveryStatusResponseBean.DeliveryInfoList(); List deliveryInforArrayList = new ArrayList(); @@ -245,8 +238,7 @@ else if (mtSMSTransactionIdParts.length ==2) responseWrapperDTO.setHttpStatus(Status.OK); int messageLogId = saveResponse(senderAddress,responseWrapperDTO.getQuerySMSDeliveryStatusResponseBean(),apiService,MessageProcessStatus.Success); - /*boolean delivaryStatusResponseStatus = smsMessagingDAO.saveDeliveryStatusResponse(jsonRequestString,deliveryStatus,type,apiId, - userId,"shortcode",sendersAddress);8*/ + if(messageLogId == 0) { responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java index 39720639..aa684dd0 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/ServiceName.java @@ -3,6 +3,6 @@ public enum ServiceName { GetAttribute, GetProfile, ApplyCredit, PartialRefund, MakePayment, ListPayment, RefundPayment, BalanceLookup, ChargeUser,RefundUser, Location, SendSMS, ReceivingSMS, SubscribeToApplication, StopSubscribeToApplication, - SubscribeToSMSDelivery, StopSubscriptionDelivery, InitUSSD; + SubscribeToSMSDelivery, StopSubscriptionDelivery, InitUSSD, QuerySMSStatus; } From aaee3c266f0878f9654f007317eca47b5198abdd Mon Sep 17 00:00:00 2001 From: Nuwan Walisundara Date: Fri, 17 Mar 2017 13:31:22 +0530 Subject: [PATCH 083/112] mi-util version upgraded --- dep-sandbox/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index b5236df8..82a80d89 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -85,7 +85,7 @@ 6.0.2 3.0.0.wso2v1 1.8.0-M3 - 2.0.3 + 2.0.19 2.3.1 1.1.wso2v1 3.0.0.wso2v1 From 0a5437a010a0bf795a3667f0228b0e53e1908d7e Mon Sep 17 00:00:00 2001 From: Bimla Date: Fri, 17 Mar 2017 14:51:49 +0530 Subject: [PATCH 084/112] Bug fixation of Credit API --- .../services/dep/sandbox/service/CreditService.java | 4 ++-- .../sandbox/servicefactory/AbstractRequestHandler.java | 3 +++ .../credit/CreditApplyResponseWrapper.java | 9 ++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java index 2a676a46..83f1ed20 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/CreditService.java @@ -59,8 +59,8 @@ public Response creditApplyForRequestedService( try { returnable = handler.execute(requestDTO); - Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); - return response; + return Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + } catch (Exception ex) { LOG.error("###CREDIT### Error in Credit Service", ex); Response response = Response.status(Status.BAD_REQUEST).entity(SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxErrorType.SERVICE_ERROR.getMessage()).build(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java index 08a76fe2..4354351f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java @@ -162,10 +162,13 @@ private String getProfileIdFromRequest(RequestDTO requestDTO) { protected RequestError constructRequestError(int type, String messageId, String text, String variable) { RequestError error = new RequestError(); + + variable = variable + " Not Whitelisted"; if (type == SERVICEEXCEPTION) { ServiceException serviceException = new ServiceException(messageId, text, variable); error.setServiceException(serviceException); + } else if (type == POLICYEXCEPTION) { PolicyException policyException = new PolicyException(messageId, text, variable); error.setPolicyException(policyException); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyResponseWrapper.java index eefb1e33..a4eb859c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyResponseWrapper.java @@ -1,6 +1,7 @@ package com.wso2telco.services.dep.sandbox.servicefactory.credit; import com.wso2telco.services.dep.sandbox.dao.model.custom.CreditApplyResponseBean; +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; public class CreditApplyResponseWrapper extends AbstractReturnWrapperDTO { @@ -9,11 +10,13 @@ public class CreditApplyResponseWrapper extends AbstractReturnWrapperDTO { @Override public Object getResponse() { - if (getRequestError() != null) { - return getRequestError(); + if (getRequestError() == null) { + return creditApplyResponseBean; + }else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; } - return creditApplyResponseBean; } public CreditApplyResponseBean getCreditApplyResponseBean() { From c4955f316746e8918fb08911aee9057b4c4c3eae Mon Sep 17 00:00:00 2001 From: Bimla Date: Fri, 17 Mar 2017 16:48:11 +0530 Subject: [PATCH 085/112] Fixation of passing null values to Request in Credit API Bug --- .../dep/sandbox/dao/model/custom/CallbackReference.java | 3 +++ .../dep/sandbox/dao/model/custom/CreditApplyResponseBean.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/CallbackReference.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/CallbackReference.java index b7b8fb40..904d913b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/CallbackReference.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/CallbackReference.java @@ -15,6 +15,9 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(value = JsonInclude.Include.NON_NULL) public class CallbackReference { private String notifyURL; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/CreditApplyResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/CreditApplyResponseBean.java index aac1e334..8ca88a09 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/CreditApplyResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/CreditApplyResponseBean.java @@ -3,7 +3,7 @@ import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; - +@JsonInclude(value = JsonInclude.Include.NON_NULL) public class CreditApplyResponseBean { private CreditApplyResponse creditApplyResponse; From 831bcaaefec0178980d99ad7c205061779f1effe Mon Sep 17 00:00:00 2001 From: Nuwan Date: Fri, 24 Mar 2017 17:38:09 +0530 Subject: [PATCH 086/112] remove unwanted dbscript --- dep-sandbox/dbscript/dep-sandbox.sql~ | 931 -------------------------- 1 file changed, 931 deletions(-) delete mode 100644 dep-sandbox/dbscript/dep-sandbox.sql~ diff --git a/dep-sandbox/dbscript/dep-sandbox.sql~ b/dep-sandbox/dbscript/dep-sandbox.sql~ deleted file mode 100644 index e3872244..00000000 --- a/dep-sandbox/dbscript/dep-sandbox.sql~ +++ /dev/null @@ -1,931 +0,0 @@ -CREATE DATABASE IF NOT EXISTS `dev2_mife_sandbox_hub` /*!40100 DEFAULT CHARACTER SET latin1 */; -USE `dev2_mife_sandbox_hub`; --- MySQL dump 10.13 Distrib 5.7.15, for Linux (x86_64) --- --- Host: localhost Database: dev2_mife_sandbox_hub --- ------------------------------------------------------ --- Server version 5.7.13-0ubuntu0.16.04.2 - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; -/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; -/*!40103 SET TIME_ZONE='+00:00' */; -/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `charge_amount_request` --- - -DROP TABLE IF EXISTS `charge_amount_request`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `charge_amount_request` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `effect_date` date DEFAULT NULL, - `amount` double DEFAULT NULL, - `channel` varchar(255) DEFAULT NULL, - `client_correlator` varchar(255) DEFAULT NULL, - `code` varchar(255) DEFAULT NULL, - `currency` varchar(255) DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `end_user_id` varchar(255) DEFAULT NULL, - `notify_url` varchar(255) DEFAULT NULL, - `on_behalf_of` varchar(255) DEFAULT NULL, - `purchase_cat_code` varchar(255) DEFAULT NULL, - `reference_code` varchar(255) DEFAULT NULL, - `tax_amount` double DEFAULT NULL, - `tran_oper_status` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - `callback_data` varchar(255) DEFAULT NULL, - `mandate_id` varchar(255) DEFAULT NULL, - `notification_format` varchar(255) DEFAULT NULL, - `product_id` varchar(255) DEFAULT NULL, - `reference_sequence` int(11) DEFAULT NULL, - `original_server_reference_code` varchar(255) DEFAULT NULL, - `service_id` varchar(255) DEFAULT NULL, - `total_amount_charged` double DEFAULT NULL, - `amount_reserved` double DEFAULT NULL, - `transaction_id` varchar(255) DEFAULT NULL, - `payment_transaction_type` int(11) DEFAULT NULL, - `refund_status` int(11) DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `UK_haok1xtx5f32qy18r9yt06p31` (`client_correlator`), - KEY `FKB48C1E939E083448` (`user_id`), - CONSTRAINT `FKB48C1E939E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `charge_amount_request` --- - -LOCK TABLES `charge_amount_request` WRITE; -/*!40000 ALTER TABLE `charge_amount_request` DISABLE KEYS */; -INSERT INTO `charge_amount_request` VALUES (1,'2016-04-27',10,'SMS','54321',NULL,'USD','Alien Invaders Game','tel:+94773524308',NULL,NULL,'Game','REF-12345',0.15,'Charged',1,NULL,NULL,NULL,NULL,0,NULL,NULL,10.15,0,'paytran-1',1,0),(2,'2016-05-02',10,'SMS','4027901',NULL,'USD','Alien Invaders Game','tel:+94123123123',NULL,NULL,'Game','REF-12345',0.15,'Charged',5,NULL,NULL,NULL,NULL,0,NULL,NULL,10.15,0,'paytran-2',1,0),(3,'2016-05-02',10,'SMS','5024530',NULL,'USD','Alien Invaders Game','tel:+94123123123',NULL,NULL,'Game','REF-12345',0.15,'Charged',5,NULL,NULL,NULL,NULL,0,NULL,NULL,10.15,0,'paytran-3',1,0),(4,'2016-05-02',10,'SMS','2067403',NULL,'USD','Alien Invaders Game','tel:+94123123123',NULL,NULL,'Game','REF-12345',0.15,'Charged',5,NULL,NULL,NULL,NULL,0,NULL,NULL,10.15,0,'paytran-4',1,0),(5,'2016-05-02',10,'SMS','3646144',NULL,'USD','Alien Invaders Game','tel:+94123123123',NULL,NULL,'Game','REF-12345',0.15,'Charged',5,NULL,NULL,NULL,NULL,0,NULL,NULL,10.15,0,'paytran-5',1,0),(6,'2016-05-02',10,'SMS','7069465',NULL,'USD','Alien Invaders Game','tel:+94123123123',NULL,NULL,'Game','REF-12345',0.15,'Charged',5,NULL,NULL,NULL,NULL,0,NULL,NULL,10.15,0,'paytran-6',1,0),(7,'2016-05-02',10,'SMS','3687508',NULL,'USD','Alien Invaders Game','tel:+94123123123',NULL,NULL,'Game','REF-12345',0.15,'Charged',5,NULL,NULL,NULL,NULL,0,NULL,NULL,10.15,0,'paytran-7',1,0),(8,'2016-05-02',10,'SMS','0987581',NULL,'USD','Alien Invaders Game','tel:+94123123123',NULL,NULL,'Game','REF-12345',0.15,'Charged',5,NULL,NULL,NULL,NULL,0,NULL,NULL,10.15,0,'paytran-8',1,1),(9,'2016-05-02',10,'SMS','3641564','ABC','USD','Alien Invaders Game','tel:+94123123123','http://localhost:8080/mifeapiserver/callback.jsp','Example Games Inc','Game','REF-12345',0.15,'Refunded',5,'54321','0000','54321','0000',0,'src-8','0000',0,0,'paytran-9',6,0),(10,'2016-05-02',10,'SMS','9317007',NULL,'USD','Alien Invaders Game','tel:+94123123123',NULL,NULL,'Game','REF-12345',0.15,'Charged',5,NULL,NULL,NULL,NULL,0,NULL,NULL,10.15,0,'paytran-10',1,0); -/*!40000 ALTER TABLE `charge_amount_request` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `locationparam` --- - -DROP TABLE IF EXISTS `locationparam`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `locationparam` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `altitude` varchar(255) DEFAULT NULL, - `latitude` varchar(255) DEFAULT NULL, - `longitude` varchar(255) DEFAULT NULL, - `loc_ret_status` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`), - CONSTRAINT `locationparam_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `locationparam` --- - -LOCK TABLES `locationparam` WRITE; -/*!40000 ALTER TABLE `locationparam` DISABLE KEYS */; -INSERT INTO `locationparam` VALUES (1,'2341','45244444','135131','Retrieved',1); -/*!40000 ALTER TABLE `locationparam` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `locationtransactionlog` --- - -DROP TABLE IF EXISTS `locationtransactionlog`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `locationtransactionlog` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `address` varchar(255) DEFAULT NULL, - `requested_accuracy` double DEFAULT NULL, - `tran_oper_status` varchar(255) DEFAULT NULL, - `effect_date` date DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`), - CONSTRAINT `locationtransactionlog_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `locationtransactionlog` --- - -LOCK TABLES `locationtransactionlog` WRITE; -/*!40000 ALTER TABLE `locationtransactionlog` DISABLE KEYS */; -INSERT INTO `locationtransactionlog` VALUES (1,'tel:+94773524308',1000,'Retrieved','2016-04-27',1),(2,'tel:+94773524308',1000,'Retrieved','2016-04-27',1),(3,'tel:+94773524308',1000,'Retrieved','2016-04-27',1),(4,'tel:+94773524308',1000,'Retrieved','2016-08-24',1),(5,'tel:+94773524308',1000,'Retrieved','2016-08-24',1),(6,'tel:+94773524308',1000,'Retrieved','2016-08-24',1),(7,'tel:+94773524308',1000,'Retrieved','2016-08-24',1),(8,'tel:+94773524308',1000,'Retrieved','2016-08-24',1),(9,'tel:+94773524308',1000,'Retrieved','2016-08-24',1),(10,'tel:+94773524308',1000,'Retrieved','2016-08-24',1),(11,'tel:+94773524308',1000,'Retrieved','2016-08-24',1),(12,'tel:+94773524308',1000,'Retrieved','2016-08-24',4),(13,'tel:+94773524308',1000,'Retrieved','2016-08-24',4),(14,'tel:+94773524308',1000,'Retrieved','2016-08-24',1),(15,'tel:+94773524308',1000,'Retrieved','2016-08-29',1),(16,'tel:+94773524308',1000,'Retrieved','2016-08-29',1),(17,'tel:+94773524308',1000,'Retrieved','2016-08-30',1),(18,'tel:+94773524308',1000,'Retrieved','2016-08-30',1),(19,'tel:+94773524308',1000,'Retrieved','2016-08-30',1),(20,'tel:+94773524308',1000,'Retrieved','2016-08-31',1),(21,'tel:+94773524308',1000,'Retrieved','2016-08-31',1),(22,'tel:+94773524308',1000,'Retrieved','2016-08-31',1),(23,'tel:+94773524308',1000,'Retrieved','2016-09-08',1),(24,'tel:+94773524308',1000,'Retrieved','2016-09-08',1); -/*!40000 ALTER TABLE `locationtransactionlog` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `mobileidapiencoderequest` --- - -DROP TABLE IF EXISTS `mobileidapiencoderequest`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `mobileidapiencoderequest` ( - `mobIdApiId` int(11) NOT NULL AUTO_INCREMENT, - `consumerkey` varchar(255) DEFAULT NULL, - `consumersecret` varchar(255) DEFAULT NULL, - `authcode` varchar(255) DEFAULT NULL, - `granttype` varchar(45) DEFAULT NULL, - `username` varchar(45) DEFAULT NULL, - `password` varchar(45) DEFAULT NULL, - `scope` varchar(45) DEFAULT NULL, - `user` varchar(45) DEFAULT NULL, - `refreshToken` varchar(45) DEFAULT NULL, - `accessToken` varchar(45) DEFAULT NULL, - PRIMARY KEY (`mobIdApiId`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `mobileidapiencoderequest` --- - -LOCK TABLES `mobileidapiencoderequest` WRITE; -/*!40000 ALTER TABLE `mobileidapiencoderequest` DISABLE KEYS */; -/*!40000 ALTER TABLE `mobileidapiencoderequest` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `numbers` --- - -DROP TABLE IF EXISTS `numbers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `numbers` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `number` varchar(255) DEFAULT NULL, - `num_balance` double DEFAULT NULL, - `reserved_amount` double NOT NULL DEFAULT '0', - `num_description` varchar(255) DEFAULT NULL, - `num_status` int(11) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK88C28E4A9E083448` (`user_id`), - CONSTRAINT `FK88C28E4A9E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `numbers` --- - -LOCK TABLES `numbers` WRITE; -/*!40000 ALTER TABLE `numbers` DISABLE KEYS */; -INSERT INTO `numbers` VALUES (1,'94773524308',989.85,0,'test number',1,1),(2,'94123123123',1000,0,'testAuxenta',1,5),(3,'945915648',1000,0,'dfaf',1,1); -/*!40000 ALTER TABLE `numbers` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `payment_gen` --- - -DROP TABLE IF EXISTS `payment_gen`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `payment_gen` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `delivery_status` varchar(255) DEFAULT NULL, - `max_pay_amount` varchar(255) DEFAULT NULL, - `max_tx_perday` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FKA4347D979E083448` (`user_id`), - CONSTRAINT `FKA4347D979E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `payment_gen` --- - -LOCK TABLES `payment_gen` WRITE; -/*!40000 ALTER TABLE `payment_gen` DISABLE KEYS */; -/*!40000 ALTER TABLE `payment_gen` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `payment_transaction` --- - -DROP TABLE IF EXISTS `payment_transaction`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `payment_transaction` ( - `transaction_id` varchar(255) NOT NULL, - `effect_date` date DEFAULT NULL, - `amount` double DEFAULT NULL, - `currency` varchar(50) DEFAULT NULL, - `end_user_id` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`transaction_id`), - KEY `FKB154785395263845` (`user_id`), - CONSTRAINT `FKB48C1E55465448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `payment_transaction` --- - -LOCK TABLES `payment_transaction` WRITE; -/*!40000 ALTER TABLE `payment_transaction` DISABLE KEYS */; -/*!40000 ALTER TABLE `payment_transaction` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `paymentparam` --- - -DROP TABLE IF EXISTS `paymentparam`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `paymentparam` ( - `ID` int(11) NOT NULL AUTO_INCREMENT, - `created` varchar(255) DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastupdated` varchar(255) DEFAULT NULL, - `lastupdated_date` datetime DEFAULT NULL, - `maxamt` double(11,2) DEFAULT NULL, - `maxtrn` int(11) DEFAULT NULL, - `paystatus` varchar(255) DEFAULT NULL, - `userid` int(11) DEFAULT NULL, - PRIMARY KEY (`ID`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `paymentparam` --- - -LOCK TABLES `paymentparam` WRITE; -/*!40000 ALTER TABLE `paymentparam` DISABLE KEYS */; -INSERT INTO `paymentparam` VALUES (1,NULL,NULL,NULL,NULL,100000000.00,1000,'Charged',1),(2,NULL,NULL,NULL,NULL,15000.00,1000,'Processing',2),(3,NULL,NULL,NULL,NULL,15000.00,1000,'Processing',3),(4,NULL,NULL,NULL,NULL,15000.00,1000,'Processing',4),(5,NULL,NULL,NULL,NULL,10.00,1000,'Charged',5); -/*!40000 ALTER TABLE `paymentparam` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sbtprmsisdnservicessmap` --- - -DROP TABLE IF EXISTS `sbtprmsisdnservicessmap`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sbtprmsisdnservicessmap` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `numbersid` int(11) NOT NULL, - `servicesid` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `fk01sbtprmsisdnservicessmap` (`numbersid`), - KEY `fk02sbtprmsisdnservicessmap` (`servicesid`), - CONSTRAINT `fk01sbtprmsisdnservicessmap` FOREIGN KEY (`numbersid`) REFERENCES `numbers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, - CONSTRAINT `fk02sbtprmsisdnservicessmap` FOREIGN KEY (`servicesid`) REFERENCES `sbxprservices` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sbtprmsisdnservicessmap` --- - -LOCK TABLES `sbtprmsisdnservicessmap` WRITE; -/*!40000 ALTER TABLE `sbtprmsisdnservicessmap` DISABLE KEYS */; -INSERT INTO `sbtprmsisdnservicessmap` VALUES (1,1,1),(2,1,2),(3,2,1),(4,1,3),(5,2,2),(6,2,3); -/*!40000 ALTER TABLE `sbtprmsisdnservicessmap` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sbtprprovisionedservices` --- - -DROP TABLE IF EXISTS `sbtprprovisionedservices`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sbtprprovisionedservices` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `msisdnservicesmapid` int(11) DEFAULT NULL, - `clientcorrelator` varchar(100) DEFAULT NULL, - `clientreferencecode` varchar(45) DEFAULT NULL, - `notifyurl` varchar(255) DEFAULT NULL, - `callbackdata` varchar(45) DEFAULT NULL, - `statusid` int(11) DEFAULT NULL, - `createddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`id`), - KEY `fk01sbtprsbtprprovisionedservices` (`statusid`), - KEY `fk02sbtprsbtprprovisionedservices` (`msisdnservicesmapid`), - CONSTRAINT `fk01sbtprsbtprprovisionedservices` FOREIGN KEY (`statusid`) REFERENCES `sbxstatus` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, - CONSTRAINT `fk02sbtprsbtprprovisionedservices` FOREIGN KEY (`msisdnservicesmapid`) REFERENCES `sbtprmsisdnservicessmap` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sbtprprovisionedservices` --- - -LOCK TABLES `sbtprprovisionedservices` WRITE; -/*!40000 ALTER TABLE `sbtprprovisionedservices` DISABLE KEYS */; -INSERT INTO `sbtprprovisionedservices` VALUES (1,1,'12345','REF12345','http://application.com/notifyURL','',1,'0000-00-00 00:00:00'),(2,2,'1211','afs','afsfas',NULL,1,'2016-09-13 17:49:12'),(3,3,'',NULL,NULL,NULL,1,'2016-09-13 17:53:07'),(4,4,NULL,NULL,NULL,NULL,1,'2016-09-13 17:53:39'),(5,1,NULL,NULL,NULL,NULL,3,'2016-09-13 17:54:58'),(6,6,NULL,NULL,NULL,NULL,2,'2016-09-13 17:54:58'); -/*!40000 ALTER TABLE `sbtprprovisionedservices` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sbtprspexpectmessage` --- - -DROP TABLE IF EXISTS `sbtprspexpectmessage`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sbtprspexpectmessage` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `numberid` int(11) NOT NULL, - `messageid` int(11) NOT NULL, - `requesttype` varchar(50) DEFAULT NULL, - `servicesid` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `fk01sbtprspexpectmessage` (`numberid`), - KEY `fk02sbtprspexpectmessage` (`messageid`), - KEY `fk03sbtprspexpectmessage` (`servicesid`), - CONSTRAINT `fk01sbtprspexpectmessage` FOREIGN KEY (`numberid`) REFERENCES `numbers` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, - CONSTRAINT `fk02sbtprspexpectmessage` FOREIGN KEY (`messageid`) REFERENCES `sbxresponsemessage` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, - CONSTRAINT `fk03sbtprspexpectmessage` FOREIGN KEY (`servicesid`) REFERENCES `sbxprservices` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sbtprspexpectmessage` --- - -LOCK TABLES `sbtprspexpectmessage` WRITE; -/*!40000 ALTER TABLE `sbtprspexpectmessage` DISABLE KEYS */; -INSERT INTO `sbtprspexpectmessage` VALUES (1,1,1,'PROVISION',1),(2,1,1,'DELETE',1); -/*!40000 ALTER TABLE `sbtprspexpectmessage` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sbxapitypes` --- - -DROP TABLE IF EXISTS `sbxapitypes`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sbxapitypes` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `apiname` varchar(50) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sbxapitypes` --- - -LOCK TABLES `sbxapitypes` WRITE; -/*!40000 ALTER TABLE `sbxapitypes` DISABLE KEYS */; -INSERT INTO `sbxapitypes` VALUES (1,'LOCATION'),(2,'SMS'),(3,'USSD'),(4,'PAYMENT'),(5,'CREDIT'),(6,'WALLET'),(7,'PROVISION'); -/*!40000 ALTER TABLE `sbxapitypes` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sbxprrequesstlog` --- - -DROP TABLE IF EXISTS `sbxprrequesstlog`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sbxprrequesstlog` ( - `provision_request_log_id` int(11) NOT NULL AUTO_INCREMENT, - `requesttype` varchar(50) NOT NULL, - `msisdn` varchar(50) NOT NULL, - `userid` int(11) NOT NULL, - `clientcorrelator` varchar(255) DEFAULT NULL, - `clientreferencecode` varchar(255) DEFAULT NULL, - `notifyurl` varchar(255) DEFAULT NULL, - `callbackdata` varchar(255) DEFAULT NULL, - `timestamp` date DEFAULT NULL, - PRIMARY KEY (`provision_request_log_id`) -) ENGINE=InnoDB AUTO_INCREMENT=91 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sbxprrequesstlog` --- - -LOCK TABLES `sbxprrequesstlog` WRITE; -/*!40000 ALTER TABLE `sbxprrequesstlog` DISABLE KEYS */; -INSERT INTO `sbxprrequesstlog` VALUES (1,'QUERY_APPLICABLE','+9471123',1,NULL,NULL,NULL,NULL,'2016-09-07'),(2,'QUERY_APPLICABLE','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-07'),(3,'QUERY_APPLICABLE','el:+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-07'),(4,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(7,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(8,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(9,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(10,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(11,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(12,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(16,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(17,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(18,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(19,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(20,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(21,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(32,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(33,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(34,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(35,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(36,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(37,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(38,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(39,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(40,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(41,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(42,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(43,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(44,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(46,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(47,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(49,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(50,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(51,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(53,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(54,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(55,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(56,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(57,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(58,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(59,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(60,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(61,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(62,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(63,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(64,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(65,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(66,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(67,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(68,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(69,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(70,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(71,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(72,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(73,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(74,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(75,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(76,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(77,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(78,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(79,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(80,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(81,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(82,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(83,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(84,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(85,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(86,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(87,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(88,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-14'),(89,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-15'),(90,'LIST_ACTIVE_PROVISIONED_SERVICES','+94773524308',1,NULL,NULL,NULL,NULL,'2016-09-15'); -/*!40000 ALTER TABLE `sbxprrequesstlog` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sbxprservices` --- - -DROP TABLE IF EXISTS `sbxprservices`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sbxprservices` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `code` varchar(45) NOT NULL, - `name` varchar(45) NOT NULL, - `type` varchar(45) DEFAULT NULL, - `description` varchar(150) DEFAULT NULL, - `charge` float DEFAULT NULL, - `tag` varchar(45) DEFAULT NULL, - `value` varchar(45) DEFAULT NULL, - `userid` int(11) NOT NULL, -CONSTRAINT `pksbxprservices` PRIMARY KEY (`id`), -CONSTRAINT `fk01sbxprservice` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sbxprservices` --- - -LOCK TABLES `sbxprservices` WRITE; -/*!40000 ALTER TABLE `sbxprservices` DISABLE KEYS */; -INSERT INTO `sbxprservices` VALUES (1,'SRV0001','ROAM5G','ROAMING','ServiceDescription',10,'count','25',0),(2,'SRV0002','FBDATA','DATA','ServiceDescription',0,'limit','1000',0),(3,'SRV0003','VoIP','VOICE',NULL,NULL,NULL,NULL,0); -/*!40000 ALTER TABLE `sbxprservices` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sbxresponsemessage` --- - -DROP TABLE IF EXISTS `sbxresponsemessage`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sbxresponsemessage` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `categoryid` int(11) DEFAULT NULL, - `message` text, - `apitypeid` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `fk01sbxresponsemessage` (`categoryid`), - KEY `fk02sbxresponsemessage` (`apitypeid`), - CONSTRAINT `fk01sbxresponsemessage` FOREIGN KEY (`categoryid`) REFERENCES `sbxresponsemessagecategory` (`id`), - CONSTRAINT `fk02sbxresponsemessage` FOREIGN KEY (`apitypeid`) REFERENCES `sbxapitypes` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sbxresponsemessage` --- - -LOCK TABLES `sbxresponsemessage` WRITE; -/*!40000 ALTER TABLE `sbxresponsemessage` DISABLE KEYS */; -INSERT INTO `sbxresponsemessage` VALUES (1,1,'Service Not Available',7); -/*!40000 ALTER TABLE `sbxresponsemessage` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sbxresponsemessagecategory` --- - -DROP TABLE IF EXISTS `sbxresponsemessagecategory`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sbxresponsemessagecategory` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `category` varchar(50) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sbxresponsemessagecategory` --- - -LOCK TABLES `sbxresponsemessagecategory` WRITE; -/*!40000 ALTER TABLE `sbxresponsemessagecategory` DISABLE KEYS */; -INSERT INTO `sbxresponsemessagecategory` VALUES (1,'General Error'),(2,'Service Error'),(3,'Policy Error'); -/*!40000 ALTER TABLE `sbxresponsemessagecategory` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sbxstatus` --- - -DROP TABLE IF EXISTS `sbxstatus`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sbxstatus` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `status` varchar(45) DEFAULT NULL, - `code` varchar(40) DEFAULT NULL, - `description` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sbxstatus` --- - -LOCK TABLES `sbxstatus` WRITE; -/*!40000 ALTER TABLE `sbxstatus` DISABLE KEYS */; -INSERT INTO `sbxstatus` VALUES (1,'Pending','PRV_PROVISION_PENDING','Provision Transaction is pendign with subsystem'),(2,'Failed','PRV_PROVISION_FAILED','Provisioning failed due to subsystem error'),(3,'Success','PRV_PROVISION_SUCCESS','Successfully provisioned'),(4,'NotActive','PRV_DELETE_NOT_ACTIVE','Service not provisioned for user'),(5,'AlreadyActive','PRV_PROVISION_ALREADY_ACTIVE','Service already active'),(6,'Pending','PRV_DELETE_PENDING','Delete Transaction is pending with subsystem'),(7,'Failed','PRV_DELETE_FAILED','Removal failed due to subsystem error'),(8,'Success','PRV_DELETE_SUCCESS','Successfully removed'); -/*!40000 ALTER TABLE `sbxstatus` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `send_sms_to_application` --- - -DROP TABLE IF EXISTS `send_sms_to_application`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `send_sms_to_application` ( - `sms_id` int(11) NOT NULL AUTO_INCREMENT, - `effect_date` date DEFAULT NULL, - `destination_address` varchar(255) DEFAULT NULL, - `message` varchar(255) DEFAULT NULL, - `sender_address` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`sms_id`), - KEY `FKEBE4BF499E083448` (`user_id`), - CONSTRAINT `FKEBE4BF499E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `send_sms_to_application` --- - -LOCK TABLES `send_sms_to_application` WRITE; -/*!40000 ALTER TABLE `send_sms_to_application` DISABLE KEYS */; -INSERT INTO `send_sms_to_application` VALUES (1,'2016-08-24','7555','Hello World','94773524308',1),(2,'2016-08-24','7555','Hello World','94773524308',1),(3,'2016-08-30','7555','Hello World','94773524308',1),(4,'2016-08-30','7555','Hello World','94773524308',1); -/*!40000 ALTER TABLE `send_sms_to_application` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sender_address` --- - -DROP TABLE IF EXISTS `sender_address`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sender_address` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `description` varchar(255) DEFAULT NULL, - `shortcode` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FKB79857EA9E083448` (`user_id`), - CONSTRAINT `FKB79857EA9E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sender_address` --- - -LOCK TABLES `sender_address` WRITE; -/*!40000 ALTER TABLE `sender_address` DISABLE KEYS */; -INSERT INTO `sender_address` VALUES (1,'test number','7555',1); -/*!40000 ALTER TABLE `sender_address` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sms` --- - -DROP TABLE IF EXISTS `sms`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sms` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `deliveryStatus` varchar(255) DEFAULT NULL, - `maxNotifications` varchar(255) DEFAULT NULL, - `notificationDelay` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK1BD599E083448` (`user_id`), - CONSTRAINT `FK1BD599E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sms` --- - -LOCK TABLES `sms` WRITE; -/*!40000 ALTER TABLE `sms` DISABLE KEYS */; -/*!40000 ALTER TABLE `sms` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sms_delivery_status` --- - -DROP TABLE IF EXISTS `sms_delivery_status`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sms_delivery_status` ( - `transaction_id` varchar(255) NOT NULL, - `sender_address` varchar(255) DEFAULT NULL, - `delivery_status` varchar(255) DEFAULT NULL, - `effect_date` date DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`transaction_id`), - KEY `FK_sycg0sik20gocmm2v5oqwh2o8` (`user_id`), - CONSTRAINT `FK_sycg0sik20gocmm2v5oqwh2o8` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sms_delivery_status` --- - -LOCK TABLES `sms_delivery_status` WRITE; -/*!40000 ALTER TABLE `sms_delivery_status` DISABLE KEYS */; -INSERT INTO `sms_delivery_status` VALUES ('smstran-1','tel:7555','DeliveredToTerminal','2016-08-24',1),('smstran-12','tel:7555','DeliveredToTerminal','2016-08-30',1),('smstran-13','tel:7555','DeliveredToTerminal','2016-08-30',1),('smstran-14','tel:7555','DeliveredToTerminal','2016-08-30',1),('smstran-15','tel:7555','DeliveredToTerminal','2016-08-30',1),('smstran-16','tel:7555','DeliveredToTerminal','2016-08-30',1),('smstran-17','tel:7555','DeliveredToTerminal','2016-08-30',1),('smstran-4','tel:7555','DeliveredToTerminal','2016-08-24',1),('smstran-6','tel:7555','DeliveredToTerminal','2016-08-24',1),('smstran-8','tel:7555','DeliveredToTerminal','2016-08-30',1); -/*!40000 ALTER TABLE `sms_delivery_status` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sms_delivery_subscription` --- - -DROP TABLE IF EXISTS `sms_delivery_subscription`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sms_delivery_subscription` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_id` int(11) DEFAULT NULL, - `sender_address` varchar(225) DEFAULT NULL, - `sub_status` int(11) NOT NULL DEFAULT '0', - `notify_url` varchar(225) DEFAULT NULL, - `filter` varchar(225) DEFAULT NULL, - `callbackdata` varchar(225) DEFAULT NULL, - `clientcorrelator` varchar(225) DEFAULT NULL, - `request` longtext, - PRIMARY KEY (`id`), - KEY `FK_adwhr1k8dr8pdh9osopmeg6b6` (`user_id`), - CONSTRAINT `FK_adwhr1k8dr8pdh9osopmeg6b6` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sms_delivery_subscription` --- - -LOCK TABLES `sms_delivery_subscription` WRITE; -/*!40000 ALTER TABLE `sms_delivery_subscription` DISABLE KEYS */; -/*!40000 ALTER TABLE `sms_delivery_subscription` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `sms_subscription` --- - -DROP TABLE IF EXISTS `sms_subscription`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `sms_subscription` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `sub_number` varchar(255) DEFAULT NULL, - `sub_status` int(11) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FKA48A3E439E083448` (`user_id`), - CONSTRAINT `FKA48A3E439E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `sms_subscription` --- - -LOCK TABLES `sms_subscription` WRITE; -/*!40000 ALTER TABLE `sms_subscription` DISABLE KEYS */; -/*!40000 ALTER TABLE `sms_subscription` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `smsparam` --- - -DROP TABLE IF EXISTS `smsparam`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `smsparam` ( - `ID` int(11) NOT NULL AUTO_INCREMENT, - `deliveryStatus` varchar(45) DEFAULT NULL, - `maxNotifications` varchar(11) DEFAULT NULL, - `notificationDelay` varchar(11) DEFAULT NULL, - `userid` int(11) DEFAULT NULL, - `created` varchar(255) DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastupdated` varchar(255) DEFAULT NULL, - `lastupdated_date` datetime DEFAULT NULL, - PRIMARY KEY (`ID`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `smsparam` --- - -LOCK TABLES `smsparam` WRITE; -/*!40000 ALTER TABLE `smsparam` DISABLE KEYS */; -INSERT INTO `smsparam` VALUES (1,'DeliveredToTerminal','1000','10',1,NULL,NULL,NULL,NULL),(2,'DeliveredToTerminal','1000','10',2,NULL,NULL,NULL,NULL),(3,'DeliveredToTerminal','1000','10',3,NULL,NULL,NULL,NULL),(4,'DeliveredToTerminal','1000','10',4,NULL,NULL,NULL,NULL),(5,'DeliveredToTerminal','1000','10',5,NULL,NULL,NULL,NULL); -/*!40000 ALTER TABLE `smsparam` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `smstransactionlog` --- - -DROP TABLE IF EXISTS `smstransactionlog`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `smstransactionlog` ( - `sms_id` int(11) NOT NULL AUTO_INCREMENT, - `effect_date` date DEFAULT NULL, - `addresses` varchar(255) DEFAULT NULL, - `callback_data` varchar(255) DEFAULT NULL, - `client_correlator` varchar(255) DEFAULT NULL, - `message` varchar(255) DEFAULT NULL, - `notify_url` varchar(255) DEFAULT NULL, - `sender_address` varchar(255) DEFAULT NULL, - `sender_name` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - `batchsize` int(11) DEFAULT NULL, - `criteria` varchar(255) DEFAULT NULL, - `notificationFormat` varchar(255) DEFAULT NULL, - `trnstatus` varchar(255) DEFAULT NULL, - `transaction_id` varchar(255) DEFAULT NULL, - `request_id` varchar(255) DEFAULT NULL, - `txntype` int(11) DEFAULT NULL, - PRIMARY KEY (`sms_id`), - KEY `FK2A1D0F729E083448` (`user_id`), - CONSTRAINT `FK2A1D0F729E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `smstransactionlog` --- - -LOCK TABLES `smstransactionlog` WRITE; -/*!40000 ALTER TABLE `smstransactionlog` DISABLE KEYS */; -INSERT INTO `smstransactionlog` VALUES (1,'2016-08-24','[tel:+94773524308]','some-data-useful-to-the-requester','123456:1472042340971SM11001','Test1','http://application.example.com/notifications/DeliveryInfoNotification','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-1',NULL,1),(2,'2016-08-24',NULL,NULL,NULL,NULL,NULL,'7555',NULL,1,2,NULL,NULL,'success',NULL,NULL,2),(3,'2016-08-24',NULL,NULL,NULL,NULL,NULL,'tel:7555',NULL,1,0,NULL,NULL,'success',NULL,'smstran-1',5),(4,'2016-08-24','[tel:+94773524308]','some-data-useful-to-the-requester','123456:1472042912982SM11002','Test1','http://application.example.com/notifications/DeliveryInfoNotification','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-4',NULL,1),(5,'2016-08-24',NULL,'doSomething()',NULL,NULL,'http://www.yoururl.here/notifications/DeliveryInfoNotification','7555',NULL,1,0,'Vote','JSON','success',NULL,NULL,3),(6,'2016-08-24','[tel:+94773524308]','some-data-useful-to-the-requester','123456:1472043111467SM11003','Test1','http://application.example.com/notifications/DeliveryInfoNotification','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-6',NULL,1),(7,'2016-08-24',NULL,NULL,NULL,NULL,NULL,'tel:7555',NULL,1,0,NULL,NULL,'success',NULL,'smstran-6',5),(8,'2016-08-30','[tel:+94773524308]','some-data-useful-to-the-requester','123456:1472555967935SM11002','Hello World','http://application.example.com/notifications/DeliveryInfoNotification','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-8',NULL,1),(9,'2016-08-30',NULL,NULL,NULL,NULL,NULL,'tel:7555',NULL,1,0,NULL,NULL,'success',NULL,'smstran-8',5),(10,'2016-08-30',NULL,NULL,NULL,NULL,NULL,'7555',NULL,1,1,NULL,NULL,'success',NULL,NULL,2),(11,'2016-08-30',NULL,NULL,NULL,NULL,NULL,'7555',NULL,1,2,NULL,NULL,'success',NULL,NULL,2),(12,'2016-08-30','[tel:+94773524308]','some-data-useful-to-the-requester','123456:1472556483791SM11003','Test1','http://application.example.com/notifications/DeliveryInfoNotification','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-12',NULL,1),(13,'2016-08-30','[tel:+94773524308]','some-data-useful-to-the-requester','123456:1472557262623SM11004','Hello World','http://application.example.com/notifications/DeliveryInfoNotification','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-13',NULL,1),(14,'2016-08-30','[tel:+94773524308]','some-data-useful-to-the-requester','123456:1472557268910SM11005','Hello World','http://application.example.com/notifications/DeliveryInfoNotification','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-14',NULL,1),(15,'2016-08-30','[tel:+94773524308]','some-data-useful-to-the-requester','123456:1472557601440SM11006','Hello World','http://application.example.com/notifications/DeliveryInfoNotification','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-15',NULL,1),(16,'2016-08-30','[tel:+94773524308]','some-data-useful-to-the-requester','1234567890:1472557624395SM11007','Hello World','http://application.example.com/notifications/DeliveryInfoNotification','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-16',NULL,1),(17,'2016-08-30','[tel:+94773524308]','some-data-useful-to-the-requester','1234567890:1472557645748SM11008','Hello World','http://application.example.com/notifications/DeliveryInfoNotification/Test','tel:7555',NULL,1,0,NULL,NULL,'success','smstran-17',NULL,1); -/*!40000 ALTER TABLE `smstransactionlog` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `subscribe_sms_request` --- - -DROP TABLE IF EXISTS `subscribe_sms_request`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `subscribe_sms_request` ( - `subscribe_id` int(11) NOT NULL AUTO_INCREMENT, - `effect_date` date DEFAULT NULL, - `callback_data` varchar(255) DEFAULT NULL, - `client_correlator` varchar(255) DEFAULT NULL, - `criteria` varchar(255) DEFAULT NULL, - `destination_address` varchar(255) DEFAULT NULL, - `notification_format` varchar(255) DEFAULT NULL, - `notify_url` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`subscribe_id`), - KEY `FKC8368A349E083448` (`user_id`), - CONSTRAINT `FKC8368A349E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `subscribe_sms_request` --- - -LOCK TABLES `subscribe_sms_request` WRITE; -/*!40000 ALTER TABLE `subscribe_sms_request` DISABLE KEYS */; -INSERT INTO `subscribe_sms_request` VALUES (1,'2016-08-24','doSomething()','12345','Vote','7555','JSON','http://www.yoururl.here/notifications/DeliveryInfoNotification',1); -/*!40000 ALTER TABLE `subscribe_sms_request` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `user` --- - -DROP TABLE IF EXISTS `user`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `user` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `user_name` varchar(255) DEFAULT NULL, - `user_status` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UK_lqjrcobrh9jc8wpcar64q1bfh` (`user_name`) -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `user` --- - -LOCK TABLES `user` WRITE; -/*!40000 ALTER TABLE `user` DISABLE KEYS */; -INSERT INTO `user` VALUES (1,'admin',1),(2,'AuxWithoutAggregate',1),(3,'AuxTestUser',1),(4,'AuxLogoutUser',1),(5,'AutInvSP1',1); -/*!40000 ALTER TABLE `user` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `ussd_subscription` --- - -DROP TABLE IF EXISTS `ussd_subscription`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `ussd_subscription` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `callbackData` varchar(255) DEFAULT NULL, - `clientCorrelator` varchar(255) DEFAULT NULL, - `created_date` date DEFAULT NULL, - `destinationAddress` varchar(255) DEFAULT NULL, - `effect_date` date DEFAULT NULL, - `notifyUrl` varchar(255) DEFAULT NULL, - `resourceUrl` varchar(255) DEFAULT NULL, - `subscriptionId` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - `subStatus` int(11) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_ec81kos30iygc5p1gcfq0m9md` (`user_id`), - CONSTRAINT `FK_ec81kos30iygc5p1gcfq0m9md` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `ussd_subscription` --- - -LOCK TABLES `ussd_subscription` WRITE; -/*!40000 ALTER TABLE `ussd_subscription` DISABLE KEYS */; -/*!40000 ALTER TABLE `ussd_subscription` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `ussd_transactions` --- - -DROP TABLE IF EXISTS `ussd_transactions`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `ussd_transactions` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `actionStatus` int(11) NOT NULL, - `address` varchar(255) DEFAULT NULL, - `callbackData` varchar(255) DEFAULT NULL, - `clientCorrelator` varchar(255) DEFAULT NULL, - `effect_date` date DEFAULT NULL, - `keyword` varchar(255) DEFAULT NULL, - `message` varchar(255) DEFAULT NULL, - `notifyUrl` varchar(255) DEFAULT NULL, - `sessionId` varchar(255) DEFAULT NULL, - `shortCode` varchar(255) DEFAULT NULL, - `ussdAction` varchar(255) DEFAULT NULL, - `user_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_f6e3wvsa0gqeft93d6r8uo4qx` (`user_id`), - CONSTRAINT `FK_f6e3wvsa0gqeft93d6r8uo4qx` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `ussd_transactions` --- - -LOCK TABLES `ussd_transactions` WRITE; -/*!40000 ALTER TABLE `ussd_transactions` DISABLE KEYS */; -/*!40000 ALTER TABLE `ussd_transactions` ENABLE KEYS */; -UNLOCK TABLES; -/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; - -/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; -/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; -/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; -/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; -/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; - --- Dump completed on 2016-09-15 11:06:21 From ce27f9c022f794a75f5a82f478fb9e4659d8abeb Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Thu, 16 Mar 2017 16:26:38 +0530 Subject: [PATCH 087/112] Update Readme.md --- dep-sandbox/README.md | 380 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 379 insertions(+), 1 deletion(-) diff --git a/dep-sandbox/README.md b/dep-sandbox/README.md index a34fcf28..06544ce2 100644 --- a/dep-sandbox/README.md +++ b/dep-sandbox/README.md @@ -120,7 +120,7 @@ Please use header key as "sandbox" and value as username to invoke below given r - Manage Numbers -This servivce is used to define user specific number for sandbox usage. +This service is used to define user specific number for sandbox usage. Request : @@ -1411,6 +1411,384 @@ Response : ``` +###6.7 SMS Service + +####6.7.1 Introduction + +SMS service will provide the Service providers a list of SMS services. Basically SMS API supports 7 operations. + +- Send SMS - Used to send an SMS from a Web Application (to one or more mobile terminals). +- Query the delivery status of a SMS - Query the delivery status of an SMS which has been sent from your Web application. +- Subscribe to SMS delivery notifications - Start subscribing to delivery status notifications for all your sent SMS. +- Stop the subscription to delivery notifications - Stop subscribing to delivery status notifications for all your sent SMS. +- Receiving SMS - Retrieve SMS sent to your Web application. +- Subscribe to notifications of messages sent to your application - Subscribe to notifications for SMS messages sent to your Web application. +- Stop the subscription to message notifications - Stop subscribing to notifications for SMS messages sent to your Web application. + +####6.6.2 API features with postman testing + + + +- Send SMS - Used to send an SMS from a Web Application (to one or more mobile terminals). + +Request : + +Type - POST + +Request URI: +``` +http://:/smsmessaging/v1_2/outbound/{Short Code}/requests +``` + +Request Body : + +``` +{ + "outboundSMSMessageRequest":{ + "address":[ + "tel:+94770000976", + "tel:+94770000977" + ], + "senderAddress":"tel:12345678", + "outboundSMSTextMessage":{ + "message":"Hello World" + }, + "clientCorrelator":"123456:AIN12345", + "receiptRequest":{ + "notifyURL":"http://application.example.com/notiications/DeliveryInfoNotication", + "callbackData":"some-data-useful-to-the-requester" + }, + "senderName":"ACME Inc." + } +} +``` + +Response : + +``` +{ + "outboundSMSMessageRequest":{ + "address":[ + "tel:+94770000976", + "tel:+94770000977" + ], + "deliveryInfoList":{ + "deliveryInfo":[ + { + "address":"tel:+94770000976", + "deliveryStatus":"MessageWaiting" + }, + { + "address":"tel:+94770000977", + "deliveryStatus":"MessageWaiting" + } + ], + "resourceURL":"/tel:+12345678 /requests/600022/deliveryInfos " + }, + "senderAddress":"tel:12345678", + "outboundSMSTextMessage":{ + "message":"Hello World" + }, + "clientCorrelator":"123456: AIN12345", + "receiptRequest":{ + "notifyURL":"http://application.example.com/notifications/DeliveryInfoNotification", + "callbackData":"some-data-useful-to-the-requester" + }, + "senderName":"ACME Inc.", + "resourceURL":"/tel:+12345678/requests/abc123 " + } +} +``` + + +Response : +201 CREATED will be returned if the service is successful. +Unless 400 Bad Request will be returned + + +- Query the delivery status of a SMS - Query the delivery status of an SMS which has been sent from your Web application. + +Request : + +Type - GET + +Request URI: +``` +http://:/smsmessaging/v1_2/outbound/{senderAddress}/requests/{requestId}/deliveryInfos +``` + + +Response : + +``` +{ + "deliveryInfoList":{ + "deliveryInfo":[ + { + "address":"tel:+94770000976", + "deliveryStatus":"MessageWaiting" + }, + { + "address":"tel:+94770000977", + "deliveryStatus":"MessageWaiting" + } + ], + "resourceURL":"/tel%3A%2B12345678/requests/abc123/deliveryInfos" + } +} +``` + + +Response : +200 OK will be returned if the service is successful. +Unless 400 Bad Request will be returned + + +- Subscribe to SMS delivery notifications - Start subscribing to delivery status notifications for all your sent SMS. + +Request : + +Type - POST + +Request URI: +``` +http://:/smsmessaging/v1_2/outbound/{Short Code}/subscriptions +``` + +Request Body : + +``` +{ + "deliveryReceiptSubscription":{ + "callbackReference":{ + "callbackData":"some-data-useful-to-the-requester ", + "notifyURL":" http://www.yoururl.here/notifications/DeliveryInfoNotification" + }, + "filterCriteria":"some-meaningful-filter-string" + } +} +``` + +Response : + +``` +{ + "deliveryReceiptSubscription":{ + "callbackReference":{ + "callbackData":" some-data-useful-to-the-requester ", + "notifyURL":" http://www.yoururl.here/notifications/DeliveryInfoNotification" + }, + "filterCriteria":"some-meaningful-filter-string", + "resourceURL":"https: ///outbound/subscription/sub789" + } +} +``` + +Response : +200 OK will be returned if the service is successful. +Unless 400 Bad Request will be returned + + + +- Stop the subscription to delivery notifications - Stop subscribing to delivery status notifications for all your sent SMS. + +Request : + +Type - DELETE + +Request URI: +``` +http://:/smsmessaging/v1_2/outbound/{senderAddress}/subscription/{subscriptionID} +``` + + +Response : +204 DELETED will be returned if the service is successful. +Unless 400 Bad Request will be returned + + + +- Receiving SMS - Retrieve SMS sent to your Web application. + +Request : + +Type - GET + +Request URI: +``` +http://:/smsmessaging/v1_2/inbound/registrations/{registrationId}/messages?maxBatchSize=2 +``` + +Response : + +``` +{ + "inboundSMSMessageList":{ + "inboundSMSMessage":[ + { + "dateTime":"2009-11-19T12:00:00", + "destinationAddress":"3456", + "messageId":"msg1", + "message":"Come on Barca!", + "resourceURL":"/3456/messages/msg1", + "senderAddress":"+947725123456" + }, + { + "dateTime":"2009-11-19T12:00:00", + "destinationAddress":"3456", + "messageId":"msg2", + "message":"Great goal by Messi", + "resourceURL":"/3456/messages/msg2", + "senderAddress":"+12345678012" + } + ], + "numberOfMessagesInThisBatch":"2", + "resourceURL":"/3456/messages", + "totalNumberOfPendingMessages":"20" + } +} +``` +Response : +200 OK will be returned if the service is successful. +Unless 400 Bad Request will be returned + + +- Subscribe to notifications of messages sent to your application - Subscribe to notifications for SMS messages sent to your Web application. + +Request : + +Type - POST + +Request URI: +``` +http://:/smsmessaging/v1_2//inbound/subscriptions +``` + +Request Body : + +``` +{ + "subscription":{ + "callbackReference":{ + "callbackData":"doSomething()", + "notifyURL":"http://www.yoururl.here/notifications/DeliveryInfoNotification" + }, + "criteria":"Vote", + "destinationAddress":"3456", + "notificationFormat":"JSON", + "clientCorrelator":"123456:AIN12345" + } +} +``` + +Response : + +``` +{ + "subscription":{ + "callbackReference":{ + "callbackData":"doSomething()", + "notifyURL":"http://www.yoururl.here/noti:cations/DeliveryInfoNoti:cation" + }, + "criteria":"Vote", + "destinationAddress":"3456", + "noti:cationFormat":"JSON", + "clientCorrelator":"123456:AIN12345", + "resourceURL":"/sub678" + } +} +``` + +Response : +201 CREATED will be returned if the service is successful. +Unless 400 Bad Request will be returned + + +- Stop the subscription to message notifications - Stop subscribing to notifications for SMS messages sent to your Web application. + +Request : + +Type - DELETE + +Request URI: +``` +http://:/smsmessaging/v1_2/inbound/subscriptions/{subscriptionID} +``` + +Response : +204 DELETED will be returned if the service is successful. +Unless 400 Bad Request will be returned + + +###6.8 USSD Service + +####6.8.1 Introduction + +USSD service will provide the Service providers a list of USSD services. Basically USSD API supports 1 operations. + +- Initiating Mobile Terminated USSD (NI USSD/ MT) - Initiates a USSD session with the intended end user. This request would pop up a USSD menu on the end users device. + + +####6.8.2 API features with postman testing + + +- Initiating Mobile Terminated USSD (NI USSD/ MT) - Initiates a USSD session with the intended end user. This request would pop up a USSD menu on the end users device. + +Request : + +Type - POST + +Request URI: +``` +http://://ussd/v1/outbound/{msisdn} +``` + +Request Body : + +``` +{ + "outboundUSSDMessageRequest":{ + "address":"tel:+123456789", + "shortCode":"tel:1234", + "keyword":"123", + "outboundUSSDMessage":"Login to service?\n1. Ok\n2. Cancel", + "clientCorrelator":"123456:AIN12345", + "responseRequest":{ + "notifyURL":"http://ussd.response.receive.url ", + "callbackData":"some-data-useful-to-the-requester" + }, + "ussdAction":"mtinit" + } +} +``` + +Response : + +``` +{ + "outboundUSSDMessageRequest":{ + "address":" tel:+123456789", + "keyword":"123", + "shortCode":"tel:1721", + "outboundUSSDMessage":" Login to service?\n1. Ok\n2. Cancel ", + "clientCorrelator":"123456:AIN12345", + "responseRequest":{ + "notifyURL":"http://ussd.response.receive.url ", + "callbackData":"some-data-useful-to-the-requester" + }, + "ussdAction":"mtinit", + "deliveryStatus":"SENT" + } +} +``` + + +Response : +201 CREATED will be returned if the service is successful. +Unless 400 Bad Request will be returned + + + ##7 Supported API Versions ###7.1 Payment Service From 804312745fc5fe859d5865545a5f10c5ea75d505 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Fri, 17 Mar 2017 13:49:55 +0530 Subject: [PATCH 088/112] Update DB Script and Implement Config Service for USSD --- ...-sandbox1_6_0.sql => dep-sandbox1_7_0.sql} | 5 +- .../dbscripts/migration1_5_0to1_6_0.sql | 12 -- .../dbscripts/migration1_6_0to1_7_0.sql | 18 +++ .../services/dep/sandbox/dao/USSDDAO.java | 1 + .../dao/hibernate/HibernateUSSDDAO.java | 24 +++ .../dep/sandbox/service/Application.java | 1 + .../service/USSSDConfigurationService.java | 91 ++++++++++++ .../servicefactory/RequestBuilderFactory.java | 9 +- .../location/LocationRequestHandler.java | 2 +- .../gateway/ReceivingSMSHandler.java | 6 +- .../gateway/SendMTSMSService.java | 6 +- ...ubscriptionMessageNotificationHandler.java | 5 + ...scribeApplicationNotificationsHandler.java | 6 +- .../ussd/USSDApplicationConfigHandler.java | 137 ++++++++++++++++++ .../USSDApplicationConfigRequestBean.java | 48 ++++++ .../USSDApplicationConfigRequestWrapper.java | 32 ++++ .../USSDApplicationConfigResponseWrapper.java | 43 ++++++ .../ussd/USSDConfigServiceFactory.java | 41 ++++++ .../dep/sandbox/util/RequestType.java | 2 +- 19 files changed, 468 insertions(+), 21 deletions(-) rename dep-sandbox/dbscripts/{dep-sandbox1_6_0.sql => dep-sandbox1_7_0.sql} (98%) delete mode 100644 dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql create mode 100644 dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSSDConfigurationService.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigHandler.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigRequestBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigRequestWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigResponseWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDConfigServiceFactory.java diff --git a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql similarity index 98% rename from dep-sandbox/dbscripts/dep-sandbox1_6_0.sql rename to dep-sandbox/dbscripts/dep-sandbox1_7_0.sql index 83e16cfa..3aa938ef 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_6_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql @@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS `sbxapitypes` ( -- Dumping data for table `sbxapitypes` -- -INSERT INTO `sbxapitypes` VALUES (1,'LOCATION'),(2,'SMS'),(3,'USSD'),(4,'PAYMENT'),(5,'CREDIT'),(6,'WALLET'),(7,'PROVISIONING'),(8,'CUSTOMERINFO'); +INSERT INTO `sbxapitypes` VALUES (1,'LOCATION'),(2,'SMSMESSAGING'),(3,'USSD'),(4,'PAYMENT'),(5,'CREDIT'),(6,'WALLET'),(7,'PROVISIONING'),(8,'CUSTOMERINFO'); -- @@ -49,7 +49,8 @@ CREATE TABLE IF NOT EXISTS `sbxapiservicecalls` ( -- Dumping data for table `sbxapiservicecalls` -- -INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'),(13,1,'Location'); +INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'),(13,1,'Location'),(14,3,'InitUSSD'),(15,2,'SendSMS'),(16,2,'ReceivingSMS'),(17,2,'QuerySMS'),(18,2,'SubscribeToSMSDelivery'),(19,2,'SubscribeToApplication'),(20,2,'StopSubscriptionDelivery'),(21,2,'StopSubscribeToApplication'); + diff --git a/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql b/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql deleted file mode 100644 index e4da4331..00000000 --- a/dep-sandbox/dbscripts/migration1_5_0to1_6_0.sql +++ /dev/null @@ -1,12 +0,0 @@ -USE `sandbox`; - -INSERT INTO `sbxapiservicecalls` VALUES (10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'),(13,1,'Location'); - -INSERT INTO `sbxattribute` VALUES (29,'patialRefund'),(30,'makePayment'),(31,'clientCorrelatorPayment'),(32,'referenceCodePayment'),(33,'refundUser'); - -INSERT INTO `sbtattributedistribution` VALUES (32,29,9),(33,26,9),(34,25,9),(35,30,10),(36,31,10),(37,32,10),(38,33,11),(39,31,11),(40,32,11); - -ALTER TABLE `sbtmessagelog` ADD ( -`status` int(11) DEFAULT 0, - `type` int(11) DEFAULT 0 - ); \ No newline at end of file diff --git a/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql b/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql new file mode 100644 index 00000000..bc8d2836 --- /dev/null +++ b/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql @@ -0,0 +1,18 @@ +USE `sandbox`; + +INSERT INTO `sbxapiservicecalls` VALUES (14,3,'InitUSSD'),(15,2,'SendSMS'),(16,2,'ReceivingSMS'),(17,2,'QuerySMS'),(18,2,'SubscribeToSMSDelivery'),(19,2,'SubscribeToApplication'),(20,2,'StopSubscriptionDelivery'),(21,2,'StopSubscribeToApplication'); + +UPDATE `sbxapitypes` SET `apiname`='SMSMESSAGING' WHERE `id`='2'; + + +CREATE TABLE IF NOT EXISTS `ussd_applications` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `userid` int(11) NOT NULL, + `shortCode` varchar(255) NOT NULL, + `keyword` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`), + CONSTRAINT `fk01ussd_application` FOREIGN KEY (`userid`) REFERENCES `user` (`id`) +); + + + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java index 78b9e69e..c61df4c3 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java @@ -23,5 +23,6 @@ public interface USSDDAO { List getUssdApplications(int userid, String shortCode, String keyWord); + boolean saveUSSDApplications(String shortCode,String keyWord, int userId) throws Exception; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java index 9644a0c8..13f061f1 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java @@ -21,6 +21,7 @@ import org.hibernate.Session; import org.hibernate.query.Query; +import javax.persistence.NoResultException; import java.util.*; public class HibernateUSSDDAO extends AbstractDAO implements USSDDAO { @@ -66,4 +67,27 @@ public List getUssdApplications(int userid, String shortCode, S return appdistributionList; } + + @Override + public boolean saveUSSDApplications(String shortCode, String keyWord, int userId) throws Exception { + + UssdApplication application = new UssdApplication(); + application.setShortCode(shortCode); + application.setKeyword(keyWord); + application.setUserid(userId); + + try { + Session session = getSession(); + session.save(application); + + } catch (NoResultException e) { + return false; + + } catch (Exception ex) { + LOG.error("###USSD Config### Error in USSD Config Service ", ex); + throw ex; + } + return true; + + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index d33e225e..e2fe97ab 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -41,6 +41,7 @@ protected List getRestFulComponents() { listOfObject.add(new PaymentService_v1_3()); listOfObject.add(new LocationService()); listOfObject.add(new USSDService()); + listOfObject.add(new USSSDConfigurationService()); if(getBehaveType().equals("Hub")){ diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSSDConfigurationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSSDConfigurationService.java new file mode 100644 index 00000000..a5c3a3f6 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSSDConfigurationService.java @@ -0,0 +1,91 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ + +package com.wso2telco.services.dep.sandbox.service; + +import com.wordnik.swagger.annotations.*; +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.exception.SandboxException; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.ussd.USSDApplicationConfigRequestBean; +import com.wso2telco.services.dep.sandbox.servicefactory.ussd.USSDApplicationConfigRequestWrapper; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + +@Path("/ussd/{v1}/config") +@Consumes({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN }) +@Produces({ MediaType.APPLICATION_JSON }) +@Api(value = "/ussd/{v1}/config", description = "Rest Services for USSD API related Configurations") +public class USSSDConfigurationService { + + + Log log = LogFactory.getLog(USSSDConfigurationService.class); + + @POST + @Path("/addApplicationInfo") + @ApiOperation(value = "addApplicationInfo", notes = "Add new application for ussd", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "username", required = true, dataType = "string", paramType = "header") }) + public Response addAccountInfo( + USSDApplicationConfigRequestBean ussdApplicationConfigRequestBean, @Context HttpServletRequest request) { + + USSDApplicationConfigRequestWrapper requestDTO = new USSDApplicationConfigRequestWrapper(); + requestDTO.setHttpRequest(request); + requestDTO.setUssdApplicationConfigRequestBean(ussdApplicationConfigRequestBean); + requestDTO.setRequestType(RequestType.USSDCONFIG); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + log.error("###USSD### Error in USSD Configuration add Application info service", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + } + + + + + + + + + + + + + +} + + + + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java index 5f1cfc8e..65609c22 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java @@ -1,5 +1,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory; +import com.wso2telco.services.dep.sandbox.servicefactory.ussd.USSDConfigServiceFactory; import com.wso2telco.services.dep.sandbox.servicefactory.ussd.USSDRequestFactory; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -78,7 +79,13 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { LOG.debug("LOADING WALLET CONFIGURATION FACTORY"); requestHandler = WalletConfigServiceFactory.getInstance(requestDTO); break; - default: + + case USSDCONFIG: + LOG.debug("LOADING USSD CONFIGURATION FACTORY"); + requestHandler = USSDConfigServiceFactory.getInstance(requestDTO); + break; + + default: LOG.debug("APPROPIATE FACTORY CLASS NOT FOUND"); break; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java index 0a2e2280..ce9944ed 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java @@ -114,7 +114,7 @@ protected Returnable process(LocationRequestWrapperDTO extendedRequestDTO) throw objTerminalLocationList.setTerminalLocation(objTerminalLocation); responseWrapperDTO.setTerminalLocationList(objTerminalLocationList); - responseWrapperDTO.setHttpStatus(Status.OK); + responseWrapperDTO.setHttpStatus(Status.CREATED); } else if (locparam.getLocationRetrieveStatus().equals("Error")) { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java index 8eb5fb0d..5946e9c4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/ReceivingSMSHandler.java @@ -81,7 +81,6 @@ protected boolean validate(ReceivingSMSRequestWrapperGateway wrapperDTO) throws LOG.error("###SMS### Error in Validations. ", ex); responseWrapper.setRequestError( constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); return false; } return true; @@ -90,6 +89,11 @@ protected boolean validate(ReceivingSMSRequestWrapperGateway wrapperDTO) throws @Override protected Returnable process(ReceivingSMSRequestWrapperGateway extendedRequestDTO) throws Exception { + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + try { String registrationId = extendedRequestDTO.getRegistrationID(); int maxBatchSize = extendedRequestDTO.getMaxBatchSize(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java index 6feb43d4..67b03941 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java @@ -106,7 +106,6 @@ protected boolean validate(SendMTSMSRequestWrapperDTOGateway wrapperDTO) throws LOG.error("###SMS### Error in Validations. ", ex); responseWrapper.setRequestError( constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); return false; } return true; @@ -115,7 +114,10 @@ protected boolean validate(SendMTSMSRequestWrapperDTOGateway wrapperDTO) throws @Override protected Returnable process(SendMTSMSRequestWrapperDTOGateway extendedRequestDTO) throws Exception { - + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } try { User user = extendedRequestDTO.getUser(); SMSMessagingParam smsMessagingParam = smsMessagingDAO.getSMSMessagingParam(user.getId()); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationHandler.java index d2fab446..5b945429 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/StopSubscriptionMessageNotificationHandler.java @@ -85,6 +85,11 @@ protected boolean validate(StopSubscriptionMessageNotificationRequestWrapper wra @Override protected Returnable process(StopSubscriptionMessageNotificationRequestWrapper extendedRequestDTO) throws Exception { + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + String subscriptionID = extendedRequestDTO.getSubscriptionID(); APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java index 4ec0b528..3fd16a5e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java @@ -106,7 +106,6 @@ protected boolean validate(SubscribeApplicationNotificationsRequestWrapperGatewa LOG.error("###SMS### Error in Validations. ", ex); responseWrapper.setRequestError( constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); return false; } return true; @@ -116,6 +115,11 @@ protected boolean validate(SubscribeApplicationNotificationsRequestWrapperGatewa protected Returnable process(SubscribeApplicationNotificationsRequestWrapperGateway extendedRequestDTO) throws Exception { + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + try { User user = extendedRequestDTO.getUser(); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigHandler.java new file mode 100644 index 00000000..71ff2d0c --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigHandler.java @@ -0,0 +1,137 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.ussd; + + +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.USSDDAO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.AddressIgnorerable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.util.CommonUtil; +import org.apache.commons.logging.LogFactory; + +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.List; + +public class USSDApplicationConfigHandler extends AbstractRequestHandler + implements AddressIgnorerable { + + + private USSDApplicationConfigRequestWrapper requestWrapper; + private USSDApplicationConfigResponseWrapper responseWrapper; + private USSDDAO ussdDAO; + + { + LOG = LogFactory.getLog(USSDApplicationConfigHandler.class); + ussdDAO = DaoFactory.getUSSDDAO(); + } + + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + return null; + } + + @Override + protected boolean validate(USSDApplicationConfigRequestWrapper wrapperDTO) throws Exception { + + USSDApplicationConfigRequestBean requestBean = wrapperDTO.getUssdApplicationConfigRequestBean(); + + String shortCode = CommonUtil.getNullOrTrimmedValue(requestBean.getShortCode()); + String keyWord = CommonUtil.getNullOrTrimmedValue(requestBean.getKeyWord()); + int userId = Integer.parseInt(CommonUtil.getNullOrTrimmedValue(String.valueOf(requestBean.getUserID()))); + List validationRulesList = new ArrayList<>(); + + try { + validationRulesList + .add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "shortCode", shortCode)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "keyWord", keyWord)); + validationRulesList + .add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_INT_GE_ZERO, "userId", userId)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###WALLETCONFIG### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + return true; + } + + @Override + protected Returnable process(USSDApplicationConfigRequestWrapper extendedRequestDTO) throws Exception { + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + try { + USSDApplicationConfigRequestBean requestBean = extendedRequestDTO.getUssdApplicationConfigRequestBean(); + + String shortCode = requestBean.getShortCode(); + String keyword = requestBean.getKeyWord(); + int userId = requestBean.getUserID(); + + boolean result = ussdDAO.saveUSSDApplications(shortCode, keyword, userId); + + if (!result) { + LOG.error("###USSD CONFIG### Error occur in save applications"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Error occur in save applications")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + + } else { + responseWrapper.setStatus("Successful"); + responseWrapper.setHttpStatus(Response.Status.OK); + } + + } catch (Exception ex) { + + LOG.error("###USSD CONFIG### Error occur in save applications"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Error occur in save applications")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + + return responseWrapper; + + } + + @Override + protected void init(USSDApplicationConfigRequestWrapper extendedRequestDTO) throws Exception { + + requestWrapper = extendedRequestDTO; + responseWrapper = new USSDApplicationConfigResponseWrapper(); + + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigRequestBean.java new file mode 100644 index 00000000..dc985e1e --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigRequestBean.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.ussd; + + +public class USSDApplicationConfigRequestBean { + + private String shortCode; + private String keyWord; + private int userID; + + public String getShortCode() { + return shortCode; + } + + public void setShortCode(String shortCode) { + this.shortCode = shortCode; + } + + public String getKeyWord() { + return keyWord; + } + + public void setKeyWord(String keyWord) { + this.keyWord = keyWord; + } + + public int getUserID() { + return userID; + } + + public void setUserID(int userID) { + this.userID = userID; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigRequestWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigRequestWrapper.java new file mode 100644 index 00000000..bcede02c --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigRequestWrapper.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.ussd; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class USSDApplicationConfigRequestWrapper extends RequestDTO { + + private USSDApplicationConfigRequestBean ussdApplicationConfigRequestBean; + + public USSDApplicationConfigRequestBean getUssdApplicationConfigRequestBean() { + return ussdApplicationConfigRequestBean; + } + + public void setUssdApplicationConfigRequestBean(USSDApplicationConfigRequestBean ussdApplicationConfigRequestBean) { + this.ussdApplicationConfigRequestBean = ussdApplicationConfigRequestBean; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigResponseWrapper.java new file mode 100644 index 00000000..e9c09ffe --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigResponseWrapper.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.ussd; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class USSDApplicationConfigResponseWrapper extends AbstractReturnWrapperDTO { + private String status; + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public Object getResponse() { + + if (getRequestError() == null) { + return status; + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + } + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDConfigServiceFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDConfigServiceFactory.java new file mode 100644 index 00000000..3a15723f --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDConfigServiceFactory.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.ussd; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class USSDConfigServiceFactory { + + + private static Log LOG = LogFactory.getLog(USSDConfigServiceFactory.class); + + public static RequestHandleable getInstance(final RequestDTO requestDTO) { + + final String APPLICATION = "Application"; + + if (requestDTO.getRequestPath().contains(APPLICATION)) { + LOG.debug("LOADING APPLICATION SAVE SERVICE"); + return new USSDApplicationConfigHandler(); + } else + return null; + } + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/RequestType.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/RequestType.java index 46c5edfc..f6ede12a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/RequestType.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/RequestType.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.util; public enum RequestType { - SMSMESSAGING, PAYMENT, USSD, LOCATION, MOBILEID, PROVISIONING,PROVISIONINGCONFIG, USER, CUSTOMERINFO,CUSTOMERINFOCONFIG, CREDIT, WALLET, WALLETCONFIG; + SMSMESSAGING, PAYMENT, USSD, LOCATION, MOBILEID, PROVISIONING,PROVISIONINGCONFIG, USER, CUSTOMERINFO,CUSTOMERINFOCONFIG, CREDIT, WALLET, WALLETCONFIG, USSDCONFIG; } From c2a58dd3d196d56ed2784b388cfa92453ff50c62 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Fri, 17 Mar 2017 15:54:15 +0530 Subject: [PATCH 089/112] Implement config service for SMS --- .../dep/sandbox/dao/SMSMessagingDAO.java | 4 +- .../hibernate/HibernateSMSMessagingDAO.java | 20 ++- .../dep/sandbox/service/Application.java | 2 + .../service/SMSConfigurationService.java | 98 +++++++++++ .../servicefactory/RequestBuilderFactory.java | 6 +- .../RetrieveSMSMessagesService.java | 14 -- .../SMSParameterConfigRequestBean.java | 50 ++++++ .../SMSParameterConfigRequestWrapper.java | 33 ++++ .../SMSParameterConfigResponseWrapper.java | 43 +++++ .../SMSParameterInsertConfigHandler.java | 154 ++++++++++++++++++ .../smsmessaging/SMSRequestFactory.java | 32 +--- .../StopSubscribeToMONotificationService.java | 14 -- .../SubscribeToMONotificationService.java | 14 -- .../dep/sandbox/util/RequestType.java | 2 +- 14 files changed, 410 insertions(+), 76 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SMSConfigurationService.java delete mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/RetrieveSMSMessagesService.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigRequestBean.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigRequestWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigResponseWrapper.java create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterInsertConfigHandler.java delete mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/StopSubscribeToMONotificationService.java delete mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SubscribeToMONotificationService.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java index b158a308..6728b4ad 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/SMSMessagingDAO.java @@ -20,8 +20,6 @@ boolean saveDeliverySubscription(User userId, String sender_address, int sub_sta boolean removeSubscription(int userId, String senderAddress); public int saveSubscribeSMSRequest(SubscribeSMSRequest subscribeSMSRequest) throws Exception; public boolean removeSubscriptionToMessage(String subscriptionID) throws Exception; - - - + boolean saveSMSParameters(SMSMessagingParam messagingParam); } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java index c42bf424..efee7cb1 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateSMSMessagingDAO.java @@ -14,6 +14,8 @@ import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import javax.persistence.NoResultException; + class HibernateSMSMessagingDAO extends HibernateCommonDAO implements SMSMessagingDAO{ { @@ -187,8 +189,24 @@ public boolean removeSubscriptionToMessage(String subscriptionID) throws Excepti return isExists; } + @Override + public boolean saveSMSParameters(SMSMessagingParam messagingParam) { + try { + Session session = getSession(); + session.save(messagingParam); + + } catch (NoResultException e) { + return false; + + } catch (Exception ex) { + LOG.error("###SMS Config### Error in SMS Config Service ", ex); + throw ex; + } + return true; + } + - public boolean saveDeliverySubscription (User userId, String sender_address,int sub_status, String notify_url, + public boolean saveDeliverySubscription (User userId, String sender_address,int sub_status, String notify_url, String filter, String callbackData, String clinetCorrelator, String request){ diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java index e2fe97ab..bfa50787 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/Application.java @@ -42,6 +42,7 @@ protected List getRestFulComponents() { listOfObject.add(new LocationService()); listOfObject.add(new USSDService()); listOfObject.add(new USSSDConfigurationService()); + listOfObject.add(new SMSConfigurationService()); if(getBehaveType().equals("Hub")){ @@ -58,6 +59,7 @@ public static void main(String[] args) { try { new Application().run(args); } catch (Exception e) { + e.printStackTrace(); System.out.println("Unable to start the server " + e.getMessage()); } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SMSConfigurationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SMSConfigurationService.java new file mode 100644 index 00000000..ac2f57a7 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/SMSConfigurationService.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.service; + +import com.wordnik.swagger.annotations.Api; +import com.wordnik.swagger.annotations.ApiImplicitParam; +import com.wordnik.swagger.annotations.ApiImplicitParams; +import com.wordnik.swagger.annotations.ApiOperation; +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; +import com.wso2telco.services.dep.sandbox.exception.SandboxException; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestBuilderFactory; +import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.SMSParameterConfigRequestBean; +import com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging.SMSParameterConfigRequestWrapper; +import com.wso2telco.services.dep.sandbox.servicefactory.ussd.USSDApplicationConfigRequestBean; +import com.wso2telco.services.dep.sandbox.servicefactory.ussd.USSDApplicationConfigRequestWrapper; +import com.wso2telco.services.dep.sandbox.util.RequestType; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import javax.servlet.http.HttpServletRequest; +import javax.ws.rs.Consumes; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; + + +@Path("/sms/{v1}/config") +@Consumes({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN }) +@Produces({ MediaType.APPLICATION_JSON }) +@Api(value = "/sms/{v1}/config", description = "Rest Services for SMS API related Configurations") +public class SMSConfigurationService { + + Log log = LogFactory.getLog(SMSConfigurationService.class); + + @POST + @Path("/addSMSParameters") + @ApiOperation(value = "addApplicationInfo", notes = "Add new application for ussd", response = Response.class) + @ApiImplicitParams({ + @ApiImplicitParam(name = "sandbox", value = "username", required = true, dataType = "string", paramType = "header") }) + public Response addAccountInfo( + SMSParameterConfigRequestBean smsParameterConfigRequestBean, @Context HttpServletRequest request) { + + SMSParameterConfigRequestWrapper requestDTO = new SMSParameterConfigRequestWrapper(); + requestDTO.setHttpRequest(request); + requestDTO.setParameterConfigRequestBean(smsParameterConfigRequestBean); + requestDTO.setRequestType(RequestType.SMSCONFIG); + + RequestHandleable handler = RequestBuilderFactory.getInstance(requestDTO); + Returnable returnable = null; + + try { + returnable = handler.execute(requestDTO); + Response response = Response.status(returnable.getHttpStatus()).entity(returnable.getResponse()).build(); + return response; + } catch (Exception ex) { + log.error("###USSD### Error in USSD Configuration add Application info service", ex); + Response response = Response.status(Response.Status.BAD_REQUEST).entity( + SandboxException.SandboxErrorType.SERVICE_ERROR.getCode() + " " + SandboxException.SandboxErrorType.SERVICE_ERROR.getMessage()) + .build(); + return response; + } + } + + + + + + + + + + + + + + + + + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java index 65609c22..3590120c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestBuilderFactory.java @@ -79,12 +79,14 @@ public static RequestHandleable getInstance(final RequestDTO requestDTO) { LOG.debug("LOADING WALLET CONFIGURATION FACTORY"); requestHandler = WalletConfigServiceFactory.getInstance(requestDTO); break; - case USSDCONFIG: LOG.debug("LOADING USSD CONFIGURATION FACTORY"); requestHandler = USSDConfigServiceFactory.getInstance(requestDTO); break; - + case SMSCONFIG: + LOG.debug("LOADING SMS CONFIGURATION FACTORY"); + requestHandler = SMSRequestFactory.getInstance(requestDTO); + break; default: LOG.debug("APPROPIATE FACTORY CLASS NOT FOUND"); break; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/RetrieveSMSMessagesService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/RetrieveSMSMessagesService.java deleted file mode 100644 index 9408f367..00000000 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/RetrieveSMSMessagesService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; - -import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; - -public class RetrieveSMSMessagesService implements RequestHandleable{ - - @Override - public Returnable execute(RequestDTO requestDTO) throws Exception { - // TODO Auto-generated method stub - return null; - } -} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigRequestBean.java new file mode 100644 index 00000000..fccd6ea1 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigRequestBean.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; + +public class SMSParameterConfigRequestBean { + + + private String deliveryStatus; + private String maxNotifications; + private String notificationDelay; + + + public String getDeliveryStatus() { + return deliveryStatus; + } + + public void setDeliveryStatus(String deliveryStatus) { + this.deliveryStatus = deliveryStatus; + } + + public String getMaxNotifications() { + return maxNotifications; + } + + public void setMaxNotifications(String maxNotifications) { + this.maxNotifications = maxNotifications; + } + + public String getNotificationDelay() { + return notificationDelay; + } + + public void setNotificationDelay(String notificationDelay) { + this.notificationDelay = notificationDelay; + } + +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigRequestWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigRequestWrapper.java new file mode 100644 index 00000000..abe6f7bd --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigRequestWrapper.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; + +public class SMSParameterConfigRequestWrapper extends RequestDTO { + + private SMSParameterConfigRequestBean parameterConfigRequestBean; + + + public SMSParameterConfigRequestBean getParameterConfigRequestBean() { + return parameterConfigRequestBean; + } + + public void setParameterConfigRequestBean(SMSParameterConfigRequestBean parameterConfigRequestBean) { + this.parameterConfigRequestBean = parameterConfigRequestBean; + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigResponseWrapper.java new file mode 100644 index 00000000..7a330cd6 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterConfigResponseWrapper.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; + + +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; + +public class SMSParameterConfigResponseWrapper extends AbstractReturnWrapperDTO { + private String status; + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public Object getResponse() { + + if (getRequestError() == null) { + return status; + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + } + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterInsertConfigHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterInsertConfigHandler.java new file mode 100644 index 00000000..4dd5fbfe --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSParameterInsertConfigHandler.java @@ -0,0 +1,154 @@ +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; + + +import com.wso2telco.core.dbutils.exception.ServiceError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; +import com.wso2telco.services.dep.sandbox.dao.DaoFactory; +import com.wso2telco.services.dep.sandbox.dao.SMSMessagingDAO; +import com.wso2telco.services.dep.sandbox.dao.model.domain.SMSMessagingParam; +import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; +import com.wso2telco.services.dep.sandbox.servicefactory.AddressIgnorerable; +import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; + +import org.apache.commons.logging.LogFactory; + +import javax.ws.rs.core.Response; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SMSParameterInsertConfigHandler extends AbstractRequestHandler + implements AddressIgnorerable { + + + private SMSParameterConfigRequestWrapper requestWrapper; + private SMSParameterConfigResponseWrapper responseWrapper; + private SMSMessagingDAO smsMessagingDAO; + + + { + LOG = LogFactory.getLog(SMSParameterInsertConfigHandler.class); + smsMessagingDAO = DaoFactory.getSMSMessagingDAO(); + } + + + @Override + protected Returnable getResponseDTO() { + return responseWrapper; + } + + @Override + protected List getAddress() { + return null; + } + + @Override + protected boolean validate(SMSParameterConfigRequestWrapper wrapperDTO) throws Exception { + + SMSParameterConfigRequestBean requestBean = wrapperDTO.getParameterConfigRequestBean(); + + + String deliveryStatus = requestBean.getDeliveryStatus(); + String maxNotifications = requestBean.getMaxNotifications(); + String notificationDelay = requestBean.getNotificationDelay(); + + List validationRulesList = new ArrayList<>(); + + try { + validationRulesList + .add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "deliveryStatus", + deliveryStatus)); + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, + "maxNotifications", maxNotifications)); + validationRulesList + .add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_INT_GE_ZERO, + "notificationDelay", notificationDelay)); + + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###SMSCONFIG### Error in Validations. ", ex); + responseWrapper.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + return true; + } + + @Override + protected Returnable process(SMSParameterConfigRequestWrapper extendedRequestDTO) throws Exception { + + if (responseWrapper.getRequestError() != null) { + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } + + + try { + SMSParameterConfigRequestBean requestBean = extendedRequestDTO.getParameterConfigRequestBean(); + + String deliveryStatus = requestBean.getDeliveryStatus(); + String maxNotifications = requestBean.getMaxNotifications(); + String notificationDelay = requestBean.getNotificationDelay(); + + SMSMessagingParam smsMessagingParam = new SMSMessagingParam(); + smsMessagingParam.setDeliveryStatus(deliveryStatus); + smsMessagingParam.setMaxNotifications(maxNotifications); + smsMessagingParam.setNotificationDelay(notificationDelay); + smsMessagingParam.setUserid(user.getId()); + smsMessagingParam.setCreated("1"); + smsMessagingParam.setCreatedDate(new Date()); + + boolean result = smsMessagingDAO.saveSMSParameters(smsMessagingParam); + + + if (!result) { + LOG.error("###USSD CONFIG### Error occur in save applications"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Error occur in save applications")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + + } else { + responseWrapper.setStatus("Successful"); + responseWrapper.setHttpStatus(Response.Status.OK); + } + + } catch (Exception ex) { + + LOG.error("###USSD CONFIG### Error occur in save applications"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Error occur in save applications")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + + return responseWrapper; + + } + + @Override + protected void init(SMSParameterConfigRequestWrapper extendedRequestDTO) throws Exception { + + requestWrapper = extendedRequestDTO; + responseWrapper = new SMSParameterConfigResponseWrapper(); + } +} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java index 912b69e3..f6319e37 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SMSRequestFactory.java @@ -16,40 +16,18 @@ public class SMSRequestFactory { public static RequestHandleable getInstance(final RequestDTO requestDTO) { final String QUERY_DELIVERY_STATUS = "deliveryinfos"; - final String SEND_MT_SMS = "requests"; - final String RETRIVE_SMS = "registrations"; - final String OUTBOUND_REQUEST = "outbound"; - final String INBOUND_REQUEST = "inbound"; + final String CONFIGAPP = "addsmsparameters"; if (requestDTO.getRequestPath().toLowerCase().contains(QUERY_DELIVERY_STATUS) && requestDTO.isGet()) { - LOG.debug("LOADING QUERY SMS DELIVERY STATUS SERVICE"); return new QuerySMSDeliveryStatusService(); - } else if (requestDTO.getRequestPath().toLowerCase().contains(RETRIVE_SMS) - && requestDTO.isGet()) { - - LOG.debug("LOADING RETRIEVE SMS MESSAGES SERVICE"); - return new RetrieveSMSMessagesService(); - - } else if (requestDTO.getRequestPath().toLowerCase().contains(OUTBOUND_REQUEST) - && requestDTO.isDelete()) { - - LOG.debug("LOADING STOP SUBSCRIBE TO DELIVERY NOTIFICATION SERVICE"); - return new StopSubscribeToDeliveryNotificationService(); - } else if (requestDTO.getRequestPath().toLowerCase().contains(INBOUND_REQUEST) - && requestDTO.isPost()) { - - LOG.debug("LOADING SUBSCRIBE TO MO NOTIFICATION SERVICE"); - return new SubscribeToMONotificationService(); - } else if (requestDTO.getRequestPath().toLowerCase().contains(INBOUND_REQUEST) - && requestDTO.isDelete()) { - - LOG.debug("LOADING STOP SUBSCRIBE TO MO NOTIFICATION SERVICE"); - return new StopSubscribeToMONotificationService(); - } + } else if (requestDTO.getRequestPath().toLowerCase().contains(CONFIGAPP)) { + LOG.debug("LOADING CONFIGURATION SMS SERVICE"); + return new SMSParameterInsertConfigHandler(); + } return null; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/StopSubscribeToMONotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/StopSubscribeToMONotificationService.java deleted file mode 100644 index 73596834..00000000 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/StopSubscribeToMONotificationService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; - -import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; - -public class StopSubscribeToMONotificationService implements RequestHandleable { - - @Override - public Returnable execute(RequestDTO requestDTO) throws Exception { - // TODO Auto-generated method stub - return null; - } -} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SubscribeToMONotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SubscribeToMONotificationService.java deleted file mode 100644 index cad4f8fe..00000000 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/SubscribeToMONotificationService.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.wso2telco.services.dep.sandbox.servicefactory.smsmessaging; - -import com.wso2telco.services.dep.sandbox.dao.model.custom.RequestDTO; -import com.wso2telco.services.dep.sandbox.servicefactory.RequestHandleable; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; - -public class SubscribeToMONotificationService implements RequestHandleable { - - @Override - public Returnable execute(RequestDTO requestDTO) throws Exception { - // TODO Auto-generated method stub - return null; - } -} diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/RequestType.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/RequestType.java index f6ede12a..afc78868 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/RequestType.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/util/RequestType.java @@ -1,6 +1,6 @@ package com.wso2telco.services.dep.sandbox.util; public enum RequestType { - SMSMESSAGING, PAYMENT, USSD, LOCATION, MOBILEID, PROVISIONING,PROVISIONINGCONFIG, USER, CUSTOMERINFO,CUSTOMERINFOCONFIG, CREDIT, WALLET, WALLETCONFIG, USSDCONFIG; + SMSMESSAGING, PAYMENT, USSD, LOCATION, MOBILEID, PROVISIONING,PROVISIONINGCONFIG, USER, CUSTOMERINFO,CUSTOMERINFOCONFIG, CREDIT, WALLET, WALLETCONFIG, USSDCONFIG, SMSCONFIG; } From 83f30318e591e3458796a7fae67f08b0db040f4d Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Wed, 22 Mar 2017 15:30:18 +0530 Subject: [PATCH 090/112] Rewrite Wallet MakePayment API --- .../AbstractRequestHandler.java | 3 - .../wallet/MakePaymentRequestHandler.java | 374 +++++++++--------- 2 files changed, 187 insertions(+), 190 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java index 4354351f..08a76fe2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java @@ -162,13 +162,10 @@ private String getProfileIdFromRequest(RequestDTO requestDTO) { protected RequestError constructRequestError(int type, String messageId, String text, String variable) { RequestError error = new RequestError(); - - variable = variable + " Not Whitelisted"; if (type == SERVICEEXCEPTION) { ServiceException serviceException = new ServiceException(messageId, text, variable); error.setServiceException(serviceException); - } else if (type == POLICYEXCEPTION) { PolicyException policyException = new PolicyException(messageId, text, variable); error.setPolicyException(policyException); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java index 47b05c5d..0cdaf479 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java @@ -9,6 +9,8 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.servicefactory.*; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.logging.LogFactory; @@ -26,15 +28,7 @@ import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; import com.wso2telco.services.dep.sandbox.dao.NumberDAO; import com.wso2telco.services.dep.sandbox.dao.WalletDAO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ChargingInformation; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ChargingMetaData; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean; import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestBean.makePayment; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentResponseBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.PaymentAmount; -import com.wso2telco.services.dep.sandbox.dao.model.custom.PaymentAmountResponse; import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeDistribution; @@ -42,33 +36,38 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.Attributes; import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import com.wso2telco.services.dep.sandbox.util.CommonUtil; import com.wso2telco.services.dep.sandbox.util.CreditStatusCodes; import com.wso2telco.services.dep.sandbox.util.MessageLogHandler; import com.wso2telco.services.dep.sandbox.util.RequestType; import com.wso2telco.services.dep.sandbox.util.ServiceName; import com.wso2telco.services.dep.sandbox.util.TableName; +import org.json.JSONObject; -public class MakePaymentRequestHandler extends AbstractRequestHandler { +public class MakePaymentRequestHandler extends AbstractRequestHandler implements RequestResponseRequestHandleable { private WalletDAO walletDAO; private LoggingDAO loggingDAO; private NumberDAO numberDAO; private MakePaymentRequestWrapperDTO requestWrapperDTO; private MakePaymentResponseWrapper responseWrapper; - private MessageLogHandler logHandler; private String serviceCallPayment; - private Integer transactionId; - + private String responseReferenceCode; { LOG = LogFactory.getLog(MakePaymentRequestHandler.class); walletDAO = DaoFactory.getWalletDAO(); loggingDAO = DaoFactory.getLoggingDAO(); numberDAO = DaoFactory.getNumberDAO(); dao = DaoFactory.getGenaricDAO(); - logHandler = MessageLogHandler.getInstance(); + } + + private static boolean currencySymbol(@Nonnull final String currencyCode) { + try { + final Currency currency = Currency.getInstance(currencyCode); + return true; + } catch (final IllegalArgumentException x) { + return false; + } } @Override @@ -188,51 +187,38 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th // Save Request Log APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); - APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); - - Gson gson = new Gson(); - String jsonString = gson.toJson(requestBean); - MessageLog messageLog = new MessageLog(); - messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); - messageLog.setUserid(extendedRequestDTO.getUser().getId()); - messageLog.setReference("msisdn"); - messageLog.setValue(endUserIdPath); - messageLog.setRequest(jsonString); - messageLog.setMessageTimestamp(new Date()); - - int ref_number = loggingDAO.saveMessageLog(messageLog); - String serverReferenceCodeFormat = String.format("%06d", ref_number); - String serverReferenceCode = "WALLET_REF_" + serverReferenceCodeFormat; - - // check already charge request against client correlator - if (clientCorrelator != null) { - String tableAttributeValue = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); - String clientCorrelatorAttribute = AttributeName.clientCorrelatorWallet.toString(); - AttributeValues duplicateClientCorrelator = walletDAO.checkDuplicateValue(serviceCallPayment, - clientCorrelator, clientCorrelatorAttribute, tableAttributeValue); - if (duplicateClientCorrelator != null) { - APIServiceCalls apiServiceCall = duplicateClientCorrelator.getAttributedid().getAPIServiceCall(); - String serviceCall = apiServiceCall.getServiceName(); - ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); - Integer id = duplicateClientCorrelator.getOwnerdid(); - AttributeValues response = walletDAO.getResponse(id); - if (serviceCall.equals(serviceCallPayment) && (response.getOwnerdid() == manageNumber.getId())) { - // return already sent response - MakePaymentResponseBean obj = null; - obj = gson.fromJson(response.getValue(), MakePaymentResponseBean.class); - MakePaymentDTO dto = new MakePaymentDTO(); - dto.setmakePayment(obj); - responseWrapper.setMakePaymentDTO(dto); - responseWrapper.setHttpStatus(Response.Status.OK); - return responseWrapper; - } else { - responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Clientcorrelator is already used")); - responseWrapper.setHttpStatus(Status.BAD_REQUEST); - return responseWrapper; - } - } - } + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallPayment); + Gson gson = new Gson(); + int serviceNameId = apiServiceCalls.getApiServiceCallId(); + + if (clientCorrelator != null) { + + String response = checkDuplicateClientCorrelator(clientCorrelator, userId, serviceNameId, endUserId, + MessageProcessStatus.Success, MessageType.Response, referenceCode); + + if (response != null) { + // return already sent response + MakePaymentResponseBean obj = null; + obj = gson.fromJson(response, MakePaymentResponseBean.class); + MakePaymentDTO dto = new MakePaymentDTO(); + dto.setmakePayment(obj); + responseWrapper.setMakePaymentDTO(dto); + responseWrapper.setHttpStatus(Response.Status.OK); + return responseWrapper; + } + } + + //check referenceCode + String duplicateReferenceCode = checkReferenceCode(userId, serviceNameId, endUserId, MessageProcessStatus + .Success, MessageType.Response, referenceCode); + + if ((duplicateReferenceCode != null)) { + LOG.error("###WALLET### Already charged for this reference code"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "Already charged for this reference code")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } // check path param endUserId and request body endUserId if (!(endUserIdPath.equals(endUserIdRequest))) { @@ -269,7 +255,7 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th if (!isValidCurrency) { LOG.error("###WALLET### currency code not valid accorfing to ISO 4217"); responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "currency code not valid accorfing to ISO 4217")); + ServiceError.INVALID_INPUT_VALUE, "currency code not valid according to ISO 4217")); responseWrapper.setHttpStatus(Status.BAD_REQUEST); return responseWrapper; } @@ -299,19 +285,6 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th return responseWrapper; } - // check already charged request against reference code - String referenceCodeAttribue = AttributeName.referenceCodeWallet.toString(); - String tableNumber = TableName.NUMBERS.toString().toLowerCase(); - AttributeValues duplicateReferenceCode = walletDAO.checkDuplicateValue(serviceCallPayment, referenceCode, - referenceCodeAttribue, tableNumber); - if (duplicateReferenceCode != null) { - LOG.error("###WALLET### Already charged for this reference code"); - responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Already charged for this reference code")); - responseWrapper.setHttpStatus(Status.BAD_REQUEST); - return responseWrapper; - } - responseBean.setClientCorrelator(clientCorrelator); responseBean.setEndUserId(endUserIdPath); @@ -325,6 +298,11 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th chargeMetaData.setOnBehalfOf(onBehalfOf); } + // Setting the serverReference Code + String serverReferenceCodeFormat = String.format("%06d", getReferenceNumber()); + String serverReferenceCode = "WALLET_REF" + serverReferenceCodeFormat; + responseBean.setServerReferenceCode(serverReferenceCode); + responseBean.setReferenceCode(referenceCode); responseBean.setServerReferenceCode(serverReferenceCode); responseBean.setNotifyURL(notifyURL); @@ -332,8 +310,6 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName().toString()); Double balance = manageNumber.getBalance(); - AttributeValues transactionStatusValue = walletDAO.getAttributeValue(endUserId, serviceCallPayment, - AttributeName.transactionStatus.toString(), userId); // transaction operation status as denied if ((balance < chargeAmount)) { @@ -345,16 +321,8 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th return responseWrapper; } - // set transaction operation status as refused - else if (transactionStatusValue != null) { - String transactionStatus = transactionStatusValue.getValue(); - if (transactionStatus.equals(TransactionStatus.Refused.toString())) { - responseBean.setTransactionOperationStatus(TransactionStatus.Refused.toString()); - } - // set transaction status as charged - } else if (balance >= chargeAmount) { + else if (balance >= chargeAmount) { balance = balance - chargeAmount; - // walletDAO.updateBalance(endUserId, balance, userId); manageNumber.setBalance(balance); numberDAO.saveManageNumbers(manageNumber); responseBean.setTransactionOperationStatus(TransactionStatus.Charged.toString()); @@ -370,14 +338,9 @@ else if (transactionStatusValue != null) { responseWrapper.setMakePaymentDTO(makePaymentDTO); responseWrapper.setHttpStatus(Response.Status.CREATED); - // save payment transaction - transactionId = saveTransaction(responseBean, endUserId, userName); + // Save Success Response + saveResponse(extendedRequestDTO, endUserIdPath, responseBean, apiServiceCalls, MessageProcessStatus.Success); - // save client correlator - if (clientCorrelator != null) { - saveClientCorrelator(endUserId, clientCorrelator); - } - saveReferenceCode(endUserId, referenceCode, userName); } catch (Exception ex) { LOG.error("###WALLET### Error Occured in WALLET Service. ", ex); responseWrapper.setHttpStatus(Status.BAD_REQUEST); @@ -387,110 +350,147 @@ else if (transactionStatusValue != null) { return responseWrapper; } - public Integer saveTransaction(MakePaymentResponseBean responseBean, String endUserId, String userName) - throws Exception { - Integer transactionId = null; - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.NUMBERS.toString().toLowerCase(); - String attributeName = AttributeName.Payment.toString().toLowerCase(); - APITypes api = dao.getAPIType(RequestType.WALLET.toString()); - APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); - Attributes attributes = dao.getAttribute(attributeName); - AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), - attributes.getAttributeId()); - ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); - Integer ownerId = manageNumber.getId(); - String jsonInString = null; - Gson gson = new Gson(); - - JsonElement je = new JsonParser().parse(gson.toJson(responseBean)); - JsonObject asJsonObject = je.getAsJsonObject(); - jsonInString = asJsonObject.toString(); - - valueObj = new AttributeValues(); - valueObj.setAttributedid(dis); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(jsonInString); - transactionId = walletDAO.saveAttributeValue(valueObj); + private boolean containsChannel(String channelValue) { - } catch (Exception ex) { - LOG.error("###WALLET### Error in processing save transaction. ", ex); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + for (Channel channel : Channel.values()) { + if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { + return true; + } } - return transactionId; + + return false; } - public void saveClientCorrelator(String endUserId, String clientCorrelator) throws Exception { - Integer ownerId = null; - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.SBXATTRIBUTEVALUE.toString().toLowerCase(); - String attributeName = AttributeName.clientCorrelatorWallet.toString(); - APITypes api = dao.getAPIType(RequestType.WALLET.toString()); - APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); - Attributes attributes = dao.getAttribute(attributeName); - AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), - attributes.getAttributeId()); - ownerId = transactionId; - - valueObj = new AttributeValues(); - valueObj.setAttributedid(dis); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(clientCorrelator); - dao.saveAttributeValue(valueObj); - } catch (Exception ex) { - LOG.error("###WALLET### Error in processing save insertion of clientCorrelator request. ", ex); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - } - } + // Check already existing clientcorrelator return response body + private String checkDuplicateClientCorrelator(String clientCorrelator, int userId, int serviceNameId, String tel, + MessageProcessStatus status, MessageType type, String + referenceCode) throws Exception { + List list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); - private static boolean currencySymbol(@Nonnull final String currencyCode) { - try { - final Currency currency = Currency.getInstance(currencyCode); - return true; - } catch (final IllegalArgumentException x) { - return false; - } - } + String jsonString = null; - public void saveReferenceCode(String endUserId, String referenceCode, String userName) throws Exception { - try { - AttributeValues valueObj = new AttributeValues(); - String tableName = TableName.NUMBERS.toString().toLowerCase(); - String attributeName = AttributeName.referenceCodeWallet.toString(); - APITypes api = dao.getAPIType(RequestType.WALLET.toString()); - APIServiceCalls call = dao.getServiceCall(api.getId(), serviceCallPayment); - Attributes attributes = dao.getAttribute(attributeName); - AttributeDistribution dis = dao.getAttributeDistribution(call.getApiServiceCallId(), - attributes.getAttributeId()); - ManageNumber manageNumber = numberDAO.getNumber(endUserId, userName); - Integer ownerId = manageNumber.getId(); - - valueObj = new AttributeValues(); - valueObj.setAttributedid(dis); - valueObj.setOwnerdid(ownerId); - valueObj.setTobject(tableName); - valueObj.setValue(referenceCode); - dao.saveAttributeValue(valueObj); + for (int i = 0; i < response.size(); i++) { - } catch (Exception ex) { - LOG.error("###WALLET### Error in processing save of referenceCode request. ", ex); - responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); - } - } + if (response != null) { - public boolean containsChannel(String channelValue) { + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); + String responseClientCorrelator; - for (Channel channel : Channel.values()) { - if (channel.name().toLowerCase().equals(channelValue.toLowerCase())) { - return true; - } - } + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + responseClientCorrelator = null; - return false; - } + if (json.has("clientCorrelator")) { + responseClientCorrelator = json.get("clientCorrelator").toString(); + } + + responseReferenceCode = json.get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check client correlator + if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals("tel:+" + tel)) { + jsonString = json.toString(); + break; + } + } + + } + + } + + return jsonString; + } + + //check reference code + private String checkReferenceCode(int userId, int serviceNameId, String tel, MessageProcessStatus status, + MessageType type, String referenceCode) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + responseReferenceCode = json.get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseReferenceCode.equals + (referenceCode)) { + jsonString = responseReferenceCode; + break; + } + } + + } + + } + + return jsonString; + } + + // Save Response in messageLog table + private void saveResponse(MakePaymentRequestWrapperDTO extendedRequestDTO, + String endUserIdPath, MakePaymentResponseBean responseBean, APIServiceCalls + apiServiceCalls, MessageProcessStatus status) throws Exception { + + String jsonInString = null; + Gson resp = new Gson(); + + JsonElement jsonElement = new JsonParser().parse(resp.toJson(responseBean)); + JsonObject asJsonObject = jsonElement.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + //setting messagelog responses + MessageLog messageLog = new MessageLog(); + messageLog = new MessageLog(); + messageLog.setRequest(jsonInString); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(extendedRequestDTO.getUser().getId()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } + + @Override + public String getApiServiceCalls() { + return ServiceName.MakePayment.toString(); + + } + + @Override + public String getJosonString(MakePaymentRequestWrapperDTO requestDTO) { + Gson gson = new Gson(); + String jsonString = gson.toJson(requestDTO.getMakePaymentRequestBean()); + return jsonString; + } + + @Override + public String getnumber(MakePaymentRequestWrapperDTO requestDTO) { + return requestDTO.getEndUserId(); + } } \ No newline at end of file From 20ee9dd13a7905bbad556d9cbc9923d70a97f6cc Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Thu, 23 Mar 2017 09:39:53 +0530 Subject: [PATCH 091/112] Rewrite wallet refund API --- .../RefundTransactionRequestHandler.java | 538 +++++++++++------- 1 file changed, 348 insertions(+), 190 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java index c4e28928..8682ef7e 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java @@ -9,6 +9,8 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.servicefactory.*; import org.apache.commons.lang.math.NumberUtils; import org.apache.commons.logging.LogFactory; @@ -25,18 +27,7 @@ import com.wso2telco.services.dep.sandbox.dao.LoggingDAO; import com.wso2telco.services.dep.sandbox.dao.NumberDAO; import com.wso2telco.services.dep.sandbox.dao.WalletDAO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ChargingInformation; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ChargingMetaData; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.MakePaymentResponseBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.PaymentAmount; -import com.wso2telco.services.dep.sandbox.dao.model.custom.PaymentAmountResponse; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundTransactionDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundTransactionRequestBean; import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundTransactionRequestBean.RefundTransaction; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundTransactionResponseBean; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundResponseBean; import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeDistribution; @@ -44,16 +35,15 @@ import com.wso2telco.services.dep.sandbox.dao.model.domain.Attributes; import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; import com.wso2telco.services.dep.sandbox.dao.model.domain.MessageLog; -import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; -import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; import com.wso2telco.services.dep.sandbox.servicefactory.wallet.AttributeName; import com.wso2telco.services.dep.sandbox.util.CommonUtil; import com.wso2telco.services.dep.sandbox.util.MessageLogHandler; import com.wso2telco.services.dep.sandbox.util.RequestType; import com.wso2telco.services.dep.sandbox.util.ServiceName; import com.wso2telco.services.dep.sandbox.util.TableName; +import org.json.JSONObject; -public class RefundTransactionRequestHandler extends AbstractRequestHandler { +public class RefundTransactionRequestHandler extends AbstractRequestHandler implements RequestResponseRequestHandleable{ private WalletDAO walletDAO; private LoggingDAO loggingDAO; @@ -63,7 +53,9 @@ public class RefundTransactionRequestHandler extends AbstractRequestHandler list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); + String responseClientCorrelator; + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + + responseClientCorrelator = null; + + if (json.has("clientCorrelator")) { + responseClientCorrelator = json.get("clientCorrelator").toString(); + } + + responseReferenceCode = json.get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check client correlator + if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && + responseUserId == userId && responseTel.equals("tel:+" + tel)) { + jsonString = json.toString(); + break; + } + } + + } + } + + return jsonString; + + } + + //check reference code + private String checkReferenceCode(int userId, int serviceNameId, String tel, MessageProcessStatus status, + MessageType type, String referenceCode) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + List response = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + + String jsonString = null; + + for (int i = 0; i < response.size(); i++) { + + if (response != null) { + + int responseStatus = response.get(i).getStatus(); + int responseType = response.get(i).getType(); + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = response.get(i).getRequest(); + JSONObject json = new JSONObject(request); + responseReferenceCode = json.get("referenceCode").toString(); + + int responseUserId = response.get(i).getUserid(); + String responseTel = response.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && responseReferenceCode.equals + (referenceCode)) { + jsonString = responseReferenceCode; + break; + } + } + + } + + } + + return jsonString; + } + + private double checkOriginalServerReferenceWithServerReference(int userId, int serviceNameId, String tel, + MessageProcessStatus status, MessageType type, + String originalServerReferenceCode, String + originalReferenceCode) throws Exception { + + List list = new ArrayList<>(); + list.add(serviceNameId); + List servercodeList = loggingDAO.getMessageLogs(userId, list, "msisdn", "tel:+" + tel, null, null); + + + APITypes apiTypes = dao.getAPIType(RequestType.WALLET.toString()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), serviceCallRefund); + + int refundId = apiServiceCalls.getApiServiceCallId(); + List list1 = new ArrayList<>(); + list1.add(refundId); + + List originalServerReferenceCodeList = loggingDAO.getMessageLogs(userId, list1, "msisdn", "tel:+" + + tel, null, null); + + Double paymentAmount = 0.0; + + + for (int i = 0; i < servercodeList.size(); i++) { + + if (servercodeList != null) { + + int responseStatus = servercodeList.get(i).getStatus(); + int responseType = servercodeList.get(i).getType(); + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = servercodeList.get(i).getRequest(); + JSONObject json = new JSONObject(request); + String serverReferenceCode = json.get("serverReferenceCode").toString(); + String referenceCode = json.get("referenceCode").toString(); + + int responseUserId = servercodeList.get(i).getUserid(); + String responseTel = servercodeList.get(i).getValue(); + + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && serverReferenceCode.equals + (originalServerReferenceCode) && referenceCode.equals(originalReferenceCode)) { + isOriginalServerReferenceCode = true; + paymentAmount = Double.valueOf(json.getJSONObject("paymentAmount").getJSONObject + ("chargingInformation").get("amount").toString()); + } + } + + } + + } + + if (isOriginalServerReferenceCode) { + + for (int i = 0; i < originalServerReferenceCodeList.size(); i++) { + + if (originalServerReferenceCodeList != null) { + + int responseStatus = originalServerReferenceCodeList.get(i).getStatus(); + int responseType = originalServerReferenceCodeList.get(i).getType(); + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + String request = originalServerReferenceCodeList.get(i).getRequest(); + JSONObject json = new JSONObject(request); + String responseOriginalServerReferenceCode = json.get("originalServerReferenceCode").toString(); + String responseReferenceCode = json.get("referenceCode").toString(); + + int responseUserId = originalServerReferenceCodeList.get(i).getUserid(); + String responseTel = originalServerReferenceCodeList.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && + responseOriginalServerReferenceCode.equals(originalServerReferenceCode) && + responseReferenceCode.equals(originalReferenceCode)) { + totalAmountRefunded += Double.valueOf(json.getJSONObject("paymentAmount").getJSONObject + ("chargingInformation").get("amount").toString()); + } + } + + } + + } + + } + + APITypes apiTypeCredit = dao.getAPIType(RequestType.WALLET.toString()); + APIServiceCalls apiServiceCallCredit = dao.getServiceCall(apiTypeCredit.getId(), ServiceName.RefundPayment + .toString()); + List refundIdList = new ArrayList<>(); + refundIdList.add(apiServiceCallCredit.getApiServiceCallId()); + + List messageLogForPartialRefund = loggingDAO.getMessageLogs(userId, refundIdList, "msisdn", + "tel:+" + tel, null, null); + + if (messageLogForPartialRefund != null) { + + for (int i = 0; i < messageLogForPartialRefund.size(); i++) { + + int responseStatus = messageLogForPartialRefund.get(i).getStatus(); + int responseType = messageLogForPartialRefund.get(i).getType(); + + if (responseType == type.getValue() && responseStatus == status.getValue()) { + + String request = messageLogForPartialRefund.get(i).getRequest(); + JSONObject json = new JSONObject(request); + String responseOriginalServerReferenceCode = json.get("originalServerReferenceCode").toString(); + + int responseUserId = messageLogForPartialRefund.get(i).getUserid(); + String responseTel = messageLogForPartialRefund.get(i).getValue(); + + // Check reference CodeDuplication + if (responseUserId == userId && responseTel.equals("tel:+" + tel) && + responseOriginalServerReferenceCode.equals(originalServerReferenceCode)) { + totalAmountRefunded += Double.valueOf(json.getJSONObject("paymentAmount").getJSONObject + ("chargingInformation").get("amount").toString()); + } + } + } + + } + + return (paymentAmount - totalAmountRefunded); + } + + // save Response in messageLog table + private void saveResponse(Integer userId, String endUserIdPath, RefundTransactionResponseBean responseBean, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { + + String jsonInString = null; + Gson resp = new Gson(); + + JsonElement je = new JsonParser().parse(resp.toJson(responseBean)); + JsonObject asJsonObject = je.getAsJsonObject(); + jsonInString = asJsonObject.toString(); + + //setting messagelog responses + MessageLog messageLog = new MessageLog(); + messageLog = new MessageLog(); + messageLog.setRequest(jsonInString); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); + messageLog.setUserid(userId); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserIdPath); + messageLog.setMessageTimestamp(new Date()); + + loggingDAO.saveMessageLog(messageLog); + } + + + @Override + public String getApiServiceCalls() { + return ServiceName.RefundPayment.toString(); + } + + @Override + public String getJosonString(RefundRequestWrapperDTO requestDTO) { + Gson gson = new Gson(); + String jsonString = gson.toJson(requestDTO.getRefundRequestBean()); + return jsonString; + } + + @Override + public String getnumber(RefundRequestWrapperDTO requestDTO) { + return requestDTO.getEndUserId(); + } } \ No newline at end of file From 2c1c4dc2971fcf16f373ff3863cf5e2f40fa5baa Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Thu, 23 Mar 2017 12:30:14 +0530 Subject: [PATCH 092/112] Update classes --- .../wallet/MakePaymentRequestHandler.java | 14 +++- .../RefundTransactionRequestHandler.java | 82 +++++++------------ 2 files changed, 42 insertions(+), 54 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java index 0cdaf479..7552f88d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java @@ -213,9 +213,9 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th .Success, MessageType.Response, referenceCode); if ((duplicateReferenceCode != null)) { - LOG.error("###WALLET### Already charged for this reference code"); + LOG.error("###WALLET### Already used reference code"); responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Already charged for this reference code")); + ServiceError.INVALID_INPUT_VALUE, "Already used reference code")); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); return responseWrapper; } @@ -310,6 +310,8 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th ManageNumber manageNumber = numberDAO.getNumber(endUserId, extendedRequestDTO.getUser().getUserName().toString()); Double balance = manageNumber.getBalance(); + AttributeValues transactionStatusValue = walletDAO.getAttributeValue(endUserId, serviceCallPayment, + AttributeName.transactionStatus.toString(), userId); // transaction operation status as denied if ((balance < chargeAmount)) { @@ -320,8 +322,14 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th "Denied : Account balance insufficient to charge request")); return responseWrapper; } + // set transaction operation status as refused + else if (transactionStatusValue != null) { + String transactionStatus = transactionStatusValue.getValue(); + if (transactionStatus.equals(TransactionStatus.Refused.toString())) { + responseBean.setTransactionOperationStatus(TransactionStatus.Refused.toString()); + } - else if (balance >= chargeAmount) { + } else if (balance >= chargeAmount) { balance = balance - chargeAmount; manageNumber.setBalance(balance); numberDAO.saveManageNumbers(manageNumber); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java index 8682ef7e..5e4e05fe 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java @@ -211,9 +211,9 @@ protected Returnable process(RefundRequestWrapperDTO extendedRequestDTO) throws MessageType.Response, referenceCode); if ((result != null)) { - LOG.error("###PAYMENT### Already charged for this reference code"); + LOG.error("###PAYMENT### Already used reference code"); responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "Already charged for this reference code")); + ServiceError.INVALID_INPUT_VALUE, "Already used reference code")); responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); return responseWrapper; } @@ -227,6 +227,9 @@ protected Returnable process(RefundRequestWrapperDTO extendedRequestDTO) throws endUserId, MessageProcessStatus.Success, MessageType.Response, originalServerReferenceCode, originalReferenceCode); + AttributeValues accountStatusValue = walletDAO.getAttributeValue(endUserId, serviceCallRefund, + AttributeName.transactionStatus.toString(), userId); + // check path param endUserId and request body endUserId if (!(endUserIdPath.equals(endUserIdRequest))) { @@ -341,8 +344,15 @@ protected Returnable process(RefundRequestWrapperDTO extendedRequestDTO) throws Double updateBalance = manageNumber.getBalance() + chargeAmount; manageNumber.setBalance(updateBalance); + if (accountStatusValue != null) { + String accountStatus = accountStatusValue.getValue(); + // set transaction operation status as Refused + if (accountStatus.equals(TransactionStatus.Refused.toString())) { + responseBean.setTransactionOperationStatus(TransactionStatus.Refused.toString()); + } + } // set transaction operation status as Refunded - if (walletDAO.saveManageNumbers(manageNumber)) { + else if (walletDAO.saveManageNumbers(manageNumber)) { responseBean.setTransactionOperationStatus(TransactionStatus.Refunded.toString()); } } else { @@ -535,71 +545,41 @@ private double checkOriginalServerReferenceWithServerReference(int userId, int s if (isOriginalServerReferenceCode) { - for (int i = 0; i < originalServerReferenceCodeList.size(); i++) { + APITypes apiTypeCredit = dao.getAPIType(RequestType.WALLET.toString()); + APIServiceCalls apiServiceCallCredit = dao.getServiceCall(apiTypeCredit.getId(), ServiceName.RefundPayment + .toString()); + List refundIdList = new ArrayList<>(); + refundIdList.add(apiServiceCallCredit.getApiServiceCallId()); + + List messageLogForPartialRefund = loggingDAO.getMessageLogs(userId, refundIdList, "msisdn", + "tel:+" + tel, null, null); - if (originalServerReferenceCodeList != null) { + if (messageLogForPartialRefund != null) { - int responseStatus = originalServerReferenceCodeList.get(i).getStatus(); - int responseType = originalServerReferenceCodeList.get(i).getType(); + for (int i = 0; i < messageLogForPartialRefund.size(); i++) { + + int responseStatus = messageLogForPartialRefund.get(i).getStatus(); + int responseType = messageLogForPartialRefund.get(i).getType(); if (responseType == type.getValue() && responseStatus == status.getValue()) { - String request = originalServerReferenceCodeList.get(i).getRequest(); + + String request = messageLogForPartialRefund.get(i).getRequest(); JSONObject json = new JSONObject(request); String responseOriginalServerReferenceCode = json.get("originalServerReferenceCode").toString(); - String responseReferenceCode = json.get("referenceCode").toString(); - int responseUserId = originalServerReferenceCodeList.get(i).getUserid(); - String responseTel = originalServerReferenceCodeList.get(i).getValue(); + int responseUserId = messageLogForPartialRefund.get(i).getUserid(); + String responseTel = messageLogForPartialRefund.get(i).getValue(); // Check reference CodeDuplication if (responseUserId == userId && responseTel.equals("tel:+" + tel) && - responseOriginalServerReferenceCode.equals(originalServerReferenceCode) && - responseReferenceCode.equals(originalReferenceCode)) { + responseOriginalServerReferenceCode.equals(originalServerReferenceCode)) { totalAmountRefunded += Double.valueOf(json.getJSONObject("paymentAmount").getJSONObject ("chargingInformation").get("amount").toString()); } } - } } - - } - - APITypes apiTypeCredit = dao.getAPIType(RequestType.WALLET.toString()); - APIServiceCalls apiServiceCallCredit = dao.getServiceCall(apiTypeCredit.getId(), ServiceName.RefundPayment - .toString()); - List refundIdList = new ArrayList<>(); - refundIdList.add(apiServiceCallCredit.getApiServiceCallId()); - - List messageLogForPartialRefund = loggingDAO.getMessageLogs(userId, refundIdList, "msisdn", - "tel:+" + tel, null, null); - - if (messageLogForPartialRefund != null) { - - for (int i = 0; i < messageLogForPartialRefund.size(); i++) { - - int responseStatus = messageLogForPartialRefund.get(i).getStatus(); - int responseType = messageLogForPartialRefund.get(i).getType(); - - if (responseType == type.getValue() && responseStatus == status.getValue()) { - - String request = messageLogForPartialRefund.get(i).getRequest(); - JSONObject json = new JSONObject(request); - String responseOriginalServerReferenceCode = json.get("originalServerReferenceCode").toString(); - - int responseUserId = messageLogForPartialRefund.get(i).getUserid(); - String responseTel = messageLogForPartialRefund.get(i).getValue(); - - // Check reference CodeDuplication - if (responseUserId == userId && responseTel.equals("tel:+" + tel) && - responseOriginalServerReferenceCode.equals(originalServerReferenceCode)) { - totalAmountRefunded += Double.valueOf(json.getJSONObject("paymentAmount").getJSONObject - ("chargingInformation").get("amount").toString()); - } - } - } - } return (paymentAmount - totalAmountRefunded); From 832153f5db4ed4ffc3e52a59d01392793a85d924 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Thu, 23 Mar 2017 14:29:32 +0530 Subject: [PATCH 093/112] Rewrite wallet ListTransaction API --- .../wallet/ListTransactionRequestHandler.java | 91 ++++++++++++------- 1 file changed, 56 insertions(+), 35 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/ListTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/ListTransactionRequestHandler.java index 2a587a54..806114b0 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/ListTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/ListTransactionRequestHandler.java @@ -6,6 +6,10 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageProcessStatus; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageType; +import com.wso2telco.services.dep.sandbox.util.*; import org.apache.commons.logging.LogFactory; import org.json.simple.JSONObject; @@ -24,16 +28,8 @@ import com.wso2telco.services.dep.sandbox.dao.WalletDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.ListTransactionResponseBean; import com.wso2telco.services.dep.sandbox.dao.model.custom.ListTransactionDTO; -import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; -import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; -import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; -import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; -import com.wso2telco.services.dep.sandbox.util.CommonUtil; -import com.wso2telco.services.dep.sandbox.util.MessageLogHandler; -import com.wso2telco.services.dep.sandbox.util.ServiceName; -import com.wso2telco.services.dep.sandbox.util.TableName; public class ListTransactionRequestHandler extends AbstractRequestHandler { @@ -92,10 +88,20 @@ protected Returnable process(ListTransactionRequestWrapper extendedRequestDTO) t try { String msisdn = extendedRequestDTO.getEndUserId(); String endUserId = getLastMobileNumber(msisdn); - List amounTransaction = null; - List attributeName = new ArrayList(); - attributeName.add(AttributeName.Payment.toString().toLowerCase()); - attributeName.add(AttributeName.Refund.toString().toLowerCase()); + APITypes walletApi = dao.getAPIType(RequestType.WALLET.toString()); + + String serviceCallMakePayment = ServiceName.MakePayment.toString(); + String serviceCallRefundPayment = ServiceName.RefundPayment.toString(); + APIServiceCalls apiServiceCallPayment = dao.getServiceCall(walletApi.getId(), serviceCallMakePayment); + APIServiceCalls apiServiceCallRefund = dao.getServiceCall(walletApi.getId(), serviceCallRefundPayment); + + int paymentId = apiServiceCallPayment.getApiServiceCallId(); + int refundId = apiServiceCallRefund.getApiServiceCallId(); + + List attributeName = new ArrayList<>(); + attributeName.add(paymentId); + attributeName.add(refundId); + Integer userId = extendedRequestDTO.getUser().getId(); // Save Request Log @@ -106,32 +112,47 @@ protected Returnable process(ListTransactionRequestWrapper extendedRequestDTO) t logHandler.saveMessageLog(apiServiceCalls.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), "msisdn", msisdn, object); - String tableName = TableName.NUMBERS.toString().toLowerCase(); ListTransactionResponseBean paymentTransaction = new ListTransactionResponseBean(); - amounTransaction = walletDAO.getTransactionValue(endUserId, attributeName, tableName, userId); + List responses = loggingDAO.getMessageLogs(userId, attributeName, "msisdn", "tel:+" + endUserId, null, null); - List listNodes = new ArrayList(); - if (amounTransaction != null && !amounTransaction.isEmpty()) { - for (AttributeValues values : amounTransaction) { - JsonParser parser = new JsonParser(); - JsonObject jsonObject = parser.parse(values.getValue()).getAsJsonObject(); - JsonElement get = jsonObject.get("paymentAmount"); - JsonObject asJsonObjectPayment = get.getAsJsonObject(); - asJsonObjectPayment.remove("chargingMetaData"); - jsonObject.remove("clientCorrelator"); - jsonObject.remove("notifyURL"); - jsonObject.remove("originalReferenceCode"); - jsonObject.remove("originalServerReferenceCode"); - jsonObject.remove("resourceURL"); - String jsonInString = null; - jsonInString = jsonObject.toString(); - - JsonNode node = null; - ObjectMapper mapper = new ObjectMapper(); - node = mapper.readValue(jsonInString, JsonNode.class); - listNodes.add(node); - } + List listNodes = new ArrayList(); + String jsonString = null; + + if (responses != null && !responses.isEmpty()) { + for (int i = 0; i < responses.size(); i++) { + + int responseStatus = responses.get(i).getStatus(); + int responseType = responses.get(i).getType(); + + if (responseType == MessageType.Response.getValue() && responseStatus == MessageProcessStatus.Success.getValue()) { + String request = responses.get(i).getRequest(); + org.json.JSONObject json = new org.json.JSONObject(request); + + int responseUserId = responses.get(i).getUserid(); + String responseTel = responses.get(i).getValue(); + + if (responseUserId == userId && responseTel.equals("tel:+" + endUserId)) { + jsonString = json.toString(); + JsonParser parser = new JsonParser(); + JsonObject jsonObject = (JsonObject) parser.parse(jsonString); + JsonElement get = jsonObject.get("paymentAmount"); + JsonObject asJsonObjectPayment = get.getAsJsonObject(); + asJsonObjectPayment.remove("chargingMetaData"); + jsonObject.remove("clientCorrelator"); + jsonObject.remove("notifyURL"); + jsonObject.remove("originalReferenceCode"); + jsonObject.remove("originalServerReferenceCode"); + jsonObject.remove("resourceURL"); + String jsonInString = null; + jsonInString = jsonObject.toString(); + + ObjectMapper mapper = new ObjectMapper(); + JsonNode node = mapper.readValue(jsonInString, JsonNode.class); + listNodes.add(node); + } + } + } paymentTransaction.setAmountTransaction(listNodes); } else { LOG.error("###WALLET### Valid Transaction List Not Available for msisdn: " + endUserId); From 7576cae6d9ca961208ac1dbcfbfcdc92f0efa7ca Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Thu, 23 Mar 2017 15:31:30 +0530 Subject: [PATCH 094/112] Fixed HUBDEV-1386 amount validation for SMS Type --- .../credit/CreditApplyRequestHandler.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java index 4c271c81..08876f69 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java @@ -189,7 +189,16 @@ protected Returnable process(CreditApplyRequestWrapper extendedRequestDTO) throw String callbackData = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getCallbackData()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); - try { + try { + if(type.toLowerCase().equals("sms")){ + if (!((amount == Math.floor(amount)) && !Double.isInfinite(amount))) { + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "SMS Should be a Integer Number")); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } + } + String clientCorrelatorAttribute = AttributeName.clientCorrelator.toString(); Integer userId = extendedRequestDTO.getUser().getId(); String userName = extendedRequestDTO.getUser().getUserName(); From 6d61a335eca451c30884c21d6b00af3fdd41a0c2 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Fri, 24 Mar 2017 12:39:46 +0530 Subject: [PATCH 095/112] Refactoring msisdn related classes --- dep-sandbox/dbscripts/dep-sandbox1_7_0.sql | 2 +- .../dbscripts/migration1_6_0to1_7_0.sql | 2 +- .../AbstractRequestHandler.java | 38 +++++++++++++++++-- .../RequestResponseRequestHandleable.java | 2 +- .../credit/CreditApplyRequestHandler.java | 20 +++++----- .../credit/PatialRefundRequestHandler.java | 21 +++++++--- .../PaymentRefundRequestHandler0_8.java | 32 ++++++++-------- .../payment/PaymentRequestHandler.java | 12 +++--- .../wallet/MakePaymentRequestHandler.java | 10 ++--- .../RefundTransactionRequestHandler.java | 10 ++--- 10 files changed, 96 insertions(+), 53 deletions(-) diff --git a/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql index 3aa938ef..ba46114e 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql @@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `sbxapiservicecalls` ( -- Dumping data for table `sbxapiservicecalls` -- -INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'),(13,1,'Location'),(14,3,'InitUSSD'),(15,2,'SendSMS'),(16,2,'ReceivingSMS'),(17,2,'QuerySMS'),(18,2,'SubscribeToSMSDelivery'),(19,2,'SubscribeToApplication'),(20,2,'StopSubscriptionDelivery'),(21,2,'StopSubscribeToApplication'); +INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'),(13,1,'Location'),(14,3,'InitUSSD'),(15,2,'SendSMS'),(16,2,'ReceivingSMS'),(17,2,'QuerySMSStatus'),(18,2,'SubscribeToSMSDelivery'),(19,2,'SubscribeToApplication'),(20,2,'StopSubscriptionDelivery'),(21,2,'StopSubscribeToApplication'); diff --git a/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql b/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql index bc8d2836..20bcc827 100644 --- a/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql +++ b/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql @@ -1,6 +1,6 @@ USE `sandbox`; -INSERT INTO `sbxapiservicecalls` VALUES (14,3,'InitUSSD'),(15,2,'SendSMS'),(16,2,'ReceivingSMS'),(17,2,'QuerySMS'),(18,2,'SubscribeToSMSDelivery'),(19,2,'SubscribeToApplication'),(20,2,'StopSubscriptionDelivery'),(21,2,'StopSubscribeToApplication'); +INSERT INTO `sbxapiservicecalls` VALUES (14,3,'InitUSSD'),(15,2,'SendSMS'),(16,2,'ReceivingSMS'),(17,2,'QuerySMSStatus'),(18,2,'SubscribeToSMSDelivery'),(19,2,'SubscribeToApplication'),(20,2,'StopSubscriptionDelivery'),(21,2,'StopSubscribeToApplication'); UPDATE `sbxapitypes` SET `apiname`='SMSMESSAGING' WHERE `id`='2'; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java index 08a76fe2..76d42919 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java @@ -1,6 +1,7 @@ package com.wso2telco.services.dep.sandbox.servicefactory; import com.wso2telco.core.dbutils.exception.ThrowableError; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; import com.wso2telco.dep.oneapivalidation.exceptions.PolicyException; import com.wso2telco.dep.oneapivalidation.exceptions.ServiceException; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; @@ -128,9 +129,38 @@ private List getNotWhitelistedNumbers(User user) throws Exception { protected abstract void init(final E2 extendedRequestDTO) throws Exception; - protected String getLastMobileNumber(String str) { - return str.substring(Math.max(0, str.length() - 11)); - } + protected String getLastMobileNumber(String str) throws Exception { + + if (str.contains("tel:+")) { + String[] parts = str.split("\\+"); + String numberOnly = parts[1]; + return str.substring(Math.max(0, str.length() - numberOnly.length())); + + } else if (str.contains("tel:")) { + String[] parts = str.split("\\:"); + String numberOnly = parts[1]; + return str.substring(Math.max(0, str.length() - numberOnly.length())); + + } else if (str.contains("etel:")) { + String[] parts = str.split("\\:"); + String numberOnly = parts[1]; + return str.substring(Math.max(0, str.length() - numberOnly.length())); + + } else if (str.contains("etel:+")) { + String[] parts = str.split("\\+"); + String numberOnly = parts[1]; + return str.substring(Math.max(0, str.length() - numberOnly.length())); + + } else if (str.contains("+")) { + String[] parts = str.split("\\+"); + String numberOnly = parts[1]; + return str.substring(Math.max(0, str.length() - numberOnly.length())); + + } else { + + return str; + } + } private String getProfileIdFromRequest(RequestDTO requestDTO) { @@ -212,7 +242,7 @@ private int saveMessageLog(String requestType,String apiService, String jsonStri messageLog.setReference("msisdn"); messageLog.setStatus(0); messageLog.setType(MessageType.Request.getValue()); - messageLog.setValue(number); + messageLog.setValue("tel:+"+number); messageLog.setRequest(jsonString); messageLog.setMessageTimestamp(new Date()); int ref_number = loggingDAO.saveMessageLog(messageLog); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestResponseRequestHandleable.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestResponseRequestHandleable.java index baac1560..7fb379de 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestResponseRequestHandleable.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/RequestResponseRequestHandleable.java @@ -22,7 +22,7 @@ public interface RequestResponseRequestHandleable { String getApiServiceCalls() ; String getJosonString(final E2 requestDTO); - String getnumber(final E2 requestDTO); + String getnumber(final E2 requestDTO) throws Exception; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java index 08876f69..032b92e5 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java @@ -60,6 +60,7 @@ public class CreditApplyRequestHandler extends AbstractRequestHandler Date: Fri, 24 Mar 2017 15:19:02 +0530 Subject: [PATCH 096/112] Edit Location API URL --- .../services/dep/sandbox/dao/USSDDAO.java | 2 +- .../sandbox/dao/hibernate/HibernateUSSDDAO.java | 16 +++------------- .../dep/sandbox/service/LocationService.java | 3 ++- .../ussd/USSDApplicationConfigHandler.java | 8 +++++++- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java index c61df4c3..7158c2b4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/USSDDAO.java @@ -23,6 +23,6 @@ public interface USSDDAO { List getUssdApplications(int userid, String shortCode, String keyWord); - boolean saveUSSDApplications(String shortCode,String keyWord, int userId) throws Exception; + boolean saveUSSDApplications(UssdApplication ussdApplication) throws Exception; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java index 13f061f1..6bc34dfe 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateUSSDDAO.java @@ -69,25 +69,15 @@ public List getUssdApplications(int userid, String shortCode, S } @Override - public boolean saveUSSDApplications(String shortCode, String keyWord, int userId) throws Exception { - - UssdApplication application = new UssdApplication(); - application.setShortCode(shortCode); - application.setKeyword(keyWord); - application.setUserid(userId); + public boolean saveUSSDApplications(UssdApplication ussdApplication) throws Exception { try { - Session session = getSession(); - session.save(application); - - } catch (NoResultException e) { - return false; + saveOrUpdate(ussdApplication); + return true; } catch (Exception ex) { LOG.error("###USSD Config### Error in USSD Config Service ", ex); throw ex; } - return true; - } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java index c4056254..25db557d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/LocationService.java @@ -31,7 +31,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; -@Path("/location") +@Path("/location/v1") @Produces({MediaType.APPLICATION_JSON}) @Api(value = "location", description = "Rest Service for Location API") public class LocationService { @@ -39,6 +39,7 @@ public class LocationService { Log LOG = LogFactory.getLog(LocationService.class); @GET + @Path("/queries/location") @ApiOperation(value = "locationService", notes = "locationService", response = Response.class) @ApiImplicitParams({ @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header") }) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigHandler.java index 71ff2d0c..3ca90966 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/ussd/USSDApplicationConfigHandler.java @@ -22,6 +22,7 @@ import com.wso2telco.dep.oneapivalidation.util.ValidationRule; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.USSDDAO; +import com.wso2telco.services.dep.sandbox.dao.model.domain.UssdApplication; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.AddressIgnorerable; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; @@ -102,7 +103,12 @@ protected Returnable process(USSDApplicationConfigRequestWrapper extendedRequest String keyword = requestBean.getKeyWord(); int userId = requestBean.getUserID(); - boolean result = ussdDAO.saveUSSDApplications(shortCode, keyword, userId); + UssdApplication application = new UssdApplication(); + application.setShortCode(shortCode); + application.setKeyword(keyword); + application.setUserid(userId); + + boolean result = ussdDAO.saveUSSDApplications(application); if (!result) { LOG.error("###USSD CONFIG### Error occur in save applications"); From c0653630ed5ee33a729891aa5b5defc7b8296259 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Fri, 24 Mar 2017 17:15:44 +0530 Subject: [PATCH 097/112] Fixed HUBDEV-1518 --- .../dao/model/custom/ReceiptRequest.java | 2 + .../dao/model/custom/ReceiptResponse.java | 44 +++++++++++++++++++ .../dao/model/custom/RefundRequestBean.java | 35 ++++++--------- .../dao/model/custom/RefundResponseBean.java | 24 +++++++++- .../credit/PatialRefundRequestHandler.java | 44 ++++++++++++------- 5 files changed, 111 insertions(+), 38 deletions(-) create mode 100644 dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptResponse.java diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptRequest.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptRequest.java index 39274d10..baaaade3 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptRequest.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptRequest.java @@ -16,7 +16,9 @@ package com.wso2telco.services.dep.sandbox.dao.model.custom; +import com.fasterxml.jackson.annotation.JsonInclude; +@JsonInclude(value= JsonInclude.Include.NON_NULL) public class ReceiptRequest { private String notifyURL; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptResponse.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptResponse.java new file mode 100644 index 00000000..fdf81361 --- /dev/null +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ReceiptResponse.java @@ -0,0 +1,44 @@ + +/******************************************************************************* + * Copyright (c) 2015-2017, WSO2.Telco Inc. (http://www.wso2telco.com) + * + * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package com.wso2telco.services.dep.sandbox.dao.model.custom; + +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(value= JsonInclude.Include.NON_NULL) +public class ReceiptResponse { + + private String notifyURL; + private String callbackData; + + public String getNotifyURL() { + return notifyURL; + } + + public void setNotifyURL(String notifyURL) { + this.notifyURL = notifyURL; + } + + public String getCallbackData() { + return callbackData; + } + + public void setCallbackData(String callbackData) { + this.callbackData = callbackData; + } +} + + diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java index 2bcded28..1b24a608 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java @@ -47,12 +47,10 @@ public static class RefundRequest{ private String referenceCode; - private String callbackData; - - private String notifyURL; - private String merchantIdentification; + private ReceiptRequest receiptRequest; + public String getClientCorrelator() { return clientCorrelator; } @@ -111,21 +109,6 @@ public void setReferenceCode(String referenceCode) { this.referenceCode = referenceCode; } - public String getCallbackData() { - return callbackData; - } - - public void setCallbackData(String callbackData) { - this.callbackData = callbackData; - } - - public String getNotifyURL() { - return notifyURL; - } - - public void setNotifyURL(String notifyURL) { - this.notifyURL = notifyURL; - } public String getMerchantIdentification() { return merchantIdentification; @@ -135,15 +118,23 @@ public void setMerchantIdentification(String merchantIdentification) { this.merchantIdentification = merchantIdentification; } - public String toString() { + public ReceiptRequest getReceiptRequest() { + return receiptRequest; + } + + public void setReceiptRequest(ReceiptRequest receiptRequest) { + this.receiptRequest = receiptRequest; + } + + public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Client Correlator : " + getClientCorrelator()); builder.append("msisdn : " + getMsisdn()); builder.append("OriginalServerReferenceCode : " +getOriginalServerReferenceCode()); builder.append("reasonForRefund : " + getReasonForRefund()); builder.append("refundAmount : " + getPaymentAmount()); - builder.append("callbackData : " +getCallbackData()); - builder.append("notifyURL : "+getNotifyURL()); + builder.append("callbackData : " +receiptRequest.getCallbackData()); + builder.append("notifyURL : "+receiptRequest.getNotifyURL()); builder.append("merchantIdentification : "+getMerchantIdentification()); if (getPaymentAmount() != null) { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java index abcde158..238abc64 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundResponseBean.java @@ -15,6 +15,8 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.dao.model.custom; +import com.fasterxml.jackson.annotation.JsonInclude; + public class RefundResponseBean { private RefundResponse refundResponse; @@ -29,7 +31,7 @@ public void setRefundResponse(RefundResponse refundResponse) { this.refundResponse = refundResponse; } - + @JsonInclude(value= JsonInclude.Include.NON_NULL) public static class RefundResponse { private String clientCorrelator; @@ -42,8 +44,12 @@ public static class RefundResponse { private double refundAmount; + private String merchantIdentification; + private PaymentAmountWithTax paymentAmount; + private ReceiptResponse receiptResponse; + private String referenceCode; private String resourceURL; @@ -133,6 +139,22 @@ public String getServerReferanceCode() { public void setServerReferanceCode(String serverReferanceCode) { this.serverReferanceCode = serverReferanceCode; } + + public ReceiptResponse getReceiptResponse() { + return receiptResponse; + } + + public void setReceiptResponse(ReceiptResponse receiptResponse) { + this.receiptResponse = receiptResponse; + } + + public String getMerchantIdentification() { + return merchantIdentification; + } + + public void setMerchantIdentification(String merchantIdentification) { + this.merchantIdentification = merchantIdentification; + } } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index 8b3e1a53..9d3199dd 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -124,6 +124,8 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti PaymentAmountWithTax paymentAmountWithTax = request.getPaymentAmount(); ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); + String callbackData = null; + String notifyURL = null; if (requestBean != null && request != null) { @@ -139,8 +141,12 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); - String callbackData = CommonUtil.getNullOrTrimmedValue(request.getCallbackData()); - String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getNotifyURL()); + + if(request.getReceiptRequest()!=null) { + callbackData = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getCallbackData()); + notifyURL = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getNotifyURL()); + } + String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMerchantIdentification()); String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); String purchaseCategoryCode = CommonUtil.getNullOrTrimmedValue(metadata.getPurchaseCategoryCode()); @@ -160,8 +166,8 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, CURRENCY, currency), new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_DOUBLE_GE_ZERO, AMOUNT, amount), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, CALL_BACK_DATA, callbackData), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, NOTIFY_URL, notifyURL), - new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, MERCHANT_IDENTIFICATION, merchantIdentification), + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, NOTIFY_URL, notifyURL), + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, MERCHANT_IDENTIFICATION, merchantIdentification), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, DESCRIPTION, description), new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, PURCHASE_CATEGORY_CODE, purchaseCategoryCode) @@ -202,7 +208,6 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro String msisdn = CommonUtil.getNullOrTrimmedValue(request.getMsisdn()); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); - String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMsisdn()); String serverTransactionReference = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); String userName = extendedRequestDTO.getUser().getUserName(); String serviceCreditApply = ServiceName.PartialRefund.toString(); @@ -212,6 +217,9 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); String endUserIdPath = extendedRequestDTO.getMsisdn(); amount = Double.parseDouble(CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount())); + String callbackData = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getCallbackData()); + String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getNotifyURL()); + String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMerchantIdentification()); String serverReferenceCodeFormat = String.format("%06d", getReferenceNumber()); @@ -324,6 +332,9 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro return responseWrapperDTO; } + ReceiptResponse receiptResponse = new ReceiptResponse(); + receiptResponse.setCallbackData(callbackData); + receiptResponse.setNotifyURL(notifyURL); if (RefundAmount <= validTransaction) { @@ -331,9 +342,8 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); if (manageNumber != null) { updateBalance(manageNumber, RefundAmount); - RefundResponseBean responseBean = buildJsonResponseBody(RefundAmount, clientCorrelator, merchantIdentification, reasonForRefund, - serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata); - + RefundResponseBean responseBean = buildJsonResponseBody(RefundAmount, clientCorrelator, msisdn, reasonForRefund, + serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata,receiptResponse,merchantIdentification); saveResponse(extendedRequestDTO, endUserID, responseBean, apiServiceCalls, MessageProcessStatus.Success); responseWrapperDTO.setHttpStatus(Response.Status.CREATED); @@ -356,16 +366,12 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro } catch (Exception ex) { - RefundResponseBean responseBean = buildJsonResponseBody(RefundAmount, clientCorrelator, merchantIdentification, reasonForRefund, - serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata); - saveResponse(extendedRequestDTO, endUserID, responseBean, apiServiceCalls, MessageProcessStatus.Failed); LOG.error("###REFUND### Error in processing credit service request. ", ex); responseWrapperDTO .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; } - } @Override @@ -381,8 +387,13 @@ private void updateBalance(ManageNumber manageNumber, double amount) throws Exce numberDao.saveManageNumbers(manageNumber); } - private RefundResponseBean buildJsonResponseBody(double amount, String clientCorrelator, String merchantIdentification, - String reason, String serverTransactionReference, String operationStatus, String referenceCode, String serverReferenceCode, ChargingInformation chargingInformation, ChargingMetaDataWithTax chargingMetaDataWithTax) { + private RefundResponseBean buildJsonResponseBody(double amount, String clientCorrelator, String enduserID, + String reason, String serverTransactionReference, String + operationStatus, String referenceCode, String + serverReferenceCode, ChargingInformation + chargingInformation, ChargingMetaDataWithTax + chargingMetaDataWithTax, ReceiptResponse receiptResponse, + String merchantIdentification) { PaymentAmountWithTax paymentAmountWithTax = new PaymentAmountWithTax(); paymentAmountWithTax.setChargingInformation(chargingInformation); @@ -392,13 +403,16 @@ private RefundResponseBean buildJsonResponseBody(double amount, String clientCor refundResponse.setRefundAmount(amount); refundResponse.setOriginalServerReferenceCode(serverTransactionReference); refundResponse.setClientCorrelator(clientCorrelator); - refundResponse.setEndUserID(merchantIdentification); + refundResponse.setEndUserID(enduserID); refundResponse.setReasonForRefund(reason); + refundResponse.setMerchantIdentification(merchantIdentification); refundResponse.setPaymentAmount(paymentAmountWithTax); + refundResponse.setReceiptResponse(receiptResponse); refundResponse.setReferenceCode(referenceCode); refundResponse.setServerReferanceCode(serverReferenceCode); refundResponse.setResourceURL(CommonUtil.getResourceUrl(requestWrapperDTO)); refundResponse.setTransactionOperationStatus(operationStatus); + RefundResponseBean refundResponseBean = new RefundResponseBean(); refundResponseBean.setRefundResponse(refundResponse); responseWrapperDTO.setRefundResponseBean(refundResponseBean); From 031467d6df08bbfd729e9a43f6224ed7c8c940e8 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Fri, 24 Mar 2017 19:00:48 +0530 Subject: [PATCH 098/112] Fixed HUBDEV-1495 --- .../servicefactory/provisioning/RemoveProvisionedServices.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java index e884307f..15bbdc0f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java @@ -396,7 +396,7 @@ private void buildJsonResponseBody(String serviceCode, .setServiceRemoveResponse(serviceRemovalResponse); responseWrapper .setRemoveProvisionedResponseBean(removeProvisionResponseBean); - responseWrapper.setHttpStatus(Response.Status.OK); + responseWrapper.setHttpStatus(Response.Status.CREATED); } From 35f15689486426aa81dcbfa0ef82a23478ffd7a5 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Mon, 27 Mar 2017 10:49:24 +0530 Subject: [PATCH 099/112] Fixed HUBDEV-1515 --- .../custom/ChargeRefundAmountResponse.java | 6 +++--- .../dao/model/custom/ChargingInformation.java | 6 +++--- .../custom/PaymentChargingInformation.java | 6 +++--- .../dao/model/custom/RefundRequestBean.java | 6 +++--- .../credit/PatialRefundRequestHandler.java | 19 ++++++++++--------- .../PaymentRefundRequestHandler0_8.java | 8 ++++---- .../payment/PaymentRequestHandler.java | 6 +++--- .../wallet/MakePaymentRequestHandler.java | 6 +++--- .../RefundTransactionRequestHandler.java | 6 +++--- 9 files changed, 35 insertions(+), 34 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java index 68a9ea6e..c83d8f82 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargeRefundAmountResponse.java @@ -23,7 +23,7 @@ public class ChargeRefundAmountResponse { private PaymentChargingInformation chargingInformation; - private String totalAmountRefunded; + private double totalAmountRefunded; private PaymentChargingMetaData chargingMetaData; @@ -43,11 +43,11 @@ public void setChargingMetaData(PaymentChargingMetaData chargingMetaData) { this.chargingMetaData = chargingMetaData; } - public String getTotalAmountRefunded() { + public double getTotalAmountRefunded() { return totalAmountRefunded; } - public void setTotalAmountRefunded(String totalAmountRefunded) { + public void setTotalAmountRefunded(double totalAmountRefunded) { this.totalAmountRefunded = totalAmountRefunded; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingInformation.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingInformation.java index 87d4636b..ccff6bbc 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingInformation.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ChargingInformation.java @@ -19,17 +19,17 @@ public class ChargingInformation { - private String amount; + private double amount; private String currency; private String description; - public String getAmount() { + public double getAmount() { return amount; } - public void setAmount(String amount) { + public void setAmount(double amount) { this.amount = amount; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java index f9c792b5..b8cf50bc 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/PaymentChargingInformation.java @@ -17,17 +17,17 @@ public class PaymentChargingInformation { - private String amount; + private double amount; private String currency; private String description; - public String getAmount() { + public double getAmount() { return amount; } - public void setAmount(String amount) { + public void setAmount(double amount) { this.amount = amount; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java index 1b24a608..06ff72a8 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/RefundRequestBean.java @@ -41,7 +41,7 @@ public static class RefundRequest{ private String reasonForRefund; - private double refundAmount; + private String refundAmount; private PaymentAmountWithTax paymentAmount; @@ -84,11 +84,11 @@ public void setReasonForRefund(String reasonForRefund) { this.reasonForRefund = reasonForRefund; } - public double getRefundAmount() { + public String getRefundAmount() { return refundAmount; } - public void setRefundAmount(double refundAmount) { + public void setRefundAmount(String refundAmount) { this.refundAmount = refundAmount; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java index 9d3199dd..50f71c36 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundRequestHandler.java @@ -129,7 +129,7 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti if (requestBean != null && request != null) { - double RefundAmount = request.getRefundAmount(); + String RefundAmount = CommonUtil.getNullOrTrimmedValue(request.getRefundAmount()); String msisdn = CommonUtil.getNullOrTrimmedValue(request.getMsisdn()); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); @@ -140,7 +140,7 @@ protected boolean validate(PatialRefundRequestWrapper wrapperDTO) throws Excepti String taxAmount = CommonUtil.getNullOrTrimmedValue(metadata.getTax()); String referenceCode = CommonUtil.getNullOrTrimmedValue(request.getReferenceCode()); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); - String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String amount = CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount())); if(request.getReceiptRequest()!=null) { callbackData = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getCallbackData()); @@ -204,7 +204,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro ChargingInformation chargingInformation = paymentAmountWithTax.getChargingInformation(); ChargingMetaDataWithTax metadata = paymentAmountWithTax.getChargingMetaData(); - double RefundAmount = request.getRefundAmount(); + String RefundAmount = CommonUtil.getNullOrTrimmedValue(request.getRefundAmount()); String msisdn = CommonUtil.getNullOrTrimmedValue(request.getMsisdn()); String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String reasonForRefund = CommonUtil.getNullOrTrimmedValue(request.getReasonForRefund()); @@ -216,7 +216,7 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro String endUserID = getLastMobileNumber(extendedRequestDTO.getMsisdn()); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); String endUserIdPath = extendedRequestDTO.getMsisdn(); - amount = Double.parseDouble(CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount())); + amount = Double.parseDouble(CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount()))); String callbackData = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getCallbackData()); String notifyURL = CommonUtil.getNullOrTrimmedValue(request.getReceiptRequest().getNotifyURL()); String merchantIdentification = CommonUtil.getNullOrTrimmedValue(request.getMerchantIdentification()); @@ -265,9 +265,10 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro Double validTransaction = checkOriginalServerReferenceWithServerReference(userId, endUserID, MessageProcessStatus.Success, MessageType.Response, serverTransactionReference); // check account amount decimal format + Double partialRefundAmount = Double.parseDouble(RefundAmount); BigDecimal bigDecimal = new BigDecimal(RefundAmount); Integer decimalDigits = bigDecimal.scale(); - if (!((decimalDigits <= 2) && (decimalDigits >= 0)) || RefundAmount < 0) { + if (!((decimalDigits <= 2) && (decimalDigits >= 0)) || partialRefundAmount < 0) { LOG.error("###REFUND### amount should be a whole number or two digit decimal"); responseWrapperDTO .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, @@ -336,12 +337,12 @@ protected Returnable process(PatialRefundRequestWrapper extendedRequestDTO) thro receiptResponse.setCallbackData(callbackData); receiptResponse.setNotifyURL(notifyURL); - if (RefundAmount <= validTransaction) { + if (partialRefundAmount <= validTransaction) { ManageNumber manageNumber = numberDao.getNumber(endUserID, userName); if (manageNumber != null) { - updateBalance(manageNumber, RefundAmount); + updateBalance(manageNumber, Double.parseDouble(RefundAmount)); RefundResponseBean responseBean = buildJsonResponseBody(RefundAmount, clientCorrelator, msisdn, reasonForRefund, serverTransactionReference, OperationStatus.Refunded.toString(), referenceCode, serverReferenceCode, chargingInformation, metadata,receiptResponse,merchantIdentification); @@ -387,7 +388,7 @@ private void updateBalance(ManageNumber manageNumber, double amount) throws Exce numberDao.saveManageNumbers(manageNumber); } - private RefundResponseBean buildJsonResponseBody(double amount, String clientCorrelator, String enduserID, + private RefundResponseBean buildJsonResponseBody(String amount, String clientCorrelator, String enduserID, String reason, String serverTransactionReference, String operationStatus, String referenceCode, String serverReferenceCode, ChargingInformation @@ -400,7 +401,7 @@ private RefundResponseBean buildJsonResponseBody(double amount, String clientCor paymentAmountWithTax.setChargingMetaData(chargingMetaDataWithTax); RefundResponse refundResponse = new RefundResponse(); - refundResponse.setRefundAmount(amount); + refundResponse.setRefundAmount(Double.parseDouble(amount)); refundResponse.setOriginalServerReferenceCode(serverTransactionReference); refundResponse.setClientCorrelator(clientCorrelator); refundResponse.setEndUserID(enduserID); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java index d09e6402..321d4f71 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRefundRequestHandler0_8.java @@ -106,7 +106,7 @@ protected boolean validate(PaymentRefundRequestWrapperDTO wrapperDTO) throws Exc String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String endUserID = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); String msisdn = CommonUtil.getNullOrTrimmedValue(request.getEndUserId()); - String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount().toString()); + String amount = CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount())); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency().toString()); String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); @@ -201,7 +201,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) String endUserId = getLastMobileNumber(endUserIdPath); String originalServerReferenceCode = CommonUtil .getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); - String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String amount = CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount())); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); @@ -331,7 +331,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) responseBean.setProductID(productID); responseBean.setServiceID(serviceID); - chargeInformation.setAmount(amount); + chargeInformation.setAmount(Double.parseDouble(amount)); chargeInformation.setCurrency(currency); chargeInformation.setDescription(description); @@ -353,7 +353,7 @@ protected Returnable process(PaymentRefundRequestWrapperDTO extendedRequestDTO) totalAmountToRefund+=totalAmountRefunded; // Setting the total Amount Refund - payAmount.setTotalAmountRefunded(totalAmountToRefund.toString()); + payAmount.setTotalAmountRefunded(Double.parseDouble(totalAmountToRefund.toString())); if (!isOriginalServerReferenceCode) { LOG.error("###REFUND### no payment matching for this Refund"); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java index f6f15d62..5cca0294 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/payment/PaymentRequestHandler.java @@ -99,7 +99,7 @@ protected boolean validate(ChargePaymentRequestWrapperDTO wrapperDTO) throws Exc String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String endUserID = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); String msisdn = CommonUtil.getNullOrTrimmedValue(request.getEndUserId()); - String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount().toString()); + String amount = CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount())); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency().toString()); String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); @@ -172,7 +172,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) String endUserIdPath = extendedRequestDTO.getEndUserId(); String endUserIdRequest = request.getEndUserId(); String endUserId = getLastMobileNumber(endUserIdPath); - String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String amount = CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount())); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); @@ -283,7 +283,7 @@ protected Returnable process(ChargePaymentRequestWrapperDTO extendedRequestDTO) responseBean.setClientCorrelator(clientCorrelator); responseBean.setEndUserId(endUserIdPath); - chargeInformation.setAmount(amount); + chargeInformation.setAmount(Double.parseDouble(amount)); chargeInformation.setCurrency(currency); chargeInformation.setDescription(description); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java index 609dfce3..f58e4dc4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/MakePaymentRequestHandler.java @@ -100,7 +100,7 @@ protected boolean validate(MakePaymentRequestWrapperDTO wrapperDTO) throws Excep String clientCorrelator = CommonUtil.getNullOrTrimmedValue(request.getClientCorrelator()); String endUserID = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getEndUserId()); String msisdn = CommonUtil.getNullOrTrimmedValue(request.getEndUserId()); - String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount().toString()); + String amount = CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount())); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); @@ -168,7 +168,7 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th String endUserIdPath = extendedRequestDTO.getEndUserId(); String endUserIdRequest = request.getEndUserId(); String endUserId = getLastMobileNumber(endUserIdPath); - String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String amount = CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount())); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); @@ -288,7 +288,7 @@ protected Returnable process(MakePaymentRequestWrapperDTO extendedRequestDTO) th responseBean.setClientCorrelator(clientCorrelator); responseBean.setEndUserId(endUserIdPath); - chargeInformation.setAmount(amount); + chargeInformation.setAmount(Double.parseDouble(amount)); chargeInformation.setCurrency(currency); chargeInformation.setDescription(description); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java index e2c529e1..b554ecb2 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/wallet/RefundTransactionRequestHandler.java @@ -98,7 +98,7 @@ protected boolean validate(RefundRequestWrapperDTO wrapperDTO) throws Exception String endUserID = CommonUtil.getNullOrTrimmedValue(request.getEndUserId()); String originalReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalReferenceCode()); String originalServerReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); - String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String amount = CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount())); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metaData.getOnBehalfOf()); @@ -169,7 +169,7 @@ protected Returnable process(RefundRequestWrapperDTO extendedRequestDTO) throws String originalReferenceCode = CommonUtil.getNullOrTrimmedValue(request.getOriginalReferenceCode()); String originalServerReferenceCode = CommonUtil .getNullOrTrimmedValue(request.getOriginalServerReferenceCode()); - String amount = CommonUtil.getNullOrTrimmedValue(chargingInformation.getAmount()); + String amount = CommonUtil.getNullOrTrimmedValue(String.valueOf(chargingInformation.getAmount())); String currency = CommonUtil.getNullOrTrimmedValue(chargingInformation.getCurrency()); String description = CommonUtil.getNullOrTrimmedValue(chargingInformation.getDescription()); String onBehalfOf = CommonUtil.getNullOrTrimmedValue(metadata.getOnBehalfOf()); @@ -303,7 +303,7 @@ protected Returnable process(RefundRequestWrapperDTO extendedRequestDTO) throws responseBean.setOriginalReferenceCode(originalReferenceCode); responseBean.setOriginalServerReferenceCode(originalServerReferenceCode); - chargeInformation.setAmount(amount); + chargeInformation.setAmount(Double.parseDouble(amount)); chargeInformation.setCurrency(currency); chargeInformation.setDescription(description); From 283804ed4979b227bb19d6a1bb3a472eed3ddcbf Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Mon, 27 Mar 2017 14:01:27 +0530 Subject: [PATCH 100/112] Fixed HUBDEV-1521 --- dep-sandbox/dbscripts/dep-sandbox1_7_0.sql | 6 +- .../dbscripts/migration1_6_0to1_7_0.sql | 6 +- .../dao/model/custom/ManageNumberRequest.java | 39 +++++ .../dao/model/domain/ManageNumber.java | 76 +++++++++ .../location/LocationRequestHandler.java | 145 +++++++++++------- .../location/TerminalLocation.java | 4 + .../location/TerminalLocationList.java | 9 +- .../user/ManageNumberServiceHandler.java | 4 + 8 files changed, 227 insertions(+), 62 deletions(-) diff --git a/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql index ba46114e..e21cb766 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql @@ -179,6 +179,10 @@ CREATE TABLE IF NOT EXISTS `numbers` ( `reserved_amount` double NOT NULL DEFAULT '0', `num_description` varchar(255) DEFAULT NULL, `num_status` int(11) DEFAULT NULL, + `altitude` VARCHAR(255) DEFAULT NULL, + `latitude` VARCHAR(255) DEFAULT NULL, + `longitude` VARCHAR(255) DEFAULT NULL, + `loc_ret_status` VARCHAR(45) DEFAULT NULL, `user_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), CONSTRAINT `FK88C28E4A9E083448` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) @@ -188,7 +192,7 @@ CREATE TABLE IF NOT EXISTS `numbers` ( -- Dumping data for table `numbers` -- -INSERT INTO `numbers` VALUES (1,'94773524308',4343,3413,13414,989.85,0,'test number',1,1),(2,'94123123123',1344,134413,13413,1000,0,'testAuxenta',1,5),(3,'94771564812',134134,13431,1343,1000,0,'dfaf',1,1); +INSERT INTO `numbers` VALUES (1,'94773524308',4343,3413,13414,989.85,0,'test number',1,'2341','45244444','135131','Retrieved',1),(2,'94123123123',1344,134413,13413,1000,0,'testAuxenta',1,'','','','',5),(3,'94771564812',134134,13431,1343,1000,0,'dfaf',1,'','','','',1); -- -- Table structure for table `payment_gen` diff --git a/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql b/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql index 20bcc827..b8971e87 100644 --- a/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql +++ b/dep-sandbox/dbscripts/migration1_6_0to1_7_0.sql @@ -15,4 +15,8 @@ CREATE TABLE IF NOT EXISTS `ussd_applications` ( ); - +ALTER TABLE `sandbox`.`numbers` +ADD COLUMN `altitude` VARCHAR(255) NULL DEFAULT NULL AFTER `num_status`, +ADD COLUMN `latitude` VARCHAR(255) NULL DEFAULT NULL AFTER `altitude`, +ADD COLUMN `longitude` VARCHAR(255) NULL DEFAULT NULL AFTER `latitude`, +ADD COLUMN `loc_ret_status` VARCHAR(45) NULL DEFAULT NULL AFTER `longitude`; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ManageNumberRequest.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ManageNumberRequest.java index 56af8923..db897c2c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ManageNumberRequest.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ManageNumberRequest.java @@ -18,6 +18,14 @@ public class ManageNumberRequest { private int mnc; + private String altitude; + + private String latitude; + + private String longitude; + + private String locationRetrieveStatus; + public String getNumber() { return number; } @@ -82,4 +90,35 @@ public void setMnc(int mnc) { this.mnc = mnc; } + public String getAltitude() { + return altitude; + } + + public void setAltitude(String altitude) { + this.altitude = altitude; + } + + public String getLatitude() { + return latitude; + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + public String getLongitude() { + return longitude; + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getLocationRetrieveStatus() { + return locationRetrieveStatus; + } + + public void setLocationRetrieveStatus(String locationRetrieveStatus) { + this.locationRetrieveStatus = locationRetrieveStatus; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/ManageNumber.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/ManageNumber.java index 0bd5f65b..2a2c9fa4 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/ManageNumber.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/domain/ManageNumber.java @@ -50,6 +50,18 @@ public class ManageNumber implements Serializable { @Column(name = "num_status") private int status; + @Column(name="altitude") + private String altitude; + + @Column(name="latitude") + private String latitude; + + @Column(name="longitude") + private String longitude; + + @Column(name="loc_ret_status") + private String locationRetrieveStatus; + @ManyToOne @JoinColumn(name = "user_id", referencedColumnName = "id") private User user; @@ -182,4 +194,68 @@ public double getReserved_amount() { public void setReserved_amount(double reserved_amount) { this.reserved_amount = reserved_amount; } + + /** + * get location parameter altitude. + * @return altitude + */ + public String getAltitude() { + return altitude; + } + + /** + * Set location parameter altitude. + * @param altitude altitude + */ + public void setAltitude(String altitude) { + this.altitude = altitude; + } + + /** + * Get location parameter latitude + * @return latitude + */ + public String getLatitude() { + return latitude; + } + + /** + * Set location parameter latitude. + * @param latitude latitude + */ + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + /** + * Get location parameter longitude. + * @return longitude + */ + public String getLongitude() { + return longitude; + } + + /** + * Set location parameter longitude. + * @param longitude longitude + */ + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + /** + * Get Location Retrieve Status. + * @return status + */ + public String getLocationRetrieveStatus() { + return locationRetrieveStatus; + } + + /** + * Set Location Retrieve Status. + * @param locationRetrieveStatus status + */ + public void setLocationRetrieveStatus(String locationRetrieveStatus) { + this.locationRetrieveStatus = locationRetrieveStatus; + } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java index ce9944ed..944ca73a 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/LocationRequestHandler.java @@ -19,9 +19,12 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import com.wso2telco.dep.oneapivalidation.service.impl.location.ValidateLocation; +import com.wso2telco.dep.oneapivalidation.exceptions.CustomException; +import com.wso2telco.dep.oneapivalidation.util.Validation; +import com.wso2telco.dep.oneapivalidation.util.ValidationRule; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.LocationDAO; +import com.wso2telco.services.dep.sandbox.dao.NumberDAO; import com.wso2telco.services.dep.sandbox.dao.model.custom.LocationRequestWrapperDTO; import com.wso2telco.services.dep.sandbox.dao.model.domain.*; import com.wso2telco.services.dep.sandbox.servicefactory.*; @@ -29,9 +32,11 @@ import org.apache.commons.logging.LogFactory; import org.json.JSONObject; +import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.List; @@ -43,90 +48,97 @@ public class LocationRequestHandler extends AbstractRequestHandler terminalLocationArrayList = new ArrayList<>(); + List address = Arrays.asList(extendedRequestDTO.getAddress().split(",")); + + for (int i = 0; i < address.size(); i++) { - if (locparam.getLocationRetrieveStatus().equals(RETRIEVED)) { - LOG.debug("Location retrieve status : " + RETRIEVED); + manageNumber = numberDAO.getNumber(getLastMobileNumber(address.get(i).toString()), user.getUserName()); - locationDao.saveTransaction(extendedRequestDTO.getAddress(), - Double.valueOf(extendedRequestDTO.getRequestedAccuracy()), - "Retrieved", user); + if (manageNumber != null) { - TerminalLocationList objTerminalLocationList = new TerminalLocationList(); + if (manageNumber.getLocationRetrieveStatus().equals(RETRIEVED)) { + LOG.debug("Location retrieve status : " + RETRIEVED); - TerminalLocation objTerminalLocation = new TerminalLocation(); - objTerminalLocation.setAddress(extendedRequestDTO.getAddress()); + TerminalLocation objTerminalLocation = new TerminalLocation(); + objTerminalLocation.setAddress(address.get(i).toString()); - TerminalLocation.CurrentLocation objCurrentLocation = new TerminalLocation.CurrentLocation(); - objCurrentLocation.setAccuracy(Double.valueOf(extendedRequestDTO.getRequestedAccuracy())); - objCurrentLocation.setAltitude(Double.parseDouble(locparam.getAltitude())); - objCurrentLocation.setLatitude(Double.parseDouble(locparam.getLatitude())); - objCurrentLocation.setLongitude(Double.parseDouble(locparam.getLongitude())); + TerminalLocation.CurrentLocation objCurrentLocation = new TerminalLocation.CurrentLocation(); + objCurrentLocation.setAccuracy(Double.valueOf(extendedRequestDTO.getRequestedAccuracy())); + objCurrentLocation.setAltitude(Double.parseDouble(manageNumber.getAltitude())); + objCurrentLocation.setLatitude(Double.parseDouble(manageNumber.getLatitude())); + objCurrentLocation.setLongitude(Double.parseDouble(manageNumber.getLongitude())); - SimpleDateFormat dateFormat = new SimpleDateFormat(SIMPLE_DATE_FORMAT); - Date currentDate = new Date(); - objCurrentLocation.setTimestamp(dateFormat.format(currentDate)); + SimpleDateFormat dateFormat = new SimpleDateFormat(SIMPLE_DATE_FORMAT); + Date currentDate = new Date(); + objCurrentLocation.setTimestamp(dateFormat.format(currentDate)); - objTerminalLocation.setCurrentLocation(objCurrentLocation); - objTerminalLocation.setLocationRetrievalStatus(RETRIEVED); + objTerminalLocation.setCurrentLocation(objCurrentLocation); + objTerminalLocation.setLocationRetrievalStatus(RETRIEVED); - objTerminalLocationList.setTerminalLocation(objTerminalLocation); + terminalLocationArrayList.add(objTerminalLocation); - responseWrapperDTO.setTerminalLocationList(objTerminalLocationList); - responseWrapperDTO.setHttpStatus(Status.OK); + } else if (manageNumber.getLocationRetrieveStatus().equals(NOT_RETRIEVED)) { - saveResponse(objTerminalLocation,extendedRequestDTO.getAddress(),apiServiceCalls, MessageProcessStatus.Success); + LOG.debug("Location retrieve status :" + NOT_RETRIEVED); - } else if (locparam.getLocationRetrieveStatus().equals(NOT_RETRIEVED)) { + locationDao.saveTransaction(extendedRequestDTO.getAddress(), + Double.valueOf(extendedRequestDTO.getRequestedAccuracy()), + NOT_RETRIEVED, user); - LOG.debug("Location retrieve status :" + NOT_RETRIEVED); + TerminalLocation objTerminalLocation = new TerminalLocation(); + objTerminalLocation.setAddress(address.get(i).toString()); + objTerminalLocation.setLocationRetrievalStatus("NotRetrieved"); + terminalLocationArrayList.add(objTerminalLocation); + responseWrapperDTO.setTerminalLocationList(objTerminalLocationList); + responseWrapperDTO.setHttpStatus(Status.OK); - locationDao.saveTransaction(extendedRequestDTO.getAddress(), - Double.valueOf(extendedRequestDTO.getRequestedAccuracy()), - NOT_RETRIEVED, user); + } - TerminalLocationList objTerminalLocationList = new TerminalLocationList(); + if (manageNumber.getLocationRetrieveStatus().equals("Error")) { - TerminalLocation objTerminalLocation = new TerminalLocation(); - objTerminalLocation.setAddress(extendedRequestDTO.getAddress()); - objTerminalLocation.setLocationRetrievalStatus("NotRetrieved"); + LOG.debug("Location retrieve status : Error"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", + "Invalid input value for message part %1", extendedRequestDTO.getAddress())); + responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); + return responseWrapperDTO; + } - objTerminalLocationList.setTerminalLocation(objTerminalLocation); + } + } + objTerminalLocationList.setTerminalLocation(terminalLocationArrayList); - responseWrapperDTO.setTerminalLocationList(objTerminalLocationList); - responseWrapperDTO.setHttpStatus(Status.CREATED); + responseWrapperDTO.setTerminalLocationList(objTerminalLocationList); + responseWrapperDTO.setHttpStatus(Status.OK); + saveResponse(objTerminalLocationList, extendedRequestDTO.getAddress(), apiServiceCalls, + MessageProcessStatus.Success); - } else if (locparam.getLocationRetrieveStatus().equals("Error")) { - LOG.debug("Location retrieve status : Error"); - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", "Invalid input value for message part %1", extendedRequestDTO.getAddress())); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } - } else { - LOG.debug("Location parameters are empty"); - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", "Invalid input value for message part %1", extendedRequestDTO.getAddress())); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } }catch (Exception ex){ LOG.debug("Error occurs in location retriever"); responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", "Invalid input value for message part %1", extendedRequestDTO.getAddress())); @@ -140,10 +152,29 @@ protected Returnable process(LocationRequestWrapperDTO extendedRequestDTO) throw @Override protected boolean validate(LocationRequestWrapperDTO wrapperDTO) throws Exception { - ValidateLocation validator = new ValidateLocation(); - String[] params ={wrapperDTO.getAddress(),wrapperDTO.getRequestedAccuracy()}; - validator.validate(params); - return false; + List validationRulesList = new ArrayList<>(); + List address = Arrays.asList(extendedRequestDTO.getAddress().split(",")); + + try { + + for (Object addres : address) { + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_TEL_END_USER_ID, "Address", + addres.toString())); + } + validationRulesList.add( + new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY_DOUBLE_GE_ZERO, "Accuracy",extendedRequestDTO.getRequestedAccuracy())); + ValidationRule[] validationRules = new ValidationRule[validationRulesList.size()]; + validationRules = validationRulesList.toArray(validationRules); + Validation.checkRequestParams(validationRules); + + } catch (CustomException ex) { + LOG.error("###LOCATION### Error in Validations. ", ex); + responseWrapperDTO.setRequestError( + constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), ex.getErrmsg(), ex.getErrvar()[0])); + return false; + } + return true; } @@ -156,7 +187,7 @@ protected Returnable getResponseDTO() { @Override protected List getAddress() { List address =new ArrayList(); - address.add(extendedRequestDTO.getAddress()); + address = Arrays.asList(extendedRequestDTO.getAddress().split(",")); return address; } @@ -196,7 +227,7 @@ public String getnumber(LocationRequestWrapperDTO requestDTO) { * @param status * @throws Exception */ - private void saveResponse(TerminalLocation terminalLocation,String endUserId, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { + private void saveResponse(TerminalLocationList terminalLocation,String endUserId, APIServiceCalls apiServiceCalls, MessageProcessStatus status) throws Exception { String jsonInString = null; Gson resp = new Gson(); @@ -213,7 +244,7 @@ private void saveResponse(TerminalLocation terminalLocation,String endUserId, AP messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog.setUserid(extendedRequestDTO.getUser().getId()); messageLog.setReference("msisdn"); - messageLog.setValue(endUserId); + messageLog.setValue(getLastMobileNumber(endUserId)); messageLog.setMessageTimestamp(new Date()); loggingDAO.saveMessageLog(messageLog); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/TerminalLocation.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/TerminalLocation.java index 13c8a33f..1fac7550 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/TerminalLocation.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/TerminalLocation.java @@ -15,6 +15,9 @@ ******************************************************************************/ package com.wso2telco.services.dep.sandbox.servicefactory.location; +import com.fasterxml.jackson.annotation.JsonInclude; + +@JsonInclude(value= JsonInclude.Include.NON_NULL) public class TerminalLocation { private String address=null; @@ -64,6 +67,7 @@ public void setLocationRetrievalStatus(String locationRetrievalStatus) { this.locationRetrievalStatus = locationRetrievalStatus; } + @JsonInclude(value= JsonInclude.Include.NON_NULL) public static class CurrentLocation { private Double accuracy=0.0; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/TerminalLocationList.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/TerminalLocationList.java index e405819a..f9bc0936 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/TerminalLocationList.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/location/TerminalLocationList.java @@ -16,21 +16,24 @@ package com.wso2telco.services.dep.sandbox.servicefactory.location; +import java.util.List; + public class TerminalLocationList { - private TerminalLocation terminalLocation; + private List terminalLocation; /** * @return the terminalLocation */ - public TerminalLocation getTerminalLocation() { + public List getTerminalLocation() { return terminalLocation; } /** * @param terminalLocation the terminalLocation to set */ - public void setTerminalLocation(TerminalLocation terminalLocation) { + + public void setTerminalLocation(List terminalLocation) { this.terminalLocation = terminalLocation; } } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/user/ManageNumberServiceHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/user/ManageNumberServiceHandler.java index a25e6c02..de835885 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/user/ManageNumberServiceHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/user/ManageNumberServiceHandler.java @@ -107,6 +107,10 @@ protected Returnable process(ManageNumberRequestWrapperDTO extendedRequestDTO) t manageNumber.setIMSI(extendedRequestDTO.getManageNumberRequest().getImsi()); manageNumber.setMCC(extendedRequestDTO.getManageNumberRequest().getMcc()); manageNumber.setMNC(extendedRequestDTO.getManageNumberRequest().getMnc()); + manageNumber.setAltitude(extendedRequestDTO.getManageNumberRequest().getAltitude()); + manageNumber.setLatitude(extendedRequestDTO.getManageNumberRequest().getLatitude()); + manageNumber.setLongitude(extendedRequestDTO.getManageNumberRequest().getLongitude()); + manageNumber.setLocationRetrieveStatus(extendedRequestDTO.getManageNumberRequest().getLocationRetrieveStatus()); numberDAO.saveManageNumbers(manageNumber); responseWrapper.setHttpStatus(Response.Status.CREATED); responseWrapper.setStatus("Successful"); From 2883bf7e5b89bf461ffcd74b7f87f7ad9ceee528 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Tue, 28 Mar 2017 12:38:15 +0530 Subject: [PATCH 101/112] Refectoring SMS API --- .../smsmessaging/gateway/SendMTSMSService.java | 16 ++++++++++------ ...SubscribeApplicationNotificationsHandler.java | 8 ++++---- .../SubscribeToDeliveryNotificationService.java | 4 ++-- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java index 67b03941..6c293a3d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SendMTSMSService.java @@ -167,7 +167,7 @@ protected Returnable process(SendMTSMSRequestWrapperDTOGateway extendedRequestDT return responseWrapper; } - smsMessageResponse.setResourceURL(getoutSideResourceURL(Integer.toString(getReferenceNumber()))); + smsMessageResponse.setResourceURL(getoutSideResourceURL(getReferenceNumber())); smsMessageResponse.setSenderAddress(requestBean.getOutboundSMSMessageRequest().getSenderAddress()); smsMessageResponse.setReceiptRequest(requestBean.getOutboundSMSMessageRequest().getReceiptRequest()); smsMessageResponse.setSenderAddress(requestBean.getOutboundSMSMessageRequest().getSenderAddress()); @@ -178,7 +178,7 @@ protected Returnable process(SendMTSMSRequestWrapperDTOGateway extendedRequestDT smsMessageResponse.setSenderName(requestBean.getOutboundSMSMessageRequest().getSenderName()); DeliveryInfoList deliveryInfoList = new DeliveryInfoList(); - deliveryInfoList.setResourceURL(getinSideResourceURL(Integer.toString(getReferenceNumber()))); + deliveryInfoList.setResourceURL(getinSideResourceURL(getReferenceNumber())); List infoList = new ArrayList(); for (String s : requestBean.getOutboundSMSMessageRequest().getAddress()) { @@ -228,9 +228,11 @@ protected void init(SendMTSMSRequestWrapperDTOGateway extendedRequestDTO) throws * @param mtSMSTransactionId Unique ID * @return URL */ - private String getinSideResourceURL(final String mtSMSTransactionId) { + private String getinSideResourceURL(int mtSMSTransactionId) { - return resourceURL + "/deliveryInfos"; + int index = resourceURL.lastIndexOf('/'); + String resourceURLs = resourceURL.substring(0, index) + "/" + (mtSMSTransactionId + 1); + return resourceURLs + "/deliveryInfos"; } /** @@ -239,9 +241,11 @@ private String getinSideResourceURL(final String mtSMSTransactionId) { * @param mtSMSTransactionId Unique Id. * @return URL */ - private String getoutSideResourceURL(final String mtSMSTransactionId) { + private String getoutSideResourceURL(int mtSMSTransactionId) { - return resourceURL; + int index = resourceURL.lastIndexOf('/'); + String resourceURLs = resourceURL.substring(0, index) + "/" + (mtSMSTransactionId + 1); + return resourceURLs; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java index 3fd16a5e..23307173 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeApplicationNotificationsHandler.java @@ -161,7 +161,7 @@ protected Returnable process(SubscribeApplicationNotificationsRequestWrapperGate } } - if (!dao.isWhiteListedSenderAddress(user.getId(), destinationAddress)) { + if (!dao.isWhiteListedSenderAddress(user.getId(), getLastMobileNumber(destinationAddress))) { LOG.error("###SMS### Destination Address is not WhiteListed "); responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.INVALID_INPUT_VALUE, "Destination Address is not WhiteListed")); @@ -250,7 +250,7 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI List list = new ArrayList<>(); list.add(serviceNameId); - List response = loggingDAO.getMessageLogs(userId, list, "destinationAddress", tel, null, null); + List response = loggingDAO.getMessageLogs(userId, list, "destinationAddress", getLastMobileNumber(tel), null, null); String jsonString = null; @@ -273,7 +273,7 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI // check for duplicate clientCorrelators if ((responseClientCorrelator != null && responseClientCorrelator.equals(clientCorrelator)) && - responseUserId == userId && responseTel.equals(tel)) { + responseUserId == userId && responseTel.equals(getLastMobileNumber(tel))) { jsonString = json.toString(); break; } @@ -301,7 +301,7 @@ private void saveResponse(String endUserIdPath, SubscribeApplicationNotification messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog.setUserid(user.getId()); messageLog.setReference("destinationAddress"); - messageLog.setValue(endUserIdPath); + messageLog.setValue(getLastMobileNumber(endUserIdPath)); messageLog.setMessageTimestamp(new Date()); loggingDAO.saveMessageLog(messageLog); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java index 6f01f828..2a9acbe9 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/gateway/SubscribeToDeliveryNotificationService.java @@ -208,7 +208,7 @@ private void saveResponse(Integer userId, String senderAddress, SubscribeToDeliv messageLog.setServicenameid(apiServiceCalls.getApiServiceCallId()); messageLog.setUserid(userId); messageLog.setReference("senderAddress"); - messageLog.setValue(senderAddress); + messageLog.setValue(getLastMobileNumber(senderAddress)); messageLog.setMessageTimestamp(new Date()); loggingDAO.saveMessageLog(messageLog); @@ -219,7 +219,7 @@ private String checkDuplicateClientCorrelator(String clientCorrelator, int userI List list = new ArrayList<>(); list.add(serviceNameId); - List response = loggingDAO.getMessageLogs(userId, list, "msisdn", senderAddress, null, null); + List response = loggingDAO.getMessageLogs(userId, list, "senderAddress", getLastMobileNumber(senderAddress), null, null); String jsonString = null; From 950b043804b452abe77355344c816a496907cf54 Mon Sep 17 00:00:00 2001 From: Sidath Weerasinghe Date: Wed, 29 Mar 2017 14:18:18 +0530 Subject: [PATCH 102/112] Exception Handeling --- .../servicefactory/credit/CreditApplyRequestHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java index 032b92e5..de61f60b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java @@ -137,7 +137,7 @@ protected boolean validate(CreditApplyRequestWrapper wrapperDTO) throws Exceptio } catch (CustomException ex) { LOG.error("###CREDIT### Error in Validation : " + ex); responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, ex.getErrcode(), - ex.getErrmsg(), wrapperDTO.getMsisdn())); + ex.getErrmsg(), ex.getErrvar()[0])); responseWrapperDTO.setHttpStatus(javax.ws.rs.core.Response.Status.BAD_REQUEST); } return true; @@ -306,7 +306,7 @@ protected Returnable process(CreditApplyRequestWrapper extendedRequestDTO) throw buildJsonResponseBody(amount, type, clientCorrelator, merchantIdentification, reasonForCredit, CreditStatusCodes.ERROR.toString(), callbackData, notifyURL, referenceCode, serverReferenceCode); responseWrapperDTO - .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, null)); + .setRequestError(constructRequestError(SERVICEEXCEPTION, ServiceError.SERVICE_ERROR_OCCURED, "Error in processing credit service request")); responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; } From b1743518521a56b3a092e5326423bcd8936068dd Mon Sep 17 00:00:00 2001 From: Bimla Date: Thu, 23 Mar 2017 09:51:20 +0530 Subject: [PATCH 103/112] Bug fixation of Ticket HUBDEV-1489 --- .../dep/sandbox/dao/hibernate/HibernateCommonDAO.java | 1 + .../dep/sandbox/servicefactory/AbstractRequestHandler.java | 4 +++- .../servicefactory/credit/CreditApplyRequestHandler.java | 1 + .../customerinfo/GetProfileRequestHandler.java | 6 ++---- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCommonDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCommonDAO.java index 8af5d1d0..f901891b 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCommonDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/hibernate/HibernateCommonDAO.java @@ -340,6 +340,7 @@ public ManageNumber getMSISDN(String msisdn, String imsi, String mcc, String mnc number = (ManageNumber) query.getSingleResult(); } catch (NoResultException e) { + return null; } catch (Exception ex) { LOG.error("###CUSTOMERINFO### Error While Retriving MSISDN", ex); diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java index 76d42919..ecddcecf 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/AbstractRequestHandler.java @@ -13,6 +13,7 @@ import com.wso2telco.services.dep.sandbox.util.RequestError; import org.apache.commons.lang.StringUtils; import org.apache.commons.logging.Log; +import org.bouncycastle.asn1.dvcs.ServiceType; import org.json.JSONException; import org.json.JSONObject; @@ -75,13 +76,14 @@ public final Returnable execute(final RequestDTO requestDTO) throws Exception { */ if (!(this instanceof AddressIgnorerable)) { List userNotWhiteListed = getNotWhitelistedNumbers(user); + if (userNotWhiteListed != null && !userNotWhiteListed.isEmpty()) { Returnable responseDTO = getResponseDTO(); LOG.debug("Location parameters are empty"); responseDTO.setRequestError( constructRequestError(SERVICEEXCEPTION, "SVC0002", "A service error occurred. Error code is %1", - StringUtils.join(userNotWhiteListed.toArray()))); + StringUtils.join(userNotWhiteListed.toArray())+" Not WhiteListed")); responseDTO.setHttpStatus(Status.BAD_REQUEST); return responseDTO; } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java index de61f60b..14a68c29 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/CreditApplyRequestHandler.java @@ -58,6 +58,7 @@ public class CreditApplyRequestHandler extends AbstractRequestHandler Date: Mon, 27 Mar 2017 17:50:55 +0530 Subject: [PATCH 104/112] Bug fixation of HUBDEV-1492 and HUBDEV-1516 --- .../dep/sandbox/dao/CustomerInfoDAO.java | 1 + .../dao/model/custom/ListCustomerInfoDTO.java | 3 +- .../GetAttributeRequestHandler.java | 132 +++++++++++++++--- .../GetAttributeResponseWrapper.java | 30 +++- .../GetProfileRequestHandler.java | 101 +++++++++++++- .../ListActiveProvisionedServices.java | 21 +-- .../ProvisionRequestedServiceHandler.java | 19 ++- .../QueryApplicableProvisioningService.java | 26 ++-- .../RemoveProvisionedServices.java | 25 ++-- 9 files changed, 290 insertions(+), 68 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CustomerInfoDAO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CustomerInfoDAO.java index 59cd23b7..56e1723f 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CustomerInfoDAO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/CustomerInfoDAO.java @@ -29,4 +29,5 @@ public interface CustomerInfoDAO { public List getAttributeServices (String msisdn,Integer userID, String imsi,String[] schema) throws Exception; public boolean checkSchema (String [] schema) throws Exception; + } diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ListCustomerInfoDTO.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ListCustomerInfoDTO.java index f6b5e9a5..7a6f0f85 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ListCustomerInfoDTO.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/dao/model/custom/ListCustomerInfoDTO.java @@ -16,8 +16,9 @@ package com.wso2telco.services.dep.sandbox.dao.model.custom; import com.fasterxml.jackson.annotation.JsonProperty; +import com.wso2telco.services.dep.sandbox.servicefactory.customerinfo.GetAttributeResponseWrapper; -public class ListCustomerInfoDTO { +public class ListCustomerInfoDTO extends GetAttributeResponseWrapper.ListCustomerInfoDTO { private ListCustomerInfoAttributesDTO customerInfo; diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/customerinfo/GetAttributeRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/customerinfo/GetAttributeRequestHandler.java index 86e3c078..3874df8d 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/customerinfo/GetAttributeRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/customerinfo/GetAttributeRequestHandler.java @@ -6,9 +6,21 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.node.ObjectNode; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.wso2telco.services.dep.sandbox.dao.model.custom.Customer; +import com.wso2telco.services.dep.sandbox.dao.model.custom.CustomerInfoDTO; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageProcessStatus; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageType; import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.logging.LogFactory; -import org.json.simple.JSONObject; + import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -20,9 +32,6 @@ import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.model.custom.ListCustomerInfoAttributesDTO; import com.wso2telco.services.dep.sandbox.dao.model.custom.ListCustomerInfoDTO; -import com.wso2telco.services.dep.sandbox.dao.model.domain.APIServiceCalls; -import com.wso2telco.services.dep.sandbox.dao.model.domain.APITypes; -import com.wso2telco.services.dep.sandbox.dao.model.domain.AttributeValues; import com.wso2telco.services.dep.sandbox.service.SandboxDTO; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractRequestHandler; import com.wso2telco.services.dep.sandbox.servicefactory.Returnable; @@ -30,6 +39,9 @@ import com.wso2telco.services.dep.sandbox.util.CommonUtil; import com.wso2telco.services.dep.sandbox.util.MessageLogHandler; import com.wso2telco.services.dep.sandbox.util.ServiceName; +import org.json.JSONObject; +import org.json.JSONTokener; +import org.json.simple.parser.JSONParser; public class GetAttributeRequestHandler extends AbstractRequestHandler { @@ -39,8 +51,10 @@ public class GetAttributeRequestHandler extends private GetAttributeResponseWrapper responseWrapperDTO; private static String schemaValues = null; private MessageLogHandler logHandler; + private String requestIdentifierCode ; + - { + { LOG = LogFactory.getLog(GetAttributeRequestHandler.class); customerInfoDao = DaoFactory.getCustomerInfoDAO(); dao = DaoFactory.getGenaricDAO(); @@ -77,9 +91,11 @@ protected boolean validate(GetAttributeRequestWrapper wrapperDTO) String onBehalfOf = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getOnBehalfOf()); String purchaseCategoryCode = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getPurchaseCategoryCode()); String requestIdentifier = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getRequestIdentifier()); - + APITypes apiTypes = dao.getAPIType(wrapperDTO.getRequestType().toString().toLowerCase()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), ServiceName.GetAttribute.toString().toLowerCase()); - List validationRulesList = new ArrayList<>(); + + List validationRulesList = new ArrayList<>(); try { if (msisdn == null && imsi == null) { @@ -119,7 +135,7 @@ protected boolean validate(GetAttributeRequestWrapper wrapperDTO) ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, "mnc", mnc)); validationRulesList.add(new ValidationRule( - ValidationRule.VALIDATION_TYPE_MANDATORY_INT_GE_ZERO, + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, "mcc", mcc)); } @@ -129,11 +145,23 @@ protected boolean validate(GetAttributeRequestWrapper wrapperDTO) purchaseCategoryCode)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "requestIdentifier", requestIdentifier)); + String duplicateRequestId = checkDuplicateRequestCode(wrapperDTO.getUser().getId(),apiServiceCalls.getApiServiceCallId(),msisdn,MessageProcessStatus.Success, MessageType.Response,requestIdentifier); if (requestIdentifier != null && checkRequestIdentifierSize(requestIdentifier)) { validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "requestIdentifier", requestIdentifier)); + + if((duplicateRequestId != null)) + { + LOG.error("###CUSTOMERINFO### Already used requestIdentifier code is entered"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "An already used requestIdentifier code is entered")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + + } + + } else { responseWrapperDTO.setRequestError(constructRequestError( SERVICEEXCEPTION, "SVC0002", "Invalid input value for message part %1", @@ -183,11 +211,9 @@ protected Returnable process(GetAttributeRequestWrapper extendedRequestDTO) obj.put("mcc",extendedRequestDTO.getMcc()); obj.put("mnc",extendedRequestDTO.getMnc()); obj.put("userName",extendedRequestDTO.getUser().getUserName()); - logHandler.saveMessageLog(apiServiceCalls.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), "msisdn", extendedRequestDTO.getMsisdn(), obj); String msisdn = null; ObjectMapper mapper = new ObjectMapper(); - JsonNode node = null; String number = CommonUtil.getNullOrTrimmedValue(extendedRequestDTO .getMsisdn()); String imsi = CommonUtil.getNullOrTrimmedValue(extendedRequestDTO @@ -251,23 +277,17 @@ protected Returnable process(GetAttributeRequestWrapper extendedRequestDTO) .getAttributeName().toString(); if (values.getValue()!=null && (Attribute.basic.toString()).equals(schemaValues)) { isNullObject = false; - node = mapper.readValue(values.getValue(), JsonNode.class); - customerInfo.setBasic(node); + customerInfo.setBasic(mapper.readValue(values.getValue().toString(), JsonNode.class)); } else if (values.getValue()!=null && (Attribute.billing.toString()).equals(schemaValues)) { isNullObject = false; - node = mapper.readValue(values.getValue(), JsonNode.class); - customerInfo.setBilling(node); + customerInfo.setBilling(mapper.readValue(values.getValue(), JsonNode.class)); } else if (values.getValue()!=null && Attribute.account.toString().equals(schemaValues)) { isNullObject = false; - node = mapper.readValue(values.getValue(), JsonNode.class); - - customerInfo.setAccount(node); + customerInfo.setAccount(mapper.readValue(values.getValue(), JsonNode.class)); } else if (values.getValue()!=null && Attribute.identification.toString().equals(schemaValues)) { isNullObject = false; - node = mapper.readValue(values.getValue(), JsonNode.class); - - customerInfo.setIdentification(node); + customerInfo.setIdentification(mapper.readValue(values.getValue(), JsonNode.class)); } } if(isNullObject){ @@ -289,12 +309,11 @@ protected Returnable process(GetAttributeRequestWrapper extendedRequestDTO) customerInfo.setPurchaseCategoryCode(CommonUtil.getNullOrTrimmedValue(extendedRequestDTO.getPurchaseCategoryCode())); customerInfo.setRequestIdentifier( CommonUtil.getNullOrTrimmedValue(extendedRequestDTO.getRequestIdentifier())); customerInfo.setResponseIdentifier("RES" + RandomStringUtils.randomAlphabetic(8)); - - ListCustomerInfoDTO customer = new ListCustomerInfoDTO(); customer.setCustomer(customerInfo); - responseWrapperDTO.setCustomer(customer); + responseWrapperDTO.setListCustomerInfoDTO(customer); responseWrapperDTO.setHttpStatus(Response.Status.OK); + saveResponse(extendedRequestDTO.getMsisdn(),customer,apiServiceCalls,MessageProcessStatus.Success); return responseWrapperDTO; } @@ -318,4 +337,71 @@ private boolean checkRequestIdentifierSize(String requestIdentifier) { return false; } } + + private String checkDuplicateRequestCode(int userId, int serviceNameId, String telNumber, MessageProcessStatus status, MessageType type, String requestIdentityCode) + { + List serviceNameIdList = new ArrayList(); + serviceNameIdList.add(serviceNameId); + String requestCode = null; + try { + List messageLogs = loggingDAO.getMessageLogs(userId,serviceNameIdList,"msisdn",telNumber,null,null); + for(int i=0;i { @@ -53,6 +61,7 @@ public class GetProfileRequestHandler extends AbstractRequestHandler validationRulesList = new ArrayList<>(); @@ -132,16 +143,28 @@ protected boolean validate(GetProfileRequestWrapper wrapperDTO) throws Exception } - + validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "onBehalfOf", onBehalfOf)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "purchaseCategoryCode", purchaseCategoryCode)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "requestIdentifier", requestIdentifier)); + String duplicateRequestId = checkDuplicateRequestCode(wrapperDTO.getUser().getId(),apiServiceCalls.getApiServiceCallId(),msisdn,MessageProcessStatus.Success, MessageType.Response,requestIdentifier); + + if (requestIdentifier != null && checkRequestIdentifierSize(requestIdentifier)) { validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "requestIdentifier", requestIdentifier)); + if((duplicateRequestId != null)) + { + LOG.error("###CUSTOMERINFO### Already used requestIdentifier code is entered"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "An already used requestIdentifier code is entered")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + + } + } else { responseWrapperDTO.setRequestError(constructRequestError( SERVICEEXCEPTION, "SVC0002", "Invalid input value for message part %1", @@ -182,8 +205,7 @@ protected Returnable process(GetProfileRequestWrapper extendedRequestDTO) throws obj.put("mcc",extendedRequestDTO.getMcc()); obj.put("mnc",extendedRequestDTO.getMnc()); obj.put("userName",extendedRequestDTO.getUser().getUserName()); - logHandler.saveMessageLog(apiServiceCalls.getApiServiceCallId(), extendedRequestDTO.getUser().getId(), "msisdn", extendedRequestDTO.getMsisdn(), obj); - + if (responseWrapperDTO.getRequestError() != null) { responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); return responseWrapperDTO; @@ -233,6 +255,9 @@ protected void init(GetProfileRequestWrapper extendedRequestDTO) throws Exceptio } private void populateResponse(ManageNumber number, CustomerInfoDTO customerInfoDTO, GetProfileRequestWrapper extendedRequestDTO) throws Exception{ + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + String serviceCallType = ServiceName.GetProfile.toString(); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(),serviceCallType); Customer customer = new Customer(); CustomerDTOWrapper customerDTOWrapper = new CustomerDTOWrapper(); ObjectMapper mapper = new ObjectMapper(); @@ -261,6 +286,7 @@ private void populateResponse(ManageNumber number, CustomerInfoDTO customerInfoD customer.setResourceURL(CommonUtil.getResourceUrl(requestWrapperDTO)); customerDTOWrapper.setCustomer(customer); responseWrapperDTO.setCustomerDTOWrapper(customerDTOWrapper); + saveResponse(extendedRequestDTO.getMsisdn(),customerDTOWrapper,apiServiceCalls,MessageProcessStatus.Success); } @@ -277,4 +303,71 @@ private boolean checkRequestIdentifierSize(String requestIdentifier) { } } + + private void saveResponse(String endUserId, CustomerDTOWrapper customerDTOWrapper , APIServiceCalls serviceCalls, MessageProcessStatus status) + { + ObjectMapper mapper = new ObjectMapper(); + String jsonRequestString = null; + try { + jsonRequestString = mapper.writeValueAsString(customerDTOWrapper); + } catch (JsonProcessingException e) { + LOG.error("an error occurred while converting JsonNode to string"+e); + } + MessageLog messageLog = new MessageLog(); + messageLog.setRequest(jsonRequestString); + messageLog.setUserid(user.getId()); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setReference("msisdn"); + messageLog.setValue(endUserId); + messageLog.setServicenameid(serviceCalls.getApiServiceCallId()); + try { + loggingDAO.saveMessageLog(messageLog); + } catch (Exception e) { + LOG.error("An error occured while saving the response"+e); + } + + } + + private String checkDuplicateRequestCode(int userId, int serviceNameId, String telNumber, MessageProcessStatus status, MessageType type, String requestIdentityCode) + { + List serviceNameIdList = new ArrayList(); + serviceNameIdList.add(serviceNameId); + String requestCode = null; + try { + List messageLogs = loggingDAO.getMessageLogs(userId,serviceNameIdList,"msisdn",telNumber,null,null); + for(int i=0;i 0) - || (mnc != null && mnc.trim().length() > 0)) { + + if (mcc != null) { + validationRulesList.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mcc", mcc)); validationRulesList.add(new ValidationRule( - ValidationRule.VALIDATION_TYPE_MANDATORY_NUMBER, "mcc", - mcc)); + ValidationRule.VALIDATION_TYPE_MANDATORY_INT_GE_ZERO, + "mnc", mnc)); + } else if (mnc != null) { validationRulesList.add(new ValidationRule( - ValidationRule.VALIDATION_TYPE_MANDATORY_NUMBER, "mnc", - mnc)); + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mnc", mnc)); + validationRulesList.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mcc", mcc)); } else { validationRulesList.add(new ValidationRule( diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/ProvisionRequestedServiceHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/ProvisionRequestedServiceHandler.java index ffcb1e83..b3f26927 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/ProvisionRequestedServiceHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/ProvisionRequestedServiceHandler.java @@ -106,16 +106,21 @@ protected boolean validate(ServiceProvisionRequestWrapper wrapperDTO) throws Exc String mnc = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getMnc()); List validationRules = new ArrayList<>(); - - if ((mcc != null && mcc.trim().length() > 0) - || (mnc != null && mnc.trim().length() > 0)) { + if (mcc != null) { + validationRules.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mcc", mcc)); + validationRules.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_MANDATORY_INT_GE_ZERO, + "mnc", mnc)); + } else if (mnc != null) { validationRules.add(new ValidationRule( - ValidationRule.VALIDATION_TYPE_MANDATORY_NUMBER, "mcc", - mcc)); + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mnc", mnc)); validationRules.add(new ValidationRule( - ValidationRule.VALIDATION_TYPE_MANDATORY_NUMBER, "mnc", - mnc)); + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mcc", mcc)); } else { validationRules.add(new ValidationRule( diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/QueryApplicableProvisioningService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/QueryApplicableProvisioningService.java index 35b1dbaf..5bf8daef 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/QueryApplicableProvisioningService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/QueryApplicableProvisioningService.java @@ -103,25 +103,31 @@ protected boolean validate(QueryProvisioningServicesRequestWrapper wrapperDTO) t validationRulesList.add(new ValidationRule( ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, "limit", limit)); - - - if ((mcc != null && mcc.trim().length() > 0) - || (mnc != null && mnc.trim().length() > 0)) { + + + if (mcc != null) { validationRulesList.add(new ValidationRule( - ValidationRule.VALIDATION_TYPE_MANDATORY_NUMBER, "mcc", - mcc)); + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mcc", mcc)); validationRulesList.add(new ValidationRule( - ValidationRule.VALIDATION_TYPE_MANDATORY_NUMBER, "mnc", - mnc)); - } else { + ValidationRule.VALIDATION_TYPE_MANDATORY_INT_GE_ZERO, + "mnc", mnc)); + } else if (mnc != null) { + validationRulesList.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mnc", mnc)); + validationRulesList.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mcc", mcc)); + }else { validationRulesList.add(new ValidationRule( ValidationRule.VALIDATION_TYPE_OPTIONAL, "mcc", mcc)); validationRulesList.add(new ValidationRule( ValidationRule.VALIDATION_TYPE_OPTIONAL, "mnc", mnc)); - } + } if (offset != null && isNumeric(offset)) { validationRulesList.add(new ValidationRule( diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java index 15bbdc0f..abea3840 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java @@ -139,17 +139,20 @@ protected boolean validate(RemoveProvisionedRequestWrapperDTO wrapperDTO) try { - if ((mcc != null && mcc.trim().length() > 0) - || (mnc != null && mnc.trim().length() > 0)) { - - validationRules - .add(new ValidationRule( - ValidationRule.VALIDATION_TYPE_MANDATORY_NUMBER, - "mcc", mcc)); - validationRules - .add(new ValidationRule( - ValidationRule.VALIDATION_TYPE_MANDATORY_NUMBER, - "mnc", mnc)); + if (mcc != null) { + validationRules.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mcc", mcc)); + validationRules.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_MANDATORY_INT_GE_ZERO, + "mnc", mnc)); + } else if (mnc != null) { + validationRules.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mnc", mnc)); + validationRules.add(new ValidationRule( + ValidationRule.VALIDATION_TYPE_OPTIONAL_INT_GE_ZERO, + "mcc", mcc)); } else { validationRules.add(new ValidationRule( From 46443d7e0b89966cbb8fe9146cc81528dc011aa9 Mon Sep 17 00:00:00 2001 From: Bimla Date: Tue, 28 Mar 2017 13:37:51 +0530 Subject: [PATCH 105/112] Refactoring of Query SMS Delivery Status for transactionId --- .../QuerySMSDeliveryStatusService.java | 28 ++++++------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java index 22182a38..b3fe8d83 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/smsmessaging/QuerySMSDeliveryStatusService.java @@ -93,13 +93,15 @@ protected Returnable process(QuerySMSDeliveryStatusRequestWrapperDTO extendedReq String deliveryStat = null; String resourceUrl = null; String recieverAddress = null; + String trimmedAddress = null; String senderAddress = extendedRequestDTO.getShortCode(); if (extendedRequestDTO.getShortCode().contains("tel:+")) { - senderAddress = extendedRequestDTO.getShortCode().replace("tel:+", "").trim(); + senderAddress = getLastMobileNumber(extendedRequestDTO.getShortCode()); } else if (extendedRequestDTO.getShortCode().contains("tel:")) { - senderAddress = extendedRequestDTO.getShortCode().replace("tel:", "").trim(); + senderAddress = getLastMobileNumber(extendedRequestDTO.getShortCode()); + } @@ -117,7 +119,6 @@ else if (mtSMSTransactionIdParts.length ==2) previousSMSDeliveryDetails = smsMessagingDAO.getPrevSMSDeliveryDataByTransId(Integer.valueOf(mtSMSTransactionIdParts[1])); } - if(previousSMSDeliveryDetails != null) { deliveryStatus = previousSMSDeliveryDetails.getStatus(); @@ -166,23 +167,15 @@ else if (mtSMSTransactionIdParts.length ==2) resourceUrl = jsonChildObj.getString(RESOURCE_URL); sendersAddress = jsonChildObj.getString(SENDER_ADDRESS); + trimmedAddress = getLastMobileNumber(sendersAddress); + } - } - if(mtSMSTransactionIdParts.length != 2) - { - previousSMSRequestDetails = smsMessagingDAO - .getPrevSMSRequestDataById(Integer.parseInt(mtSMSTransactionIdParts[0])); - } - if(mtSMSTransactionIdParts.length == 2) - { - previousSMSRequestDetails = smsMessagingDAO - .getPrevSMSRequestDataById(Integer.parseInt(mtSMSTransactionIdParts[1])); } - if (previousSMSRequestDetails == null) { + if (previousSMSDeliveryDetails == null) { responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", "Invalid input value for message part %1", extendedRequestDTO.getMtSMSTransactionId())); @@ -193,12 +186,7 @@ else if (mtSMSTransactionIdParts.length ==2) "A service error occurred. Error code is %1", extendedRequestDTO.getShortCode() + " Not Provisioned")); responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else if (previousSMSDeliveryDetails == null) { - - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0002", - "Invalid input value for message part %1", extendedRequestDTO.getMtSMSTransactionId())); - responseWrapperDTO.setHttpStatus(Status.BAD_REQUEST); - } else if (!senderAddress.equals(sendersAddress)) { + } else if (!senderAddress.equals(trimmedAddress)) { responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, "SVC0004", "No valid addresses provided in message part %1", extendedRequestDTO.getShortCode())); From 192021f7aa28fa26fb7689efd0ceaccd357cc7da Mon Sep 17 00:00:00 2001 From: Bimla Date: Wed, 29 Mar 2017 12:18:51 +0530 Subject: [PATCH 106/112] code optimization and further fixes related to CustomerInfo API --- .../GetAttributeRequestHandler.java | 73 +++++++++++-------- .../GetProfileRequestHandler.java | 55 ++++++++++---- 2 files changed, 82 insertions(+), 46 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/customerinfo/GetAttributeRequestHandler.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/customerinfo/GetAttributeRequestHandler.java index 3874df8d..85e85063 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/customerinfo/GetAttributeRequestHandler.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/customerinfo/GetAttributeRequestHandler.java @@ -52,6 +52,10 @@ public class GetAttributeRequestHandler extends private static String schemaValues = null; private MessageLogHandler logHandler; private String requestIdentifierCode ; + static final String CUSTOMER = "customer"; + static final String REQUESTIDENTIFIER = "requestIdentifier"; + static final String MSISDN = "msisdn"; + static final String IMSI ="imsi"; { @@ -82,6 +86,8 @@ protected List getAddress() { protected boolean validate(GetAttributeRequestWrapper wrapperDTO) throws Exception { + String duplicateRequestId = null; + String msisdn = CommonUtil .getNullOrTrimmedValue(wrapperDTO.getMsisdn()); String imsi = CommonUtil.getNullOrTrimmedValue(wrapperDTO.getImsi()); @@ -111,7 +117,6 @@ protected boolean validate(GetAttributeRequestWrapper wrapperDTO) } validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "schema", schema)); - if (msisdn != null) { validationRulesList.add(new ValidationRule( ValidationRule.VALIDATION_TYPE_OPTIONAL_TEL, "msisdn", @@ -144,24 +149,10 @@ protected boolean validate(GetAttributeRequestWrapper wrapperDTO) validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_OPTIONAL, "purchaseCategoryCode", purchaseCategoryCode)); validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "requestIdentifier", requestIdentifier)); - - String duplicateRequestId = checkDuplicateRequestCode(wrapperDTO.getUser().getId(),apiServiceCalls.getApiServiceCallId(),msisdn,MessageProcessStatus.Success, MessageType.Response,requestIdentifier); - if (requestIdentifier != null && checkRequestIdentifierSize(requestIdentifier)) { validationRulesList.add(new ValidationRule(ValidationRule.VALIDATION_TYPE_MANDATORY, "requestIdentifier", requestIdentifier)); - - if((duplicateRequestId != null)) - { - LOG.error("###CUSTOMERINFO### Already used requestIdentifier code is entered"); - responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, - ServiceError.INVALID_INPUT_VALUE, "An already used requestIdentifier code is entered")); - responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); - - } - - } else { responseWrapperDTO.setRequestError(constructRequestError( SERVICEEXCEPTION, "SVC0002", "Invalid input value for message part %1", @@ -230,6 +221,16 @@ protected Returnable process(GetAttributeRequestWrapper extendedRequestDTO) msisdn = CommonUtil.extractNumberFromMsisdn(number); } + String duplicateRequestId = checkDuplicateRequestCode(extendedRequestDTO.getUser().getId(),apiServiceCalls.getApiServiceCallId(),MessageProcessStatus.Success, MessageType.Response,extendedRequestDTO.getRequestIdentifier()); + + if(duplicateRequestId != null) + { + LOG.error("###CUSTOMERINFO### Already used requestIdentifier code is entered"); + responseWrapperDTO.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "An already used requestIdentifier code is entered")); + responseWrapperDTO.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapperDTO; + } List customerInfoServices = null; // check request parameter schema has the matching values @@ -313,7 +314,13 @@ protected Returnable process(GetAttributeRequestWrapper extendedRequestDTO) customer.setCustomer(customerInfo); responseWrapperDTO.setListCustomerInfoDTO(customer); responseWrapperDTO.setHttpStatus(Response.Status.OK); - saveResponse(extendedRequestDTO.getMsisdn(),customer,apiServiceCalls,MessageProcessStatus.Success); + if(msisdn != null) { + saveResponse(extendedRequestDTO.getMsisdn(), customer, apiServiceCalls, MessageProcessStatus.Success); + } + else + { + saveResponse(extendedRequestDTO.getImsi(), customer, apiServiceCalls, MessageProcessStatus.Success); + } return responseWrapperDTO; } @@ -338,13 +345,12 @@ private boolean checkRequestIdentifierSize(String requestIdentifier) { } } - private String checkDuplicateRequestCode(int userId, int serviceNameId, String telNumber, MessageProcessStatus status, MessageType type, String requestIdentityCode) - { + private String checkDuplicateRequestCode(int userId, int serviceNameId, MessageProcessStatus status, MessageType type, String requestIdentityCode) throws Exception { List serviceNameIdList = new ArrayList(); serviceNameIdList.add(serviceNameId); String requestCode = null; try { - List messageLogs = loggingDAO.getMessageLogs(userId,serviceNameIdList,"msisdn",telNumber,null,null); + List messageLogs = loggingDAO.getMessageLogs(userId,serviceNameIdList,null,null,null,null); for(int i=0;i serviceNameIdList = new ArrayList(); serviceNameIdList.add(serviceNameId); String requestCode = null; try { - List messageLogs = loggingDAO.getMessageLogs(userId,serviceNameIdList,"msisdn",telNumber,null,null); + List messageLogs = loggingDAO.getMessageLogs(userId,serviceNameIdList,null,null,null,null); for(int i=0;i Date: Wed, 29 Mar 2017 14:31:49 +0530 Subject: [PATCH 107/112] refactoring Provisioning API to make requestIdentifier unique per request --- .../ListActiveProvisionedServices.java | 98 ++++++++++++++++-- .../QueryApplicableProvisioningService.java | 99 +++++++++++++++++-- .../dep/sandbox/util/ServiceName.java | 2 +- 3 files changed, 182 insertions(+), 17 deletions(-) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/ListActiveProvisionedServices.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/ListActiveProvisionedServices.java index 6f7fdc9f..e26ce93c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/ListActiveProvisionedServices.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/ListActiveProvisionedServices.java @@ -23,6 +23,13 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.wso2telco.services.dep.sandbox.dao.model.custom.*; +import com.wso2telco.services.dep.sandbox.dao.model.domain.*; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageProcessStatus; +import com.wso2telco.services.dep.sandbox.servicefactory.MessageType; +import com.wso2telco.services.dep.sandbox.util.ServiceName; import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.logging.LogFactory; @@ -33,14 +40,6 @@ import com.wso2telco.dep.oneapivalidation.util.ValidationRule; import com.wso2telco.services.dep.sandbox.dao.DaoFactory; import com.wso2telco.services.dep.sandbox.dao.ProvisioningDAO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ListProvisionedDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ListProvisionedRequestWrapperDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ServiceInfoListProvisionedDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ServiceListProvisioned; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ServiceListProvisionedDTO; -import com.wso2telco.services.dep.sandbox.dao.model.custom.ServiceMetaInfoListProvisionedDTO; -import com.wso2telco.services.dep.sandbox.dao.model.domain.ManageNumber; -import com.wso2telco.services.dep.sandbox.dao.model.domain.User; import com.wso2telco.services.dep.sandbox.exception.SandboxException; import com.wso2telco.services.dep.sandbox.exception.SandboxException.SandboxErrorType; import com.wso2telco.services.dep.sandbox.service.SandboxDTO; @@ -50,6 +49,7 @@ import com.wso2telco.services.dep.sandbox.util.ProvisioningStatusCodes; import com.wso2telco.services.dep.sandbox.util.ProvisioningUtil; import com.wso2telco.services.dep.sandbox.util.ProvisioningUtil.ProvisionRequestTypes; +import org.json.JSONObject; /** * @@ -62,6 +62,10 @@ public class ListActiveProvisionedServices extends private ProvisioningDAO provisioningDao; private ListProvisionedRequestWrapperDTO requestWrapperDTO; private ListActiveProvisionedServicesResponseWrapper responseWrapper; + private String requestIdentifierCode ; + static final String MSISDN = "msisdn"; + static final String SERVICELIST = "serviceList"; + static final String REQUESTIDENTIFIER = "requestIdentifier"; private final String NUMERIC_REGEX = "[0-9]+"; { @@ -216,7 +220,9 @@ protected Returnable process( responseWrapper.setHttpStatus(Status.BAD_REQUEST); return responseWrapper; - } + } + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), ServiceName.ListService.toString().toLowerCase()); User user = extendedRequestDTO.getUser(); @@ -257,6 +263,15 @@ protected Returnable process( } else { phoneNumber = number.getNumber(); } + String duplicateRequestId = checkDuplicateRequestCode(extendedRequestDTO.getUser().getId(),apiServiceCalls.getApiServiceCallId(),MessageProcessStatus.Success, MessageType.Response,extendedRequestDTO.getRequestIdentifier()); + if(duplicateRequestId != null) + { + LOG.error("###CUSTOMERINFO### Already used requestIdentifier code is entered"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "An already used requestIdentifier code is entered")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } List provisionedServices = provisioningDao .getActiveProvisionedServices(phoneNumber, @@ -308,6 +323,7 @@ protected Returnable process( ServiceListProvisionedDTO serviceListDTO = new ServiceListProvisionedDTO(); serviceListDTO.setServiceList(serviceList); responseWrapper.setServiceListDTO(serviceListDTO); + saveResponse(extendedRequestDTO.getMsisdn(), serviceListDTO, apiServiceCalls, MessageProcessStatus.Success); } catch (Exception ex) { LOG.error("###PROVISION### Error Occured in List Provisioned Service. " @@ -351,5 +367,69 @@ private boolean isNumeric(String input) { return false; } + private void saveResponse(String endUserId, ServiceListProvisionedDTO listCustomerInfoDTO, APIServiceCalls serviceCalls, MessageProcessStatus status) throws Exception { + ObjectMapper mapper = new ObjectMapper(); + String jsonRequestString = null; + try { + jsonRequestString = mapper.writeValueAsString(listCustomerInfoDTO); + } catch (JsonProcessingException e) { + LOG.error("an error occurred while converting JsonNode to string"+e); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + MessageLog messageLog = new MessageLog(); + messageLog.setRequest(jsonRequestString); + messageLog.setUserid(user.getId()); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setReference(MSISDN); + messageLog.setValue(endUserId); + messageLog.setServicenameid(serviceCalls.getApiServiceCallId()); + try { + loggingDAO.saveMessageLog(messageLog); + } catch (Exception e) { + LOG.error("An error occured while saving the response"+e); + throw e; + } + + } + + private String checkDuplicateRequestCode(int userId, int serviceNameId, MessageProcessStatus status, MessageType type, String requestIdentityCode) throws Exception { + List serviceNameIdList = new ArrayList(); + serviceNameIdList.add(serviceNameId); + String requestCode = null; + try { + List messageLogs = loggingDAO.getMessageLogs(userId,serviceNameIdList,null,null,null,null); + for(int i=0;i { @@ -55,6 +56,10 @@ public class QueryApplicableProvisioningService private ProvisioningDAO provisioningDao; private QueryProvisioningServicesRequestWrapper requestWrapperDTO; private QueryApplicableProvisioningServiceResponseWrapper responseWrapper; + private String requestIdentifierCode ; + static final String MSISDN = "msisdn"; + static final String SERVICELIST = "serviceList"; + static final String REQUESTIDENTIFIER = "requestIdentifier"; private final String NUMERIC_REGEX = "[0-9]+"; @@ -210,6 +215,8 @@ protected Returnable process(QueryProvisioningServicesRequestWrapper extendedReq responseWrapper.setHttpStatus(Status.BAD_REQUEST); return responseWrapper; } + APITypes apiTypes = dao.getAPIType(extendedRequestDTO.getRequestType().toString().toLowerCase()); + APIServiceCalls apiServiceCalls = dao.getServiceCall(apiTypes.getId(), ServiceName.QueryService.toString().toLowerCase()); try { User user = extendedRequestDTO.getUser(); @@ -238,6 +245,17 @@ protected Returnable process(QueryProvisioningServicesRequestWrapper extendedReq } else { phoneNumber = number.getNumber(); } + + String duplicateRequestId = checkDuplicateRequestCode(extendedRequestDTO.getUser().getId(),apiServiceCalls.getApiServiceCallId(),MessageProcessStatus.Success, MessageType.Response,extendedRequestDTO.getRequestIdentifier()); + + if(duplicateRequestId != null) + { + LOG.error("###CUSTOMERINFO### Already used requestIdentifier code is entered"); + responseWrapper.setRequestError(constructRequestError(SERVICEEXCEPTION, + ServiceError.INVALID_INPUT_VALUE, "An already used requestIdentifier code is entered")); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + return responseWrapper; + } List applicableServices = provisioningDao.getApplicableProvisionServices(phoneNumber,user.getUserName(),offset, limit); @@ -270,6 +288,8 @@ protected Returnable process(QueryProvisioningServicesRequestWrapper extendedReq ServiceListDTO serviceListDTO = new ServiceListDTO(); serviceListDTO.setServiceList(serviceList); responseWrapper.setServiceListDTO(serviceListDTO); + saveResponse(extendedRequestDTO.getMsisdn(), serviceListDTO, apiServiceCalls, MessageProcessStatus.Success); + } catch (Exception ex) { LOG.error("###PROVISION### Error Occured in Query Applicable Service. " + ex); @@ -308,4 +328,69 @@ private boolean isNumeric(String input) { return false; } + + private void saveResponse(String endUserId, ServiceListDTO serviceListDTO, APIServiceCalls serviceCalls, MessageProcessStatus status) throws Exception { + ObjectMapper mapper = new ObjectMapper(); + String jsonRequestString = null; + try { + jsonRequestString = mapper.writeValueAsString(serviceListDTO); + } catch (JsonProcessingException e) { + LOG.error("an error occurred while converting JsonNode to string"+e); + responseWrapper.setHttpStatus(Response.Status.BAD_REQUEST); + } + MessageLog messageLog = new MessageLog(); + messageLog.setRequest(jsonRequestString); + messageLog.setUserid(user.getId()); + messageLog.setStatus(status.getValue()); + messageLog.setType(MessageType.Response.getValue()); + messageLog.setReference(MSISDN); + messageLog.setValue(endUserId); + messageLog.setServicenameid(serviceCalls.getApiServiceCallId()); + try { + loggingDAO.saveMessageLog(messageLog); + } catch (Exception e) { + LOG.error("An error occured while saving the response"+e); + throw e; + } + + } + + private String checkDuplicateRequestCode(int userId, int serviceNameId, MessageProcessStatus status, MessageType type, String requestIdentityCode) throws Exception { + List serviceNameIdList = new ArrayList(); + serviceNameIdList.add(serviceNameId); + String requestCode = null; + try { + List messageLogs = loggingDAO.getMessageLogs(userId,serviceNameIdList,null,null,null,null); + for(int i=0;i Date: Wed, 29 Mar 2017 11:13:31 +0000 Subject: [PATCH 108/112] [maven-release-plugin] prepare release v1_7_0 --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index 82a80d89..29050279 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.2-SNAPSHOT + 1.7.0 ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index 6319f21a..37033044 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.6.2-SNAPSHOT + 1.7.0 ../../pom.xml diff --git a/pom.xml b/pom.xml index f34d7ece..09ca7f96 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.6.2-SNAPSHOT + 1.7.0 WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_0_0-rc1 + v1_7_0 From 44ada5b29caa3d06a213c04bec83a4aefeed4a52 Mon Sep 17 00:00:00 2001 From: SidathWeerasinghe Date: Wed, 29 Mar 2017 11:13:36 +0000 Subject: [PATCH 109/112] [maven-release-plugin] prepare for next development iteration --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index 29050279..e2945c56 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.7.0 + 1.7.1-SNAPSHOT ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index 37033044..b89acca7 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.7.0 + 1.7.1-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index 09ca7f96..370219ab 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.7.0 + 1.7.1-SNAPSHOT WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_7_0 + v1_0_0-rc1 From db4347fd850ff3b164ba3729d39631f584196bba Mon Sep 17 00:00:00 2001 From: SidathWeerasinghe Date: Mon, 15 May 2017 14:46:17 +0530 Subject: [PATCH 110/112] Fixed DEPSB-88, DEPSB-29, DEPSB-87 --- dep-sandbox/dbscripts/dep-sandbox1_7_0.sql | 2 +- dep-sandbox/dbscripts/migration1_7_0to1_7_1.sql | 1 + .../services/dep/sandbox/service/USSDService.java | 2 +- .../credit/PatialRefundResponseWrapper.java | 11 +++++++---- .../provisioning/RemoveProvisionedServices.java | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 dep-sandbox/dbscripts/migration1_7_0to1_7_1.sql diff --git a/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql b/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql index e21cb766..1ebcc83b 100644 --- a/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql +++ b/dep-sandbox/dbscripts/dep-sandbox1_7_0.sql @@ -49,7 +49,7 @@ CREATE TABLE IF NOT EXISTS `sbxapiservicecalls` ( -- Dumping data for table `sbxapiservicecalls` -- -INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'),(13,1,'Location'),(14,3,'InitUSSD'),(15,2,'SendSMS'),(16,2,'ReceivingSMS'),(17,2,'QuerySMSStatus'),(18,2,'SubscribeToSMSDelivery'),(19,2,'SubscribeToApplication'),(20,2,'StopSubscriptionDelivery'),(21,2,'StopSubscribeToApplication'); +INSERT INTO `sbxapiservicecalls` VALUES (1,8,'GetAttribute'),(2,8,'GetProfile'),(3,7,'GetApplicable'),(4,6,'MakePayment'),(5,6,'ListPayment'),(6,6,'RefundPayment'),(7,6,'BalanceLookup'),(8,5,'ApplyCredit'),(9,5,'PartialRefund'),(10,4,'ChargeUser'),(11,4,'RefundUser'),(12,4,'ListPayment'),(13,1,'Location'),(14,3,'InitUSSD'),(15,2,'SendSMS'),(16,2,'ReceivingSMS'),(17,2,'QuerySMSStatus'),(18,2,'SubscribeToSMSDelivery'),(19,2,'SubscribeToApplication'),(20,2,'StopSubscriptionDelivery'),(21,2,'StopSubscribeToApplication'),(22,7,'ListService'),(23,7,'QueryService'); diff --git a/dep-sandbox/dbscripts/migration1_7_0to1_7_1.sql b/dep-sandbox/dbscripts/migration1_7_0to1_7_1.sql new file mode 100644 index 00000000..608beef6 --- /dev/null +++ b/dep-sandbox/dbscripts/migration1_7_0to1_7_1.sql @@ -0,0 +1 @@ +INSERT INTO `sbxapiservicecalls` VALUES (22,7,'ListService'),(23,7,'QueryService'); \ No newline at end of file diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java index d2e63b45..12da1463 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/service/USSDService.java @@ -44,7 +44,7 @@ public class USSDService { Log LOG = LogFactory.getLog(USSDService.class); @POST - @Path("/ussd/v1/outbound/{endUserId}") + @Path("/outbound/{endUserId}") @ApiOperation(value = "ussdSession", notes = "initiate ussd session with endUser", response = Response.class) @ApiImplicitParams({ @ApiImplicitParam(name = "sandbox", value = "Authorization token", required = true, dataType = "string", paramType = "header")}) diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundResponseWrapper.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundResponseWrapper.java index db21e740..79e54917 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundResponseWrapper.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/credit/PatialRefundResponseWrapper.java @@ -1,5 +1,6 @@ package com.wso2telco.services.dep.sandbox.servicefactory.credit; +import com.wso2telco.services.dep.sandbox.dao.model.custom.ErrorResponseDTO; import com.wso2telco.services.dep.sandbox.dao.model.custom.RefundResponseBean; import com.wso2telco.services.dep.sandbox.servicefactory.AbstractReturnWrapperDTO; @@ -9,11 +10,13 @@ public class PatialRefundResponseWrapper extends AbstractReturnWrapperDTO { @Override public Object getResponse() { - if (getRequestError() != null) { - return getRequestError(); - } - return refundResponseBean; + if (getRequestError() == null) { + return refundResponseBean; + } else { + ErrorResponseDTO response = new ErrorResponseDTO(getRequestError()); + return response; + } } public RefundResponseBean getRefundResponseBean() { diff --git a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java index abea3840..fa65216c 100644 --- a/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java +++ b/dep-sandbox/src/main/java/com/wso2telco/services/dep/sandbox/servicefactory/provisioning/RemoveProvisionedServices.java @@ -304,7 +304,7 @@ protected Returnable process( clientReferenceCode, notifyURL, callbackData, statusMap); // create json body from updated service object buildJsonResponseBody(deletedServiceList); - responseWrapper.setHttpStatus(Response.Status.OK); + responseWrapper.setHttpStatus(Response.Status.CREATED); return responseWrapper; } else { // check for already removed provisioned service for request From 0044604c00275aa48c662060fde1f943edcb64ac Mon Sep 17 00:00:00 2001 From: SidathWeerasinghe Date: Mon, 15 May 2017 09:46:38 +0000 Subject: [PATCH 111/112] [maven-release-plugin] prepare release v1_7_1 --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index e2945c56..793d69b5 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.7.1-SNAPSHOT + 1.7.1 ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index b89acca7..b22fe73f 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.7.1-SNAPSHOT + 1.7.1 ../../pom.xml diff --git a/pom.xml b/pom.xml index 370219ab..44d5e7a9 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.7.1-SNAPSHOT + 1.7.1 WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_0_0-rc1 + v1_7_1 From 323c76e7fc12e6d51ca8a75b555f4e720b36c72f Mon Sep 17 00:00:00 2001 From: SidathWeerasinghe Date: Mon, 15 May 2017 09:46:42 +0000 Subject: [PATCH 112/112] [maven-release-plugin] prepare for next development iteration --- dep-sandbox/pom.xml | 2 +- feature/sandbox/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dep-sandbox/pom.xml b/dep-sandbox/pom.xml index 793d69b5..d9056b8e 100644 --- a/dep-sandbox/pom.xml +++ b/dep-sandbox/pom.xml @@ -13,7 +13,7 @@ com.wso2telco.services.dep services-dep-parent - 1.7.1 + 1.7.2-SNAPSHOT ../pom.xml 4.0.0 diff --git a/feature/sandbox/pom.xml b/feature/sandbox/pom.xml index b22fe73f..cdc620e9 100644 --- a/feature/sandbox/pom.xml +++ b/feature/sandbox/pom.xml @@ -5,7 +5,7 @@ com.wso2telco.services.dep services-dep-parent - 1.7.1 + 1.7.2-SNAPSHOT ../../pom.xml diff --git a/pom.xml b/pom.xml index 44d5e7a9..fddac42e 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ com.wso2telco.services.dep services-dep-parent pom - 1.7.1 + 1.7.2-SNAPSHOT WSO2Telco Core - Component WSO2Telco Core Aggregate Pom http://wso2telco.com @@ -41,7 +41,7 @@ https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git scm:git:https://github.com/WSO2Telco/sandbox-service.git - v1_7_1 + v1_0_0-rc1