I have imported the WSO2 IoT server Connected Cup sample device agent into Eclipse IDE, and disable device authentication for MQTT broker for easy of testing purpose. Then I created a connected cup sample device in the device management console, run the device agent, and expected to see some data in the analytics view. But nothing happened. When I took a look at the broker console it stated that the channel is established with the device, so I concluded that messages were normally transmitted from the device to the broker, and from the broker to the analytics server receiver. But then, I saw that the following exceptions were thrown in the analytics server console
[2017-04-04 14:55:29,918] [IoT-Analytics] ERROR {org.wso2.carbon.analytics.dataservice.core.indexing.AnalyticsDataIndexer} - Error while looking up table Schema: [-1234:DEVICE_COFFEELEVEL_SUMMARY] does not exist org.wso2.carbon.analytics.datasource.commons.exception.AnalyticsTableNotAvailableException: [-1234:DEVICE_COFFEELEVEL_SUMMARY] does not exist
and in the core component console
[2017-04-04 14:55:29,927] [] ERROR - StandardWrapperValve Servlet.service() for servlet [CXFServlet] in context with path [/connectedcup] threw exception java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: Unable to search the table - DEVICE_COFFEELEVEL_SUMMARY for tenant id : -1234 with query : deviceId:t4l4gf267ara AND deviceType:connectedcup AND time : [1491306929 TO 1491310529].
It looks like that DEVICE_COFFEELEVEL_SUMMARY table is missing in the database or something like that. Any ideas what could be the reason for this fault?
This could have happened if the summarization table is not created, You could trigger the table creation manually by running the spark script from the analytics console (https://ip:9444/carbon) [1].
In addition check whether the device has published data by going the data explorer in the console.
[1] https://docs.wso2.com/display/DAS300/Scheduling+Batch+Analytics+Scripts