Hi,

Indeed something wrong happened when App-Schema generated the query for your 
mappings.
It is not obvious to me why App-Schema generated such a bad SQL query, I 
suggest you
to open a JIRA ticket describing the issue and providing enough info (mappings, 
and bit of the data)
to reproduce this issue.

In the mean time you may want to deactivate the JOIN optimization in App-Schema 
[1] and see if
App-Schema will produce correct SQL queries. If it works the performance will 
be bad but it will allow
you to proceed with your mapping work.

Hope it helps,

Nuno Oliveira

[1] 
http://docs.geoserver.org/latest/en/user/data/app-schema/joining.html#configuration

On 10/31/2017 07:13 AM, Verbeeck Bart wrote:
Hi again

I moved my data to postgresql and I received the same error doing a getmap 
request. So this problem is not sqlserver related.

Is it a wrong idea to do wms requests to an application scheme based layer?


Geoserver sends the following query to my postgis database, and it has an error at         "AND 
"uidn" FROM "public"."bekken"

SELECT "public"."bekken"."ogc_fid",encode(ST_AsEWKB("public"."bekken"."wkb_geometry"),'base64') as 
"wkb_geometry","public"."bekken"."uidn","public"."bekken"."oidn"
FROM "public"."bekken" INNER JOIN ( SELECT DISTINCT "oidn" FROM 
"public"."bekken"
WHERE "wkb_geometry" && ST_GeomFromText('POLYGON ((-80016.3310434809 -54667.64601825603, 
-80016.3310434809 322203.1650796655, 391530.2915944371 322203.1650796655, 391530.2915944371 
-54667.64601825603, -80016.3310434809 -54667.64601825603))', 31370) ) "temp_alias_used_for_filter"
ON ( "bekken"."oidn" = "temp_alias_used_for_filter"."oidn" AND "uidn" FROM 
"public"."bekken"
WHERE "wkb_geometry" && ST_GeomFromText('POLYGON ((-80016.3310434809 -54667.64601825603, 
-80016.3310434809 322203.1650796655, 391530.2915944371 322203.1650796655, 391530.2915944371 
-54667.64601825603, -80016.3310434809 -54667.64601825603))', 31370) ) "temp_alias_used_for_filter"
ON ( "bekken"."uidn" = "temp_alias_used_for_filter"."uidn" )  ORDER BY "public"."bekken"."oidn" ASC, 
"public"."bekken"."uidn" ASC, "public"."bekken"."ogc_fid"

-----Original Message-----
From: Verbeeck Bart [mailto:bart.verbe...@kb.vlaanderen.be]
Sent: dinsdag 31 oktober 2017 7:35
To: Ben Caradoc-Davies <b...@transient.nz>; 
geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] inspire-appscheme-wms-sqlserver

Thanks Ben

Yes, I have configured the secondary namespace. The problem occurs with " 
&outputFormat=gml3", not with " &outputFormat=gml32"
I will follow up the GEOS-8250 issue. Hopefully it will be solved in a future 
release

Bart

-----Original Message-----
From: Ben Caradoc-Davies [mailto:b...@transient.nz]
Sent: maandag 30 oktober 2017 21:02
To: Verbeeck Bart <bart.verbe...@kb.vlaanderen.be>; 
geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] inspire-appscheme-wms-sqlserver

Bart,

I have no experience with sqlserver, but in relation to the null GML namespace, 
have you configured a secondary namespace for GML 3.2.1?
http://docs.geoserver.org/latest/en/user/data/app-schema/supported-gml-versions.html#secondary-namespace-for-gml-3-2-1-required

The DescribeFeatureType problem is reported here:

[GEOS-8250] WFS 2.0 DescribeFeatureType responses for app-schema types contain 
a spurious WFS 2.0 jar import
https://osgeo-org.atlassian.net/browse/GEOS-8250

Kind regards,
Ben.

On 30/10/17 23:22, Verbeeck Bart wrote:
Hi List

In our organization we try to use geoserver (2.11) to serve harmonized services 
using the application scheme extension.
Our data is stored in a SQLSERVER db. The documentation refers to postgres and 
oracle databases, not to sqlserver.

The wfs services seem to work, although

    *   there is the null namespace problem (null:identifier [ 
xmlns:null=http://www.opengis.net/gml/3.2 
codeSpace=http://inspire.ec.europa.eu/ids ])
    *   the describefeaturetype (2.0.0) result is not as I would expect, 
schemaLocation="jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%208.0/webapps/overdrachtdiensten/WEB-INF/lib/gt-xsd-wfs-17.2.jar!/org/geotools/wfs/v2_0/wfs.xsd

The wms getfeaturetype result is ok, but the getmap request causes an
erroneous sql request (at "FROM") (see below) The wms getmap result is 
successful on a shapefile based layer.

Does anyone have experience using the app scheme on a sql server database?

Thanks

Bart


SELECT "RT"."BEKKEN"."OBJECTID","RT"."BEKKEN"."UIDN","RT"."BEKKEN"."SHAPE" as 
"SHAPE","RT"."BEKKEN"."OIDN"
         FROM "RT"."BEKKEN"
         INNER JOIN (
               SELECT DISTINCT "OIDN"
               FROM "RT"."BEKKEN"
               WHERE "SHAPE".Filter(geometry::STGeomFromText('POLYGON 
((12127.108205075114 2103.1082012057304, 12127.108205075114 395097.58538683876, 267800.38165359845 
395097.58538683876, 267800.38165359845 2103.1082012057304, 12127.108205075114 
2103.1082012057304))', 31370)) = 1 ) "temp_alias_used_for_filter"
               ON ( "BEKKEN"."OIDN" = "temp_alias_used_for_filter"."OIDN" AND "UIDN" FROM 
"RT"."BEKKEN" WHERE "SHAPE".Filter(geometry::STGeomFromText('POLYGON ((12127.108205075114 2103.1082012057304, 12127.108205075114 
395097.58538683876, 267800.38165359845 395097.58538683876, 267800.38165359845 2103.1082012057304, 12127.108205075114 2103.1082012057304))', 31370)) = 1 ) 
"temp_alias_used_for_filter"
               ON ( "BEKKEN"."UIDN" = "temp_alias_used_for_filter"."UIDN" )
               ORDER BY "RT"."BEKKEN"."OIDN" ASC, "RT"."BEKKEN"."UIDN" ASC, 
"RT"."BEKKEN"."OBJECTID"




----------------------------------------------------------------------
-------- Check out the vibrant tech community on one of the world's
most engaging tech sites, Slashdot.org! http://sdm.link/slashdot



_______________________________________________
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

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

--
Ben Caradoc-Davies <b...@transient.nz>
Director
Transient Software Limited <http://transient.nz/> New Zealand
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot 
_______________________________________________
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

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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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

Geoserver-users@lists.sourceforge.net
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

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo 
è consentito esclusivamente al destinatario del messaggio, per le finalità 
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne 
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di 
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro 
sistema. Conservare il messaggio stesso, divulgarlo anche in parte, 
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, 
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
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

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

Reply via email to