问题
When restarting APIM Analytics the following error appears in log (the first run is ok). We need to truncate ANX___8GEKYOMM_ table for being able to start it again.
TID: [-1234] [] ERROR {org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceComponent} - Error in activating analytics data service: null {org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceComponent} java.lang.RuntimeException at org.wso2.carbon.analytics.datasource.rdbms.RDBMSAnalyticsRecordStore$RDBMSResultSetIterator.next(RDBMSAnalyticsRecordStore.java:881) at org.wso2.carbon.analytics.datasource.rdbms.RDBMSAnalyticsRecordStore$RDBMSResultSetIterator.hasNext(RDBMSAnalyticsRecordStore.java:843) at org.apache.commons.collections.IteratorUtils.toList(IteratorUtils.java:848) at org.apache.commons.collections.IteratorUtils.toList(IteratorUtils.java:825) at org.wso2.carbon.analytics.datasource.core.util.GenericUtils.listRecords(GenericUtils.java:284) at org.wso2.carbon.analytics.dataservice.core.AnalyticsDataServiceImpl.readTenantIds(AnalyticsDataServiceImpl.java:468)
Caused by: java.lang.NullPointerException at java.io.OutputStream.write(OutputStream.java:75) at org.wso2.carbon.analytics.datasource.rdbms.RDBMSAnalyticsRecordStore$RDBMSResultSetIterator.extractDataFromRS(RDBMSAnalyticsRecordStore.java:890) at org.wso2.carbon.analytics.datasource.rdbms.RDBMSAnalyticsRecordStore$RDBMSResultSetIterator.next(RDBMSAnalyticsRecordStore.java:863) ... 124 more
回答1:
I have solved it upgrading from org.wso2.carbon.analytics.datasource.rdbms-1.3.0.jar to org.wso2.carbon.analytics.datasource.rdbms-1.3.6.jar
来源:https://stackoverflow.com/questions/45055154/wso2-api-manager-2-1-analytics-cannot-be-restarted-when-using-oracle-db