ERROR: Persistence already in use, Reload this gateway when MQTT Broker comes UP


  • Hardware Contributor

    I'm running 0.0.3.Alpha2 on a linux/ubuntu system and connecting to another system on my network running Mosquitto. I have added my gateway into mycontroller but its giving me an error "ERROR: Persistence already in use, Reload this gateway when MQTT Broker comes UP".

    Could someone please eleborate on what this actually means? I have no other controller alive at the moment and therefor its an internal error on this system, from what I can work out anyway.


  • Plugin Developer

    @Samuel235 can you paste your complete error log(mycontroller/log/mycontroller.log)? Have disabled inbuilt MQTT broker?


  • Hardware Contributor

    @jkandasa - I have disabled the built in MQTT broker, through the web UI where you have put the slider for the MQTT broker, that is turned to the off position. Should i have disabled it in any other way, command line or anything? I'm running it on a Linux box.

    Part one of the log is:

    2017-02-18 18:28:08,496 INFO [main] [org.mycontroller.standalone.AppProperties:407] Created directory location: tmp/
    2017-02-18 18:28:08,501 INFO [main] [org.mycontroller.standalone.AppProperties:407] Created directory location: ../conf/resources/scripts/
    2017-02-18 18:28:08,502 INFO [main] [org.mycontroller.standalone.AppProperties:407] Created directory location: ../conf/resources/scripts/conditions/
    2017-02-18 18:28:08,503 INFO [main] [org.mycontroller.standalone.AppProperties:407] Created directory location: ../conf/resources/scripts/operations/
    2017-02-18 18:28:08,503 INFO [main] [org.mycontroller.standalone.AppProperties:407] Created directory location: ../www/configurations
    2017-02-18 18:28:10,179 INFO [main] [org.mycontroller.standalone.db.migration.V1_01__Initial_Configuration:398] Migration completed successfully.
    2017-02-18 18:28:10,382 INFO [main] [org.mycontroller.standalone.db.migration.V1_01_01__SNAPSHOT:66] Migration completed successfully.
    2017-02-18 18:28:10,469 INFO [main] [org.mycontroller.standalone.db.migration.V1_01_02__SNAPSHOT:127] Migration completed successfully.
    2017-02-18 18:28:10,544 INFO [main] [org.mycontroller.standalone.db.migration.V1_01_03__SNAPSHOT:48] Migration completed successfully.
    2017-02-18 18:28:10,635 INFO [main] [org.mycontroller.standalone.db.migration.V1_01_04__SNAPSHOT:107] Migration completed successfully.
    2017-02-18 18:28:10,699 INFO [main] [org.mycontroller.standalone.db.migration.V1_01_05__0_0_3_alpha1:47] Migration completed successfully.
    2017-02-18 18:28:10,879 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_04__2016_Apr_25:58] Migration completed successfully.
    2017-02-18 18:28:10,888 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_01__2016_Mar_24:308] Migration completed successfully.
    2017-02-18 18:28:10,971 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_02__2016_Apr_11:66] Migration completed successfully.
    2017-02-18 18:28:11,110 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_03__2016_Apr_14:83] Migration completed successfully.
    2017-02-18 18:28:11,209 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_04__2016_Apr_25:58] Migration completed successfully.
    2017-02-18 18:28:11,240 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_05__2016_Apr_27:68] Migration completed successfully.
    2017-02-18 18:28:11,283 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_06__2016_May_10:49] Migration completed successfully.
    2017-02-18 18:28:11,337 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_07__2016_May_19:57] Migration completed successfully.
    2017-02-18 18:28:11,445 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_08__2016_Jul_01:104] Migration completed successfully.
    2017-02-18 18:28:11,487 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_09__2016_Jul_16:93] Migration completed successfully.
    2017-02-18 18:28:11,512 INFO [main] [org.mycontroller.standalone.db.migration.V1_02_10__2016_Jul_29:53] Migration completed successfully.
    2017-02-18 18:28:11,770 INFO [main] [org.mycontroller.standalone.db.DataBaseUtils:149] Number of migrations done:16
    2017-02-18 18:28:11,771 INFO [main] [org.mycontroller.standalone.db.DataBaseUtils:154] Application information: [Version:0.0.3.Alpha2, Database version:1.02.10 - 2016 Jul 29]
    2017-02-18 18:28:12,461 INFO [main] [org.mycontroller.standalone.mqttbroker.MoquetteMqttBroker:51] MQTT Broker started successfully. MqttBrokerSettings(enabled=true, bindAddress=0.0.0.0, httpPort=1883, websocketPort=7080, allowAnonymous=false)
    2017-02-18 18:28:14,017 INFO [main] [org.mycontroller.standalone.StartApp:209] TJWS server started successfully, HTTPS Enabled?:true, HTTP(S) Port: [8443]
    2017-02-18 18:28:14,017 INFO [main] [org.mycontroller.standalone.StartApp:107] MyController.org server started in [5535] ms
    2017-02-18 18:31:52,662 INFO [Acme.Utils.ThreadPool(0)-PooledThread: Acme.Serve.Serve$ServeConnection@34a868b0] [org.mycontroller.standalone.mqttbroker.MoquetteMqttBroker:71] MQTT broker restart triggered...
    2017-02-18 18:31:52,866 INFO [Acme.Utils.ThreadPool(0)-PooledThread: Acme.Serve.Serve$ServeConnection@34a868b0] [org.mycontroller.standalone.mqttbroker.MoquetteMqttBroker:66] MQTT Broker has been stopped successfully
    2017-02-18 18:34:19,018 ERROR [Acme.Utils.ThreadPool(1)-PooledThread: Acme.Serve.Serve$ServeConnection@48a9ff76] [org.mycontroller.standalone.api.jaxrs.exception.mappers.ApplicationExceptionMapper:42] ApplicationException,
    org.jboss.resteasy.spi.ApplicationException: java.lang.IllegalArgumentException: 192.168.0.21
            at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:152) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: java.lang.IllegalArgumentException: 192.168.0.21
            at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(MqttConnectOptions.java:458) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:273) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:167) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:224) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:136) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.mqtt.MqttGatewayImpl.<init>(MqttGatewayImpl.java:54) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.loadGateway(GatewayUtils.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.addGateway(GatewayUtils.java:259) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.add(GatewayApi.java:96) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.addGateway(GatewayHandler.java:72) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 15 common frames omitted
    2017-02-18 18:34:22,953 ERROR [Acme.Utils.ThreadPool(1)-PooledThread: Acme.Serve.Serve$ServeConnection@48a9ff76] [org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl:187] unable to add new item:[GatewayTable(id=null, enabled=true, name=Gateway_!, networkType=MY_SENSORS, timestamp=null, state=UNAVAILABLE, statusMessage=null, statusSince=null, type=MQTT, properties={p=, u=, bh=192.168.0.21, tp=MyController-Out, cid=MyController, ts=MyController-In})]
    java.sql.SQLException: Unable to run insert stmt on object GatewayTable(id=null, enabled=true, name=Gateway_!, networkType=MY_SENSORS, timestamp=null, state=UNAVAILABLE, statusMessage=null, statusSince=null, type=MQTT, properties={p=, u=, bh=192.168.0.21, tp=MyController-Out, cid=MyController, ts=MyController-In}): INSERT INTO `gateway` (`id` ,`enabled` ,`name` ,`networkType` ,`timestamp` ,`state` ,`statusMessage` ,`statusSince` ,`type` ,`properties` ) VALUES (?,?,?,?,?,?,?,?,?,?)
            at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl.create(BaseAbstractDaoImpl.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.addGateway(GatewayUtils.java:255) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.add(GatewayApi.java:96) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.addGateway(GatewayHandler.java:72) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "CONSTRAINT_INDEX_1 ON PUBLIC.GATEWAY(NAME) VALUES ( /* 2 */ 'Gateway_!' )"; SQL statement:
    INSERT INTO `gateway` (`id` ,`enabled` ,`name` ,`networkType` ,`timestamp` ,`state` ,`statusMessage` ,`statusSince` ,`type` ,`properties` ) VALUES (?,?,?,?,?,?,?,?,?,?) [23505-176]
            at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.message.DbException.get(DbException.java:178) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.message.DbException.get(DbException.java:154) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtree.find(PageBtree.java:121) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:151) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:104) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:97) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:88) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.table.RegularTable.addRow(RegularTable.java:120) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.dml.Insert.insertRows(Insert.java:157) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.dml.Insert.update(Insert.java:115) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.CommandContainer.update(CommandContainer.java:79) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.Command.executeUpdate(Command.java:254) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:158) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:144) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 26 common frames omitted
    2017-02-18 18:34:22,957 ERROR [Acme.Utils.ThreadPool(1)-PooledThread: Acme.Serve.Serve$ServeConnection@48a9ff76] [org.mycontroller.standalone.api.jaxrs.exception.mappers.ApplicationExceptionMapper:42] ApplicationException,
    org.jboss.resteasy.spi.ApplicationException: java.lang.IllegalArgumentException: 192.168.0.21
            at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:152) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: java.lang.IllegalArgumentException: 192.168.0.21
            at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(MqttConnectOptions.java:458) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:273) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:167) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:224) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:136) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.mqtt.MqttGatewayImpl.<init>(MqttGatewayImpl.java:54) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.loadGateway(GatewayUtils.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.addGateway(GatewayUtils.java:259) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.add(GatewayApi.java:96) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.addGateway(GatewayHandler.java:72) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 15 common frames omitted
    2017-02-18 18:36:19,522 ERROR [Acme.Utils.ThreadPool(6)-PooledThread: Acme.Serve.Serve$ServeConnection@43b0de1a] [org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl:187] unable to add new item:[GatewayTable(id=null, enabled=true, name=Gateway_!, networkType=MY_SENSORS, timestamp=null, state=UNAVAILABLE, statusMessage=null, statusSince=null, type=MQTT, properties={p=, u=, bh=192.168.0.21, tp=MyController-Out, cid=MyController, ts=MyController-In})]
    java.sql.SQLException: Unable to run insert stmt on object GatewayTable(id=null, enabled=true, name=Gateway_!, networkType=MY_SENSORS, timestamp=null, state=UNAVAILABLE, statusMessage=null, statusSince=null, type=MQTT, properties={p=, u=, bh=192.168.0.21, tp=MyController-Out, cid=MyController, ts=MyController-In}): INSERT INTO `gateway` (`id` ,`enabled` ,`name` ,`networkType` ,`timestamp` ,`state` ,`statusMessage` ,`statusSince` ,`type` ,`properties` ) VALUES (?,?,?,?,?,?,?,?,?,?)
            at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl.create(BaseAbstractDaoImpl.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.addGateway(GatewayUtils.java:255) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.add(GatewayApi.java:96) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.addGateway(GatewayHandler.java:72) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "CONSTRAINT_INDEX_1 ON PUBLIC.GATEWAY(NAME) VALUES ( /* 3 */ 'Gateway_!' )"; SQL statement:
    INSERT INTO `gateway` (`id` ,`enabled` ,`name` ,`networkType` ,`timestamp` ,`state` ,`statusMessage` ,`statusSince` ,`type` ,`properties` ) VALUES (?,?,?,?,?,?,?,?,?,?) [23505-176]
            at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.message.DbException.get(DbException.java:178) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.message.DbException.get(DbException.java:154) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtree.find(PageBtree.java:121) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:151) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:104) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:97) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:88) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.table.RegularTable.addRow(RegularTable.java:120) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.dml.Insert.insertRows(Insert.java:157) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.dml.Insert.update(Insert.java:115) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.CommandContainer.update(CommandContainer.java:79) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.Command.executeUpdate(Command.java:254) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:158) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:144) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 26 common frames omitted
    

  • Hardware Contributor

    Part two:

    2017-02-18 18:36:19,524 ERROR [Acme.Utils.ThreadPool(6)-PooledThread: Acme.Serve.Serve$ServeConnection@43b0de1a] [org.mycontroller.standalone.api.jaxrs.exception.mappers.ApplicationExceptionMapper:42] ApplicationException,
    org.jboss.resteasy.spi.ApplicationException: java.lang.IllegalArgumentException: 192.168.0.21
            at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:152) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: java.lang.IllegalArgumentException: 192.168.0.21
            at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(MqttConnectOptions.java:458) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:273) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:167) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:224) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:136) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.mqtt.MqttGatewayImpl.<init>(MqttGatewayImpl.java:54) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.loadGateway(GatewayUtils.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.addGateway(GatewayUtils.java:259) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.add(GatewayApi.java:96) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.addGateway(GatewayHandler.java:72) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 15 common frames omitted
    2017-02-18 18:36:26,822 ERROR [Acme.Utils.ThreadPool(6)-PooledThread: Acme.Serve.Serve$ServeConnection@43b0de1a] [org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl:187] unable to add new item:[GatewayTable(id=null, enabled=true, name=Gateway_!, networkType=MY_SENSORS, timestamp=null, state=UNAVAILABLE, statusMessage=null, statusSince=null, type=MQTT, properties={p=, u=, bh=192.168.0.21, tp=MyController-Out, cid=MyController, ts=MyController-In})]
    java.sql.SQLException: Unable to run insert stmt on object GatewayTable(id=null, enabled=true, name=Gateway_!, networkType=MY_SENSORS, timestamp=null, state=UNAVAILABLE, statusMessage=null, statusSince=null, type=MQTT, properties={p=, u=, bh=192.168.0.21, tp=MyController-Out, cid=MyController, ts=MyController-In}): INSERT INTO `gateway` (`id` ,`enabled` ,`name` ,`networkType` ,`timestamp` ,`state` ,`statusMessage` ,`statusSince` ,`type` ,`properties` ) VALUES (?,?,?,?,?,?,?,?,?,?)
            at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl.create(BaseAbstractDaoImpl.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.addGateway(GatewayUtils.java:255) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.add(GatewayApi.java:96) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.addGateway(GatewayHandler.java:72) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "CONSTRAINT_INDEX_1 ON PUBLIC.GATEWAY(NAME) VALUES ( /* 4 */ 'Gateway_!' )"; SQL statement:
    INSERT INTO `gateway` (`id` ,`enabled` ,`name` ,`networkType` ,`timestamp` ,`state` ,`statusMessage` ,`statusSince` ,`type` ,`properties` ) VALUES (?,?,?,?,?,?,?,?,?,?) [23505-176]
            at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.message.DbException.get(DbException.java:178) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.message.DbException.get(DbException.java:154) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtree.find(PageBtree.java:121) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:151) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:104) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:97) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:88) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.table.RegularTable.addRow(RegularTable.java:120) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.dml.Insert.insertRows(Insert.java:157) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.dml.Insert.update(Insert.java:115) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.CommandContainer.update(CommandContainer.java:79) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.Command.executeUpdate(Command.java:254) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:158) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:144) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 26 common frames omitted
    2017-02-18 18:36:26,823 ERROR [Acme.Utils.ThreadPool(6)-PooledThread: Acme.Serve.Serve$ServeConnection@43b0de1a] [org.mycontroller.standalone.api.jaxrs.exception.mappers.ApplicationExceptionMapper:42] ApplicationException,
    org.jboss.resteasy.spi.ApplicationException: java.lang.IllegalArgumentException: 192.168.0.21
            at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:152) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: java.lang.IllegalArgumentException: 192.168.0.21
            at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(MqttConnectOptions.java:458) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:273) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:167) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:224) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:136) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.mqtt.MqttGatewayImpl.<init>(MqttGatewayImpl.java:54) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.loadGateway(GatewayUtils.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.addGateway(GatewayUtils.java:259) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.add(GatewayApi.java:96) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.addGateway(GatewayHandler.java:72) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 15 common frames omitted
    2017-02-18 18:37:15,462 ERROR [Acme.Utils.ThreadPool(5)-PooledThread: Acme.Serve.Serve$ServeConnection@17431941] [org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl:187] unable to add new item:[GatewayTable(id=null, enabled=true, name=Gateway_!, networkType=MY_SENSORS, timestamp=null, state=UNAVAILABLE, statusMessage=null, statusSince=null, type=MQTT, properties={p=, u=, bh=tcp://192.168.0.21, tp=MyController-Out, cid=MyController, ts=MyController-In})]
    java.sql.SQLException: Unable to run insert stmt on object GatewayTable(id=null, enabled=true, name=Gateway_!, networkType=MY_SENSORS, timestamp=null, state=UNAVAILABLE, statusMessage=null, statusSince=null, type=MQTT, properties={p=, u=, bh=tcp://192.168.0.21, tp=MyController-Out, cid=MyController, ts=MyController-In}): INSERT INTO `gateway` (`id` ,`enabled` ,`name` ,`networkType` ,`timestamp` ,`state` ,`statusMessage` ,`statusSince` ,`type` ,`properties` ) VALUES (?,?,?,?,?,?,?,?,?,?)
            at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.db.dao.BaseAbstractDaoImpl.create(BaseAbstractDaoImpl.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.addGateway(GatewayUtils.java:255) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.add(GatewayApi.java:96) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.addGateway(GatewayHandler.java:72) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "CONSTRAINT_INDEX_1 ON PUBLIC.GATEWAY(NAME) VALUES ( /* 5 */ 'Gateway_!' )"; SQL statement:
    INSERT INTO `gateway` (`id` ,`enabled` ,`name` ,`networkType` ,`timestamp` ,`state` ,`statusMessage` ,`statusSince` ,`type` ,`properties` ) VALUES (?,?,?,?,?,?,?,?,?,?) [23505-176]
            at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.message.DbException.get(DbException.java:178) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.message.DbException.get(DbException.java:154) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:103) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtree.find(PageBtree.java:121) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:151) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:104) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:97) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:88) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.table.RegularTable.addRow(RegularTable.java:120) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.dml.Insert.insertRows(Insert.java:157) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.dml.Insert.update(Insert.java:115) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.CommandContainer.update(CommandContainer.java:79) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.command.Command.executeUpdate(Command.java:254) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:158) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:144) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at com.j256.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 26 common frames omitted
    2017-02-18 18:37:15,510 INFO [Acme.Utils.ThreadPool(5)-PooledThread: Acme.Serve.Serve$ServeConnection@17431941] [org.mycontroller.standalone.gateway.mqtt.MqttGatewayImpl:70] MQTT Gateway[tcp://192.168.0.21] connected successfully..
    2017-02-18 18:38:10,512 ERROR [Acme.Utils.ThreadPool(0)-PooledThread: Acme.Serve.Serve$ServeConnection@4154ac95] [org.mycontroller.standalone.api.jaxrs.exception.mappers.ApplicationExceptionMapper:42] ApplicationException,
    org.jboss.resteasy.spi.ApplicationException: java.lang.IllegalArgumentException: 192.168.0.21
            at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:152) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: java.lang.IllegalArgumentException: 192.168.0.21
            at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(MqttConnectOptions.java:458) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:273) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:167) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:224) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.eclipse.paho.client.mqttv3.MqttClient.<init>(MqttClient.java:136) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.mqtt.MqttGatewayImpl.<init>(MqttGatewayImpl.java:54) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.loadGateway(GatewayUtils.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.updateGateway(GatewayUtils.java:250) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.update(GatewayApi.java:100) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.updateGateway(GatewayHandler.java:64) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 15 common frames omitted
    

  • Hardware Contributor

    Part three:

    2017-02-18 18:38:18,023 ERROR [Acme.Utils.ThreadPool(0)-PooledThread: Acme.Serve.Serve$ServeConnection@4154ac95] [org.mycontroller.standalone.api.jaxrs.exception.mappers.ApplicationExceptionMapper:42] ApplicationException,
    org.jboss.resteasy.spi.ApplicationException: java.lang.NullPointerException
            at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:152) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) [mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at java.lang.Thread.run(Thread.java:745) [na:1.8.0_121]
    Caused by: java.lang.NullPointerException: null
            at org.mycontroller.standalone.gateway.mqtt.MqttGatewayImpl.<init>(MqttGatewayImpl.java:77) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.loadGateway(GatewayUtils.java:184) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.gateway.GatewayUtils.updateGateway(GatewayUtils.java:250) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.GatewayApi.update(GatewayApi.java:100) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            at org.mycontroller.standalone.api.jaxrs.GatewayHandler.updateGateway(GatewayHandler.java:64) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            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.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139) ~[mycontroller-dist-standalone-0.0.3.Alpha2-single.jar:0.0.3.Alpha2]
            ... 15 common frames omitted
    2017-02-18 18:41:20,641 ERROR [MQTT Rec: MyController] [org.mycontroller.standalone.gateway.mqtt.MqttCallbackListener:55] MQTT Gateway[id:null, Name:Gateway_!, serverURI:tcp://192.168.0.21] connection lost! Error:Connection lost
    2017-02-18 18:41:50,716 INFO [MQTT Rec: MyController] [org.mycontroller.standalone.gateway.mqtt.MqttCallbackListener:115] MQTT Gateway[tcp://192.168.0.21] Reconnected successfully...
    2017-02-18 20:51:41,892 ERROR [MQTT Rec: MyController] [org.mycontroller.standalone.gateway.mqtt.MqttCallbackListener:55] MQTT Gateway[id:null, Name:Gateway_!, serverURI:tcp://192.168.0.21] connection lost! Error:Connection lost
    2017-02-18 20:52:21,983 INFO [MQTT Rec: MyController] [org.mycontroller.standalone.gateway.mqtt.MqttCallbackListener:115] MQTT Gateway[tcp://192.168.0.21] Reconnected successfully...
    [Sat Feb 18 20:57:49 GMT 2017] Accept: java.net.SocketException: Socket closed
    2017-02-18 20:57:49,789 INFO [MyController.org Shutdown-Hook] [org.mycontroller.standalone.AppShutdownHook:36] Bye, Have a nice day! See you soon
    

  • Plugin Developer

    @Samuel235

    @jkandasa - I have disabled the built in MQTT broker, through the web UI where you have put the slider for the MQTT broker, that is turned to the off position. Should i have disabled it in any other way, command line or anything? I'm running it on a Linux box.

    Thank you for the detailed log. We have an option in GUI only to stop/start MQTT broker.
    Looks like you have entered MQTT Borker host as only 192.168.0.21 on gateway settings, which is wrong. You have to feed as tcp://192.168.0.21:1883. Kindly remove your old gateway entry if any. and add new entry with tcp://192.168.0.21:1883.


  • Hardware Contributor

    @jkandasa - I added my IP as tcp://192.168.0.21

    Not sure why its saying that it was on 192.168.0.21 - Every time i went back to check it, it was automatically taking away the tcp:// too. However, i don't recall putting the port number after it. I think that was specified under it. I will attempt this and report back.

    Do you have any sort of guide/walk through for adding new nodes as all the options like "Registration Status", "EUI", "Firmware", I feel could be explained a little to people tbh. Obviously, users could go looking around the internet to find out what you actually mean by those labels but tooltips or some guide/walk through would be nice to add in. Just to let you know ;)

    Thank you.


  • Hardware Contributor

    Okay, so i have MyController working and seeing my gateway with the sensor attached. However, i have obviously setup the sensor incorrectly as it wont relay messages back to it. So, do you have some sort of walk through or guide to add a mysensor node/sensor to the controller properly please?


  • Plugin Developer


  • Hardware Contributor

    @jkandasa - I knew i saw something somewhere. Thank you, will attempt to add sensors later on when i get home. Thank you!


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.