Description
In the library org.apache.karaf.jaas.modules in
JDBCBackingEngine in line 195 is the following code:
while (!usersResultSet.next()) {
this should be
while (usersResultSet.next()) {
to iterate the results of the query.
An empty USERS table causes the following error - as estimated:
java.sql.SQLException: Illegal operation on empty result set.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:982)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:927)
at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:841)
at com.mysql.jdbc.ResultSetImpl.getStringInternal(ResultSetImpl.java:5650)
at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5570)
at com.mysql.jdbc.ResultSetImpl.getString(ResultSetImpl.java:5610)
at org.apache.karaf.jaas.modules.jdbc.JDBCBackingEngine.listUsers(JDBCBackingEngine.java:196)
at org.apache.karaf.jaas.command.ListUsersCommand.doExecute(ListUsersCommand.java:59)
at org.apache.karaf.jaas.command.ListUsersCommand.doExecute(ListUsersCommand.java:54)
at org.apache.karaf.shell.console.AbstractAction.execute(AbstractAction.java:33)
...
You have the same issue in line 245:
while (!rolesResultSet.next()) {