SpatialLite Table Import: No Primary Key or Unique Index Found

51 views
Skip to first unread message

bixb...@gmail.com

unread,
Sep 5, 2013, 10:22:57 AM9/5/13
to geo...@opengeo.org
I am more of a power user than a developer type, and I am experimenting with using GeoGit to version some parcel data.  I keep running into an error trying to import my tables, and I am trying to figure out where and how to look deeper in the issue to resolve it.

I am running GeoGit 0.4 on Windows 7 x64 Enterprise Edition.  The command I am running and resulting output are:


D:\tmp\geogit_test>geogit sl describe --database d:\transfer\test.sqlite --table ParcelInfo_1
WARNING   CompositePrimaryKeyFinder - Failure occurred while looking up the primary key with finder: org.geotools.jdbc.HeuristicPrimaryKeyFinder@4499d7
WARNING   JDBCDataStore - No primary key or unique index found for ParcelInfo_1.

Fetching table...
Unable to read the feature source.

The warnings point to a lack of a primary key or unique index; however, the table has a primary key defined.  I have trimmed the table back to just a few columns and few thousand records to simplify troubleshooting.  The ParcelInfo_1 table structure is:

CREATE TABLE [] ( 
    OBJECTID      INTEGER      PRIMARY KEY AUTOINCREMENT
                               NOT NULL,
    Shape         MULTIPOLYGON,
    PRCL_NBR      TEXT( 17 )   CHECK ( ( typeof( PRCL_NBR ) = 'text' 
                                       OR
                                   typeof( PRCL_NBR ) = 'null' ) 
                                   AND
                               NOTlength( PRCL_NBR ) > 17 ),
    ACREAGE       FLOAT64      CHECK ( typeof( ACREAGE ) = 'real' 
                                   OR
                               typeof( ACREAGE ) = 'null' ),
    TAX_DIST_NAME TEXT( 35 )   CHECK ( ( typeof( TAX_DIST_NAME ) = 'text' 
                                       OR
                                   typeof( TAX_DIST_NAME ) = 'null' ) 
                                   AND
                               NOTlength( TAX_DIST_NAME ) > 35 ) 
);

Am I running into a bug or missing the obvious?  What is the easiest way to get more information about why the CompositePrimaryKeyFinder is failing to find the existing primary key?

Any help is appreciated, thanks, Joshua

Victor Olaya

unread,
Sep 5, 2013, 10:35:11 AM9/5/13
to bixb...@gmail.com, geo...@opengeo.org
Joshua

By looking at your information, I am not sure what might be going on,
but if your database is not too large, could you send us the sqlite
file so we can use it for some testing? If it is large, just a small
part of the database(as long as it causes that error) will work.

Let's see if we can help you and fix the issue.

Thanks in advance!

Victor

bixb...@gmail.com

unread,
Sep 5, 2013, 4:39:55 PM9/5/13
to geo...@opengeo.org, bixb...@gmail.com
Victor,

Thanks for the prompt reply.  I have already trimmed the database down to ease troubleshooting, it now zips up quite small.  Where is the best place to send it?

The database, and table, in question was created using the new SpatiaLite support in ArcGIS Desktop 10.2.  It may be that Esri's code is doing something odd with creating the tables, and that is why GeoGit is having a problem.  The first step, though, is figuring out exactly what isn't working.
Message has been deleted

bixb...@gmail.com

unread,
Sep 6, 2013, 2:08:43 PM9/6/13
to geo...@opengeo.org, bixb...@gmail.com
OK, sent, let me know if it doesn't come through.  Thanks.
Reply all
Reply to author
Forward
0 new messages