0

我設置了Worklight V6 Server和IWAP。 我發現我的worklight應用程序控制臺具有分析選項卡,並且存在IWAP控制檯。 有dashboad視圖,搜索視圖,搜索日誌視圖,地理分析視圖。Worklight v6 iwap

然後我將WL.Logger.error和WL.Analytics.log代碼放在我的應用程序中,併發布了這些日誌 ,但我在IWAP控制檯上找不到任何數據。 ,並且在我的IWAP日誌中存在以下NumberFormatException。我能解決這個問題嗎?

[2013-06-24 18:02:35,998][DEBUG][action.search.type  ] [Rattler] [worklight][7], node[M8YymIEGQbae4fbtkc2cyA], [P], s[STARTED]: Failed to execute [[email protected]] 
org.elasticsearch.search.SearchParseException: [worklight][7]: from[0],size[-1],sort[<custom:"worklight_data.timestamp": [email protected]8644>!]: 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) 
+0

增加了額外的評論:

編輯

如果您在開發模式下運行工作燈6.0,則需要在worklight.properties以下標誌。 – jnortey

回答

1

請檢查以下內容:

1 - 您是否使用了開發者版本?在Worklight v6中,Analytics(分析)控制檯將無法在開發者版本中運行。這可能會在未來的版本中更改。我從來沒有見過這種異常,但我想知道是否是因爲嘗試使用開發者版本運行而發生的。

2 - 在你initOptions.js,分析已被設置爲true:

分析:{啓用:真正}

3 - 在worklight.properties,你應該設置隊列大小爲1,即分析立即看到控制檯

wl.analytics.queue.size = 1

重要注意事項在測試模式下,隊列大小隻應設置爲1,因爲在生產模式下使用1不會縮放。

如果您仍然遇到問題,請發佈更多信息,例如您正在對WL.Analytics.log進行的調用以及針對分析的worklight.properties。如果在開發工作室運行大約需要標誌

wl.analytics.debug=true