Hello:
I have the following JDO entity class:

*@PersistenceCapable(detachable = "false")*
*public class BizContext implements Serializable{*
*
*
* /***
* * *
* */*
* private static final long serialVersionUID = -3573604788900579800L;*
*
*
* @PrimaryKey*
* @Persistent*
* private String contextKey;*
*
*
* @Persistent*
* private String contextId;*
*....*
*.....*

I have a logic where I am reading this entity based on the Id. The code 
snippet is as given below:

*...*
*
*
* if (contextKey != null) { *
* result.setContext(pm.getObjectById(BizContext.class, contextKey));*
* }*
*
*
* return result;*
*
*
However when I run this piece of code, I get the following exception:

at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.IllegalArgumentException: name cannot be null or empty
at 
com.google.appengine.api.datastore.KeyFactory.createKey(KeyFactory.java:70)
at 
com.google.appengine.api.datastore.KeyFactory.createKey(KeyFactory.java:57)
at 
org.datanucleus.store.appengine.EntityUtils.stringToInternalKey(EntityUtils.java:301)
at 
org.datanucleus.store.appengine.EntityUtils.idToInternalKey(EntityUtils.java:136)
at 
org.datanucleus.store.appengine.EntityUtils.idToInternalKey(EntityUtils.java:126)
at 
org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManager.getObjectById(DatastoreJDOPersistenceManager.java:63)
at 
com.samuuhanet.main.server.service.ContextServiceImpl.getContextDetailsLocal(ContextServiceImpl.java:135)
at 
com.samuuhanet.main.server.service.ContextServiceImpl.getContextDetails(ContextServiceImpl.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
... 34 more

Any ideas as to what could be the cause of this exception ?
Thanks a lot.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/72B1nSeM2CYJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to