Tokens + JdoCredentialStore - Transient instances cant be deleted #48
Labels
priority: p1
Important issue which blocks shipping the next release. Will be fixed prior to next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
From martin.v...@fronde.com on August 06, 2012 21:32:12
google-oauth-java-client : 1.10.1-beta
Java 6.33 32bit, Linux
GoogleAuthorizationCodeFlow flow = gBuilder.setAccessType("offline").setApprovalPrompt("force").setCredentialStore(new JdoCredentialStore(persistenceFactory)).build();
when i am trying to delete stored credential :
Credential credential = getStoredCredential(userId);
getFlow().getCredentialStore().delete(userId, credential);
I got message :
javax.jdo.JDOUserException: Transient instances cant be deleted.
Caused by :
javax.jdo.JDOUserException: Transient instances cant be deleted.
at org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:375)
at org.datanucleus.jdo.JDOPersistenceManager.jdoDeletePersistent(JDOPersistenceManager.java:759)
at org.datanucleus.jdo.JDOPersistenceManager.deletePersistent(JDOPersistenceManager.java:772)
at com.google.api.client.extensions.jdo.auth.oauth2.JdoCredentialStore.delete(JdoCredentialStore.java:57)
at com.fronde.google.mailmerge.utils.UserUtils.deleteStoredCredential(UserUtils.java:227)
New (users) credentials are created, but is not possible to remove tokens.
Any ideas ? In previous version (1.6.0) Credentials were stored directly not through JDOCredentialStore, maybe that`s the problem.
Thank you
Original issue: http://code.google.com/p/google-oauth-java-client/issues/detail?id=48
The text was updated successfully, but these errors were encountered: