hi Sean,
Sorry for replying to your mail ,a bit late.No the table did not have
a primary key.But i added a primary key field called FID of type
number, after having read Thijs Brentjens's mail. These is the new
structure of the table after doing so:
SQL> desc test_ora_layers
Name Null? Type
----------------------------------------- --------
--------------------------
FID NOT NULL NUMBER(10)
LAYER_ID NUMBER(10)
SHAPE MDSYS.SDO_GEOMETRY
But it didnot help much when i called :
http://localhost/geoserver/GetFeature?typename=topp:test_ora_layers
I see the same error message on my browser:
-----------------------------------------------------------
<?xml version="1.0" ?>
- <ServiceExceptionReport version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc
http://localhost/geoserver/data/capabilities/wfs/1.0.0/OGC-exception.xsd">
<ServiceException locator="test_ora_layers">While getting connection
to datasource: org.geotools.data.DataSourceException:
SQL Error occured when generating unique key</ServiceException>
</ServiceExceptionReport>
------------------------------------------------------------------------------------
I have the LoggingLevel still at finer,so the log on the tomcat screen
shows the following:
193201 [FINE] org.geotools.data.oracle.OracleDataSourceFactory -
oracle
datasource factory constructed
193201 [FINER] org.geotools.data.DataSourceFinder - Oracle Spatial
Database
193201 [FINER] org.geotools.data.oracle.OracleDataSourceFactory -
canProcess
called on {table=test_ora_layers, user=userme, instance=TESTORA,
passwd=passme,
host=1.2.3.4, port=1521, dbtype=oracle}
193201 [FINE] org.geotools.data.oracle.OracleDataSourceFactory -
create ds
called in oracle
193201 [FINER] org.geotools.data.oracle.OracleDataSourceFactory -
canProcess
called on {table=test_ora_layers, user=userme, instance=TESTORA,
passwd=passme,
host=1.2.3.4, port=1521, dbtype=oracle}
193311 [FINE] org.geotools.data.jdbc.ConnectionPool - No available
connections,
creating a new one.
194603 [FINE]
org.geotools.data.jdbc.ConnectionPool$ConnectionListManager -
Connection closed - adding to available connections.
194603 [FINE] org.vfny.geoserver.responses.WfsException - >
[test_ora_layers]:
While getting connection to datasource:
org.geotools.data.DataSourceException:
SQL Error occured when generating unique key
194613 [FINE] org.vfny.geoserver.responses.WfsException - return wfs
exception
is <?xml version="1.0" ?>
<ServiceExceptionReport
version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc
http://localhost/geoserver/dat
a/capabilities/wfs/1.0.0/OGC-exception.xsd">
<ServiceException locator="test_ora_layers">
While getting connection to datasource:
org.geotools.data.DataSourceException:
SQL Error occured when generating unique key
</ServiceException>
</ServiceExceptionReport>
------------------------------------------
With the new changes to the table , my schema.xml looks like these:
<xs:complexType name="test_ora_layers_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="fid" nillable="false" minOccurs="1"
maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:totalDigits value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="layer_id" nillable="true" minOccurs="0"
maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:totalDigits value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="shape" type="gml:PolygonPropertyType"
nillable="false" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
-------------------------------------------
hope that helps.
regards,
gautam
Sean Geoghegan <sean@anonymised.com> 11/28/03 07:44PM >>>
Hi Gautam,
This can happen if the table does not have single primary key defined.
Can you make sure it does?
Sean
cholmes@anonymised.com wrote:
Yes, looks like you solved the connection issue. For your next issue,
no, it's not because the schema.xml file is wrong, that would not
cause such an error. I'm going to have to defer to Sean on this one,
as he's the oracle expert. He will likely reply fairly soon, I think
we've seen this before, but I don't remember the solution. It's
probably something with how your oracle tables are set up.Chris
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel