[Geoserver-users] App Schema Plugin - GetMap results in error

Dear users,

Could you help me to understand what is wrong with my set up of app schema plugin and its application on one simple featureType.

GetMap request results in the following error:

<?xml version="1.0" encoding="UTF-8"?> |
  • | - |

java.lang.ClassCastException: org.geoserver.security.decorators.ReadOnlyDataAccess cannot be cast to org.geotools.data.DataStore |
org.geoserver.security.decorators.ReadOnlyDataAccess cannot be cast to org.geotools.data.DataStore |


http://bolegweb.geof.unizg.hr/geoserver/proplant/wms?service=WMS&version=1.3.0&request=GetMap&layers=proplant:observations&styles=&bbox=20.522657679466,48.6046642023666,20.6049912088275,48.6113374332541&width=4071&height=330&srs=EPSG:4326&format=application/openlayers

|

Has anyone experienced similar problem and could help me?

On THIS link is the whole workspace defining the new schema (proplant_observations.xsd), mapping file (proplant_observations.xml) etc.

Thank you in advance,
Tomas

···


[

Tomas Kliment on about.me

Ing. Tomas Kliment, PhD.
about.me/klimeto

](http://about.me/klimeto)

Tomas,

I recommend getting WFS working first as it is easiest to debug.

(1) Do not use workspace-specific service URLs as they cannot work with app-schema because GeoServer assumes a one-to-one workspace to namespace relationship. Removing the workspace does not fix your problem but it will be required.
Change: http://bolegweb.geof.unizg.hr/geoserver/proplant/wms
To: http://bolegweb.geof.unizg.hr/geoserver/wms
(but get WFS working first)

(2) Your geometries have a null namespace prefix that should be gml:
http://bolegweb.geof.unizg.hr/geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typenames=proplant:observations&count=10
Did you define a GML 3.2.1 secondary namespace as required by app-schema?
http://docs.geoserver.org/latest/en/user/data/app-schema/supported-gml-versions.html#secondary-namespace-for-gml-3-2-1-required

(3) Your schema imports itself. It should instead import the GML 3.2.1 schema. Until it does, it is not a GML application schema.
http://bolegweb.geof.unizg.hr/proplant/xsd/proplant_observations.xsd
I am surprised it works at all. I expected to see:
<xsd:import namespace="http://www.opengis.net/gml/3.2&quot; schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd&quot;/&gt;

(4) WFS DescribeFeatureType fails with "java.io.IOException: Error occurred building feature type Error occurred building feature type ERROR: relation &quot;objekt_obveznik_naselje_area_total_spatial&quot; does not exist Position: 31"
http://bolegweb.geof.unizg.hr/geoserver/wfs?service=WFS&version=2.0.0&request=DescribeFeatureType&typenames=proplant:observations

(5) Your feature type looks very close to an OGC SF-0 simple feature. An alternative method is to deliver your data with GeoServer schema mapping. This option is completely separate to app-schema and may work in this simple case. I have not used it with WMS:
http://docs.geoserver.org/stable/en/user/services/wfs/schemamapping.html

Kind regards,
Ben.

On 05/03/16 04:01, Tomas Kliment wrote:

Dear users,

Could you help me to understand what is wrong with my set up of app schema
plugin and its application on one simple featureType.

GetMap request results in the following error:

<?xml version="1.0"
encoding="UTF-8"?><ServiceExceptionReport version="1.3.0" xmlns="
http://www.opengis.net/ogc&quot; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="
http://www.opengis.net/ogc
http://bolegweb.geof.unizg.hr/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd
"> <ServiceException>
java.lang.ClassCastException:
org.geoserver.security.decorators.ReadOnlyDataAccess cannot be cast to
org.geotools.data.DataStore
org.geoserver.security.decorators.ReadOnlyDataAccess cannot be cast to
org.geotools.data.DataStore
</ServiceException></ServiceExceptionReport>

http://bolegweb.geof.unizg.hr/geoserver/proplant/wms?service=WMS&version=1.3.0&request=GetMap&layers=proplant:observations&styles=&bbox=20.522657679466,48.6046642023666,20.6049912088275,48.6113374332541&width=4071&height=330&srs=EPSG:4326&format=application/openlayers

  Has anyone experienced similar problem and could help me?

On THIS
<https://drive.google.com/file/d/0B_LYIq94gSDiYW1pLWpYY1dnZVE/view?usp=sharing&gt;
link is the whole workspace defining the new schema
(proplant_observations.xsd), mapping file (proplant_observations.xml) etc.

Thank you in advance,
Tomas

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140

_______________________________________________
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

Hi Tomas,
don’t know if you are still blocked on this issue, but I believe this was solved by the following patches:

GeoServer 2.9.x (will be included in 2.9-beta2)
https://github.com/geoserver/geoserver/pull/1530

GeoServer 2.8.x (included in 2.8.3)

···

https://github.com/geoserver/geoserver/pull/1532

GeoServer 2.7.x (will be included in 2.7.7)
https://github.com/geoserver/geoserver/pull/1533

Of course, the nightly builds of each branch contain the relevant patch.

Hope this helps,
–S

On Fri, Mar 4, 2016 at 4:01 PM, Tomas Kliment <tomas.kliment@anonymised.com> wrote:

Dear users,

Could you help me to understand what is wrong with my set up of app schema plugin and its application on one simple featureType.

GetMap request results in the following error:

<?xml version="1.0" encoding="UTF-8"?>
java.lang.ClassCastException: org.geoserver.security.decorators.ReadOnlyDataAccess cannot be cast to org.geotools.data.DataStore
org.geoserver.security.decorators.ReadOnlyDataAccess cannot be cast to org.geotools.data.DataStore


http://bolegweb.geof.unizg.hr/geoserver/proplant/wms?service=WMS&version=1.3.0&request=GetMap&layers=proplant:observations&styles=&bbox=20.522657679466,48.6046642023666,20.6049912088275,48.6113374332541&width=4071&height=330&srs=EPSG:4326&format=application/openlayers

Has anyone experienced similar problem and could help me?

On THIS link is the whole workspace defining the new schema (proplant_observations.xsd), mapping file (proplant_observations.xml) etc.

Thank you in advance,
Tomas


Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140


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


[

Tomas Kliment on about.me

Ing. Tomas Kliment, PhD.
about.me/klimeto

](http://about.me/klimeto)

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
[http://goo.gl/it488V](http://goo.gl/it488V) for more information.
==
Dott. Stefano Costa
Senior 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://www.geo-solutions.it)
[http://twitter.com/geosolutions_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.