1

I have a problem with a database connection on GeoServer.

I have installed the app-schema plugin.

In my workspace, named nc, I would like to connect to postgres (on localhost) to a target table p_giunzione_stradale on db progetto.

But when I start the GeoServer I have this warning:

WARN [geoserver.security] - Could not find factory store : DataStoreInfoImpl[nc_giunzione_stradale]. Unable to encrypt connection parameters

The PostGIS extension is installed correctly and the system user is the same as the db user, and owner of the database 'progetto'. Moreover psql console is accessible without password from the shell.

The connection parameters are stored in nc_giunzione_stradale.xml file located in the directory workspaces/nc/nc_giunzione_stradale as requested by app-schema.

Can someone tell me where the problem is?

I attach the content of nc_giunzione_stradale.xml file:

    <?xml version="1.0" encoding="UTF-8"?>
<as:AppSchemaDataAccess xmlns:as="http://www.geotools.org/app-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema" 
xsi:schemaLocation="http://www.geotools.org/app-schema AppSchemaDataAccess.xsd">
    <namespaces>
        <Namespace>
                <prefix>nc</prefix>
            <uri>urn:nc</uri>
        </Namespace>
        <Namespace>
            <prefix>gml</prefix>
            <uri>http://www.opengis.net/gml</uri>
        </Namespace>
        <Namespace>
                <prefix>xlink</prefix>
            <uri>http://www.w3.org/1999/xlink</uri>
        </Namespace>
    </namespaces>
    <sourceDataStores>
        <DataStore>
            <id>datastoreNC</id>
            <parameters>
                <Parameter>
                    <name>dbtype</name>
                    <value>postgisng</value>
                </Parameter>
                <Parameter>
                    <name>host</name>
                    <value>localhost</value>
                </Parameter>
                <Parameter>
                    <name>port</name>
                    <value>5432</value>
                </Parameter>
                <Parameter>
                    <name>database</name>
                    <value>progetto</value>
                </Parameter>
                <Parameter>
                        <name>schema</name>
                        <value>public</name>
                </Parameter>
                <Parameter>
                    <name>user</name>
                    <value>michele</value>
                </Parameter>
                <Parameter>
                    <name>password</name>
                    <value>miapwd</value>
                </Parameter>
            </parameters>
        </DataStore>
    </sourceDataStores>
    <targetTypes>
        <FeatureType>
            <schemaUri>nc.xsd</schemaUri>
        </FeatureType>
    </targetTypes>
    <typeMappings>
        <FeatureTypeMapping>
            <sourceDataStore>datastoreNC</sourceDataStore>
            <sourceType>p_giunzione_stradale</sourceType>
            <targetElement>nc:Giunzione_stradale</targetElement>
            <attributeMappings>
                <AttributeMapping>
                    <targetAttribute>
                        nc:UUID
                    </targetAttribute>
                    <idExpression>
                        <OCQL>classid</OCQL>
                    </idExpression>
                </AttributeMapping>
                <AttributeMapping>
                    <targetAttribute>
                        nc:Posizione
                      </targetAttribute>
                    <sourceExpression>
                        <OCQL>posizione</OCQL>
                    </sourceExpression>
                </AttributeMapping>
            </attributeMappings>
        </FeatureTypeMapping>
    </typeMappings>
</as:AppSchemaDataAccess>
  • Show us the nc_giunzione_stradale.xml file contents? – Andrea Aime Mar 16 '17 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.