[Geoserver-users] Problem in creating FeatureType using Oracle

Hi,

maybe you can check the following: For the shp2sdo, did you specify the proper version of your Oracle database, i.e. via the option -v 10.2.0.1 ?  If -v is not specified, shp2sdo assumes a default 8.1.7 version (at least the version I use).

Background is that until Oracle 8.1.5, only a single digit SDO_GTYPE was used to specify the type of object, i.e. 1-Point, ... 7-MultiPolygon. After 8.1.5 Oracle introduced 4 digit SDO_GTYPE including dimension of coordinates, e.g. 2001 Point/2D, 3001 Point/3D, ... 4007 Multipolygon/4D.

So, if the data you are loaded into your Oracle DB have the wrong GTYPE it might not work. So better redo shp2sdo with the correct version of your Oracle.

There is also an Oracle utility SDO_MIGRATE.TO_CURRENT to migrate 1 digit to 4 digit GTYPE.

Let me know if this was the reson or not.

Cheers,

Uli.

Thanks Uli and Chris,

But that didn’t work. I tried using SDO_MIGRATE.TO_CURRENT Utility, and I checked the data. It is converting GTYPE to 4 digits from 1 digit. And Chris, I also tried giving the bounds manually but the GetFeature request is not working. I guess the problem is that it is not able to identify the GEOM column or default Geometry attribute. Is there any place where we can define the default GEOM column or attribute? Or I guess someone had a same problem with the PostGIS datastore and he had a permission problem on spatial_ref_sys table. I can’t verify if I have proper permissions or not but from the log below I think I can say that GeoTools is able to identify the default geometry column.

1610032 [FINE] org.geotools.filter.SQLEncoderOracle - SQLEncoderOracle: Geometric Column is: THE_GEOM

1610047 [FINE] org.geotools.filter.SQLEncoderOracle - SQLEncoderOracle: Geometric Column is: THE_GEOM

and from then on there is some problem in creating the multipolygon see log below

1610079 [FINE] org.geotools.data.oracle.attributeio.SDOAttributeIO - About to create Geometry convertor for GA_438.THE_

GEOM

1610454 [WARNING] org.geotools.data.oracle.sdo.SDO - Could not create MultiPolygon with INTERPRETATION 1 - we can only

represent 1 for straight edges

1610485 [WARNING] org.geotools.data.oracle.sdo.SDO - Could not create MultiPolygon with INTERPRETATION 1 - we can only

represent 1 for straight edges

1610485 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1610485 [FINE] org.vfny.geoserver.action.data.TypesEditorAction - FeatureType ‘GA_438’ has a null bounding box

Please help me in this regard.

I am attaching full log after clicking on “New” in Feature Type screen. And I have bold font where I think there is problem.

1517532 [FINE] org.geotools.data.arcsde.ArcSDEDataStoreFactory - com.esri.sde.sdk.client.SeConnection is in place.

1521532 [FINE] org.geotools.data.arcsde.ArcSDEDataStoreFactory - com.esri.sde.sdk.pe.PeCoordinateSystem is in place.

1521532 [WARNING] org.geotools.data.mysql.MySQLDataStoreFactory - Failed on : database

1521532 [FINE] org.geotools.data.mysql.MySQLDataStoreFactory - {namespace=topp, user=UNESPATIAL, instance=TID920A, pass

wd=UNESPECIAL, host=TITAN.HOMER.ATT.COM, port=1521, schema=, dbtype=oracle}

1521532 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1521657 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1521657 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1521688 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1521688 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1521688 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

java.lang.NullPointerException

at org.vfny.geoserver.action.data.DataFeatureTypesNewAction.execute(DataFeatureTypesNewAction.java:103)

at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:98)

at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)

at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)

at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)

at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)

at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)

at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)

at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

at java.lang.Thread.run(Thread.java:595)

1522594 [FINE] DefaultFactory - Unavailable factory: European Petroleum Survey Group

rest based on schemaBase: gml:AbstractFeatureType

1522610 [FINE] org.geotools.data.arcsde.ArcSDEDataStoreFactory - com.esri.sde.sdk.client.SeConnection is in place.

1522610 [FINE] org.geotools.data.arcsde.ArcSDEDataStoreFactory - com.esri.sde.sdk.pe.PeCoordinateSystem is in place.

1522610 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1522735 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1522750 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1522782 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1522782 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1522797 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1609547 [FINE] DefaultFactory - Unavailable factory: European Petroleum Survey Group

rest based on schemaBase: gml:AbstractFeatureType

1609547 [FINE] org.geotools.data.arcsde.ArcSDEDataStoreFactory - com.esri.sde.sdk.client.SeConnection is in place.

1609547 [FINE] org.geotools.data.arcsde.ArcSDEDataStoreFactory - com.esri.sde.sdk.pe.PeCoordinateSystem is in place.

1609547 [WARNING] org.geotools.data.mysql.MySQLDataStoreFactory - Failed on : database

1609547 [FINE] org.geotools.data.mysql.MySQLDataStoreFactory - {namespace=topp, user=UNESPATIAL, instance=TID920A, pass

wd=UNESPECIAL, host=TITAN.HOMER.ATT.COM, port=1521, schema=, dbtype=oracle}

1609547 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1609672 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1609672 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1609719 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1609719 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1609719 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1609719 [FINE] DefaultFactory - Unavailable factory: European Petroleum Survey Group

1609766 [FINE] org.geotools.referencing.factory.DatumAliases - Loading datum aliases from "jar:file:/C:/Program%20Files

/Apache%20Group/Tomcat%204.1/webapps/geoserver/WEB-INF/lib/gt2-main.jar!/org/geotools/referencing/factory/DatumAliasesTa

ble.txt".

1609844 [FINE] org.geotools.data.arcsde.ArcSDEDataStoreFactory - com.esri.sde.sdk.client.SeConnection is in place.

1609844 [FINE] org.geotools.data.arcsde.ArcSDEDataStoreFactory - com.esri.sde.sdk.pe.PeCoordinateSystem is in place.

1609860 [WARNING] org.geotools.data.mysql.MySQLDataStoreFactory - Failed on : database

1609860 [FINE] org.geotools.data.mysql.MySQLDataStoreFactory - {namespace=topp, user=UNESPATIAL, instance=TID920A, pass

wd=UNESPECIAL, host=TITAN.HOMER.ATT.COM, port=1521, schema=, dbtype=oracle}

1609860 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1609969 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1609969 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1610000 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1610016 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1610016 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1610016 [FINE] org.vfny.geoserver.action.data.TypesEditorAction - calculating bbox for their dataset

1610032 [FINE] org.geotools.filter.SQLEncoderOracle - SQLEncoderOracle: Geometric Column is: THE_GEOM

1610047 [FINE] org.geotools.filter.SQLEncoderOracle - SQLEncoderOracle: Geometric Column is: THE_GEOM

1610047 [FINE] org.geotools.data.jdbc.JDBCDataStore - calling sql builder with filter Filter.NONE

1610047 [FINE] org.geotools.data.jdbc.JDBCDataStore - sql is SELECT “LATA”, “NAME”, “STATE”, “THE_GEOM” FROM “GA_438”

1610047 [FINE] org.geotools.data.jdbc.JDBCDataStore - About to execute query: SELECT “LATA”, “NAME”, “STATE”, "THE_GEOM

" FROM “GA_438”

1610047 [FINE] org.geotools.data.jdbc.ConnectionPool - Getting available connection.

1610079 [FINE] org.geotools.data.oracle.attributeio.SDOAttributeIO - About to create Geometry convertor for GA_438.THE_

GEOM

1610454 [WARNING] org.geotools.data.oracle.sdo.SDO - Could not create MultiPolygon with INTERPRETATION 1 - we can only

represent 1 for straight edges

1610485 [WARNING] org.geotools.data.oracle.sdo.SDO - Could not create MultiPolygon with INTERPRETATION 1 - we can only

represent 1 for straight edges

1610485 [FINE] org.geotools.data.jdbc.ConnectionPool$ConnectionListManager - Connection closed - adding to available co

nnections.

1610485 [FINE] org.vfny.geoserver.action.data.TypesEditorAction - FeatureType ‘GA_438’ has a null bounding box

-----Original Message-----
From: Hans-Ulrich Otto [mailto:hans.ulrich.otto@anonymised.com]
Sent: Wednesday, September 21, 2005 2:56 AM
To: Palak Mehta
Cc: Chris Holmes; geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Problem in creating FeatureType using Oracle

Hi,
 
maybe you can check the following: For the shp2sdo, did you specify the proper version of your Oracle database, i.e. via the option -v 10.2.0.1 ?  If -v is not specified, shp2sdo assumes a default 8.1.7 version (at least the version I use).
 
Background is that until Oracle 8.1.5, only a single digit SDO_GTYPE was used to specify the type of object, i.e. 1-Point, ... 7-MultiPolygon. After 8.1.5 Oracle introduced 4 digit SDO_GTYPE including dimension of coordinates, e.g. 2001 Point/2D, 3001 Point/3D, ... 4007 Multipolygon/4D.
 
So, if the data you are loaded into your Oracle DB have the wrong GTYPE it might not work. So better redo shp2sdo with the correct version of your Oracle.
 
There is also an Oracle utility SDO_MIGRATE.TO_CURRENT to migrate 1 digit to 4 digit GTYPE.
 
Let me know if this was the reson or not.
 
Cheers,
 
Uli.
 
Date: Tue, 20 Sep 2005 09:57:22 -0400 (EDT)
From: Chris Holmes [<cholmes@anonymised.com>](mailto:cholmes@anonymised.com)
To: Palak Mehta [<palak@anonymised.com>](mailto:palak@anonymised.com.)
cc: [geoserver-users@anonymised.com.sourceforge.net](mailto:geoserver-users@lists.sourceforge.net),  [<mgwhite@anonymised.com>](mailto:mgwhite@anonymised.com), 
     [<bartvde@anonymised.com>](mailto:bartvde@anonymised.com)
Subject: Re: [Geoserver-users] Problem in creating FeatureType using Oracle
 DataStore
 
Hmmm...  I've never used the oracle shapefile converter.  You may just 
fill out the fetureType bounds yourself, and then see if a GetFeature 
request will work.  Also check to make sure all the permissions are 
correct, that the user you are connecting with can get at all the meta 
information.  I don't really know what the migrate polygon data means, 
though be sure that you create a spatial index, as I don't think geoserver 
will work otherwise.  If none of this works then get the logs and let us 
take a look at them.
 
best regards,
 
Chris
 
On Mon, 19 Sep 2005, Palak Mehta wrote:
 
> Thanks for your reply to my previous query.
> 
>  
> 
> I had some shape files and I converted them to oracle data store using the
> ShapeToSdo Converter utility from Oracle. It gave me one sql file which
> created one data table same as .dbf file in Shape File Format. Also it
> inserted one entry in USER_SDO_GEOM_METADATA table. Then I loaded the data
> in the table using sqlldr and control file generated by the converter. After
> that I created spatial index on the table and geom. column.  I was able to
> successfully create a new oracle data store. But when I try to create new
> feature type using the table that I just loaded it gives me following error.
> 
> 
> * The FeatureType 'GA_438' has a NULL extent. 
> HINT: the dataset is empty or has no default geometry attribute. 
> 
> Now in the sql file generated by the converter utility, it says that 
> 
>  
> 
> --   After the data is loaded in the GA_438 table, you should
> 
> --   migrate polygon data and create the spatial index
> 
>  
> 
> >From those two required steps I created the spatial index but I don't know
> what "migrate polygon data" means.
> 
>  
> 
> Please help me as soon as possible.
> 
>  
> 
> Thanks
> 
> Palak
> 
  
 
--