-
Notifications
You must be signed in to change notification settings - Fork 1.3k
JdbcOAuth2AuthorizationService in postgresql cannot casting type blob
#467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@phuongdpham, as mentioned in this comment:
Take a look at You may also find this comment helpful, as the same technique would apply to the Lastly, you may be interested in this gist which implements a I'm going to close this for now, but if you are still having issues after you have tried out the proposed solutions we can re-open and discuss further. |
Hi @phuongdpham. We have OAuth 2.0 samples in the spring-security-samples repo. Additionally, some team members presented at SpringOne this year and produced a full sample with all three roles represented. There's a link to a video on that page as well. Hope that helps! |
Hi @sjohnr, thank you so much. That really helps me a lot 👯 |
Caused by: org.postgresql.util.PSQLException: Cannot cast an instance of [B to type Types.BLOB
When I set datasource to Postgres, then
private OAuth2Authorization findBy(String filter, List<SqlParameterValue> parameters) { PreparedStatementSetter pss = new ArgumentPreparedStatementSetter(parameters.toArray()); List<OAuth2Authorization> result = this.jdbcOperations.query(LOAD_AUTHORIZATION_SQL + filter, pss, this.authorizationRowMapper); return !result.isEmpty() ? result.get(0) : null; }
throw exeption abount casting Types.BLOB to bytea in postgres table oauth2_authorization column access_token_value
Thanks,
The text was updated successfully, but these errors were encountered: