ClassCastException thrown while creating Postgis table.

Description

The exception is thrown in class
org.geotools.data.postgis.PostGISDialect
in method: postCreateTable at line 922.
The JDBC NATIVE SRID is of type Long and is being cast to Integer.

The soution could look like this:
srid = ((Number) gd.getUserData().get(JDBCDataStore.JDBC_NATIVE_SRID)).intValue();

Environment

System: Windows 7 Professional 64 bit
Java: 1.8 u111

Activity

Show:
Andrea Aime
November 12, 2017, 1:51 PM

Do you have a sample class that can be used to reproduce the problem?
In general, for any bug fix, we need a JUnit test case and a code change (having just one will prevent merge).

Assignee

Unassigned

Reporter

Marcin Roguski