INSPIRE Could not acquire data access 'ProtectedSite'

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

INSPIRE Could not acquire data access 'ProtectedSite'

ljacedo
Hello,

Im migrating data from one Geoserver (DEV) to another Geoserver (PRE) both
geoserver runs over tomcat 7. The difference between these two environment
is the Geoserver_PRE does not have access to internet so all schema links
were downloaded to local folder on server.  

If somebody could help with this problem?
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">bd_oracle</entry>
    <entry
key="url">file:/serveis/dades/pre/gis/workspaces/ps/ProtectedSite/ProtectedSite_appschema.xml</entry>
    <entry key="namespace">http://mySrv/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://mySrv/geoserver/www/schemas/ps/4.0</uri>
                </Namespace>
                <Namespace>
                        <prefix>gml</prefix>
                        <uri>http://mySrv/geoserver/www/gml/3.2.1</uri>
                </Namespace>
                <Namespace>
                        <prefix>base</prefix>
                        <uri>http://mySrv/geoserver/www/schemas/base/3.3</uri>
                </Namespace>
                <Namespace>
                        <prefix>base2</prefix>
                        <uri>http://mySrv/geoserver/www/schemas/base2/2.0</uri>
                </Namespace>
                <Namespace>
                        <prefix>gmd</prefix>
                        <uri>http://mySrv/geoserver/www/iso/19139/20070417/gmd</uri>
                </Namespace>
                <Namespace>
                        <prefix>xsi</prefix>
                        <uri>http://mySrv/geoserver/www/2001</uri>
                </Namespace>
                <Namespace>
                        <prefix>xlink</prefix>
                        <uri>http://mySrv/geoserver/www/xlink</uri>
                </Namespace>
                <Namespace>
                        <prefix>gco</prefix>
                        <uri>http://mySrv/geoserver/www/iso/19139/20070417/gco</uri>
                </Namespace>
                <Namespace>
                        <prefix>gn</prefix>
                        <uri>http://mySrv/geoserver/www/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>mySrvOra</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>myPsswd</value>
                                </Parameter>
                        </parameters>
                </DataStore>
        </sourceDataStores>
        <targetTypes>
                <FeatureType>
                        <schemaUri>
                http://mySrv/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>
                                <AttributeMapping>
                               
<targetAttribute>ps:inspireID/base:Identifier/base:namespace</targetAttribute>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                        <sourceExpression>
                                                <OCQL>ID_NAMESPACE</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:inspireID/base:Identifier/base:versionId</targetAttribute>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                        <sourceExpression>
                                                <OCQL>ID_VERSIONID</OCQL>
                                        </sourceExpression>
                                        <ClientProperty>
                        <name>xsi:nil</name>
                        <value>if_then_else(isNull(ID_VERSIONID), 'true',
Expression.NIL)</value>
                    </ClientProperty>
                    <ClientProperty>
                        <name>nilReason</name>
                        <value>if_then_else(isNull(ID_VERSIONID),
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown',
Expression.NIL)</value>
                                        </ClientProperty>
                                </AttributeMapping>
                               
                                <AttributeMapping>
                                        <targetAttribute>ps:geometry</targetAttribute>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                        <sourceExpression>
                                                <OCQL>SHAPE</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                               
                               
                               
                                <AttributeMapping>
                                        <targetAttribute>ps:siteName</targetAttribute>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                        <sourceExpression>
                                                <OCQL>SITENAME</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:siteName/gn:GeographicalName/gn:language</targetAttribute>
                                        <encodeIfEmpty>false</encodeIfEmpty>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(SITENAME), Expression.NIL, 'cat')</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:siteName/gn:GeographicalName/gn:nativeness</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(SITENAME), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
                                        </sourceExpression>
                                        <encodeIfEmpty>false</encodeIfEmpty>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:siteName/gn:GeographicalName/gn:nameStatus</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(SITENAME), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
                                        </sourceExpression>
                                        <encodeIfEmpty>false</encodeIfEmpty>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:siteName/gn:GeographicalName/gn:sourceOfName</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(SITENAME), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
                                        </sourceExpression>
                                        <encodeIfEmpty>false</encodeIfEmpty>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:siteName/gn:GeographicalName/gn:pronunciation</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(SITENAME), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
                                        </sourceExpression>
                                        <encodeIfEmpty>false</encodeIfEmpty>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:siteName/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:script</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(SITENAME), Expression.NIL, 'Latn')</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:siteName/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>SITENAME</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                               
                               
                                <AttributeMapping>
                                        <targetAttribute>ps:siteProtectionClassification</targetAttribute>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                        <sourceExpression>
                                                <OCQL>SITEPROTECTIONCLASSIFICATION</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                               
                                <AttributeMapping>
                                        <targetAttribute>ps:legalFoundationDate</targetAttribute>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                        <sourceExpression>
                                                <OCQL>LEGALFOUNDATIONDATE</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                               
                                <AttributeMapping>
                               
<targetAttribute>ps:siteDesignation/ps:DesignationType/ps:designationScheme</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(SITEDESIGNATION), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown')</OCQL>
                                        </sourceExpression>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:siteDesignation/ps:DesignationType/ps:designation</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(SITEDESIGNATION), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown')</OCQL>
                                        </sourceExpression>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:siteDesignation/ps:DesignationType/ps:percentageUnderDesignation</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(SITEDESIGNATION), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown')</OCQL>
                                        </sourceExpression>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                </AttributeMapping>
                               
                               
                                <AttributeMapping>
                                        <targetAttribute>ps:legalFoundationDocument</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(LEGALFOUNDATIONDOCUMENT), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
                                        </sourceExpression>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:legalFoundationDocument/gmd:CI_Citation/gmd:title/gco:CharacterString</targetAttribute>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(LEGALFOUNDATIONDOCUMENT), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                                <AttributeMapping>
                               
<targetAttribute>ps:legalFoundationDocument/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date</targetAttribute>
                                        <encodeIfEmpty>true</encodeIfEmpty>
                                        <sourceExpression>
                                                <OCQL>if_then_else(isNull(LEGALFOUNDATIONDOCUMENT), Expression.NIL,
'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                        </attributeMappings>
                </FeatureTypeMapping>
        </typeMappings>
</appschema:AppSchemaDataAccess>

Geoserver log:
2019-07-12 08:07:00,348 WARN [org.geoserver] - Ignoring store directory
'styles'
2019-07-12 08:07:00,355 INFO [org.geoserver] - Loaded store 'ProtectedSite',
enabled
2019-07-12 08:07:00,355 INFO [org.geoserver] - Loaded data store
'ProtectedSite'
2019-07-12 08:07:00,356 WARN [org.geoserver] - Error connecting to
'ProtectedSite'. Disabling.
2019-07-12 08:07:00,356 INFO [org.geoserver] -
java.io.IOException
        at org.geoserver.catalog.ResourcePool.getDataStore(ResourcePool.java:586)
        at
org.geoserver.catalog.impl.DataStoreInfoImpl.getDataStore(DataStoreInfoImpl.java:37)
        at
org.geoserver.config.GeoServerLoader.readCatalog(GeoServerLoader.java:355)
        at
org.geoserver.config.GeoServerLoader.readCatalog(GeoServerLoader.java:226)
        at
org.geoserver.config.DefaultGeoServerLoader.loadCatalog(DefaultGeoServerLoader.java:46)
        at org.geoserver.config.GeoServerLoader.reload(GeoServerLoader.java:210)
        at
org.geoserver.config.GeoServerLoaderProxy.reload(GeoServerLoaderProxy.java:65)
        at org.geoserver.config.impl.GeoServerImpl.reload(GeoServerImpl.java:434)
Caused by: java.lang.NullPointerException: Could not acquire data access
'ProtectedSite'
        at org.geoserver.catalog.ResourcePool.getDataStore(ResourcePool.java:560)
        ... 115 more
2019-07-12 08:07:00,362 INFO [org.geoserver] - Loaded feature type
'ProtectedSite', enabled
2019-07-12 08:07:00,363 INFO [org.geoserver] - Loaded feature type
'ProtectedSite'
2019-07-12 08:07:00,366 WARN [org.geoserver] - Failed to load layer for
feature type 'ProtectedSite'
com.thoughtworks.xstream.converters.ConversionException: null : null
---- Debugging information ----
cause-exception     : java.lang.NullPointerException
cause-message       : null
class               : java.util.LinkedHashSet
required-type       : java.util.LinkedHashSet
converter-type      :
org.geoserver.config.util.XStreamPersister$ReferenceCollectionConverter
line number         : 11
class[1]            : org.geoserver.catalog.impl.LayerInfoImpl
converter-type[1]   :
org.geoserver.config.util.XStreamPersister$LayerInfoConverter
version             : null
-------------------------------
        at
com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
        at
com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)




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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: INSPIRE Could not acquire data access 'ProtectedSite'

tõnis kärdi
Hi,

just a thought here but instead of "hosting" the xsds yourself through
http://mySrv/geoserver/www (unless you have made changes to the xsd
files) leave the original/official URIs in all your GS config files and
then copy-paste the $GEOSERVER_DATA_DIR/app-schema-cache with all its
contents from your DEV instance to your PRE environment (and make sure
Tomcat has restarted aswell afterwards). Because unless you've changed
the namespace imports in the inspire xsds the schema parsing will still
be looking for schemas in the original location (excerpt from
http://inspire.ec.europa.eu/schemas/ps/4.0/ProtectedSites.xsd):

<schema xmlns="http://www.w3.org/2001/XMLSchema"
     xmlns:base="http://inspire.ec.europa.eu/schemas/base/3.3"
     xmlns:gmd="http://www.isotc211.org/2005/gmd"
     xmlns:gml="http://www.opengis.net/gml/3.2"
     xmlns:gn="http://inspire.ec.europa.eu/schemas/gn/4.0"
     xmlns:ps="http://inspire.ec.europa.eu/schemas/ps/4.0"
elementFormDefault="qualified"
targetNamespace="http://inspire.ec.europa.eu/schemas/ps/4.0" version="4.0">
     <import namespace="http://inspire.ec.europa.eu/schemas/base/3.3"
schemaLocation="http://inspire.ec.europa.eu/schemas/base/3.3/BaseTypes.xsd"/>
     <import namespace="http://inspire.ec.europa.eu/schemas/gn/4.0"
schemaLocation="http://inspire.ec.europa.eu/schemas/gn/4.0/GeographicalNames.xsd"/>
     <import namespace="http://www.isotc211.org/2005/gmd"
schemaLocation="http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"/>
     <import namespace="http://www.opengis.net/gml/3.2"
schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>

     ...etc...

And another thought - are you sure you can connect from the pre machine
to your oracle db? If I had a penny for every time I ran into this issue
... :)

All the best,
Tõnis


On 12.07.19 11:34, ljacedo wrote:

> Hello,
>
> Im migrating data from one Geoserver (DEV) to another Geoserver (PRE) both
> geoserver runs over tomcat 7. The difference between these two environment
> is the Geoserver_PRE does not have access to internet so all schema links
> were downloaded to local folder on server.
>
> If somebody could help with this problem?
> 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">bd_oracle</entry>
>      <entry
> key="url">file:/serveis/dades/pre/gis/workspaces/ps/ProtectedSite/ProtectedSite_appschema.xml</entry>
>      <entry key="namespace">http://mySrv/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://mySrv/geoserver/www/schemas/ps/4.0</uri>
> </Namespace>
> <Namespace>
> <prefix>gml</prefix>
> <uri>http://mySrv/geoserver/www/gml/3.2.1</uri>
> </Namespace>
> <Namespace>
> <prefix>base</prefix>
> <uri>http://mySrv/geoserver/www/schemas/base/3.3</uri>
> </Namespace>
> <Namespace>
> <prefix>base2</prefix>
> <uri>http://mySrv/geoserver/www/schemas/base2/2.0</uri>
> </Namespace>
> <Namespace>
> <prefix>gmd</prefix>
> <uri>http://mySrv/geoserver/www/iso/19139/20070417/gmd</uri>
> </Namespace>
> <Namespace>
> <prefix>xsi</prefix>
> <uri>http://mySrv/geoserver/www/2001</uri>
> </Namespace>
> <Namespace>
> <prefix>xlink</prefix>
> <uri>http://mySrv/geoserver/www/xlink</uri>
> </Namespace>
> <Namespace>
> <prefix>gco</prefix>
> <uri>http://mySrv/geoserver/www/iso/19139/20070417/gco</uri>
> </Namespace>
> <Namespace>
> <prefix>gn</prefix>
> <uri>http://mySrv/geoserver/www/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>mySrvOra</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>myPsswd</value>
> </Parameter>
> </parameters>
> </DataStore>
> </sourceDataStores>
> <targetTypes>
> <FeatureType>
> <schemaUri>
>                  http://mySrv/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>
> <AttributeMapping>
>
> <targetAttribute>ps:inspireID/base:Identifier/base:namespace</targetAttribute>
> <encodeIfEmpty>true</encodeIfEmpty>
> <sourceExpression>
> <OCQL>ID_NAMESPACE</OCQL>
> </sourceExpression>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:inspireID/base:Identifier/base:versionId</targetAttribute>
> <encodeIfEmpty>true</encodeIfEmpty>
> <sourceExpression>
> <OCQL>ID_VERSIONID</OCQL>
> </sourceExpression>
> <ClientProperty>
>                          <name>xsi:nil</name>
>                          <value>if_then_else(isNull(ID_VERSIONID), 'true',
> Expression.NIL)</value>
>                      </ClientProperty>
>                      <ClientProperty>
>                          <name>nilReason</name>
>                          <value>if_then_else(isNull(ID_VERSIONID),
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown',
> Expression.NIL)</value>
> </ClientProperty>
> </AttributeMapping>
>
> <AttributeMapping>
> <targetAttribute>ps:geometry</targetAttribute>
> <encodeIfEmpty>true</encodeIfEmpty>
> <sourceExpression>
> <OCQL>SHAPE</OCQL>
> </sourceExpression>
> </AttributeMapping>
>
>
>
> <AttributeMapping>
> <targetAttribute>ps:siteName</targetAttribute>
> <encodeIfEmpty>true</encodeIfEmpty>
> <sourceExpression>
> <OCQL>SITENAME</OCQL>
> </sourceExpression>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:siteName/gn:GeographicalName/gn:language</targetAttribute>
> <encodeIfEmpty>false</encodeIfEmpty>
> <sourceExpression>
> <OCQL>if_then_else(isNull(SITENAME), Expression.NIL, 'cat')</OCQL>
> </sourceExpression>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:siteName/gn:GeographicalName/gn:nativeness</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(SITENAME), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
> </sourceExpression>
> <encodeIfEmpty>false</encodeIfEmpty>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:siteName/gn:GeographicalName/gn:nameStatus</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(SITENAME), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
> </sourceExpression>
> <encodeIfEmpty>false</encodeIfEmpty>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:siteName/gn:GeographicalName/gn:sourceOfName</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(SITENAME), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
> </sourceExpression>
> <encodeIfEmpty>false</encodeIfEmpty>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:siteName/gn:GeographicalName/gn:pronunciation</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(SITENAME), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
> </sourceExpression>
> <encodeIfEmpty>false</encodeIfEmpty>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:siteName/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:script</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(SITENAME), Expression.NIL, 'Latn')</OCQL>
> </sourceExpression>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:siteName/gn:GeographicalName/gn:spelling/gn:SpellingOfName/gn:text</targetAttribute>
> <sourceExpression>
> <OCQL>SITENAME</OCQL>
> </sourceExpression>
> </AttributeMapping>
>
>
> <AttributeMapping>
> <targetAttribute>ps:siteProtectionClassification</targetAttribute>
> <encodeIfEmpty>true</encodeIfEmpty>
> <sourceExpression>
> <OCQL>SITEPROTECTIONCLASSIFICATION</OCQL>
> </sourceExpression>
> </AttributeMapping>
>
> <AttributeMapping>
> <targetAttribute>ps:legalFoundationDate</targetAttribute>
> <encodeIfEmpty>true</encodeIfEmpty>
> <sourceExpression>
> <OCQL>LEGALFOUNDATIONDATE</OCQL>
> </sourceExpression>
> </AttributeMapping>
>
> <AttributeMapping>
>
> <targetAttribute>ps:siteDesignation/ps:DesignationType/ps:designationScheme</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(SITEDESIGNATION), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown')</OCQL>
> </sourceExpression>
> <encodeIfEmpty>true</encodeIfEmpty>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:siteDesignation/ps:DesignationType/ps:designation</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(SITEDESIGNATION), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown')</OCQL>
> </sourceExpression>
> <encodeIfEmpty>true</encodeIfEmpty>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:siteDesignation/ps:DesignationType/ps:percentageUnderDesignation</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(SITEDESIGNATION), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unknown')</OCQL>
> </sourceExpression>
> <encodeIfEmpty>true</encodeIfEmpty>
> </AttributeMapping>
>
>
> <AttributeMapping>
> <targetAttribute>ps:legalFoundationDocument</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(LEGALFOUNDATIONDOCUMENT), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
> </sourceExpression>
> <encodeIfEmpty>true</encodeIfEmpty>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:legalFoundationDocument/gmd:CI_Citation/gmd:title/gco:CharacterString</targetAttribute>
> <sourceExpression>
> <OCQL>if_then_else(isNull(LEGALFOUNDATIONDOCUMENT), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
> </sourceExpression>
> </AttributeMapping>
> <AttributeMapping>
>
> <targetAttribute>ps:legalFoundationDocument/gmd:CI_Citation/gmd:date/gmd:CI_Date/gmd:date</targetAttribute>
> <encodeIfEmpty>true</encodeIfEmpty>
> <sourceExpression>
> <OCQL>if_then_else(isNull(LEGALFOUNDATIONDOCUMENT), Expression.NIL,
> 'http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated')</OCQL>
> </sourceExpression>
> </AttributeMapping>
> </attributeMappings>
> </FeatureTypeMapping>
> </typeMappings>
> </appschema:AppSchemaDataAccess>
>
> Geoserver log:
> 2019-07-12 08:07:00,348 WARN [org.geoserver] - Ignoring store directory
> 'styles'
> 2019-07-12 08:07:00,355 INFO [org.geoserver] - Loaded store 'ProtectedSite',
> enabled
> 2019-07-12 08:07:00,355 INFO [org.geoserver] - Loaded data store
> 'ProtectedSite'
> 2019-07-12 08:07:00,356 WARN [org.geoserver] - Error connecting to
> 'ProtectedSite'. Disabling.
> 2019-07-12 08:07:00,356 INFO [org.geoserver] -
> java.io.IOException
> at org.geoserver.catalog.ResourcePool.getDataStore(ResourcePool.java:586)
> at
> org.geoserver.catalog.impl.DataStoreInfoImpl.getDataStore(DataStoreInfoImpl.java:37)
> at
> org.geoserver.config.GeoServerLoader.readCatalog(GeoServerLoader.java:355)
> at
> org.geoserver.config.GeoServerLoader.readCatalog(GeoServerLoader.java:226)
> at
> org.geoserver.config.DefaultGeoServerLoader.loadCatalog(DefaultGeoServerLoader.java:46)
> at org.geoserver.config.GeoServerLoader.reload(GeoServerLoader.java:210)
> at
> org.geoserver.config.GeoServerLoaderProxy.reload(GeoServerLoaderProxy.java:65)
> at org.geoserver.config.impl.GeoServerImpl.reload(GeoServerImpl.java:434)
> Caused by: java.lang.NullPointerException: Could not acquire data access
> 'ProtectedSite'
> at org.geoserver.catalog.ResourcePool.getDataStore(ResourcePool.java:560)
> ... 115 more
> 2019-07-12 08:07:00,362 INFO [org.geoserver] - Loaded feature type
> 'ProtectedSite', enabled
> 2019-07-12 08:07:00,363 INFO [org.geoserver] - Loaded feature type
> 'ProtectedSite'
> 2019-07-12 08:07:00,366 WARN [org.geoserver] - Failed to load layer for
> feature type 'ProtectedSite'
> com.thoughtworks.xstream.converters.ConversionException: null : null
> ---- Debugging information ----
> cause-exception     : java.lang.NullPointerException
> cause-message       : null
> class               : java.util.LinkedHashSet
> required-type       : java.util.LinkedHashSet
> converter-type      :
> org.geoserver.config.util.XStreamPersister$ReferenceCollectionConverter
> line number         : 11
> class[1]            : org.geoserver.catalog.impl.LayerInfoImpl
> converter-type[1]   :
> org.geoserver.config.util.XStreamPersister$LayerInfoConverter
> version             : null
> -------------------------------
> at
> com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
> at
> com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
>
>
>
>
> --
> 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
>
>
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>

--
@tkardi



_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: INSPIRE Could not acquire data access 'ProtectedSite'

ljacedo
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: INSPIRE Could not acquire data access 'ProtectedSite'

Nuno Oliveira-3
Hi all,
one possible approach to handle this would be to make use of App-Schema cache.

All schema that App-Schema needs are cache inside App-Schema cache directory, which is created automatically. 
So you could copy paste the App-Schema cache from the first server to second one and set the location using schema.cache.dir environment property.

Hope it helps,
Nuno Oliveira

On Thu, 2019-07-18 at 03:53 -0700, ljacedo wrote:
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
-- 
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the
experts! 
Visit http://goo.gl/it488V for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Con riferimento alla normativa sul trattamento dei dati 
personali (Reg. UE 2016/679 - Regolamento generale sulla 
protezione dei dati “GDPR”), si precisa che ogni 
circostanza inerente alla presente email (il suo contenuto, 
gli eventuali allegati, etc.) è un dato la cui conoscenza 
è riservata al/i solo/i destinatario/i indicati dallo 
scrivente. Se il messaggio Le è giunto per errore, è 
tenuta/o a cancellarlo, ogni altra operazione è illecita. 
Le sarei comunque grato se potesse darmene notizia.

This email is intended only for the person or entity to 
which it is addressed and may contain information that 
is privileged, confidential or otherwise protected from 
disclosure. We remind that - as provided by European 
Regulation 2016/679 “GDPR” - copying, dissemination or 
use of this e-mail or the information herein by anyone 
other than the intended recipient is prohibited. If you 
have received this email by mistake, please notify 
us immediately by telephone or e-mail.


_______________________________________________
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


[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users