<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Thank you Astrid.</p>
<p>Although I am still missing something and I can't spot it... <br>
</p>
<p>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. <br>
</p>
<p>I included the links to the configuration files<br>
</p>
<b>config.yml</b>: <a class="moz-txt-link-freetext" href="https://paste.debian.net/hidden/317e0f4c/">https://paste.debian.net/hidden/317e0f4c/</a><br>
<b>parameters.yml</b>: <a class="moz-txt-link-freetext" href="https://paste.debian.net/974572/">https://paste.debian.net/974572/</a><br>
<b>SearchRouter configuration</b>: <a class="moz-txt-link-freetext" href="https://paste.debian.net/974573/">https://paste.debian.net/974573/</a><br>
<br>
<br>
<div class="moz-cite-prefix">On 2017-07-03 11:46 AM, Astrid Emde
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:df1c0dd669ecf1e32f4d6352d774141b@wheregroup.com">Hello
Patrice,
<br>
<br>
Am 2017-07-01 16:15, schrieb Patrice:
<br>
<blockquote type="cite">I am trying to use the Search Router
bundle in an application, but it
<br>
fails.
<br>
<br>
At first, it could not find the database, so I have setup the
database
<br>
in config.yml and parameters.yml.
<br>
<br>
Now, it can't find the table to search in.
<br>
<br>
Here is the error in prod.log:
<br>
<br>
[2017-07-01 14:04:54] request.CRITICAL: Uncaught PHP Exception
<br>
Doctrine\DBAL\DBALException: "An exception occurred while
executing
<br>
'SELECT t.objectid, t.code_proje, ST_AsGeoJSON(geom) as geom
FROM
<br>
data.aires_prot_priv t WHERE LOWER(t.code_proje) LIKE LOWER(?)'
with
<br>
params ["%tabi%"]: SQLSTATE[HY000]: General error: 1 no such
table:
<br>
data.aires_prot_priv" at
<br>
C:\ms4w\apps\mapbender3-3.0.5.3\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php
<br>
line 91 {"exception":"[object]
(Doctrine\\DBAL\\DBALException(code:
<br>
0): An exception occurred while executing 'SELECT t.objectid,
<br>
t.code_proje, ST_AsGeoJSON(geom) as geom FROM
data.aires_prot_priv t
<br>
WHERE LOWER(t.code_proje) LIKE LOWER(?)' with params
<br>
[\"%tabi%\"]:\n\nSQLSTATE[HY000]: General error: 1 no such
table:
<br>
data.aires_prot_priv at
<br>
C:\\ms4w\\apps\\mapbender3-3.0.5.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\DBALException.php:91,
<br>
PDOException(code: HY000): SQLSTATE[HY000]: General error: 1 no
such
<br>
table: data.aires_prot_priv at
<br>
C:\\ms4w\\apps\\mapbender3-3.0.5.3\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Connection.php:691)"}
<br>
[]
<br>
<br>
The table "aires_prot_priv" does exist in the "data" schema and
I have
<br>
the necessary right to read from it (made the test with pgAdmin
using
<br>
the same credentials as specified in parameters.yml).
<br>
<br>
However, as my database and schema are already filled with the
data I
<br>
want to use, I didn't create the database and schema using
<br>
"doctrine:database:create". Is this mandatory in order to use
the
<br>
search router?
<br>
</blockquote>
<br>
No - this is not mandatory.
<br>
<br>
<br>
<blockquote type="cite">What am I missing?
<br>
</blockquote>
<br>
It looks like your database configuration is not right or your
configuration.
<br>
You should ceck this again in parameters.yml and config.yml.
<br>
<br>
<a class="moz-txt-link-freetext" href="https://doc.mapbender3.org/en/book/database.html#using-multiple-databases">https://doc.mapbender3.org/en/book/database.html#using-multiple-databases</a>
<br>
<br>
In the searchRouter configuration you have to use the name that
you defined for your second database
<br>
<br>
Hope that helps
<br>
<br>
Astrid
<br>
<br>
<blockquote type="cite">_______________________________________________
<br>
Mapbender_users mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Mapbender_users@lists.osgeo.org">Mapbender_users@lists.osgeo.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapbender_users">https://lists.osgeo.org/mailman/listinfo/mapbender_users</a>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>