New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensors page fails to load with servo node #181

Closed
githubcdr opened this Issue Apr 15, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@githubcdr

githubcdr commented Apr 15, 2016

Hi,

I noticed that a server node prevents the "sensors" tab from loading, after removing the servo node the sensors tab loads again.

angular.js:12416 ReferenceError: data is not defined
    at Object.displayRestError.display (alert_services.js:106)
    at sensors.js:50
    at angular-resource.js:626
    at angular.js:14634
    at m.$eval (angular.js:15878)
    at m.$digest (angular.js:15689)
    at m.$apply (angular.js:15986)
    at g (angular.js:10511)
    at L (angular.js:10683)
    at XMLHttpRequest.A.onload (angular.js:10624)

https://docs.angularjs.org/error/$rootScope/infdig?p0=10&p1=%5B%5D

Not sure why but other nodes seem to work fine.

Keep up the great work!

@jkandasa

This comment has been minimized.

Show comment
Hide comment
@jkandasa

jkandasa Apr 15, 2016

Member

@githubcdr do you see any error in mycontroller/logs/mycontroller.log.
Can you give some more detail to reproduce this issue like sensor type and sensor variables used

Member

jkandasa commented Apr 15, 2016

@githubcdr do you see any error in mycontroller/logs/mycontroller.log.
Can you give some more detail to reproduce this issue like sensor type and sensor variables used

@githubcdr

This comment has been minimized.

Show comment
Hide comment
@githubcdr

githubcdr Apr 15, 2016

Hi @jkandasa,

I notice the following;

[Fri Apr 15 16:34:51 CEST 2016] Unexpected problem running servlet: org.jboss.resteasy.spi.UnhandledException: Response is committed, can't handle exception
[Fri Apr 15 16:36:31 CEST 2016] Unexpected problem running servlet
org.jboss.resteasy.spi.UnhandledException: Response is committed, can't handle exception
        at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:148)
        at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:432)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:376)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
        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:2331)
        at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2285)
        at Acme.Serve.Serve$ServeConnection.run(Serve.java:2057)
        at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: empty String (through reference chain: org.mycontroller.standalone.api.jaxrs.mapper.QueryResponse["data"]->java.util.ArrayList[5]->org.mycontroller.standalone.db.tables.Sensor["variables"])
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:232)
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:197)
        at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:187)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:647)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:100)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:21)
        at com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase.serialize(AsArraySerializerBase.java:183)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)
        at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:114)
        at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:602)
        at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.writeTo(ResteasyJackson2Provider.java:207)
        at org.mycontroller.standalone.api.jaxrs.mixins.McJacksonJson2Provider.writeTo(McJacksonJson2Provider.java:85)
        at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.writeTo(AbstractWriterInterceptorContext.java:129)
        at org.jboss.resteasy.core.interception.ServerWriterInterceptorContext.writeTo(ServerWriterInterceptorContext.java:62)
        at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:118)
        at org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor.aroundWriteTo(GZIPEncodingInterceptor.java:100)
        at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:122)
        at org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:99)
        at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:427)
        ... 12 more
Caused by: java.lang.NumberFormatException: empty String
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
        at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
        at java.lang.Double.parseDouble(Double.java:538)
        at java.lang.Double.valueOf(Double.java:502)
        at org.mycontroller.standalone.NumericUtils.getDoubleAsString(NumericUtils.java:68)
        at org.mycontroller.standalone.db.SensorUtils.getValue(SensorUtils.java:108)
        at org.mycontroller.standalone.api.jaxrs.exception.mappers.VariableStatusModel.<init>(VariableStatusModel.java:59)
        at org.mycontroller.standalone.api.jaxrs.mixins.serializers.SensorVariableSerializer.serialize(SensorVariableSerializer.java:51)
        at org.mycontroller.standalone.api.jaxrs.mixins.serializers.SensorVariableSerializer.serialize(SensorVariableSerializer.java:1)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)
        ... 30 more

[Fri Apr 15 16:36:31 CEST 2016] Unexpected problem running servlet: org.jboss.resteasy.spi.UnhandledException: Response is committed, can't handle exception

I compiled a default "distance sensor" and got the same issue, not sure why.

update: After testing some more I discovered that the pages sometimes loads correctly, only once in 20 tries.

I have disabled all clientside add blockers just to make sure.

githubcdr commented Apr 15, 2016

Hi @jkandasa,

I notice the following;

[Fri Apr 15 16:34:51 CEST 2016] Unexpected problem running servlet: org.jboss.resteasy.spi.UnhandledException: Response is committed, can't handle exception
[Fri Apr 15 16:36:31 CEST 2016] Unexpected problem running servlet
org.jboss.resteasy.spi.UnhandledException: Response is committed, can't handle exception
        at org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:148)
        at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:432)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:376)
        at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
        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:2331)
        at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2285)
        at Acme.Serve.Serve$ServeConnection.run(Serve.java:2057)
        at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: empty String (through reference chain: org.mycontroller.standalone.api.jaxrs.mapper.QueryResponse["data"]->java.util.ArrayList[5]->org.mycontroller.standalone.db.tables.Sensor["variables"])
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:232)
        at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:197)
        at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:187)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:647)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:100)
        at com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:21)
        at com.fasterxml.jackson.databind.ser.std.AsArraySerializerBase.serialize(AsArraySerializerBase.java:183)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)
        at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:152)
        at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:114)
        at com.fasterxml.jackson.databind.ObjectWriter.writeValue(ObjectWriter.java:602)
        at org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.writeTo(ResteasyJackson2Provider.java:207)
        at org.mycontroller.standalone.api.jaxrs.mixins.McJacksonJson2Provider.writeTo(McJacksonJson2Provider.java:85)
        at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.writeTo(AbstractWriterInterceptorContext.java:129)
        at org.jboss.resteasy.core.interception.ServerWriterInterceptorContext.writeTo(ServerWriterInterceptorContext.java:62)
        at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:118)
        at org.jboss.resteasy.plugins.interceptors.encoding.GZIPEncodingInterceptor.aroundWriteTo(GZIPEncodingInterceptor.java:100)
        at org.jboss.resteasy.core.interception.AbstractWriterInterceptorContext.proceed(AbstractWriterInterceptorContext.java:122)
        at org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:99)
        at org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:427)
        ... 12 more
Caused by: java.lang.NumberFormatException: empty String
        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
        at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
        at java.lang.Double.parseDouble(Double.java:538)
        at java.lang.Double.valueOf(Double.java:502)
        at org.mycontroller.standalone.NumericUtils.getDoubleAsString(NumericUtils.java:68)
        at org.mycontroller.standalone.db.SensorUtils.getValue(SensorUtils.java:108)
        at org.mycontroller.standalone.api.jaxrs.exception.mappers.VariableStatusModel.<init>(VariableStatusModel.java:59)
        at org.mycontroller.standalone.api.jaxrs.mixins.serializers.SensorVariableSerializer.serialize(SensorVariableSerializer.java:51)
        at org.mycontroller.standalone.api.jaxrs.mixins.serializers.SensorVariableSerializer.serialize(SensorVariableSerializer.java:1)
        at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:505)
        at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:639)
        ... 30 more

[Fri Apr 15 16:36:31 CEST 2016] Unexpected problem running servlet: org.jboss.resteasy.spi.UnhandledException: Response is committed, can't handle exception

I compiled a default "distance sensor" and got the same issue, not sure why.

update: After testing some more I discovered that the pages sometimes loads correctly, only once in 20 tries.

I have disabled all clientside add blockers just to make sure.

@jkandasa

This comment has been minimized.

Show comment
Hide comment
@jkandasa

jkandasa Apr 15, 2016

Member

@githubcdr Thank you for the report. It looks like you are using old version of MyController. Can you please check version information once again? In the latest version will be printed in mycontroller.log file, when you start the server.

Member

jkandasa commented Apr 15, 2016

@githubcdr Thank you for the report. It looks like you are using old version of MyController. Can you please check version information once again? In the latest version will be printed in mycontroller.log file, when you start the server.

@githubcdr

This comment has been minimized.

Show comment
Hide comment
@githubcdr

githubcdr Apr 15, 2016

Sorry for my mistake, it seems versions got mixed up, all is working again!

Thank you :)

githubcdr commented Apr 15, 2016

Sorry for my mistake, it seems versions got mixed up, all is working again!

Thank you :)

@jkandasa

This comment has been minimized.

Show comment
Hide comment
@jkandasa

jkandasa Apr 15, 2016

Member

@githubcdr Thank you! I will close this issue. Please reopen if you face again.

Member

jkandasa commented Apr 15, 2016

@githubcdr Thank you! I will close this issue. Please reopen if you face again.

@jkandasa jkandasa closed this Apr 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment