google app engine - Unable to Persist using latest Cloud Endpoint Backend defaults in AppEngine 1.8.2 -
i have created multiple endpoints in past using appengine 1.7, jre 1.6, , different google account. data classes follow tutorial examples closely.
with new project, unable persist simple bean, receiving following error when running api explorer. error occurs both running locally , running on appengine.
500 internal server error { "error": { "message": "javax.jdo.jdofatalinternalexception: key value passed construct singlefieldidentity of type \"class javax.jdo.identity.stringidentity\" class \"class com.jdub.minorplanets.mapsector\" null.\nnestedthrowables:\norg.datanucleus.exceptions.nucleusexception: key value passed construct singlefieldidentity of type \"class javax.jdo.identity.stringidentity\" class \"class com.jdub.minorplanets.mapsector\" null.", "code": 503,
"errors": [ { "domain": "global", "reason": "backenderror", "message": "javax.jdo.jdofatalinternalexception: key value passed construct singlefieldidentity of type \"class javax.jdo.identity.stringidentity\" class \"class com.jdub.minorplanets.mapsector\" null.\nnestedthrowables:\norg.datanucleus.exceptions.nucleusexception: key value passed construct singlefieldidentity of type \"class javax.jdo.identity.stringidentity\" class \"class com.jdub.minorplanets.mapsector\" null." } ] } }
my data class simple , stripped down version exhibits error:
@persistencecapable(identitytype = identitytype.application) public class mapsector { @primarykey @persistent(valuestrategy = idgeneratorstrategy.identity) @extension(vendorname="datanucleus", key="gae.encoded-pk", value="true") private string encodedkey; @persistent private string sectorid; public mapsector(string sectorid) { super(); this.sectorid = sectorid; } public mapsector() { super(); } public string getencodedkey() { return encodedkey; } /** * @return sectorid */ public string getsectorid() { return sectorid; } /** * @param sectorid sectorid set */ public void setsectorid(string sectorid) { this.sectorid = sectorid; } } the endpoint generated using eclipse plug-in.
at point, believe data nucleus enhancers not getting launched in project. difference see use of app engine 1.8.2 in new project , java 1.7. although using different google account, don't believe issue receive errors on localhost well.
here libs in use project:
- appengine-api-1.0-sdk-1.8.2.jar
- appengine-api-labs.jar
- appengine-endpoints.jar
- appengine-jsr107cache-1.8.2.jar
- asm-4.0.jar
- datanucleus-api-jdo-3.1.3.jar
- datanucleus-api-jpa-3.1.3.jar
- datanucleus-appengine-2.1.2.jar
- datanucleus.core-3.1.3.jar
- gcm-server.jar
- geronimo-jpa_2.0_spec-1.0.jar
- jdo-api-3.0.1.jar
- json_simple-1.1.jar
- jsr107.cache-1.1.jar
- jta-1.1.jar
this driving me nuts. have compared repeatedly working projects , sample code , not see problem. not see similar errors reported.
what need change in configuration have identity set endpoint/datanucleus/appengine code?
other things have tried:
- i have tried revert java 1.6 no benefit.
- i have deleted backend project , re-created.
i hope looking for. i've been there , drove me nuts. worked me.
https://stackoverflow.com/a/15014679/2695621
cheers
Comments
Post a Comment