Hi Tõnis,

I have done what you recomend, and I have to add MySrvr to Namespace and
datastore. after re-starting Tomcat Geoserver and Refreshing Geoserver.

Base on log, it seems geoserver is connecting to database, and I want to
point out that the table PROTECTEDSITE_PS has no data.

Geoserver Log:
2019-07-18 10:15:49,876 DEBUG [geotools.jdbc] - Getting information about
primary keys of PROTECTEDSITE_PS
2019-07-18 10:15:50,388 DEBUG [geotools.jdbc] - Getting information about
unique indexes of PROTECTEDSITE_PS
2019-07-18 10:15:50,435 WARN [geotools.jdbc] - No primary key or unique
index found for PROTECTEDSITE_PS.
2019-07-18 10:15:50,435 DEBUG [geotools.jdbc] - CLOSE CONNECTION
2019-07-18 10:15:50,444 DEBUG [geotools.jdbc] - CREATE CONNECTION
2019-07-18 10:15:50,455 DEBUG [geotools.jdbc] - Check user can access user
metadata views: SELECT * FROM MDSYS.USER_SDO_INDEX_METADATA WHERE ROWNUM < 2
2019-07-18 10:15:50,517 DEBUG [geotools.jdbc] - Check user can access user
metadata views: SELECT * FROM MDSYS.USER_SDO_GEOM_METADATA WHERE ROWNUM < 2
2019-07-18 10:15:50,517 DEBUG [geotools.jdbc] - SELECT * FROM
MDSYS.USER_SDO_GEOM_METADATA WHERE ROWNUM < 2
2019-07-18 10:15:50,524 DEBUG [geotools.jdbc] - Geometry type check; SELECT
META.SDO_LAYER_GTYPE
FROM ALL_INDEXES INFO
INNER JOIN MDSYS.USER_SDO_INDEX_METADATA META
ON INFO.INDEX_NAME = META.SDO_INDEX_NAME
WHERE INFO.TABLE_NAME = 'PROTECTEDSITE_PS'
AND REPLACE(meta.sdo_column_name, '"') = 'SHAPE'
 
2019-07-18 10:15:50,526 DEBUG [geotools.jdbc] - Geometry type check; SELECT
META.SDO_LAYER_GTYPE
FROM ALL_INDEXES INFO
INNER JOIN MDSYS.ALL_SDO_INDEX_METADATA META
ON INFO.INDEX_NAME = META.SDO_INDEX_NAME
WHERE INFO.TABLE_NAME = 'PROTECTEDSITE_PS'
AND REPLACE(meta.sdo_column_name, '"') = 'SHAPE'
 
2019-07-18 10:15:50,534 DEBUG [geotools.jdbc] - SRID check; SELECT SRID FROM
MDSYS.USER_SDO_GEOM_METADATA WHERE TABLE_NAME='PROTECTEDSITE_PS' AND
COLUMN_NAME='SHAPE' 
2019-07-18 10:15:50,550 DEBUG [geotools.jdbc] - CLOSE CONNECTION
2019-07-18 10:15:50,551 DEBUG [complex.config] - found feature source for
PROTECTEDSITE_PS
2019-07-18 10:15:50,553 WARN [data.complex] - No top level element found in
schemas: {http://MySrvr/geoserver/www/schemas/ps/4.0/}ProtectedSite
2019-07-18 10:15:50,556 WARN [complex.config] - Error creating app-schema
data store for 'ProtectedSite_STORE', caused by: No top level element found
in schemas: {http://MySrvr/geoserver/www/schemas/ps/4.0/}ProtectedSite
2019-07-18 10:15:50,567 WARN [org.geoserver] - Error connecting to
'ProtectedSite'. Disabling.

Namespace.xml
<namespace>
  <id>NamespaceInfoImpl--138ca4e9:1679897f1ee:-7ffd</id>
  <prefix>ps</prefix>
  <uri>http://MySrvr/geoserver/www/schemas/ps/4.0/</uri>
</namespace>

Datastore.xml
<dataStore>
  <id>DataStoreInfoImpl-2c4aa0ee:16020fa6fe6:-7fff</id>
  <name>ProtectedSite</name>
  <description>INSPIRE ProtectedSite</description>
  <type>Application Schema DataAccess</type>
  <enabled>true</enabled>
  <workspace>
    <id>WorkspaceInfoImpl--138ca4e9:1679897f1ee:-7ffe</id>
  </workspace>
  <connectionParameters>
    <entry key="dbtype">app-schema</entry>
    <entry
key="url">file:/serveis/dades/pre/gis/workspaces/ps/ProtectedSite/ProtectedSite_appschema.xml</entry>
    <entry
key="namespace">http://MySrvr/geoserver/www/schemas/ps/4.0/</entry>
  </connectionParameters>
  <__default>false</__default>
</dataStore>

ProtectedSite_appschema.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<appschema:AppSchemaDataAccess xmlns:ns2="http://www.opengis.net/ogc";
xmlns:appschema="http://www.geotools.org/app-schema";>
        <namespaces>
                <Namespace>
                        <prefix>ps</prefix>
                        <uri>http://MySrvr/geoserver/www/schemas/ps/4.0/</uri>
                </Namespace>
                <Namespace>
                        <prefix>gml</prefix>
                        <uri>http://www.opengis.net/gml/3.2</uri>
                </Namespace>
                <Namespace>
                        <prefix>base</prefix>
                        <uri>http://inspire.ec.europa.eu/schemas/base/3.3</uri>
                </Namespace>
                <Namespace>
                        <prefix>base2</prefix>
                        <uri>http://inspire.ec.europa.eu/schemas/base2/2.0</uri>
                </Namespace>
                <Namespace>
                        <prefix>gmd</prefix>
                        <uri>http://www.isotc211.org/2005/gmd</uri>
                </Namespace>
                <Namespace>
                        <prefix>xsi</prefix>
                        <uri>http://www.w3.org/2001/XMLSchema-instance</uri>
                </Namespace>
                <Namespace>
                        <prefix>xlink</prefix>
                        <uri>http://www.w3.org/1999/xlink</uri>
                </Namespace>
                <Namespace>
                        <prefix>gco</prefix>
                        <uri>http://www.isotc211.org/2005/gco</uri>
                </Namespace>
                <Namespace>
                        <prefix>gn</prefix>
                        <uri>http://inspire.ec.europa.eu/schemas/gn/4.0</uri>
                </Namespace>
        </namespaces>
        <includedTypes/>
        <sourceDataStores>
                <DataStore>
                        <id>bd_oracle</id>
                        <parameters>
                                <Parameter>
                                        <name>dbtype</name>
                                        <value>Oracle</value>
                                </Parameter>
                                <Parameter>
                                        <name>host</name>
                                        <value>MyHost</value>
                                </Parameter>
                                <Parameter>
                                        <name>port</name>
                                        <value>MyPort</value>
                                </Parameter>
                                <Parameter>
                                        <name>database</name>
                                        <value>MyDDBB</value>
                                </Parameter>
                                <Parameter>
                                        <name>user</name>
                                        <value>MyUser</value>
                                </Parameter>
                                <Parameter>
                                        <name>passwd</name>
                                        <value>MyPswd</value>
                                </Parameter>
                        </parameters>
                </DataStore>
        </sourceDataStores>
        <targetTypes>
                <FeatureType>
                        <schemaUri>
               
http://MySrvr/geoserver/www/schemas/ps/4.0/ProtectedSites.xsd
            </schemaUri>
                </FeatureType>
        </targetTypes>
        <typeMappings>
                <FeatureTypeMapping>
                        <mappingName>ProtectedSite_STORE</mappingName>
                        <sourceDataStore>bd_oracle</sourceDataStore>
                        <sourceType>PROTECTEDSITE_PS</sourceType>
                        <targetElement>ps:ProtectedSite</targetElement>
                        <attributeMappings>             
                                
                                <AttributeMapping>
                                
<targetAttribute>ps:inspireID/base:Identifier/base:localId</targetAttribute>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                        <sourceExpression>
                                                <OCQL>ID_LOCALID</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to