[Geoserver-users] application schema error

Hi,
I’m trying to repeat the application schema tutorial example and made the
following simple steps:
- Installed geoserver 2.3.0 on Windows 7 (64), JRE 6 (64)
- Copied jar files into WEB-INF/lib
- Copied geoserver-2.3.0-app-schema-plugin/tutorial as data_dir.
Then … logging with admin or root user…
In Layer preview I can see only gsml:Mappedfeature. When I tried to get GML
from layer preview page the result is:

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
version="1.2.0"xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
<ServiceException>
java.lang.ClassCastException:
org.geotools.feature.type.ComplexFeatureTypeImpl cannot be cast to
org.opengis.feature.simple.SimpleFeatureType
org.geotools.feature.type.ComplexFeatureTypeImpl cannot be cast to
org.opengis.feature.simple.SimpleFeatureType
</ServiceException>
</ServiceExceptionReport>

Also it’s impossible to republish some other complex feature, for example if
I tried to publish again tut_RoadSegment, the error is:

java.lang.RuntimeException: Error occurred while building the resources for
the configuration page
  at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:3
02)
  at
org.geoserver.web.data.layer.NewLayerPage$6.onClick(NewLayerPage.java:241)
  at org.geoserver.web.wicket.SimpleAjaxLilp
nk$1.onClick(SimpleAjaxLink.java:45)
  at
org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:68)
         ………………………….

Can anybody help me?
Regards
Hristo Dechev

Hristo,

app-schema does not support the GeoServer web interface. Do not use the web interface to view or modify app-schema layers. The demo layer request fails because it defaults to WFS 1.0.0 / GML 2, which is also not supported by app-schema, which only supports WFS 1.1.0 and (some of) WFS 2.0.0. The WFS 1.0.0 implementation does not support complex features.

Did you try accessing the two layers using the links as the end of the tutorial?
http://docs.geoserver.org/latest/en/user/data/app-schema/tutorial.html

Namely:
http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=gsml:GeologicUnit
http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=gsml:MappedFeature

If you use the demo requests page, you *must* select GML 3.1 output, because these are GML 3.1 layers. (Yes, the tutorial should be updated to include this information.)

Kind regards,
Ben.

On 09/04/13 05:14, Hristo Dechev wrote:

Hi,
I’m trying to repeat the application schema tutorial example and made the
following simple steps:
- Installed geoserver 2.3.0 on Windows 7 (64), JRE 6 (64)
- Copied jar files into WEB-INF/lib
- Copied geoserver-2.3.0-app-schema-plugin/tutorial as data_dir.
Then … logging with admin or root user…
In Layer preview I can see only gsml:Mappedfeature. When I tried to get GML
from layer preview page the result is:

<ServiceExceptionReport xmlns="http://www.opengis.net/ogc&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
version="1.2.0"xsi:schemaLocation="http://www.opengis.net/ogc
http://schemas.opengis.net/wfs/1.0.0/OGC-exception.xsd&quot;&gt;
<ServiceException>
java.lang.ClassCastException:
org.geotools.feature.type.ComplexFeatureTypeImpl cannot be cast to
org.opengis.feature.simple.SimpleFeatureType
org.geotools.feature.type.ComplexFeatureTypeImpl cannot be cast to
org.opengis.feature.simple.SimpleFeatureType
</ServiceException>
</ServiceExceptionReport>

Also it’s impossible to republish some other complex feature, for example if
I tried to publish again tut_RoadSegment, the error is:

java.lang.RuntimeException: Error occurred while building the resources for
the configuration page
  at
org.geoserver.web.data.layer.NewLayerPage.buildLayerInfo(NewLayerPage.java:3
02)
  at
org.geoserver.web.data.layer.NewLayerPage$6.onClick(NewLayerPage.java:241)
  at org.geoserver.web.wicket.SimpleAjaxLilp
nk$1.onClick(SimpleAjaxLink.java:45)
  at
org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:68)
          ………………………….

Can anybody help me?
Regards
Hristo Dechev

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis& visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

Hi,
I had the similar problem. I followed the instructions to install
Geoserver2.3.3, application schema and tutorial data on Windows 7 (64), JRE6
(32). When I enter the following url
"http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=gsml:GeologicUnit&quot;,
the error message is

  <?xml version="1.0" encoding="UTF-8" ?>
- <ows:ExceptionReport version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:ows="http://www.opengis.net/ows&quot;&gt;
- <ows:Exception exceptionCode="NoApplicableCode">
  <ows:ExceptionText>Error occurred getting features null
java.net.UnknownHostException: www.geosciml.org
www.geosciml.org</ows:ExceptionText>
  </ows:Exception>
  </ows:ExceptionReport>

The server log has "Error connecting to 'gsml_GeologicUnit'. Disabling:.

Cheers

Pu Lin

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/application-schema-error-tp5045388p5066904.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Pu Lin,

does your machine have internet access?

If you are behind a firewall that prevents outgoing web connections, GeoServer app-schema will not be able to download the GML application schemas that define the GeoSciML information model, and data store initialisation will fail. This download only occurs the first time GeoServer app-schema starts; schemas are cached for future use in the folder app-schema-cache in your data directory.

There are several solutions to this problem, documented at the end of this page:
http://docs.geoserver.org/latest/en/user/data/app-schema/app-schema-resolution.html

Also, if you are able to make outgoing HTTP requests on port 80 using a web proxy, you should also be able to configure your JRE to use this proxy. I have not tried it as I do not use Windows, but here is the Java support page:
http://www.java.com/en/download/help/proxy_setup.xml

Kind regards,
Ben.

On 17/07/13 09:03, Pu Lin wrote:

Hi,
I had the similar problem. I followed the instructions to install
Geoserver2.3.3, application schema and tutorial data on Windows 7 (64), JRE6
(32). When I enter the following url
"http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&typeName=gsml:GeologicUnit&quot;,
the error message is

   <?xml version="1.0" encoding="UTF-8" ?>
- <ows:ExceptionReport version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:ows="http://www.opengis.net/ows&quot;&gt;
- <ows:Exception exceptionCode="NoApplicableCode">
   <ows:ExceptionText>Error occurred getting features null
java.net.UnknownHostException: www.geosciml.org
www.geosciml.org</ows:ExceptionText>
   </ows:Exception>
   </ows:ExceptionReport>

The server log has "Error connecting to 'gsml_GeologicUnit'. Disabling:.

Cheers

Pu Lin

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/application-schema-error-tp5045388p5066904.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

[Please keep discussions on-list]

Pu,

are your schemas in paths relative to the schemas/catalog.xml? Such as data_dir/schemas/cgiutilities/ ? Does GeoServer still complain about geosciml.org on startup?

I think you are missing several rewrite rules; I recommend one per host so I count four. According the contents of my app-schema-cache for the tutorial, the full list of dependencies is:

./net/opengis/schemas/gml/3.1.1/base/basicTypes.xsd
./net/opengis/schemas/gml/3.1.1/base/coordinateOperations.xsd
./net/opengis/schemas/gml/3.1.1/base/coordinateReferenceSystems.xsd
./net/opengis/schemas/gml/3.1.1/base/coordinateSystems.xsd
./net/opengis/schemas/gml/3.1.1/base/coverage.xsd
./net/opengis/schemas/gml/3.1.1/base/dataQuality.xsd
./net/opengis/schemas/gml/3.1.1/base/datums.xsd
./net/opengis/schemas/gml/3.1.1/base/defaultStyle.xsd
./net/opengis/schemas/gml/3.1.1/base/dictionary.xsd
./net/opengis/schemas/gml/3.1.1/base/direction.xsd
./net/opengis/schemas/gml/3.1.1/base/dynamicFeature.xsd
./net/opengis/schemas/gml/3.1.1/base/feature.xsd
./net/opengis/schemas/gml/3.1.1/base/geometryAggregates.xsd
./net/opengis/schemas/gml/3.1.1/base/geometryBasic0d1d.xsd
./net/opengis/schemas/gml/3.1.1/base/geometryBasic2d.xsd
./net/opengis/schemas/gml/3.1.1/base/geometryComplexes.xsd
./net/opengis/schemas/gml/3.1.1/base/geometryPrimitives.xsd
./net/opengis/schemas/gml/3.1.1/base/gml.xsd
./net/opengis/schemas/gml/3.1.1/base/gmlBase.xsd
./net/opengis/schemas/gml/3.1.1/base/grids.xsd
./net/opengis/schemas/gml/3.1.1/base/measures.xsd
./net/opengis/schemas/gml/3.1.1/base/observation.xsd
./net/opengis/schemas/gml/3.1.1/base/referenceSystems.xsd
./net/opengis/schemas/gml/3.1.1/base/temporal.xsd
./net/opengis/schemas/gml/3.1.1/base/temporalReferenceSystems.xsd
./net/opengis/schemas/gml/3.1.1/base/temporalTopology.xsd
./net/opengis/schemas/gml/3.1.1/base/topology.xsd
./net/opengis/schemas/gml/3.1.1/base/units.xsd
./net/opengis/schemas/gml/3.1.1/base/valueObjects.xsd
./net/opengis/schemas/gml/3.1.1/smil/smil20-language.xsd
./net/opengis/schemas/gml/3.1.1/smil/smil20.xsd
./net/opengis/schemas/ic/2.0/IC-ISM-v2.xsd
./net/opengis/schemas/om/1.0.0/observation.xsd
./net/opengis/schemas/om/1.0.0/om.xsd
./net/opengis/schemas/sampling/1.0.0/LUTgeodesy.xsd
./net/opengis/schemas/sampling/1.0.0/sampling.xsd
./net/opengis/schemas/sampling/1.0.0/samplingBase.xsd
./net/opengis/schemas/sampling/1.0.0/samplingManifold.xsd
./net/opengis/schemas/sampling/1.0.0/specimen.xsd
./net/opengis/schemas/sampling/1.0.0/surveyProcedure.xsd
./net/opengis/schemas/sensorML/1.0.1/base.xsd
./net/opengis/schemas/sensorML/1.0.1/method.xsd
./net/opengis/schemas/sensorML/1.0.1/process.xsd
./net/opengis/schemas/sensorML/1.0.1/sensorML.xsd
./net/opengis/schemas/sensorML/1.0.1/system.xsd
./net/opengis/schemas/sweCommon/1.0.1/aggregateTypes.xsd
./net/opengis/schemas/sweCommon/1.0.1/basicTypes.xsd
./net/opengis/schemas/sweCommon/1.0.1/curveTypes.xsd
./net/opengis/schemas/sweCommon/1.0.1/data.xsd
./net/opengis/schemas/sweCommon/1.0.1/encoding.xsd
./net/opengis/schemas/sweCommon/1.0.1/phenomenon.xsd
./net/opengis/schemas/sweCommon/1.0.1/positionTypes.xsd
./net/opengis/schemas/sweCommon/1.0.1/simpleTypes.xsd
./net/opengis/schemas/sweCommon/1.0.1/swe.xsd
./net/opengis/schemas/sweCommon/1.0.1/temporalAggregates.xsd
./net/opengis/schemas/sweCommon/1.0.1/xmlData.xsd
./org/geosciml/www/cgiutilities/1.0/xsd/cgiUtilities.xsd
./org/geosciml/www/cgiutilities/1.0/xsd/primitiveTypes.xsd
./org/geosciml/www/geosciml/2.0/xsd/borehole.xsd
./org/geosciml/www/geosciml/2.0/xsd/collection.xsd
./org/geosciml/www/geosciml/2.0/xsd/earthMaterial.xsd
./org/geosciml/www/geosciml/2.0/xsd/fossil.xsd
./org/geosciml/www/geosciml/2.0/xsd/geologicAge.xsd
./org/geosciml/www/geosciml/2.0/xsd/geologicFeature.xsd
./org/geosciml/www/geosciml/2.0/xsd/geologicRelation.xsd
./org/geosciml/www/geosciml/2.0/xsd/geologicStructure.xsd
./org/geosciml/www/geosciml/2.0/xsd/geologicUnit.xsd
./org/geosciml/www/geosciml/2.0/xsd/geosciml.xsd
./org/geosciml/www/geosciml/2.0/xsd/value.xsd
./org/geosciml/www/geosciml/2.0/xsd/vocabulary.xsd
./org/w3/www/1999/xlink.xsd

Kind regards,
Ben.

On 17/07/13 12:23, LIN Pu wrote:

Hi Ben,

I used the OASIS catalog but still got the error message. Did I miss something?

1 Add the element <catalog>../../../schemas/catalog.xml</catalog> to gsml_GeologicUnit.xml.
2. Add schemas under data_dir.
3. catalog.xml
<?xml version="1.0"?>
<!DOCTYPE catalog PUBLIC
  "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
  "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd&quot;&gt;
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <rewriteURI uriStartString="http://www.geosciml.org/cgiutilities/&quot;
    rewritePrefix="cgiutilities/" />
  <rewriteURI uriStartString="http://www.geosciml.org/geosciml/&quot;
    rewritePrefix="geosciml/" />
  <rewriteURI uriStartString="http://schemas.opengis.net/sampling/&quot;
    rewritePrefix="sampling/" />
</catalog>

Cheers

Pu Lin

-----Original Message-----
From: Ben Caradoc-Davies [mailto:Ben.Caradoc-Davies@anonymised.com]
Sent: Wednesday, 17 July 2013 12:42 PM
To: LIN Pu
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] application schema error

Pu Lin,

does your machine have internet access?

If you are behind a firewall that prevents outgoing web connections, GeoServer app-schema will not be able to download the GML application schemas that define the GeoSciML information model, and data store initialisation will fail. This download only occurs the first time GeoServer app-schema starts; schemas are cached for future use in the folder app-schema-cache in your data directory.

There are several solutions to this problem, documented at the end of this page:
http://docs.geoserver.org/latest/en/user/data/app-schema/app-schema-resolution.html

Also, if you are able to make outgoing HTTP requests on port 80 using a web proxy, you should also be able to configure your JRE to use this proxy. I have not tried it as I do not use Windows, but here is the Java support page:
http://www.java.com/en/download/help/proxy_setup.xml

Kind regards,
Ben.

On 17/07/13 09:03, Pu Lin wrote:

Hi,
I had the similar problem. I followed the instructions to install
Geoserver2.3.3, application schema and tutorial data on Windows 7
(64), JRE6 (32). When I enter the following url
"http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&
typeName=gsml:GeologicUnit",
the error message is

    <?xml version="1.0" encoding="UTF-8" ?>
- <ows:ExceptionReport version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:ows="http://www.opengis.net/ows&quot;&gt;
- <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>Error occurred getting features null
java.net.UnknownHostException: www.geosciml.org
www.geosciml.org</ows:ExceptionText>
    </ows:Exception>
    </ows:ExceptionReport>

The server log has "Error connecting to 'gsml_GeologicUnit'. Disabling:.

Cheers

Pu Lin

--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/application-schema-error-tp5045388
p5066904.html Sent from the GeoServer - User mailing list archive at
Nabble.com.

----------------------------------------------------------------------
-------- See everything from the browser to the database with
AppDynamics Get end-to-end visibility with application monitoring from
AppDynamics Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.c
lktrk _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com> Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre

------------------------------
The information in this email together with any attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. There is no waiver of any confidentiality/privilege by your inadvertent receipt of this material.
Any form of review, disclosure, modification, distribution and/or publication of this email message is prohibited, unless as a necessary part of Departmental business.
If you have received this message in error, you are asked to inform the sender as quickly as possible and delete this message and any copies of this message from your computer and/or your computer system network.
------------------------------

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

On 17/07/13 14:30, Ben Caradoc-Davies wrote:

I think you are missing several rewrite rules; I recommend one per host
so I count four.

Off-by-one: it is only three. I have attached a corresponding catalog.xml; store your schemas under data_dir/schemas. Once you have your schemas in this tree form, you could even put them in data_dir/app-schema_cache and GeoServer will find them there.

Kind regards,

--
Ben Caradoc-Davies <Ben.Caradoc-Davies@anonymised.com>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

catalog.xml (539 Bytes)