[Geoserver-devel] Oracle Spatial-NO connection error

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&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  xsi:schemaLocation="http://www.opengis.net/ogc

http://localhost/geoserver/data/capabilities/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
  <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

It looks like you're doing everything correctly. It should definitely
be instance, not database, but if you've tried both then it should
work. I think the problem may be a classpath issue. If you could
turn your logging level to finer and start up geoserver, look for a
line like 'Postgis is an available datasource'. There should also be
two more lines: 'Shapefile is an available datasource' and 'oracle is
an available datasource' (I'm working off of memory here, might be
slightly different'. So look for those lines, and if the oracle one
is not there then that's probably the problem. If it is I can
probably fix it for you relatively easily (you just have to get the
servlet container recognizing the right meta-inf/service/Data... line,
that tells which factories are available). If not then we'll have to
investigate further. Let me know and we can better diagnose the
problem. And thanks for the nice detailed message.

          Chris

Quoting Gautam Ganguly <ggangul@anonymised.com>:

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&quot;
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
  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

-------------------------------------------------------
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

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/