WSO2AM Analytics 2.1-在"os"列中为空值.违反非空约束 [英] WSO2AM analytics 2.1 - null value in column "os" violates not-null constraint

查看:127
本文介绍了WSO2AM Analytics 2.1-在"os"列中为空值.违反非空约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在分析中使用WSO2AM 2.1和分析工具(我相信也是2.1版),我们在aalytics的服务器日志中具有以下例外:

using WSO2AM 2.1 with analytics (I believe version 2.1 too) we have following exceptino in the aalytics' server log:

错误:列"os"中的空值违反了非空约束

Caused by: java.sql.BatchUpdateException: Batch entry 4 INSERT INTO API_REQ_USER_BROW_SUMMARY (api, version, apiPublisher, tenantDomain, total_request_count, year, month, day, requestTime, os, browser) VALUES ('agenda.city', '0.0.1', 'admin', 'carbon.super', 153, 2017, 8, 15, 1502794641000, NULL, NULL) ON CONFLICT (api,version,apiPublisher,year,month,day,os,browser,tenantDomain) DO UPDATE SET total_request_count=EXCLUDED.total_request_count, requestTime=EXCLUDED.requestTime was aborted: ERROR: null value in column "os" violates not-null constraint
  Detail: Failing row contains (agenda.city, 0.0.1, admin, carbon.super, 153, 2017, 8, 15, 1502794641000, null, null).  Call getNextException to see other errors in the batch.
        at org.postgresql.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:145)
        at 

完全例外: https://pastebin.com/bqRJZniN

请注意-我没有看到 os 浏览器为空的问题,因为并非所有客户端(大多数后端API客户端)都可以/将提供其他信息

As a note - I don't see a problem having null os or browser as not all clients (mainy backend API clients) may/will provide additional information

编辑(18.8.2018):

Edit (18.8.2018):

我看到并非在所有环境中都发生此异常,因此区别一定存在于其他地方(从2.0.0升级后重用的数据库?),似乎有些因素我并不了解

I see this exception doesn't occur on every environment, so the difference must be somewhere else (reused DB after upgrade from 2.0.0?), seems there are factors I am not aware of

我也看到了很久以前总是提到批处理条目38 ..",也许我可以清理一下条目.我怎么做?

As well I see te long always mention "Batch entry 38 ..", maybe I could just clean up the entries for the start. How do I do that?

推荐答案

此问题已修复[1],将在下一版本中提供.

This is already fixed [1] and will be available in the next release.

[1] https://wso2.org/jira/browse/ANLYAPIM-154

这篇关于WSO2AM Analytics 2.1-在"os"列中为空值.违反非空约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆