Opened 16 years ago

Closed 16 years ago

#666 closed defect (invalid)

PostGIS FDO: connection problem with PostgreSQL+PostGIS

Reported by: ssimoss Owned by:
Priority: medium Milestone:
Component: Server Version: 2.0.1
Severity: major Keywords:
Cc: External ID:

Description

I'm running MGOS 2.0.1 and fdo-3.3.0 in Ubuntu 7.10, and I cannot connect to PostGIS using nor PostGIS FDO neither OGR FDO.

Mapguide Studio 2009 crashes using PostGIS datasource ("verify connection" reports no errors). Maestro complains:

Errore del server remoto: (559) MgConnectionFailedException.:

Cannot establish connection. Exception occurred in method MgServerConnection.Open at line 106 in file Services/ServerConnection.cpp

Change History (3)

comment:1 by zspitzer, 16 years ago

Can you post your featureSource definition?

comment:2 by ssimoss, 16 years ago

FDO::PostGIS

This is the dataconnection xml (using maestro) with OSGeo.PostGIS provider:

<?xml version="1.0" encoding="utf-8"?>
<FeatureSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="FeatureSource-1.0.0.xsd">
  <Provider>OSGeo.PostGIS</Provider>
  <Parameter>
    <Name>Username</Name>
    <Value>demo</Value>
  </Parameter>
  <Parameter>
    <Name>Password</Name>
    <Value>demo</Value>
  </Parameter>
  <Parameter>
    <Name>Service</Name>
    <Value>demo@10.1.1.150:5432</Value>
  </Parameter>
  <Parameter>
    <Name>DataStore</Name>
    <Value>public</Value>
  </Parameter>
</FeatureSource>

test connection reports no error, but when I try to use this dataconnection with a new layer I get:

MgInvalidStreamHeaderException.: Invalid stream header exception.
Exception occurred in method MgCommand.GetResponse at line 152 in file Service/Command.cpp

and mgos 2 crashes with:

$ sudo /usr/local/mapguideopensource/server/bin/mgserver.sh
/usr/local/mapguideopensource/server/bin ~
Running the server interactively as an application instead of as a service.

(3018266304) Server starting...
(3018266304) PROJ4 Coordinate System Library
(3018266304) Server started.
terminate called after throwing an instance of 'FdoCommandException*'
/usr/local/mapguideopensource/server/bin/mgserver.sh: line 7:  4941 Aborted                 (core dumped) ./mgserver run
~

FDO::OGR

If I try to use OSGeo.OGR provider, which works (slow) with mgos 1.2, it don't pass test connection:

Errore del server remoto: (559) MgFdoException.: 
An exception occurred in FDO component.
Connect failed: 
Exception occurred in method

and server console complains:

$ sudo /usr/local/mapguideopensource/server/bin/mgserver.sh 
/usr/local/mapguideopensource/server/bin ~
Running the server interactively as an application instead of as a service.

(3018061504) Server starting...
(3018061504) PROJ4 Coordinate System Library
(3018061504) Server started.
(2691959696) An exception occurred in FDO component.
Connect failed: 
Exception occurred in method MgFdoConnectionManager.Open at line 858 in file FdoConnectionManager.cpp

Now if I retry OSGeo.PostGIS test connection I get the #666 error message.

comment:3 by jbirch, 16 years ago

Milestone: 2.1
Resolution: invalid
Status: newclosed

This is most likely a configuration problem (Postgresql library locations?) and would be better dealt with on the mailing lists.

Note: See TracTickets for help on using tickets.