使用产品:iobject for Java 11.0.1
数据库: postgresql 12
问题:采用组件ImportSettingSHP类执行shp文件的导入到数据源中,数据源为数据库数据源,引擎为POSTGRESQL,代码如下:
String datasourceName = FileUtil.getPrefix(shpPath);
ImportSettingSHP importSettingSHP = new ImportSettingSHP(shpPath,ds);
importSettingSHP.setImportEmptyDataset(true);
importSettingSHP.setImporttingAs3D(false);
importSettingSHP.setAttributeIgnored(false);
importSettingSHP.setImportMode(ImportMode.OVERWRITE);
importSettingSHP.setSourceFileCharset(Charset.ANSI);
importSettingSHP.setTargetDatasetName(datasourceName);
DataImport dataImport = new DataImport();
ImportSettings settings = dataImport.getImportSettings();
settings.add(importSettingSHP);
dataImport.setImportSettings(settings);
ImportResult result = dataImport.run();
String[] dataSetNames= result.getSucceedDatasetNames(importSettingSHP);
ImportSetting[] failSettings= result.getFailedSettings();
failSettings中拿到了导入异常的配置,错误信息:方法抛出'java.lang.RuntimeException'异常. 无法评估 com.supermap.data.conversion.DataType.toString()
请问下会是哪出的问题?