[Mapbender-users] Problem using the Search Router (can't find table)

Abrabacabra abrabacabra at openmailbox.org
Mon Jul 3 10:22:19 PDT 2017


Thank you Astrid.

Although I am still missing something and I can't spot it...

It can find the connection, but even if the credentials and permissions 
are correct, I still get the "No such table" error. In fact, even if I 
put incorrect information in parameters.yml (such as not wrong database 
driver, wrong adress, wrong port, wrong user, wrong password, etc), it 
raises the "No such table" error.

I included the links to the configuration files

*config.yml*:   https://paste.debian.net/hidden/317e0f4c/
*parameters.yml*: https://paste.debian.net/974572/
*SearchRouter configuration*: https://paste.debian.net/974573/


On 2017-07-03 11:46 AM, Astrid Emde wrote:
> Hello Patrice,
>
> Am 2017-07-01 16:15, schrieb Patrice:
>> I am trying to use the Search Router bundle in an application, but it
>> fails.
>>
>> At first, it could not find the database, so I have setup the database
>> in config.yml and parameters.yml.
>>
>> Now, it can't find the table to search in.
>>
>> Here is the error in prod.log:
>>
>> [2017-07-01 14:04:54] request.CRITICAL: Uncaught PHP Exception
>> Doctrine\DBAL\DBALException: "An exception occurred while executing
>> 'SELECT t.objectid, t.code_proje, ST_AsGeoJSON(geom) as geom FROM
>> data.aires_prot_priv t WHERE LOWER(t.code_proje) LIKE LOWER(?)' with
>> params ["%tabi%"]:  SQLSTATE[HY000]: General error: 1 no such table:
>> data.aires_prot_priv" at
>> C:\ms4w\apps\mapbender3-3.0.5.3\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php 
>>
>> line 91 {"exception":"[object] (Doctrine\\DBAL\\DBALException(code:
>> 0): An exception occurred while executing 'SELECT t.objectid,
>> t.code_proje, ST_AsGeoJSON(geom) as geom FROM data.aires_prot_priv t
>> WHERE LOWER(t.code_proje) LIKE LOWER(?)' with params
>> [\"%tabi%\"]:\n\nSQLSTATE[HY000]: General error: 1 no such table:
>> data.aires_prot_priv at
>> C:\\ms4w\\apps\\mapbender3-3.0.5.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\DBALException.php:91, 
>>
>> PDOException(code: HY000): SQLSTATE[HY000]: General error: 1 no such
>> table: data.aires_prot_priv at
>> C:\\ms4w\\apps\\mapbender3-3.0.5.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Connection.php:691)"} 
>>
>> []
>>
>> The table "aires_prot_priv" does exist in the "data" schema and I have
>> the necessary right to read from it (made the test with pgAdmin using
>> the same credentials as specified in parameters.yml).
>>
>> However, as my database and schema are already filled with the data I
>> want to use, I didn't create the database and schema using
>> "doctrine:database:create". Is this mandatory in order to use the
>> search router?
>
> No - this is not mandatory.
>
>
>> What am I missing?
>
> It looks like your database configuration is not right or your 
> configuration.
> You should ceck this again in parameters.yml and config.yml.
>
> https://doc.mapbender3.org/en/book/database.html#using-multiple-databases
>
> In the searchRouter configuration you have to use the name that you 
> defined for your second database
>
> Hope that helps
>
> Astrid
>
>> _______________________________________________
>> Mapbender_users mailing list
>> Mapbender_users at lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/mapbender_users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20170703/9d4c52a4/attachment-0001.html>


More information about the Mapbender_users mailing list