[udig-devel] [jira] Created: (UDIG-992) Postgresql OID's can be
larger than INT even though JDBC driver casts them as such
carl anderson (JIRA)
jira at codehaus.org
Thu Sep 14 18:40:39 PDT 2006
Postgresql OID's can be larger than INT even though JDBC driver casts them as such
----------------------------------------------------------------------------------
Key: UDIG-992
URL: http://jira.codehaus.org/browse/UDIG-992
Project: uDIG
Issue Type: Bug
Components: postgis
Affects Versions: UDIG 1.1.RC4
Environment: ALL
Reporter: carl anderson
Assigned To: Jody Garnett
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 {
return resultSet.getObject(index + 1);
} catch (SQLException e) {
throw new DataSourceException("Error reading fid column " + index, e);
}
}
C.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the udig-devel
mailing list