java.sql.SQLException: Before start of result set


Samebug tips

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


7 months ago
Expert tip

Solutions on the web

Solution icon of web
Before start of result set

Solution icon of web
Before start of result set

Solution icon of github
via GitHub by alyphen
, 6 months ago
Before start of result set

Solution icon of googlegroups
via Google Groups by pn / beherit, 2 months ago
Before start of result set

Solution icon of stackoverflow
via Stack Overflow by ljpv14
, 1 year ago
Before start of result set

Solution icon of stackoverflow
via Stack Overflow by user3871938
, 1 year ago
Before start of result set

Solution icon of stackoverflow
via Stack Overflow by Unknown author, 1 year ago
Before start of result set

Solution icon of stackoverflow
Before start of result set

Solution icon of stackoverflow
Before start of result set

Solution icon of stackoverflow
Before start of result set

Stack trace

java.sql.SQLException: Before start of result set
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860)
	at com.mysql.jdbc.ResultSetImpl.checkRowPos(ResultSetImpl.java:790)
	at com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.java:2012)
	at com.mysql.jdbc.ResultSetImpl.getDate(ResultSetImpl.java:1978)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

2 times, 1 year ago
Samebug visitor profile picture
Unknown user
3 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 4 days ago
Samebug visitor profile picture
Unknown user
Once, 6 days ago
160 more bugmates