Hi list,

This issue was found if the SQL Server 2008 table is empty initially. If we try 
to search on empty table by providing bounding box, no feature is returned 
(which is expected). But thereafter if we insert some feature in table and 
search again, even then no feature is returned. Instead, if we start with 
non-empty table (with even 1 record), things work properly. Search after 
insertion/deletion results in correct number of features.

I created a test program GeoToolsTest.java (please find attached). Here I am 
making use of 2 tables in SQL Server 2008 - READ_TABLE & WRITE_TABLE. Both 
table have similar schema which is as follows:
There are 3 columns in both table, the name and type are as follows:
COUNTRY varchar(254)
MI_PRINX integer
SP_GEOMETRY geometry

To start with READ_TABLE has couple of entries and WRITE_TABLE is blank. The 
program do the following
1) Search WRITE_TABLE (which is empty initially)
2) Insert all records from READ_TABLE to WRITE_TABLE
3) Search WRITE_TABLE again.

The step #3 above should return all inserted features, but it is not returning 
any feature. If we keep at least 1 record in WRITE_TABLE to start with (in step 
#1 above), things work fine.

I am making use of following jars to compile and run this test program.

commons-dbcp-1.4.jar
commons-pool-1.5.6.jar
gt-api-9.2.jar
gt-data-9.2.jar
gt-epsg-hsql-9.2.jar
gt-jdbc-9.2.jar
gt-jdbc-sqlserver-9.2.jar
gt-main-9.2.jar
gt-metadata-9.2.jar
gt-opengis-9.2.jar
gt-referencing-9.2.jar
jsr-275-1.0-beta-2.jar
jts-1.11.jar
sqljdbc4-3.0.jar

If I remove gt-epsg-hsql-9.2.jar from classpath, then things work fine. But 
this jar is required for my project.

I have also tested it using v10.4 & v11-beta of GeoTools and still getting the 
same issue. So please help me in identifying the root cause of the issue and 
resolve it.

Regards,
Atul Gupta


________________________________

Attachment: GeoToolsTest.java
Description: GeoToolsTest.java

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to