Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

[End of TNS data channel] with Java SDO API (JDBC thin 9.0.1.2.1)

gkk1969Nov 8 2002 — edited Feb 15 2005
Hello folks,

Environment:

Win2K, 1.2GHz Intel, 500MB RAM, Oracle 9i, Oracle JDBC Thin (9.0.1.2.1), JDK1.3
Our data in the DB is 2-D. It consists of SDO LineString geometries. We use SRID = 8307.

I run into this problem with Java SDO API. I got this exception: "Io exception: End of TNS data channel"

when I try to execute query that uses the SDO_RELATE function:

SELECT e.shape
FROM edge e
WHERE SDO_RELATE(e.shape,
mdsys.sdo_geometry( 2003, 8307, NULL,
mdsys.sdo_elem_info_array(1,1003,1),
mdsys.sdo_ordinate_array(-125.8,49.9,-125.6,49.9,-125.6,50.0,-125.8,50.0,-125.8,49.9) ),
'mask=ANYINTERACT querytype=WINDOW') = 'TRUE'

If I use SDO_FILTER instead of SDO_RELATE it works!

Here is how I execute the query in Java:

public int executeSpatialQuery(OracleConnection conn, String spatialQuery) throws Exception
{
int numberOfGeometries = 0;
conn.setDefaultRowPrefetch(1000);
Statement ps = conn.createStatement();
ResultSet rs = ps.executeQuery(spatialQuery);
while (rs.next()) {
numberOfGeometries++;
}
rs.close();
ps.close();
return numberOfGeometries;
}

Note: I was playing with the "conn.setDefaultRowPrefetch(n)" method hoping that there might be something to do with that but with no success.

Any help will be much appreciated. Thank you.

GKK
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2005
Added on Nov 8 2002
17 comments
932 views