Opened 7 years ago

Closed 6 years ago

#917 closed defect (fixed)

mapfish demo not working

Reported by: kalxas Owned by: live-demo@…
Priority: normal Milestone: OSGeoLive6.5
Component: OSGeoLive Keywords: 6.5
Cc: live-demo@…


Trying to access http://localhost/mapfishsample/osgeolive/wsgi/ gives an error.

Change history (13)

comment:1 Changed 7 years ago by kalxas

Priority: criticalmajor

comment:2 Changed 7 years ago by darkblueb

confirmed in beta1

comment:3 Changed 7 years ago by kalxas

Priority: majorcritical

I confirm this too for beta1. Since we are moving to beta I elevate the priority of this...

comment:4 Changed 7 years ago by kalxas

Resolution: fixed
Status: newclosed

fixed in rev 8121. Thanks to bbinet.

comment:5 Changed 6 years ago by kalxas

Keywords: 6.5 alpha 4 added; 6.0 removed
Milestone: OSGeoLive6.5
Resolution: fixed
Status: closedreopened

I am getting a 500 error in 6.5 alpha4. Seems to be broken again.

comment:6 Changed 6 years ago by kalxas

still error 500 in 6.5 alpha 5

comment:7 Changed 6 years ago by kalxas

Keywords: alpha 4 removed

After a bit of searching, I think that our problem is that the Mapfish installation is not PostGIS 2.0 ready:

It fails to create properly the database needed for the sample application to work.

log file: * /PICKED VERSIONS * createlang: language "plpgsql" is already installed in database "v2.2_mapfishsample" Abort: cannot find postgis sql file. --2013-01-04 01:40:59--

comment:8 Changed 6 years ago by kalxas

patch committed in [9533]

comment:9 Changed 6 years ago by kalxas

Priority: criticalmajor

after testing [9533] the application now loads fine.

There is a pink tile issue left, because http://localhost/mapfishsample/osgeolive/wsgi/pois service fails to work.

It can be reproduced using this iso:

comment:10 Changed 6 years ago by kalxas

I used

#cd /usr/local/lib/mapfish/MapfishSample
#./buildout/bin/paster serve development.ini

to get into a debugging mode and then navigated to http://localhost/mapfishsample/osgeolive/wsgi/pois This gives me the following error:

File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/WebError-0.10.3-py2.7.egg/weberror/', line 431 in respond
  app_iter = self.application(environ, detect_start_response)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Beaker-1.5.4-py2.7.egg/beaker/', line 152 in __call__
  return self.wrap_app(environ, session_start_response)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Routes-1.12.3-py2.7.egg/routes/', line 131 in __call__
  response =, start_response)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Pylons-1.0-py2.7.egg/pylons/', line 107 in __call__
  response = self.dispatch(controller, environ, start_response)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Pylons-1.0-py2.7.egg/pylons/', line 312 in dispatch
  return controller(environ, start_response)
File '/usr/local/lib/mapfish/MapfishSample/mapfishsample/lib/', line 18 in __call__
  return WSGIController.__call__(self, environ, start_response)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Pylons-1.0-py2.7.egg/pylons/controllers/', line 211 in __call__
  response = self._dispatch_call()
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Pylons-1.0-py2.7.egg/pylons/controllers/', line 162 in _dispatch_call
  response = self._inspect_call(func)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Pylons-1.0-py2.7.egg/pylons/controllers/', line 105 in _inspect_call
  result = self._perform_call(func, args)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Pylons-1.0-py2.7.egg/pylons/controllers/', line 57 in _perform_call
  return func(**args)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/FormAlchemy-1.4-py2.7.egg/formalchemy/ext/pylons/', line 267 in index
  page = self.get_page()
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/FormAlchemy-1.4-py2.7.egg/formalchemy/ext/pylons/', line 173 in get_page
  return Page(collection, **options)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/WebHelpers-1.2-py2.7.egg/webhelpers/', line 407 in __init__
  self.item_count = len(self.collection)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/WebHelpers-1.2-py2.7.egg/webhelpers/', line 266 in __len__
  return self.obj.count()
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/', line 2177 in count
  return self.from_self(col).scalar()
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/', line 1827 in scalar
  ret =
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/', line 1796 in one
  ret = list(self)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/', line 1839 in __iter__
  return self._execute_and_instances(context)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/', line 1854 in _execute_and_instances
  result = conn.execute(querycontext.statement, self._params)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/engine/', line 1399 in execute
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/engine/', line 1532 in _execute_clauseelement
  compiled_sql, distilled_params
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/engine/', line 1640 in _execute_context
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/engine/', line 1633 in _execute_context
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/engine/', line 325 in do_execute
  cursor.execute(statement, parameters)
ProgrammingError: (ProgrammingError) column poi_osm.the_geom does not exist
LINE 2: FROM (SELECT ST_AsBinary(poi_osm.the_geom) AS poi_osm_the_ge...
 'SELECT count(*) AS count_1 \nFROM (SELECT ST_AsBinary(poi_osm.the_geom) AS poi_osm_the_geom, poi_osm.gid AS poi_osm_gid, AS poi_osm_id, poi_osm.rating AS poi_osm_rating, AS poi_osm_name, poi_osm.code_dept AS poi_osm_code_dept, poi_osm.type_desc AS poi_osm_type_desc, poi_osm.type AS poi_osm_type, poi_osm.theme AS poi_osm_theme, poi_osm.geom AS poi_osm_geom \nFROM poi_osm) AS anon_1' {}

Then I tried to fix this issue in [9534] by changing the geometry column in the file layers.ini The osm_poi table in postgis has a geometry column named "geom" instead of "the_geom". I am not sure if this is a Pylons specific thing, but changing the column name in layers.ini and running the buildout again still produces the same error. Is the geometry column name hard-coded somewhere?

comment:11 Changed 6 years ago by kalxas

I have traced this back to /usr/local/lib/mapfish/MapfishSample/mapfishsample/model/ where GeometryTableMixIn? is called from mapfish.sqlalchemygeom It seems this function should be tracing automatically the geometry column and assign this to an alias "the_geom". This seems to fail for some reason, perhaps Mapfish and/or GeoAlchemy? do not support PostGIS 2.0 yet...

comment:12 Changed 6 years ago by kalxas

Priority: majornormal

Fixed in [9539]. To be confirmed on the next build.

comment:13 Changed 6 years ago by kalxas

Resolution: fixed
Status: reopenedclosed

confirmed in 6.5 beta1

Note: See TracTickets for help on using tickets.