[Mapbender-users] Mapbender3: Searchrouter/additional database connection
Axel Schaefer
axel.schaefer at wheregroup.com
Mon Jan 16 09:01:37 PST 2017
Hi Uwe.
After changes in parameters.yml and config.yml you have to clear the
Mapbender cache directory.
The contents in: <mapbender>/(application)/app/cache.
Not the cache-directory itself, but the contents of the directory.
Maybe that's the missing point. Your configuration looks ok.
Axel
Uwe Seher writes:
> Hello again!
>
> I an trying to set up a search function in my application with the search
> router element.
> For this i had setup an additional database connection following teh
> desctioption in the documentation with the following parameters:
>
> parameters.yml:
>
> parameters:
> # Default-Datenbank
> database_driver: pdo_pgsql
> database_host: 192.168.1.3
> database_port: 5432
> database_name: mapbender3
> database_path: ~
> database_user: mapbender
> database_password: xxxx
>
> # Rhein-Datenbank
> database1_driver: pdo_pgsql
> database1_host: 192.168.1.3
> database1_port: 5432
> database1_name: rhein
> database1_path: ~
> database1_user: gdi_user
> database1_password: xxxx
>
> config.yml:
>
> doctrine:
> dbal:
> default_connection: default
> connections:
> default:
> driver: %database_driver%
> host: %database_host%
> port: %database_port%
> dbname: %database_name%
> path: %database_path%
> user: %database_user%
> password: %database_password%
> charset: UTF8
> logging: %kernel.debug%
> profiling: %kernel.debug%
> rhein:
> driver: %database1_driver%
> host: %database1_host%
> port: %database1_port%
> dbname: %database1_name%
> path: %database1_path%
> user: %database1_user%
> password: %database1_password%
> charset: UTF8
> logging: %kernel.debug%
> profiling: %kernel.debug%
> orm:
> auto_generate_proxy_classes: %kernel.debug%
> auto_mapping: true
>
> The search-dialog parameters look like this:
>
> class: Mapbender\CoreBundle\Component\SQLSearchEngine
> class_options:
> connection: rhein
> relation: mrh_1509.engstellen
> attributes:
> - objectid
> - name
> geometry_attribute: geom
> form:
> name:
> type: choice
> options:
> empty_value: 'Bitte wählen'
> required: true
> choices:
> 1: 'Reg.Bereich 1'
> 2: 'Reg.Bereich 2'
> 3: 'Reg.Bereich 3'
> 4: 'Reg.Bereich 3'
> 5: 'Reg.Bereich 5'
> 6: 'Reg.Bereich 6'
> 7: 'Reg.Bereich 6'
> results:
> view: table
> count: true
> headers:
> objectid: ID
> name: Name
> callback:
> event: click
> options:
> buffer: 10
> minScale: null
> maxScale: null
>
> The dialog itself works fine, but no results are found. In the logfile i
> found this entry:
>
> [2017-01-13 08:45:04] request.CRITICAL: Uncaught PHP Exception
> Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException:
> "You have requested a non-existent service
> "doctrine.dbal.rhein_connection". Did you mean this:
> "doctrine.dbal.default_connection"?" at
> /srv/www/htdocs/mapbender3-3.0.5.3/app/bootstrap.php.cache line 2063
> {"exception":"[object]
> (Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException(code:
> 0): You have requested a non-existent service
> \"doctrine.dbal.rhein_connection\". Did you mean this:
> \"doctrine.dbal.default_connection\"? at
> /srv/www/htdocs/mapbender3-3.0.5.3/app/bootstrap.php.cache:2063)"} []
>
> So i think, the second database connection is not etablished. If i use the
> parameters with other applications or psql everything works. Restarting
> apache has no effect. It would be great if someone has a hint what i missed
> here.
>
> Thanks in advance
>
> Uwe Seher
> _______________________________________________
> Mapbender_users mailing list
> Mapbender_users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_users
--
Axel Schaefer
WhereGroup GmbH & Co. KG
Eifelstraße 7
53119 Bonn
Germany
Fon: +49 (0)228 / 90 90 38 - 23 (neue Durchwahl!)
Fax: +49 (0)228 / 90 90 38 - 11
axel.schaefer at wheregroup.com
www.meldemax.com
www.wheregroup.com
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
More information about the Mapbender_users
mailing list