[Geoserver-users] Oracle connection [Sec=Unclassified]

-----Original Message-----
From: Juan Arévalo

Hi folks,

I am setting up a WFS-server using Geoserver 1.5.0. I added a
new datastore (an oracle spatial database) and everything
went fine, but now when setting the featuretype section when
I pressed the "generate" button to automatically fill in the
lat/lon, I got the following error: "The FeatureType 'Name of
the table' has a NULL extent. HINT: the dataset is empty or
has no default geometry attribute." However my Featuretype
has not a NULL-extent.

I read on the forum that someone solved this problem creating
a primary key for the table, Does anyone know any other way
to solve it??

Thanks for your help, much appreciated,

Best regards,

Juan Arévalo.

I've found the NULL Extent message can be generated by a number of things, including:

  A) The username you are using doesn't have the appropriate permissions on the table you are trying to use. Try connecting using the owner of the schema as the username or check the permissions. I'm not sure which permissions are needed on which objects but I know for fact that having read rights on the table is not enough. Someone else may be able to provide more info.
  
  B) Missing primary key - to fix:
ALTER TABLE [schemaname].[tablename] ADD PRIMARY KEY ([columnname]);

  C) (possibly) Missing spatial index - to fix:
CREATE INDEX [indexname] ON [schemaname].[tablename]([columnname]) INDEXTYPE IS MDSYS.SPATIAL_INDEX;

Spatial tables also need a metadata entry in USER_SDO_GEOM_METADATA but I guess you already have that or you wouldn't have got as far as you did.

I hope this has helped.

Miles
___________________________________________________________________________

    Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not the
intended recipient, you are notified that use or dissemination of this communication is
strictly prohibited by Commonwealth law. If you have received this transmission in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 3209 and
DELETE the message.
        Visit our web site at http://www.antarctica.gov.au/
___________________________________________________________________________