A number of tests are failing which I suspect is due to the way
retrieval sets are handled in DB2 vs other databases like PostGIS.
For example in JDBCDataStoreOnlineTest::testCreateSchemaWithConstraints,
there is logic
//grab a writer
try(FeatureWriter<SimpleFeatureType, SimpleFeature> w =
dataStore.getFeatureWriter(
tname("ft2"),Transaction.AUTO_COMMIT)) {
w.hasNext();
SimpleFeature f = w.next();
f.setAttribute( 1, new Integer(0));
f.setAttribute( 2, "hello");
w.write();
This fails on w.next() with
java.io.IOException: com.ibm.db2.jcc.am.SqlException:
[jcc][t4][10120][10898][3.66.46] Invalid operation: result set is
closed. ERRORCODE=-4470, SQLSTATE=null
which results from:
ResultSetFeature rsf = getOrCreateRSF();
which tried to get the metadata from the result set. DB2 closes the
result set when the end of the data is reached and fails when attempting
to get the metadata on a closed result set. From what I can tell,
PostGIS still can get the metadata on result set.
I haven't found an obvious way to have DBMS specific behavior for
FeatureWriter::getOrCreateRSF();
Any suggestions?
It seems that in some of the tests the use of FeatureWriter could be
replaced with dataStore.addFeatures().
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users