[Geoserver-users] Problem with INSPIRE xsd schema

Hi,

I’m working on my diploma thesis with GeoServer and complement application schema.

When I created data store, and create a new layer program writes an error in the mapping file:
"Could not list layers for this store, an error occurred retrieving them: java.util.NoSuchElementException: No top-level element found in Schemes: {} http://inspire.ec.europa.eu/schemas/ps/4.0/ProtectedSite ProtectedSite "

I don´t know how to resolve because there isn´t another source ProtectedSites.xsd scheme download source.

How I can solve this problem ???

here is my mapping file for download: https://drive.google.com/open?id=0B1bulwJXoip1VHdxSHFyenNXLXM

Adam

Adam,

it looks like your namespaces are incorrect. The ps namespace should be:
http://inspire.ec.europa.eu/schemas/ps/4.0

But below it looks like you have requested type with namespace:
http://inspire.ec.europa.eu/schemas/ps/4.0/ProtectedSite

Your namespace.xml also has a different namespace URI:
http://inspire.ec.europa.eu/schemas/ps

Please check that all your namespaces are correct. You may also need to create secondary namespaces to ensure that these are defined for the GeoTools encoder:
http://docs.geoserver.org/latest/en/user/data/app-schema/secondary-namespaces.html

There are also several problems with your mapping file: you use a namespace prefix "base" that is not defined, and one targetAttribute is "ps:" (no prefix, missing local name).

It would also be useful to examine the geoserver logs and look for exception stack traces; sometimes a strange error later may be caused by earlier exception that has left something in an incomplete state. First fix your namespaces.

Kind regards,
Ben.

On 07/04/16 19:32, Adam Mydla wrote:

Hi,

I'm working on my diploma thesis with GeoServer and complement application
schema.

When I created data store, and create a new layer program writes an error
in the mapping file:
"Could not list layers for this store, an error occurred retrieving them:
java.util.NoSuchElementException: No top-level element found in Schemes: {}
http://inspire.ec.europa.eu/schemas/ps/4.0/ProtectedSite ProtectedSite "

I don´t know how to resolve because there isn´t another source
ProtectedSites.xsd scheme download source.

How I can solve this problem ???

here is my mapping file for download:
https://drive.google.com/open?id=0B1bulwJXoip1VHdxSHFyenNXLXM

Adam

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

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

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

Adam, you must keep discussions on the geoserver-users list or purchase a support contract. On-list discussions help the whole community, so community members may answer on-list questions for free. You are better off asking the list because individual members may be unavailable or not have a good answer.

In app-schema, geometries are treated as atomic types and will be converted into GML by the encoder. Use targetAttribute to map the top level geometry property. Change this:
<targetAttribute>/ps:ProtectedSite/ps:geometry/gml:Polygon/gml:exterior/gml:LinearRing/gml:posList</targetAttribute>

to this:
<targetAttribute>ps:geometry</targetAttribute>

The leading slash was also unexpected, and you do not need the target element unless you are addressing its attributes.

Even once you fix your mapping, your request will fail because you are using a GML 3.2.1 application schema but WFS 1.1.0 which defaults to GML 3.1.1, incompatible with your target application schema. See:
http://docs.geoserver.org/latest/en/user/data/app-schema/supported-gml-versions.html#gml-3-2-1

Either specify outputformat=gml32 in your request:
http://localhost:8080/geoserver2/wfs?service=WFS&version=1.1.0&request=GetFeature&typename=ps:ProtectedSite&outputformat=gml32

or use WFS 2.0.0:
http://localhost:8080/geoserver2/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=ps:ProtectedSite

You are also specifying many unnecessary <FeatureType><schemaUri>; just specify the top-level schemaUri and app-schema will follow any imports/includes. You may need more than one. You certainly go not need to specify GML 3.2.1.

Kind regards,
Ben.

On 14/04/16 01:51, Adam Mydla wrote:

Thank you for your advice,

It was very helpful.

I modified the namespace name, added attributes, in some parts I must
change target attribute for testing responses to requests. Only for example
I am mapped all attributes like INSPIRE ID.

When I send request GetFeature:

http://localhost:8080/geoserver2/wfs?request=GetFeature&version=1.1.0&typeName=ps:ProtectedSite

This is answer:

<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema&quot; xmlns:ows="
http://www.opengis.net/ows&quot; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver2/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;&gt;

<ows:Exception exceptionCode="NoApplicableCode">

<ows:ExceptionText>

java.lang.RuntimeException: Error applying mapping with targetAttribute
ps:geometry/gml:Polygon/gml:exterior/gml:LinearRing/gml:posList Error
applying mapping with targetAttribute
ps:geometry/gml:Polygon/gml:exterior/gml:LinearRing/gml:posList Could not
find working property accessor for attribute (Shape) in object
(SimpleFeatureImpl:chko=[SimpleFeatureImpl.Attribute: the_geom<the_geom
id=chko.1>=MULTIPOLYGON (((48.709917 18.08879, 48.71037 18.089492,
48.710799 18.089892, 48.710175 18.091621, 48.709862 18.091097, 48.709789
18.090894, 48.70971 18.090842, 48.709584 18.090511, 48.709714 18.090136,
48.7094 18.088812, 48.709812 18.089396, 48.709917 18.08879))),
SimpleFeatureImpl.Attribute: OSM_ID<OSM_ID id=chko.1>=81009135,
SimpleFeatureImpl.Attribute: URL<URL id=chko.1>=http://oksovske-duby.oma.sk/,
SimpleFeatureImpl.Attribute: TYP<TYP id=chko.1>=chko,
SimpleFeatureImpl.Attribute: POPIS_MALY<POPIS_MALY id=chko.1>=Chránený
areál rozlohy 1,56&nbsp;ha, typ chráneného územia Chránený areál,
názvy: Chránený areál, <a href='http://oksovske-duby.oma.sk/'>plná
stránka o Okšovské duby</a>])

</ows:ExceptionText>

</ows:Exception>

</ows:ExceptionReport>

I do not know what's wrong ? Why it seems that GeoServer not followed my
mapping file?

My modified mapping file:

https://drive.google.com/open?id=0B1bulwJXoip1X3ZabTJJN2kzeDg

GeoServer log file:

https://drive.google.com/open?id=0B1bulwJXoip1QkZCYko4VWhONW8

Regards,

Adam

2016-04-07 10:23 GMT+02:00 Ben Caradoc-Davies <ben@anonymised.com>:

Adam,

it looks like your namespaces are incorrect. The ps namespace should be:
http://inspire.ec.europa.eu/schemas/ps/4.0

But below it looks like you have requested type with namespace:
http://inspire.ec.europa.eu/schemas/ps/4.0/ProtectedSite

Your namespace.xml also has a different namespace URI:
http://inspire.ec.europa.eu/schemas/ps

Please check that all your namespaces are correct. You may also need to
create secondary namespaces to ensure that these are defined for the
GeoTools encoder:

http://docs.geoserver.org/latest/en/user/data/app-schema/secondary-namespaces.html

There are also several problems with your mapping file: you use a
namespace prefix "base" that is not defined, and one targetAttribute is
"ps:" (no prefix, missing local name).

It would also be useful to examine the geoserver logs and look for
exception stack traces; sometimes a strange error later may be caused by
earlier exception that has left something in an incomplete state. First fix
your namespaces.

Kind regards,
Ben.

On 07/04/16 19:32, Adam Mydla wrote:

Hi,

I'm working on my diploma thesis with GeoServer and complement application
schema.

When I created data store, and create a new layer program writes an error
in the mapping file:
"Could not list layers for this store, an error occurred retrieving them:
java.util.NoSuchElementException: No top-level element found in Schemes:
{}
http://inspire.ec.europa.eu/schemas/ps/4.0/ProtectedSite ProtectedSite "

I don´t know how to resolve because there isn´t another source
ProtectedSites.xsd scheme download source.

How I can solve this problem ???

here is my mapping file for download:
https://drive.google.com/open?id=0B1bulwJXoip1VHdxSHFyenNXLXM

Adam

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

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

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

Hello,

Please help:

I´m trying to do the same think you have done, and Im getting the same
error.
I have check and dobule check my namespace to see if there is a problem and
still I get the same error.

Here is my namespace in ProtectedSite mapping file xml:
        <namespaces>
                <Namespace>
                        <prefix>ps</prefix>
                       
<uri>"http://inspire.ec.europa.eu/schemas/ps/4.0&quot;&lt;/uri&gt;
                </Namespace>
                <Namespace>
                        <prefix>base</prefix>
                       
<uri>"http://inspire.ec.europa.eu/schemas/base/3.3&quot;&lt;/uri&gt;
                </Namespace>
                <Namespace>
                        <prefix>gn</prefix>
                       
<uri>"http://inspire.ec.europa.eu/schemas/gn/4.0&quot;&lt;/uri&gt;
                </Namespace>
                <Namespace>
                        <prefix>qmd</prefix>
                        <uri>"http://www.isotc211.org/2005/gmd&quot;&lt;/uri&gt;
                </Namespace>
                <Namespace>
                        <prefix>gml</prefix>
                        <uri>"http://www.opengis.net/gml/3.2&quot;&lt;/uri&gt;
                </Namespace>
        </namespaces>

This is the FeatureTypeMapping in ProtectedSite Mapping file:
                <FeatureTypeMapping>
                        <sourceDataStore>bd_oracle</sourceDataStore>
                        <sourceType>PROTECTEDSITE</sourceType>
                        <targetElement>ps:ProtectedSite</targetElement>
                        <attributeMappings>
                                <AttributeMapping>
                                       
<targetAttribute>ps:legalFoundationDate</targetAttribute>
                                        <sourceExpression>
                                               
<OCQL>LEGALFOUNDATIONDATE</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                        </attributeMappings>
                </FeatureTypeMapping>

Also, Here is the targetTypes (I don't think this could be a problem)
        <targetTypes>
                <FeatureType>
                        <schemaUri>./ProtectedSites.xsd</schemaUri>
                </FeatureType>
        </targetTypes>

The error log shows as follow:
2018-12-04 14:16:38,201 INFO [org.geoserver] - Loaded store 'ProtectedSite',
enabled
2018-12-04 14:16:38,201 INFO [org.geoserver] - Loaded data store
'ProtectedSite'
2018-12-04 14:17:22,839 WARN [data.complex] - No top level element found in
schemas: {"http://inspire.ec.europa.eu/schemas/ps/4.0&quot;\}ProtectedSite
2018-12-04 14:17:22,839 WARN [complex.config] - Error creating app-schema
data store for 'ps:ProtectedSite', caused by: No top level element found in
schemas: {"http://inspire.ec.europa.eu/schemas/ps/4.0&quot;\}ProtectedSite
2018-12-04 14:17:22,842 WARN [org.geoserver] - Error connecting to
'ProtectedSite'. Disabling.
2018-12-04 14:17:22,842 INFO [org.geoserver] -
java.io.IOException: java.util.NoSuchElementException: No top level element
found in schemas:
{"http://inspire.ec.europa.eu/schemas/ps/4.0&quot;\}ProtectedSite

If you could give some guiden on this matter I would appreciate

Thanks
Luis Acedo

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

Hey Luis,

some time has passed and I can't remember exactly, but a couple of
possible pointers for no-top-element:
- you'll need to declare all required xml namespaces in appschema/namespaces
- add them as ("secondary" I think they were called) workspaces in the
GS data dir aswell.
- and watch out for misspellings (e.g <prefix>qmd</prefix> vs
<prefix>gmd</prefix> :slight_smile: )

If you'd like to take a look at a working example of inspire ps using
GeoServer appschema then there's
https://github.com/e-gov/kem-inspire/blob/reporting/src/data/ps/ProtectedSite/ProtectedSite.appschema
available with all the required (+ more) data dir contents aswell. The
service itself based on this app-schema can be reached through
https://gsavalik.envir.ee/geoserver/ps/ows?service=WFS&version=2.0.0&request=GetFeature&count=1&typename=ps:ProtectedSite

Hope this helps and all the best,
Tõnis

Kontakt ljacedo (<ljacedo@anonymised.com>) kirjutas kuupäeval K, 5.
detsember 2018 kell 19:18:

Hello,

Please help:

I´m trying to do the same think you have done, and Im getting the same
error.
I have check and dobule check my namespace to see if there is a problem and
still I get the same error.

Here is my namespace in ProtectedSite mapping file xml:
        <namespaces>
                <Namespace>
                        <prefix>ps</prefix>

<uri>"http://inspire.ec.europa.eu/schemas/ps/4.0&quot;&lt;/uri&gt;
                </Namespace>
                <Namespace>
                        <prefix>base</prefix>

<uri>"http://inspire.ec.europa.eu/schemas/base/3.3&quot;&lt;/uri&gt;
                </Namespace>
                <Namespace>
                        <prefix>gn</prefix>

<uri>"http://inspire.ec.europa.eu/schemas/gn/4.0&quot;&lt;/uri&gt;
                </Namespace>
                <Namespace>
                        <prefix>qmd</prefix>
                        <uri>"http://www.isotc211.org/2005/gmd&quot;&lt;/uri&gt;
                </Namespace>
                <Namespace>
                        <prefix>gml</prefix>
                        <uri>"http://www.opengis.net/gml/3.2&quot;&lt;/uri&gt;
                </Namespace>
        </namespaces>

This is the FeatureTypeMapping in ProtectedSite Mapping file:
                <FeatureTypeMapping>
                        <sourceDataStore>bd_oracle</sourceDataStore>
                        <sourceType>PROTECTEDSITE</sourceType>
                        <targetElement>ps:ProtectedSite</targetElement>
                        <attributeMappings>
                                <AttributeMapping>

<targetAttribute>ps:legalFoundationDate</targetAttribute>
                                        <sourceExpression>

<OCQL>LEGALFOUNDATIONDATE</OCQL>
                                        </sourceExpression>
                                </AttributeMapping>
                        </attributeMappings>
                </FeatureTypeMapping>

Also, Here is the targetTypes (I don't think this could be a problem)
        <targetTypes>
                <FeatureType>
                        <schemaUri>./ProtectedSites.xsd</schemaUri>
                </FeatureType>
        </targetTypes>

The error log shows as follow:
2018-12-04 14:16:38,201 INFO [org.geoserver] - Loaded store 'ProtectedSite',
enabled
2018-12-04 14:16:38,201 INFO [org.geoserver] - Loaded data store
'ProtectedSite'
2018-12-04 14:17:22,839 WARN [data.complex] - No top level element found in
schemas: {"http://inspire.ec.europa.eu/schemas/ps/4.0&quot;\}ProtectedSite
2018-12-04 14:17:22,839 WARN [complex.config] - Error creating app-schema
data store for 'ps:ProtectedSite', caused by: No top level element found in
schemas: {"http://inspire.ec.europa.eu/schemas/ps/4.0&quot;\}ProtectedSite
2018-12-04 14:17:22,842 WARN [org.geoserver] - Error connecting to
'ProtectedSite'. Disabling.
2018-12-04 14:17:22,842 INFO [org.geoserver] -
java.io.IOException: java.util.NoSuchElementException: No top level element
found in schemas:
{"http://inspire.ec.europa.eu/schemas/ps/4.0&quot;\}ProtectedSite

If you could give some guiden on this matter I would appreciate

Thanks
Luis Acedo

Hello Tõnis,

Thanks so much for your help, it really help me out solving this problem.
Now, I wonder if I could troble some more.
I´m trying to see how the appschema is link to a table on the database, and
I think I need to give a blackground on this.
I have an oracle database tables, based on my interpretation of the INSPIRE
UML model por ProtectedSite. I wonder if my interpretation is acurate, since
looking at the ProtectedSite.appschema shows fields that are not defined on
the table. Do i need to change these fields to my fields as it shows on the
UML? Do I need to add these fields on the ProtectedSite.appschema to my
table? How does it work with the links fields (See images for table fields).
Also, after loading the appschema, it seems I need to create the layer on
the geoserver or I need to create the feature.xml and layer.xml, is this
right?
Once more thanks for your help, I really apprecite, becasue at least i feel
I´m moving forward
Regards
Luis Acedo
<http://osgeo-org.1560.x6.nabble.com/file/t384224/ProtectedSite.png&gt;
<http://osgeo-org.1560.x6.nabble.com/file/t384224/DESIGNATIONTYPE.png&gt;

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

Hey Tõnis,

I was able to solve the problem with XSD schema and I have created my layer
ProtectedSite as it shows on demo and tutorial.

Thanks so much for your help, it really point me to the right direction

Regards
Luis Acedo

PS: I have another problem but It is not related to appschema. It is about
XSD. When I test the layer as it explaind on the Geoserver tutorial
(http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=ProtectedSite)
It returns the following error:
<ows:Exception exceptionCode="InvalidParameterValue"
locator="typeName"><ows:ExceptionText>Feature type :ProtectedSiteType
unknown</ows:ExceptionText></ows:Exception>

If you have any idea about how to solve this matter I would appreciate. I
will try to post the problem on the right list

Thanks anyway
Luis Acedo

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

Hey Luis,

please keep the discussion on the list :slight_smile:

I don’t have a copy of the dataset as the work was done for my previous employer. But the structure of the table for ps was flat-out single table.

Given the exception <ows:ExceptionText>Feature type :ProtectedSiteType unknown</ows:ExceptionText> I’d guess there’s a problem with getting the xsd or missing namespace declarations. Also, note the missing namespace identifier in front of ProtectedSiteType.

Do the xsds get cached on app-schema-cache path? if yes then you can troubleshoot by modifying the ps xsd to include only the bare minimum and then adding parts back bit-by-bit to narrow down which element is causin the problem.

All the best,
Tõnis

Kontakt Gucho (<ljacedo@anonymised.com>) kirjutas kuupäeval K, 12. detsember 2018 kell 10:54:
[…]

···

@tkardi
skype: tonis.kardi

Hi Tõnis,

I´m sorry I will keep this conversation to this link, really sorry.

Anyway, I was able to solve all those problems, I had created the layer and
I can see it on geoserver Layers list.
However, when I test the layer unig the link as it shows on tutorial. I get
the following error:
java.lang.RuntimeException: Failed to get property:
{http://www.opengis.net/wfs/2.0\}boundedBy
    Failed to get property: {http://www.opengis.net/wfs/2.0\}boundedBy
    Exception occurred while computing bounds
    Could not find working property accessor for attribute (gml_id) in object
(
      SimpleFeatureImpl:PROTECTEDSITE_PS=[
        SimpleFeatureImpl.Attribute: GML_ID&lt;GML_ID
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=1,
        SimpleFeatureImpl.Attribute: ID_LOCALID&lt;ID_LOCALID
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=1,
        SimpleFeatureImpl.Attribute: ID_NAMESPACE&lt;ID_NAMESPACE
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=1,
        SimpleFeatureImpl.Attribute: ID_VERSIONID&lt;ID_VERSIONID
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=1,
        SimpleFeatureImpl.Attribute: SHAPE&lt;SHAPE
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=null,
        SimpleFeatureImpl.Attribute: SITENAME&lt;SITENAME
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=TEST,
        SimpleFeatureImpl.Attribute:
SITEPROTECTIONCLASSIFICATION&lt;SITEPROTECTIONCLASSIFICATION
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=null,
        SimpleFeatureImpl.Attribute: LEGALFOUNDATIONDATE&lt;LEGALFOUNDATIONDATE
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=2018-12-11
17:12:35.487
      ]
    )

The table structure shows on image:
<http://osgeo-org.1560.x6.nabble.com/file/t384224/ProtectedSite_PS.png&gt;

The table only has the following values:
<http://osgeo-org.1560.x6.nabble.com/file/t384224/ProtectedSite_PS_data.png&gt;

I wonder if there is a problem with my data strucutre / column type or with
my data values. Really lost here since there is no data example to check

Anyway, thanks so much for your help. I really have moved forward on this
project and have it almost done

Regards
Luis Acedo

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

Hey,

could this be a lowercase/uppercase issue with fieldnames in the mapping file?

Could not find working property accessor for attribute (gml_id) in object
(
                        SimpleFeatureImpl:PROTECTEDSITE_PS=[
                                SimpleFeatureImpl.Attribute: GML_ID&lt;GML_ID
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=1,
...

i.e since the backend is oracle, everything is uppercase? Do you have
uppercase fieldnames in your mapping file aswell?

all the best,
Tõnis
Kontakt ljacedo (<ljacedo@anonymised.com>) kirjutas kuupäeval K, 12.
detsember 2018 kell 19:42:

Hi Tõnis,

I´m sorry I will keep this conversation to this link, really sorry.

Anyway, I was able to solve all those problems, I had created the layer and
I can see it on geoserver Layers list.
However, when I test the layer unig the link as it shows on tutorial. I get
the following error:
java.lang.RuntimeException: Failed to get property:
{http://www.opengis.net/wfs/2.0\}boundedBy
                Failed to get property: {http://www.opengis.net/wfs/2.0\}boundedBy
                Exception occurred while computing bounds
                Could not find working property accessor for attribute (gml_id) in object
(
                        SimpleFeatureImpl:PROTECTEDSITE_PS=[
                                SimpleFeatureImpl.Attribute: GML_ID&lt;GML_ID
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=1,
                                SimpleFeatureImpl.Attribute: ID_LOCALID&lt;ID_LOCALID
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=1,
                                SimpleFeatureImpl.Attribute: ID_NAMESPACE&lt;ID_NAMESPACE
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=1,
                                SimpleFeatureImpl.Attribute: ID_VERSIONID&lt;ID_VERSIONID
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=1,
                                SimpleFeatureImpl.Attribute: SHAPE&lt;SHAPE
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=null,
                                SimpleFeatureImpl.Attribute: SITENAME&lt;SITENAME
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=TEST,
                                SimpleFeatureImpl.Attribute:
SITEPROTECTIONCLASSIFICATION&lt;SITEPROTECTIONCLASSIFICATION
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=null,
                                SimpleFeatureImpl.Attribute: LEGALFOUNDATIONDATE&lt;LEGALFOUNDATIONDATE
id=PROTECTEDSITE_PS.fid--138ca4e9_1679897f1ee_-7ff5&gt;=2018-12-11
17:12:35.487
                        ]
                )

The table structure shows on image:
<http://osgeo-org.1560.x6.nabble.com/file/t384224/ProtectedSite_PS.png&gt;

The table only has the following values:
<http://osgeo-org.1560.x6.nabble.com/file/t384224/ProtectedSite_PS_data.png&gt;

I wonder if there is a problem with my data strucutre / column type or with
my data values. Really lost here since there is no data example to check

Anyway, thanks so much for your help. I really have moved forward on this
project and have it almost done

Regards
Luis Acedo

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

--
@tkardi
skype: tonis.kardi

Hi there,

Yes it is, the elements wihtin OCQL must match database field and it is case
sensitive.

Thanks for all your help, it works now

Regards
Luis Acedo

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

Excellent! :slight_smile:

All the best,
Tõnis

Kontakt ljacedo (<ljacedo@anonymised.com>) kirjutas kuupäeval R, 14.
detsember 2018 kell 12:26:

Yes it is, the elements wihtin OCQL must match database field and it is case
sensitive.

Thanks for all your help, it works now

Hello Ben,

Im moving the inspire I have installed on a DEV environmente where Tomcat
server has access to internet to an intranet where Tomcat does not have
access to internet (thus any call to http://inspire.ec.europa.eu/ would
return error).
I have copied all the xsd locally on the server, so I could see the xsd with
url http://mySrv/geoserver/www/schemas/ps/4.0/ProtectedSite.xsd as well as
namespace.xml, datastore.xml and ProtectedSite_appschema.xml (see below).
When I refresh the geoserver I get the following errors:
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 java.lang.Thread.run(Thread.java:745)
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)

Any idea that could help me to deploy Geoserver INSPIRE on LAN with no
access to Internet I would appreciated it.

namespace.xml:
<namespace>
  <id>NamespaceInfoImpl--138ca4e9:1679897f1ee:-7ffd</id>
  <prefix>ps</prefix>
  <uri>http://mySrv/geoserver/www/schemas/ps/4.0&lt;/uri&gt;
</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">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&lt;/entry&gt;
  </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&quot;
xmlns:appschema="http://www.geotools.org/app-schema&quot;&gt;
  <namespaces>
    <Namespace>
      <prefix>ps</prefix>
      <uri>http://mySrv/geoserver/www/schemas/ps/4.0&lt;/uri&gt;
    </Namespace>
    <Namespace>
      <prefix>gml</prefix>
      <uri>http://mySrv/geoserver/www/gml/3.2.1&lt;/uri&gt;
    </Namespace>
    <Namespace>
      <prefix>base</prefix>
      <uri>http://mySrv/geoserver/www/schemas/base/3.3&lt;/uri&gt;
    </Namespace>
    <Namespace>
      <prefix>base2</prefix>
      <uri>http://mySrv/geoserver/www/schemas/base2/2.0&lt;/uri&gt;
    </Namespace>
    <Namespace>
      <prefix>gmd</prefix>
      <uri>http://mySrv/geoserver/www/iso/19139/20070417/gmd&lt;/uri&gt;
    </Namespace>
    <Namespace>
      <prefix>xsi</prefix>
      <uri>http://mySrv/geoserver/www/2001&lt;/uri&gt;
    </Namespace>
    <Namespace>
      <prefix>xlink</prefix>
      <uri>http://mySrv/geoserver/www/xlink&lt;/uri&gt;
    </Namespace>
    <Namespace>
      <prefix>gco</prefix>
      <uri>http://mySrv/geoserver/www/iso/19139/20070417/gco&lt;/uri&gt;
    </Namespace>
    <Namespace>
      <prefix>gn</prefix>
      <uri>http://mySrv/geoserver/www/schemas/gn/4.0&lt;/uri&gt;
    </Namespace>
  </namespaces>
  <includedTypes/>
  <sourceDataStores>
    <DataStore>
      <id>bd_oracle</id>
      <parameters>
        <Parameter>
          <name>dbtype</name>
          <value>Oracle</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>

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