The VoltDB package has an example setup called 'voter.' I'm running that on the server and trying to work with it in Java. I am able to create a ResultSet with Statement.executeQuery and "SELECT * FROM voter;" it has the correct columns (PHONE_NUMBER, STATE, and CONTESTANT_NUMBER), but no rows. When I try to get anything from the resultSet, I get the following error:
Exception in thread "main"
java.sql.SQLException: s1000
Caused by: java.lang.RuntimeException: VoltTableRow.advanceRow() must be called to advance to the first row before any access.
I don't see how I'm supposed to use VoltTableRow.advanceRow() in the code, like it says there. I'm also getting the same problem (correct columns, no rows) when I use the provided VoltDB studio setup (which doesn't rely on my Java code at all), with select * from votes giving me three columns and no rows, so I'm thinking it's probably not just a mistake in the Java code, but the relevant code is included below:
Statement jdbcStmt;
String jdbcSelect = "SELECT * FROM voter;";
ResultSet rs = jdbcStmt.executeQuery(jdbcSelect);
(The portions of the code not directly related to the creation of this ResultSet are omitted.)