我嘗試使用文檔說明將wso2 api管理器(1.6.0)與wso2 bam(2.4.0)連接。我在Api Manager Publisher中看到統計信息,但我看不到「用戶的API使用情況」。在Api Manager的日誌文件中,我有以下例外。有人有任何想法?用戶的API使用情況未顯示
由於 斯特凡諾
[2014年1月21日11:52:14551] ERROR - APIProviderHostObject錯誤而調用APIUsageStatisticsClient爲ProviderAPIUsage org.wso2.carbon.apimgt.usage.client.exception.APIMgtUsageQueryServiceClientException:錯誤從JDBC數據庫 在org.wso2.carbon.apimgt.usage.client.APIUsageStatisticsClient.queryBetweenTwoDaysForAPIUsageByUser(APIUsageStatisticsClient.java:1211) 在org.wso2.carbon.apimgt.usage.client.APIUsageStatisticsClient.getAPIUsageByUser(APIUsageStatisticsClient在查詢時發生。 java:313) at org.wso2.carbon.apimgt.hostobjects.APIProviderHostObject.jsF unction_getAPIUsageByUser(APIProviderHostObject.java:2146) 在sun.reflect.NativeMethodAccessorImpl.invoke0(本機方法) 在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java :25) at java.lang.reflect.Method.invoke(Method.java:597) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) at org.mozilla.javascript.FunctionObject.call (FunctionObject.java:386) at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) at org.jaggeryjs.rhino.publisher.modules.statistics.c1._c_getAPIUsageByUser_6(/ publisher/modules/statistics/usage.jag:147) at org.jaggeryjs.rhi no.publisher.modules.statistics.c1.call(/publisher/modules/statistics/usage.jag) at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2430) at org.mozilla.javascript.BaseFunction .execIdCall(BaseFunction.java:269) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:97) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42) at org .jaggeryjs.rhino.publisher.modules.statistics.c0._c_anonymous_11(/publisher/modules/statistics/module.jag:25) at org.jaggeryjs.rhino.publisher.modules.statistics.c0.call(/ publisher/modules /statistics/module.jag) at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52) at org.jaggeryjs.rhino.publisher.site.blocks.stats.ajax.c0。 _c_anonymous_1(/publisher/site/blocks/stats/ajax/stats.jag:153) at org.jaggeryjs.rhino.publisher.site.blocks.stats.ajax.c0.call(/ publisher/site/blocks/stats/AJAX/stats.jag) 在org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23) 在org.jaggeryjs.rhino.publisher.site.blocks.stats.ajax.c0._c_script_0(/發佈/site/blocks/stats/ajax/stats.jag:4) at org.jaggeryjs.rhino.publisher.site.blocks.stats.ajax.c0.call(/ publisher/site/blocks/stats/ajax/stats。 jag) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) at org.jaggeryjs.rhino.publisher.site。 blocks.stats.ajax.c0.call(/publisher/site/blocks/stats/ajax/stats.jag) at org.jaggeryjs.rhino.publisher.site.blocks.stats.ajax.c0.exec(/publisher/site/blocks/stats/ajax/stats.jag) at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript (RhinoEngine.java:570) 在org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273) 在org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:432) at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29) at javax.servlet.http。HttpServlet.service(HttpServlet.java:755) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:848) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher。 (org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339) at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(粗糖Filter.java:21) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) 處組織org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 。 apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke( AuthenticatorBase.java:472) 在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) 在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) 的組織。 wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:17 8) 在org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve $ 1.invoke(CarbonTomcatValve.java:47) 在org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:56) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at org .wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.wso2.carbon.tomcat .ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52) at org.apache.catalina.core.StandardEngineValve.invoke(Stan dardEngineValve.java:118) 在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) 在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) 在有機apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1653) at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) 引起: org.h2.jdbc.JdbcSQLException:列「CONTEXT」必須位於GROUP BY列表中; SQL語句: SELECT API,API_VERSION,VERSION,USERID,SUM(TOTAL_REQUEST_COUNT)AS TOTAL_REQUEST_COUNT,CONTEXT FROM API_REQUEST_SUMMARY WHERE time BETWEEN'2014-01-20'AND'2014-01-22'GROUP BY API,API_VERSION,USERID ORDER BY TOTAL_REQUEST_COUNT DESC LIMIT 10 [90016-140] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:167) at org.h2 .message.DbException.get(DbException.java:144) at org.h2.expression.ExpressionColumn.updateAggregate(ExpressionColumn.java:148) at org.h2.command.dml.Select.queryGroup(Select.java:335) ) at org.h2.command.dml.Select.queryWithoutCache(Select.java:574) at org.h2.command.dml.Query.query(Query.java:241) 在org.h2.command。CommandContainer.query(CommandContainer.java:80) at org.h2.command.Command.executeQuery(Command.java:132) at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:76) at org。 wso2.carbon.apimgt.usage.client.APIUsageStatisticsClient.queryBetweenTwoDaysForAPIUsageByUser(APIUsageStatisticsClient.java:1193) ...... 63多個
堆棧跟蹤是不是足夠向前?它表示由org.h2.jdbc.JdbcSQLException引發:列「CONTEXT」必須位於GROUP BY列表中;因此,只需在GROUP BY子句中包含CONTEXT列並檢查。 – Ragavan