Skip to content

Commit 5ecdc99

Browse files
committed
trace logging voor troubleshooting, zie microsoft/mssql-jdbc#1270
1 parent d379976 commit 5ecdc99

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/main/java/nl/b3p/loader/jdbc/MssqlJdbcConverter.java

+8-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import org.apache.commons.logging.Log;
2424
import org.apache.commons.logging.LogFactory;
2525
import org.locationtech.jts.io.ParseException;
26-
2726
import java.sql.SQLException;
2827

2928

@@ -64,11 +63,17 @@ public Object convertToNativeGeometryObject(org.locationtech.jts.geom.Geometry g
6463
return null;
6564
}
6665
String param = g.toText();
67-
// return param;
66+
// geotools
67+
// import org.geotools.geometry.jts.WKTWriter2;
68+
// import org.locationtech.jts.io.WKTWriter;
69+
// String param = (new WKTWriter2(2)).write(g);
6870
if (param == null || param.trim().length() == 0) {
6971
return null;
7072
}
71-
return Geometry.STGeomFromText(param, srid);
73+
LOG.trace("Converted geom WKT: " + param + ", SRID: " + srid);
74+
Geometry sqlGeom = Geometry.STGeomFromText(param, srid);
75+
LOG.trace("mssql geom: " + sqlGeom);
76+
return sqlGeom;
7277
}
7378

7479
@Override

src/main/java/nl/b3p/loader/jdbc/OracleJdbcConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,6 @@ public Geometry convertToJTSGeometryObject(Object nativeObj) {
202202
}
203203

204204
public String getUpdateSequenceSQL(String seqName, long nextVal){
205-
throw new UnsupportedOperationException("Not supported.");
205+
throw new UnsupportedOperationException("Update sequence not supported for this database version.");
206206
}
207207
}

0 commit comments

Comments
 (0)