mycontroller-org / mycontroller-v1-legacy

The Open Source Controller
http://www.MyController.org
Apache License 2.0
148 stars 90 forks source link

Selecting Topology tab gives null pointer exception. #452

Closed ghost closed 6 years ago

ghost commented 6 years ago

This happens everytime I select the topology tab. This started after a backup restore. I backed up my raspberrypi mycontroller and restored it to a computer running ubuntu. Both running the same version of mycontroller.org

MyController Version 1.2.0.Final Database schema revision 1.04.01 - 2017 Oct 25 Database type H2 database embedded Database version 1.4.194 (2017-03-10) Git commit:branch a10694ff1bff40cfb9988cec48e6569ec51ee57b:master Built on 2018-02-23T10:26:25+0530 Build JDK 1.8.0_161 Build tool Apache Maven 3.5.0 Java virtual machine specification VM vendor Oracle Corporation VM name Java HotSpot(TM) 64-Bit Server VM VM version 1.8.0_171-b11 Java home /usr/lib/jvm/java-8-oracle/jre Operating system Operating system Linux Architecture amd64 Version /Kernel 4.15.0-22-generic Location /home/john/mycontroller/mycontroller/

Here is the server log entry that was created.

2018-06-01 07:44:08,315 ERROR [Acme.Utils.ThreadPool(0)-PooledThread: Acme.Serve.Serve$ServeConnection@c13566c] [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)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
    at org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2328)
    at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2282)
    at Acme.Serve.Serve$ServeConnection.run(Serve.java:2054)
    at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: null
    at org.mycontroller.standalone.db.SensorUtils.getValue(SensorUtils.java:207)
    at org.mycontroller.standalone.api.jaxrs.MetricsHandler.updateSensorVariableTopology(MetricsHandler.java:478)
    at org.mycontroller.standalone.api.jaxrs.MetricsHandler.updateSensorTopology(MetricsHandler.java:459)
    at org.mycontroller.standalone.api.jaxrs.MetricsHandler.updateNodeTopology(MetricsHandler.java:414)
    at org.mycontroller.standalone.api.jaxrs.MetricsHandler.updateGatewayTopology(MetricsHandler.java:362)
    at org.mycontroller.standalone.api.jaxrs.MetricsHandler.getTopology(MetricsHandler.java:305)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
    ... 15 common frames omitted
jkandasa commented 6 years ago

@rayvenwalker Fix updated in SNAPSHOT version, kindly reopen this issue. if you see this issue

ghost commented 6 years ago

Will do, keep up the good work!

ghost commented 6 years ago

problem solved