Hi Michael,

I also have the same error recreating ProtectedSite. This is what I did to
solve the problem and it works for me. On these steps what is your mapping
file I called appschema file.

1. On GeoServer create a workspace for the project, be sure the uri on your
workspace is the main path for your XSD file. For example: if you xsd link
is http://schemas.earthresourceml.org/2.0/mineralOccurrence.xsd, the uri for
workspace is http://schemas.earthresourceml.org/2.0
2. Go to your workspace folder on your server and check that namespace.xml
and wokspace.xml files has been created. On the namspace.xml file, check
that your prefix is the workspace folder name and uri is as defined on
step1. On the workspace.xml file, check that your name is the workspace
folder name.
3. Create folder where the datasoter.xml and appschema xml files will be
located.
4. On you datastore.xml file should look like:
<dataStore>
  <id>DataStoreInfoImpl-2c4aa0ee:16020fa6fe6:-7fff</id>
  <name>layer_folder_step2</name>
  <description>Some description</description>
  <type>Application Schema DataAccess</type>
  <enabled>true</enabled>
  <workspace>
    <id>ID on your workspace.xml file</id>
  </workspace>
  <connectionParameters>
    <entry key="dbtype">app-schema</entry>
    <entry key="url">file:/<geoserver workspace
path>/workspace/workspa_folder_step1/layer_folder_step2/appschema_file.xml</entry>
    <entry key="namespace">http://schemas.earthresourceml.org/2.0</entry>
  </connectionParameters>
  <__default>false</__default>
</dataStore>
5. On appschema.xml check the following:
5.a. On namespaces Namespace, check your prefix is er and uri is
http://schemas.earthresourceml.org/2.0
5.b. Check your targetTypes, it should look like:
<targetTypes>
        <FeatureType>
            <schemaUri>
               http://schemas.earthresourceml.org/2.0/mineralOccurrence.xsd
            </schemaUri>
        </FeatureType>
    </targetTypes>
5.c. Your DataSoter ID should match "datastore" and it should be the same on
the FeatureTypeMapping sourceDatatStore 
5.d. The FeatureTypeMapping soureType should be your table name, be carefull
because it is case sensitive
5.c. On the FeatureTypeMapping, the sourceData
5.e. On the AttributeMapping, the fild OCQL should be as it shows on your
table and it is case sensitive
<AttributeMapping>
                <targetAttribute>er:MineralOccurrence</targetAttribute>
                <idExpression>
                    <OCQL>GML_ID</OCQL>
                </idExpression>
            </AttributeMapping>
NOTE: 1. Check your AttributeMapping for all fields; 2. If there is a
wfs.xml file on your workspace_step1 folder move out of the folder
6. When done checking these points reload your geoserver and check the log. 

This solve the error on my system, hope it helps you.

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

Reply via email to