You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2014/04/16 02:20:18 UTC
[jira] [Work started] (KARAF-2913) JAAS JDBCBackingEngine has the
wrong condition to iterate results, no users are returned
[ https://issues.apache.org/jira/browse/KARAF-2913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on KARAF-2913 started by Freeman Fang.
> JAAS JDBCBackingEngine has the wrong condition to iterate results, no users are returned
> ----------------------------------------------------------------------------------------
>
> Key: KARAF-2913
> URL: https://issues.apache.org/jira/browse/KARAF-2913
> Project: Karaf
> Issue Type: Bug
> Components: karaf-security
> Affects Versions: 3.0.0
> Reporter: Mike Hummel
> Assignee: Freeman Fang
>
> 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()) {
--
This message was sent by Atlassian JIRA
(v6.2#6252)