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
Duplicate entry Exception using GoogleAuthorizationCodeFlow with JdoCredentialStore and DataNucleus #46
Comments
From yan...@google.com on July 14, 2012 04:46:16 Status: Accepted |
From yan...@google.com on July 14, 2012 04:46:29 |
From yan...@google.com on August 30, 2012 06:06:43 Labels: -Milestone-Version1.11.0 Milestone-Version1.11.1 |
From yan...@google.com on September 26, 2012 05:17:39 Owner: ngmic...@google.com |
From yan...@google.com on October 08, 2012 12:17:44 Labels: -Milestone-Version1.12.0 Milestone-Version1.13.0 |
From yan...@google.com on December 13, 2012 06:33:45 Labels: -Milestone-Version1.13.0 Milestone-Version1.14.0 |
From yan...@google.com on February 04, 2013 20:47:22 Labels: -Milestone-Version1.14.0 Milestone-Version1.15.0 |
From pele...@google.com on March 05, 2013 13:04:00 Owner: pele...@google.com |
From pele...@google.com on March 07, 2013 08:31:11 https://codereview.appspot.com/7575043/ Status: Started |
From pele...@google.com on April 23, 2013 12:47:48 Status: Fixed |
From Marian.F...@googlemail.com on July 11, 2012 14:48:07
Version of google-oauth-java-client: 1.10.1-beta?
Java environment Java 6, JEE
JDOCredentialStore causes "Duplicate entry exception" when refreshing access token with the "GoogleAuthorizationCodeFlow" and using DataNucleus Access Plattform 3.0.
Caused by: javax.jdo.JDODataStoreException: Duplicate entry 'XXXXIDXXXX' for key 'PRIMARY'
NestedThrowables:
java.sql.BatchUpdateException: Duplicate entry 'XXXXIDXXXX' for key 'PRIMARY'
at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:421)
at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:735)
at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:755)
at com.google.api.client.extensions.jdo.auth.oauth2.JdoCredentialStore.store(JdoCredentialStore.java:47)
at com.google.api.client.auth.oauth2.CredentialStoreRefreshListener.makePersistent(CredentialStoreRefreshListener.java:73)
at com.google.api.client.auth.oauth2.CredentialStoreRefreshListener.onTokenResponse(CredentialStoreRefreshListener.java:51)
at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:512)
...
Caused by: java.sql.BatchUpdateException: Duplicate entry 'XXXXIDXXXX' for key 'PRIMARY'
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2035)
at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1458)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.apache.commons.dbcp.DelegatingStatement.executeBatch(DelegatingStatement.java:297)
at org.datanucleus.store.rdbms.SQLController.processConnectionStatement(SQLController.java:607)
at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.release(ConnectionFactoryImpl.java:290)
at org.datanucleus.store.rdbms.request.InsertRequest.execute(InsertRequest.java:493)
at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertTable(RDBMSPersistenceHandler.java:166)
at org.datanucleus.store.rdbms.RDBMSPersistenceHandler.insertObject(RDBMSPersistenceHandler.java:142) http://stackoverflow.com/questions/11420727/duplicate-entry-exception-using-googleauthorizationcodeflow-with-jdocredentialst How would you expect it to be fixed? Could this be the problem: "Modifying a persisted Object
To modify a previously persisted object you need to retrieve it (getObjectById, query, getExtent) and then modify it and its changes will be propagated to the datastore at commit of the transaction." ( http://www.datanucleus.org/products/datanucleus/jdo/pm.html )
Original issue: http://code.google.com/p/google-oauth-java-client/issues/detail?id=46
The text was updated successfully, but these errors were encountered: