Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: UDIG 1.1.RC4
-
Fix Version/s: UDIG 1.1.RC5
-
Component/s: database
-
Labels:None
-
Environment:ALL
Description
With some PostGIS databases I can't access all records
Caused by: org.postgresql.util.PSQLException: Bad value for type int : 2182558298
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toInt(AbstractJdbc2ResultSet.java:2507)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:1994)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.internalGetObject(AbstractJdbc2ResultSet.java:122)
at org.postgresql.jdbc3.AbstractJdbc3ResultSet.internalGetObject(AbstractJdbc3ResultSet.java:39)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getObject(AbstractJdbc2ResultSet.java:2325)
at org.geotools.data.jdbc.QueryData.readFidColumn(QueryData.java:208)
As long as the OID's are small enough to be cast into java INT's everything works well.
A potential resolution is to cast OID's as VARBINARY or LONG
issue might spring forth from geotools
module/main/src/org/geotools/data/jdbc/QueryData.java
public Object readFidColumn(int index) throws IOException {
try
catch (SQLException e)
{ throw new DataSourceException("Error reading fid column " + index, e); }}
C.
Issue Links
- is related to
-
GEOT-958
Support FID values greater than int
-
Could you attach your table schema?
Thanks,
Cory.