Solve the problem that the table name is underlined when geotools imports the shp file to the Oracle database,
Problem:
Recently, we used geotools to import the shp file to the Oracle table. We found that the import failed when the Oracle table name was underlined. The problematic code line is dsOracle. getFeatureWriterAppend (oracleTable, Transaction. AUTO_COMMIT); dsOracle is org. geotools. data. dataStore type object
Solution:
I found that the Oracle 11 java package ojdbc version was incorrect. I searched for ojdbc in maven and found the latest version, such as pom Configuration:
<! -- Https://mvnrepository.com/artifact/ojdbc/ojdbc -->
<Dependency>
<GroupId> ojdbc </groupId>
<ArtifactId> ojdbc </artifactId>
<Version> 14 </version>
</Dependency>
However, the latest version of Oracle11g ojdbc should be ojdbc6
Pom Configuration:
<! -- Https://mvnrepository.com/artifact/cn.guoyukun.jdbc/oracle-ojdbc6 -->
<Dependency>
<GroupId> cn. guoyukun. jdbc </groupId>
<ArtifactId> oracle-ojdbc6 </artifactId>
<Version> 11.2.0.3.0 </version>
</Dependency>
So I updated the jar package of ojdbc TO THE oracle-ojdbc6-11.2.0.3.0.jar version.