Ryan,

I can't see anything obvious. Can we please see the full stack trace 
from your logs?

Kind regards,
Ben.

On 30/05/13 18:35, Ryan Moody wrote:
> Hello,
>
> I would be very grateful if someone could assist me with the following
> problem.
>
> I have GeoServer 2.3.2 running on my local machine, and have been able
> to get it to publish a layer using a PostGIS database as the data store,
> which is also running on my local machine.
>
> The working datastore.xml is as follows:
>
> = = =
>
> <dataStore>
>
>    <id>DataStoreInfoImpl--6d343d73:13ef4ab8649:-8000</id>
>
>    <name>MyName</name>
>
>    <description>MyDescription</description>
>
>    <type>PostGIS</type>
>
>    <enabled>true</enabled>
>
>    <workspace>
>
>      <id>WorkspaceInfoImpl-39154e6b:13ef0ec49f8:-8000</id>
>
>    </workspace>
>
>    <connectionParameters>
>
>      <entry key="port">5432</entry>
>
>      <entry key="Connection timeout">20</entry>
>
>     <entry key="passwd"> MyPassword </entry>
>
>      <entry key="dbtype">postgis</entry>
>
>      <entry key="host">localhost</entry>
>
>      <entry key="validate connections">true</entry>
>
>      <entry key="encode functions">false</entry>
>
>      <entry key="max connections">10</entry>
>
>      <entry key="database">MyDatabase </entry>
>
>      <entry key="namespace">MyNamespace </entry>
>
>      <entry key="schema">public</entry>
>
>      <entry key="Loose bbox">true</entry>
>
>      <entry key="Expose primary keys">false</entry>
>
>      <entry key="fetch size">1000</entry>
>
>      <entry key="Max open prepared statements">50</entry>
>
>      <entry key="preparedStatements">false</entry>
>
>      <entry key="Estimated extends">true</entry>
>
>      <entry key="user">MyUser</entry>
>
>      <entry key="min connections">1</entry>
>
>    </connectionParameters>
>
>    <__default>false</__default>
>
> </dataStore>
>
> = = =
>
> I am now trying to reconfigure the data store to use GeoServer’s
> app-schema plugin, referring to an XML mapping file that provides the
> PostGIS database connection details.
>
> The modified datastore.xml is as follows:
>
> = = =
>
> <dataStore>
>
>    <id> DataStoreInfoImpl--6d343d73:13ef4ab8649:-8000</id>
>
>    <name> MyName </name>
>
>    <description> MyDescription </description>
>
>    <type>PostGIS</type>
>
>    <enabled>true</enabled>
>
>    <workspace>
>
>      <id> WorkspaceInfoImpl-39154e6b:13ef0ec49f8:-8000</id>
>
>    </workspace>
>
>    <connectionParameters>
>
>       <entry key="namespace">MyNamespace</entry>
>
>       <entry key="url">file:workspaces/path/to/MyMappingFile.xml</entry>
>
>       <entry key="dbtype">app-schema</entry>
>
>    </connectionParameters>
>
>    <__default>false</__default>
>
> </dataStore>
>
> = = =
>
> And the XML mapping file I have defined is as follows:
>
> = = =
>
> <?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-instance";
>
>      xsi:schemaLocation="http://www.geotools.org/app-schema
> AppSchemaDataAccess.xsd">
>
>      <namespaces>
>
>                  (…some namespaces…)
>
>     </namespaces>
>
>      <sourceDataStores>
>
>                  <DataStore>
>
>                                  <id>datastore</id>
>
>                                  <parameters>
>
>                                                  <Parameter>
>
>
> <name>dbtype</name>
>
>
> <value>postgis</value>
>
>                                                  </Parameter>
>
>                                                  <Parameter>
>
>
> <name>host</name>
>
>
> <value>localhost</value>
>
>                                                  </Parameter>
>
>                                                  <Parameter>
>
>
> <name>port</name>
>
>
> <value>5432</value>
>
>                                                  </Parameter>
>
>                                                  <Parameter>
>
>
> <name>database</name>
>
>
> <value>MyDatabase </value>
>
>                                                  </Parameter>
>
>                                                  <Parameter>
>
>
> <name>user</name>
>
>
> <value>MyUser </value>
>
>                                                  </Parameter>
>
>                                                  <Parameter>
>
>
> <name>passwd</name>
>
>
> <value>MyPassword</value>
>
>                                                  </Parameter>
>
>                                  </parameters>
>
>                                  </DataStore>
>
>                  </sourceDataStores>
>
>                  <targetTypes>
>
>                                  (…some target types…)
>
>                  </targetTypes>
>
>      <typeMappings>
>
>                  (…some type mappings…)
>
>      </typeMappings>
>
> </as:AppSchemaDataAccess>
>
> = = =
>
> Unfortunately, when I restart GeoServer, I get a Java exception
> “Connection refused: connect” when it attempts to connect to my data
> source. I have confirmed that I am able to connect to my PostGIS
> database via pgAdmin, and I have set listen_addresses=’*’ in the
> postgresql.conf file. A Google search suggested to check my firewall
> settings, but the firewall shouldn’t be an issue as GeoServer and the
> PostGIS database are both running on my local machine. I have
> double-checked that the datastore parameters in the XML mapping file,
> especially the user and passwd, are correct.
>
> If anyone can suggest how I may be able to address this issue, I’d be
> most appreciative :-)
>
> Regards,
>
> Ryan
>
>
>
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
>
>
>
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>

-- 
Ben Caradoc-Davies <[email protected]>
Software Engineer
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to