I modified the file to be: SELECT DropGeometryColumn('public','inrix_tmc_codes','the_geom'); DROP TABLE "inrix_tmc_codes"; BEGIN; CREATE TABLE "inrix_tmc_codes" (gid serial PRIMARY KEY, "market_code" int4, "region" int4, "tmc_code" int4, "direction" char(1), "speed" int4, "color" int4, "route" varchar(254), "start_mm" numeric, "end_mm" numeric ) WITHOUT OIDS; SELECT AddGeometryColumn('public','inrix_tmc_codes','the_geom','-1','LINESTRING',2); CREATE INDEX "inrix_tmc_codes_the_geom_gist" ON "inrix_tmc_codes" using gist ("the_geom" gist_geometry_ops);
but I'm still getting the same error. 13:43:45,265 ERROR [STDERR] org.geotools.data.SchemaNotFoundException: Feature type could not be found for inrix_tmc_codes 13:43:45,265 ERROR [STDERR] at org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory.getPkColumnInfo(DefaultFIDMapperFactory.java:283) 13:43:45,265 ERROR [STDERR] at org.geotools.data.jdbc.fidmapper.DefaultFIDMapperFactory.getMapper(DefaultFIDMapperFactory.java:97) 13:43:45,265 ERROR [STDERR] at org.geotools.data.postgis.PostgisDataStore.buildFIDMapper(PostgisDataStore.java:968) Any other ideas? It seems to be complaining about the primary key. Do I need to have a specific field name for the key? Thanks in advance, David Cory Horner wrote: > David Robison wrote: >> I have created a Postgis table and am trying to load it into geoserver >> and I am getting the following error: >> ... The version of geoserver that I am using is using gt2 version >> 2.2.3-SNAPSHOT. Any idea what the problem might be? The code I used to >> create the table is: >> >> SELECT DropGeometryColumn('','inrix_tmc_codes','the_geom'); >> DROP TABLE "inrix_tmc_codes"; >> BEGIN; >> CREATE TABLE "inrix_tmc_codes" (gid serial PRIMARY KEY, >> "market_code" int4, >> "region" int4, >> "tmc_code" int4, >> "direction" char(1), >> "speed" int4, >> "color" int4, >> "route" varchar(254), >> "start_mm" numeric, >> "end_mm" numeric, >> the_geom geometry >> ) >> WITHOUT OIDS; >> SELECT >> AddGeometryColumn('','inrixtmccodes','the_geom','-1','MULTILINESTRING',2); >> >> CREATE INDEX "inrix_tmc_codes_the_geom_gist" ON "inrix_tmc_codes" using >> gist ("the_geom" gist_geometry_ops); >> >> Any help would be appreciated. Thanks, David > > Try removing the_geom from your create table statement > (AddGeometryColumn does this for you), and use this: > AddGeometryColumn('public','inrix_tmc_codes','the_geom','-1','MULTILINESTRING',2); > > > The prior statement tried to add a column to a non-existent table in > the schema "", with name "inrixtmccodes". > > You'll also be happier if you specify the CRS of your data when you > are importing it; -1 will just cause you trouble later. > > Cheers, > Cory. > > ---- > Cory Horner > Refractions Research Inc. > http://www.refractions.net -- David R Robison Open Roads Consulting, Inc. 708 S. Battlefield Blvd., Chesapeake, VA 23322 phone: (757) 546-3401 e-mail: [EMAIL PROTECTED] web: http://openroadsconsulting.com blog: http://therobe.blogspot.com book: http://www.xulonpress.com/bookstore/titles/1597816523.htm ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users