Switched to the dev mailing list. I haven't seen any posts on that list since I signed up, so let me know if it didn't go through :)
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? > > James > > On Mon, Jan 23, 2017 at 1:13 PM, David Landry <[email protected]> wrote: > > I created an SQLite JDBC auth extension by using Guacamole's JDBC base > source. I copied the MySQL extension, changed references from MySQL to > SQLite, and translated some of the MySQL-specific queries to work with > SQLite. > > My extension only partially works. > > Two queries for Connections and ConnectionGroups throw an > ArrayIndexOutOfBoundsException ('select' and 'selectReadable'). I've > validated that the query itself is valid by manually filling in the > parameters and querying the database. I think MyBatis is mixing up how many > parameters the query should have. The 'selectReadable' call expects two > parameters: the user ID and a collection of identifiers. Those two params > are used three places in the query. When I stepped through the code, I saw > the PreparedStatement expected 6 parameters. The exception is thrown when > the code attempts to fill in a third nonexistent parameter. > > Can anyone point me in the right direction? > > You can see the code here > <https://bitbucket.org/apporto/incubator-guacamole-client/src/f197907dc2e26f4e9393f78f3fb06014f01ddfbd/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-sqlite/?at=sqlite>. > I also uploaded artifacts to make it easier for someone to give it a test > run: > > - SQLite JDBC connector - > > https://bitbucket.org/apporto/incubator-guacamole-client/downloads/sqlite-jdbc-3.16.1.jar > - SQLite auth extension - > > https://bitbucket.org/apporto/incubator-guacamole-client/downloads/guacamole-auth-jdbc-sqlite-0.9.10-incubating.jar > - A test DB with a single ConnectionGroup (move it to > /tmp/guac_test.sqlite) - > > https://bitbucket.org/apporto/incubator-guacamole-client/downloads/guac_test.sqlite > - guacamole.properties file (there are some bogus settings required > right now) - > > https://bitbucket.org/apporto/incubator-guacamole-client/downloads/guacamole.properties > > > -- > > --- > > David Landry > > > -- --- David Landry
