[Mapbender-users] connecting a database

Patrick Meis Meis at stadt-muenster.de
Tue Mar 8 02:55:57 PST 2016


Hey Astrid,

i checked the log file and i get this error message whenenver i run an adress search:

[2016-03-08 10:32:00] request.CRITICAL: Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "You have requested a non-existent service "doctrine.dbal.search_db_connection". Did you mean this: "doctrine.dbal.default_connection"?" at /var/www/mapbender3/app/bootstrap.php.cache line 2027 {"exception":"[object] (Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException(code: 0): You have requested a non-existent service \"doctrine.dbal.search_db_connection\". Did you mean this: \"doctrine.dbal.default_connection\"? at /var/www/mapbender3/app/bootstrap.php.cache:2027)"} []


"You have requested a non-existent service "doctrine.dbal.search_db_connection"  
 -   I'm not quite sure what this means, whether my database cannot be connected, or if I did something wrong in the search router configuration...


This is what I wrote in my search routerconfiguration field:

class: Mapbender\CoreBundle\Component\SQLSearchEngine
class_options:
    connection: search_db
    relation: ADRESSE_GEOJSON_UTM
    attributes:
        - STR_NAME
        - HSNR_GES
    geometry_attribute: GEOM
form:
    STR_NAME:
        type: text
        options:
            required: true
            label: Strasse
            attr:
                data-autocomplete: 'on'
    HSNR_GES:
        type: text
        options:
            required: false
            label: Hausnummer
            attr:
                data-autocomplete: 'on'
results:
    view: table
    count: true
    headers:
        STR_NAME: Straße
        HSNR_GES: Hausnummer
    callback:
        event: click
        options:
            buffer: 1000
            minScale: null
            maxScale: null


STR_NAME and HSNR_GES and GEOM are attributes of the table ADRESSEN_GEOJSON_UTM
In the field GEOM I have geometry encoded in geojson specification. 

Can you please try to help me again?

Thanks
Patrick
 



-----Ursprüngliche Nachricht-----
Von: Mapbender_users [mailto:mapbender_users-bounces at lists.osgeo.org] Im Auftrag von Astrid Emde
Gesendet: Montag, 7. März 2016 17:18
An: Mapbender User List
Betreff: Re: [Mapbender-users] connecting a database

Hi Patrick,

your configuration looks ok.

If the database is not needed in an application the connection is not 
used.

http://doc.mapbender3.org/en/bundles/Mapbender/CoreBundle/elements/search_router.html

You can configure the searchrouter an will find out wether the 
connection works.

You find an error in your log messages (F12) or in the log-file if the 
connection fails.

Use app_dev.php and have a look in the dev-logfile.
http://localhost/mapbender3/app_dev.php

Best regards Astrid Emde


Am 2016-03-07 16:41, schrieb Patrick Meis:
> Hello,
> 
> I'm just new to mapbender and i am currently trying to configure an
> address-search
> 
> in mapbender3 via the "search router".
> 
> So far I am only getting "No results found" whenever I enter a query.
> 
> What I would like to do now is checking if my database connection to
> my "search_db"
> 
> is working.
> 
> From my config.yml:
> 
> ´
> 
> and from my parameters.yml:
> 
> I am using mapbender v3.0.5.0. and I try to connect to an Oracle DB:
> 
> Now is there an easy way to test the connection I defined?
> 
> Regards
> 
> Patrick
> 
> 
> _______________________________________________
> Mapbender_users mailing list
> Mapbender_users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_users

-- 
Mit freundlichen Grüßen

Astrid Emde
GIS-Consultant

-----------------------------------
Aufwind durch Wissen!
Qualifizierte OpenSource-Schulungen
bei der www.foss-academy.eu
-----------------------------------

  Astrid Emde
  WhereGroup GmbH & Co.KG
  Eifelstraße 7
  53119 Bonn
  Germany

  Fon: +49(0)228 90 90 38 - 19
  Fax: +49(0)228 90 90 38 - 11

  astrid.emde at wheregroup.com
  www.wheregroup.com

  Folgen Sie der WhereGroup auf twitter: 
http://twitter.com/WhereGroup_com

Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
-------------------------------
  pgp-public key:
  http://pgp.mit.edu:11371/pks/lookup?search=0x06DA52D72D515284
  Signierte und/oder verschlüsselte Nachrichten sind sehr willkommen
  Signed and/or encrypted mail is highly appreciated
_______________________________________________
Mapbender_users mailing list
Mapbender_users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapbender_users


More information about the Mapbender_users mailing list