So, I'm still not exactly sure what's causing your issue, but I did notice
that the prepared statement (selectReadable) in the logs you uploaded does
indeed contain 6 parameters:

SELECT guacamole_connection_group.connection_group_id,
       connection_group_name,
       parent_id,
       type,
       max_connections,
       max_connections_per_user,
       enable_session_affinity
FROM   guacamole_connection_group
       JOIN guacamole_connection_group_permission
         ON guacamole_connection_group_permission.connection_group_id =
            guacamole_connection_group.connection_group_id
WHERE  guacamole_connection_group.connection_group_id IN ( ? )
       AND user_id = ?
       AND permission = 'READ';

SELECT parent_id,
       guacamole_connection_group.connection_group_id
FROM   guacamole_connection_group
       JOIN guacamole_connection_group_permission
         ON guacamole_connection_group_permission.connection_group_id =
            guacamole_connection_group.connection_group_id
WHERE  parent_id IN ( ? )
       AND user_id = ?
       AND permission = 'READ';

SELECT parent_id,
       guacamole_connection.connection_id
FROM   guacamole_connection
       JOIN guacamole_connection_permission
         ON guacamole_connection_permission.connection_id =
            guacamole_connection.connection_id
WHERE  parent_id IN ( ? )
       AND user_id = ?
       AND permission = 'READ';

It seems like maybe MyBatis is having a hard time mapping the two
parameters provided into the 6 parameters in the prepared statement. It
looks like having multiple selects in a single prepared statement trips it
up. Maybe a bug in MyBatis that only manifests when talking to SQLite?

I'm curious - have you tried using either the MySQL or
PostgreSQL extensions? MyBatis should just be using JDBC to prepare
statements; I don't see how it would matter what's on the other end. Maybe
I'm missing something obvious.

James

On Tue, Jan 24, 2017 at 12:56 PM, David Landry <[email protected]> wrote:

> Switching to the dev mailing list.
>
> On Mon, Jan 23, 2017 at 6:50 PM James Muehlner <
> [email protected]>
> wrote:
>
> Hey David, this would probably be more appropriate in dev than user, I
> would think.
>
> I had a look at your code, and can't see anything wrong that would cause
> that error. Do you have the full stacktrace available?
>
>
> I didn't find the stacktrace very helpful, but I've uploaded an example
> catalina.out file here
> <https://bitbucket.org/apporto/incubator-guacamole-
> client/downloads/single_connection_group.sql>
> .
>
> In this log, I started with a DB that only had an admin user. I did the
> following:
>
>    1. Started Tomcat
>    2. Loaded Guac in the browser
>    3. Logged in
>    4. Navigated to "Settings" and then "Connections"
>    5. Added a new connection group called "Test"
>
> The change is committed to the SQLite file, but Guac stops working for any
> page that should show a list of connections and connection groups. If I
> remove the group from the database manually, it works again.
>
> The same thing happens if I start with a fresh DB and create a connection.
>
> Any ideas?
> --
>
> ---
>
> David Landry
>

Reply via email to