Solve the problem that the table name is underlined when geotools imports the shp file to the Oracle database,

Source: Internet
Author: User

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.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.