技术文章 - CS333946
对于 ThingWorx Platform 中的某些价值流,将价值流从 PostgreSQL 迁移或导入到 InfluxDB 会失败
已修改: 22-Oct-2024
适用于
- ThingWorx Platform 8.4 to 9.5
- PostgreSQL
- InfluxDB
说明
- 将某些 Value Streams 数据导入 InfluxDB 时失败并出现错误:
com.thingworx.common.exceptions.DataAccessException: [2,000] Error occurred while accessing the data provider
- 将值流从PostgreSQL迁移到InfluxDB脚本失败,出现重复条目
- 位于<ThingworxStorage>\logs的 ThingWorx Platform 日志显示以下内容:
- 应用程序日志
[L: ERROR] [O: c.t.c.DataImportProcessor] [I: ] [U: <User>] [S: ] [T: Worker-a4253e02-c797-4ecd-863e-4be74ab8c516-1] Task-1605070440176 Import issue with ValueStream <Value Stream>: com.thingworx.common.exceptions.DataAccessException: [2,000] Error occurred while accessing the data provider. [L: ERROR] [O: c.t.c.DataImportProcessor] [I: ] [U: <User>] [S: ] [T: Worker-a4253e02-c797-4ecd-863e-4be74ab8c516-1] Task-1605070440176 Failed to import file [<ThingworxStorage>/repository/SystemRepository/<Export Date>/ValueStreams/<Value Stream>/data-0.twx] : com.thingworx.common.exceptions.DataAccessException: [2,000] Error occurred while accessing the data provider. [L: ERROR] [O: c.t.p.c.a.AsyncExecutionHelper] [I: ] [U: <User>] [S: ] [T: Worker-a4253e02-c797-4ecd-863e-4be74ab8c516-1] Task-1605070440176 Import FAILED for entity [<Value Stream>] File:[data-0.twx]. Data imported : [10000 rows]. Path to file [<ThingworxStorage>/repository/SystemRepository/<Export Date>/ValueStreams/<Value Stream>/data-0.twx] Failure Reason : Error: . com.thingworx.common.exceptions.DataAccessException: [2,000] Error occurred while accessing the data provider.. [2,000] Error occurred while accessing the data provider.
- ErrorLog.log (在LoggingSubsystem中选中启用堆栈跟踪)
[L: ERROR] [O: E.c.t.p.i.InfluxdbDataExceptionTranslator] [I: ] [U: <User>] [S: ] [T: Worker-a4253e02-c797-4ecd-863e-4be74ab8c516-1] [message: [2,000] Error occurred while accessing the data provider.] org.influxdb.InfluxDBException$FieldTypeConflictException: field type conflict
at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:144)
at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:188)
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:806)
...
Wrapped by: com.thingworx.common.exceptions.DataAccessException: [2,000] Error occurred while accessing the data provider.
at com.thingworx.persistence.influxdb.InfluxdbDataExceptionTranslator.rethrowTranslated(InfluxdbDataExceptionTranslator.java:30)
at com.thingworx.persistence.influx.dao.InfluxValueStreamDao.save(InfluxValueStreamDao.java:100)
at com.thingworx.persistence.influxdb.dataprovider.InfluxValueStreamDataProvider.addEntries(InfluxValueStreamDataProvider.java:150)
at com.thingworx.persistence.common.ValueStreamEngine.lambda$writeStreamEntries$16(ValueStreamEngine.java:440)
at com.thingworx.persistence.TransactionFactory.createDataTransaction(TransactionFactory.java:141)
at com.thingworx.persistence.common.BaseEngine.createTransaction(BaseEngine.java:192)
...
这是文章 333946 的 PDF 版本,可能已过期。最新版本 CS333946