hi all,
I am trying to make Geoserver to use oracle-spatial.When i use the
url:
http://localhost/geoserver/GetFeature?typename=topp:test_ora_layers
i get the following 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>Please contact the admin, the configuration for
topp:test_ora_layers has
an error. No datasource could be constructed with the params:
{table=test_ora_layers,
user=userme, passwd=passme, host=TESTORA, port=1521,
database=TESTORA, dbtype=oracle} from the
info.xml file.</ServiceException></ServiceExceptionReport>
------------
I did notice the following message on the tomcat screen:
---------------------------------------------------------
127853 [WARNING] org.vfny.geoserver.config.TypeInfo - Could not get
DataSource:
topp:test_ora_layers during GetCapabilities: could not construct a
datasource
for topp:test_ora_layers with params: {table=test_ora_layers,
user=userme,
passwd=passme, host=TESTORA, port=1521, database=TESTORA,
dbtype=oracle} returning
basic Capabilities, but GetFeature requests will likely fail.
-------------------------------------------------------------------
My system settings are:
OS-Win2000
Database - oracle Spatial-1.1.7
WebServer - IIS-5.0
Tomcat-4.1.27
Geoserver ver - 1.0
As per the docs,i built Geoserver.war and also managed to installed it
under Tomcat.
Calling the url http:\\localhost\geoserver\getcapabilities..i do get
the xml doc returned
to me in the browser.
As per the doc,to make it work with Oracle..i followed all the steps
as mentioned there.
I got the classes12.zip and sdoapi.zip from oracle and renamed them to
classes12.jar and sdoapi.jar and placed them into the
c:\tomcat\webapps\geoserver\web-inf\lib dir.The oracle table has the
following table description:
sql>desc test_ora_layers
Name Null? Type
----------------------------------------- --------
----------------------------
LAYER_ID NUMBER
SHAPE MDSYS.SDO_GEOMETRY
I have the directory under \data\featureTypes\test_ora_layers,as
mentioned in the doc.
The datasourceparams tag inside the info.xml looks like these:
--------------------------------------------------------------
<DatasourceParams>
<host>TESTORA</host>
<port>1521</port>
<instance>TESTORA</instance>
<user>userme</user>
<passwd>passme</passwd>
<table>test_ora_layers</table>
<dbtype>oracle</dbtype>
</DatasourceParams>
The Schema.xml looks like these:
----------------------------------
<xs:complexType name="test_ora_layers_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="layer_id" nillable="false" 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>
Also in the doc,it is mentioned that in case of oracle,the
DataSourceParams tag has a child node called <instance> and not
<database>.Looking at the FeatureType.java,were these
tags are read in the function getDataParams(..), i saw that these
function looks for tag called <database>,so i even changed it from
"instance" to "database" tag but that didnot help it either.
Any help or suggestion would be highly appreciated.
regards,
Gautam