Worklight v6 iwap

174 Views Asked by At

I set up Worklight V6 Server and IWAP. I found my worklight app console has analytics tab and there is IWAP console. there is dashboad view, search view, search log view, geo analytics view.

then I put WL.Logger.error and WL.Analytics.log code in my app and issued these logs but I cannot find any data on my IWAP console. and there is following NumberFormatException in my IWAP logs. can I fix this?

[2013-06-24 18:02:35,998][DEBUG][action.search.type       ] [Rattler] [worklight][7], node[M8YymIEGQbae4fbtkc2cyA], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@465651a2]
org.elasticsearch.search.SearchParseException: [worklight][7]: from[0],size[-1],sort[<custom:"worklight_data.timestamp": org.elasticsearch.index.field.data.longs.LongFieldDataType$1@79b8644>!]: Parse Failure [Failed to parse source [{"sort": {"worklight_data.timestamp": {"order": "desc"}}, "from": 0, "script_fields": {}, "facets": {}, "query": {"query_string": {"query": "worklight_data.log.message:* AND worklight_data.timestamp:[NaN TO * ]"}}, "size": 1000}]]
        at org.elasticsearch.search.SearchService.parseSource(SearchService.java:566)
        at org.elasticsearch.search.SearchService.createContext(SearchService.java:481)
        at org.elasticsearch.search.SearchService.createContext(SearchService.java:466)
        at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:236)
        at org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteQuery(SearchServiceTransportAction.java:141)
        at org.elasticsearch.action.search.type.TransportSearchQueryThenFetchAction$AsyncAction.sendExecuteFirstPhase(TransportSearchQueryThenFetchAction.java:80)
        at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:205)
        at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.performFirstPhase(TransportSearchTypeAction.java:192)
        at org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction$2.run(TransportSearchTypeAction.java:178)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
        at java.lang.Thread.run(Thread.java:779)
Caused by: java.lang.NumberFormatException: For input string: "NaN"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:76)
        at java.lang.Long.parseLong(Long.java:452)
        at java.lang.Long.parseLong(Long.java:494)
        at org.elasticsearch.index.mapper.core.LongFieldMapper.rangeQuery(LongFieldMapper.java:176)
        at org.apache.lucene.queryParser.MapperQueryParser.getRangeQuerySingle(MapperQueryParser.java:342)
        at org.apache.lucene.queryParser.MapperQueryParser.getRangeQuery(MapperQueryParser.java:331)
        at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1496)
        at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1319)
        at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1275)
        at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1234)
        at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:206)
        at org.elasticsearch.index.query.QueryStringQueryParser.parse(QueryStringQueryParser.java:212)
        at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:188)
1

There are 1 best solutions below

0
On

Please check that the following:

1 - Are you using the developer edition? In Worklight v6, the Analytics console will not function in the developer edition. This may be changed in future releases. I have never seen that exception before, but I wonder if it occurs as a result of trying to run with the developer edition.

2 - In your initOptions.js, analytics has been set to true:

analytics : { enabled: true }

3 - In worklight.properties, you should set the queue size to 1 so that analytics are immediately seen on the console

wl.analytics.queue.size=1

Important Note The queue size should only be set to 1 in testing mode, as using 1 will not scale in production mode.

If you continue to have issues, please post more information such as the calls you are making to WL.Analytics.log and your worklight.properties for the analytics.

EDIT

If you are running Worklight 6.0 in development mode, you will need the following flag in worklight.properties:

wl.analytics.debug=true