java.sql.SQLException: Before start of result set

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg

Solutions on the web

via Stack Overflow by Peter
, 2 years ago
via Stack Overflow by user2775697
, 2 years ago
After end of result set//and this one too 0 2.1333333E7 21333333 1 1.35E7 13500000 2 1.7285714E7 17285714 3 1.55E7 15500000 4 1.58E7 15800000 5 1.59E7 15900000 6 1.5875E7 15875000 7 1.56E7 15600000 8
java.sql.SQLException: Before start of result set
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:855)
at com.mysql.jdbc.ResultSetImpl.getInt(ResultSetImpl.java:2710)

Users with the same issue

Once, 1 year ago
7 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
1848 times, 10 hours ago
Once, 1 day ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.