Reputation: 479
i am developing sparklr application i changed xml to
<bean id="tokenServices" class="org.springframework.security.oauth2.provider.token.JdbcOAuth2ProviderTokenServices">
<property name="supportRefreshToken" value="true" />
<constructor-arg index="0" ref="dataSource" />
</bean>
i take an error at client side Exception in thread "main" java.io.IOException: PreparedStatementCallback; bad SQL grammar [insert into oauth_access_token (token_id, token, authentication, refresh_token) values (?, ?, ?, ?)]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'authantication.oauth_access_token' doesn't exist at javaapplication17.RestClient.httpPost(RestClient.java:74) at javaapplication17.Main.main(Main.java:19) Java Result: 1
but ı have this column on db,instead of using org.springframework.security.oauth2.provider.token.JdbcOAuth2ProviderTokenServices"
i need to develop my own class,but i cant developed it gives error is there any example please help me!!
thank you
Upvotes: 0
Views: 1186
Reputation: 597056
The exception tells you the table oauth_access_token
doesn't exist
Making this work with hibernate is harder (I've been working on it for a couple of days, perhaps I'll blog about it sometime soon). If you are unsure how to proceed, stick to the JDBC version and just make sure the table exists
Upvotes: 1