Opened 12 years ago

Closed 11 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@…

Description

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

Change history (13)

comment:1 by kalxas, 12 years ago

Priority: criticalmajor

comment:2 by darkblueb, 12 years ago

confirmed in beta1

comment:3 by kalxas, 12 years ago

Priority: majorcritical

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

comment:4 by kalxas, 12 years ago

Resolution: fixed
Status: newclosed

fixed in rev 8121. Thanks to bbinet.

comment:5 by kalxas, 11 years ago

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 by kalxas, 11 years ago

still error 500 in 6.5 alpha 5

comment:7 by kalxas, 11 years ago

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: http://www.mapfish.org/svn/mapfish/sample/trunk/geodata/create_database.bash.in

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-- http://www.mapfish.org/downloads/foss4g_livedvd/tomcat-server.xml.patch

comment:8 by kalxas, 11 years ago

patch committed in [9533]

comment:9 by kalxas, 11 years ago

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: http://aiolos.survey.ntua.gr/gisvm/dev/osgeo-live-debug-build9533.iso

comment:10 by kalxas, 11 years ago

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:

URL: http://127.0.0.1:5000/admin/Poi/models
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/WebError-0.10.3-py2.7.egg/weberror/evalexception.py', 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/middleware.py', 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/middleware.py', line 131 in __call__
  response = self.app(environ, start_response)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Pylons-1.0-py2.7.egg/pylons/wsgiapp.py', 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/wsgiapp.py', line 312 in dispatch
  return controller(environ, start_response)
File '/usr/local/lib/mapfish/MapfishSample/mapfishsample/lib/base.py', 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/core.py', line 211 in __call__
  response = self._dispatch_call()
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/Pylons-1.0-py2.7.egg/pylons/controllers/core.py', 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/core.py', 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/core.py', 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/controller.py', 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/controller.py', line 173 in get_page
  return Page(collection, **options)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/WebHelpers-1.2-py2.7.egg/webhelpers/paginate.py', 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/paginate.py', 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/query.py', 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/query.py', line 1827 in scalar
  ret = self.one()
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/orm/query.py', 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/query.py', 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/query.py', 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/base.py', line 1399 in execute
  params)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py', 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/base.py', line 1640 in _execute_context
  context)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/engine/base.py', line 1633 in _execute_context
  context)
File '/usr/local/lib/mapfish/MapfishSample/buildout/eggs/SQLAlchemy-0.7.2-py2.7-linux-x86_64.egg/sqlalchemy/engine/default.py', 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, poi_osm.id AS poi_osm_id, poi_osm.rating AS poi_osm_rating, poi_osm.name 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 by kalxas, 11 years ago

I have traced this back to /usr/local/lib/mapfish/MapfishSample/mapfishsample/model/init.py 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 by kalxas, 11 years ago

Priority: majornormal

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

comment:13 by kalxas, 11 years ago

Resolution: fixed
Status: reopenedclosed

confirmed in 6.5 beta1

Note: See TracTickets for help on using tickets.