[appengine-java] Mail send from AppEngine application not received by any recipient from past few days

2012-02-20 Thread Gaurav Sharma
Hello Everyone,

We have two Business application running on AppEngine one of which we have 
upgraded into HRD instance a couple of months before and other one was 
upgraded into HRD instance a week before.Everything was working fine on 
them but from past few days(after Friday) no mail is sending from these 
applications.No exception is coming in code and it is showing Mail send 
successfully message but mail not receiving anywhere.

We also have few other HRD and non-HRD applications running on AppEngine in 
same account and the same code is working fine for all of them.Only these 
two applications are facing this issue.

I would appreciate if anyone can help or give any suggestion on this.


Thanks,
Gaurav Sharma

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



[appengine-java] Java Application With MySql Database in App engine Datastore

2012-01-21 Thread gaurav
Hey I wanna to Know How can I Use Java Application with Mysql
database  in App Engine datastore ?

Thnx in Advance .. :-)

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.




[appengine-java] Unable to update app : failed in compling jsp

2011-07-28 Thread Gaurav
when i tired to deploy my application on GAE its shows me error failed
to complie jsp  pages .. what this error means i cann't understand
when i am running locally its runs fine . its only happening when i am
trying to deploy on
GAE/j
help me through this it is really getting me insane .
i am using eclipse on linux

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Deleting orphan blobs in blobstore

2011-03-18 Thread Gaurav
Hi,

I deleted a large number of objects from the datastore that I din't
required (around 7000 of them).
Each of those objects had a blob associated with it, referenced by a
String (blob key).
As you might have guessed by now, I forgot to delete those blobs.

Now I don't have any reference to them, but I want to delete them.
I can't seem to find a way to do that.

Any help will be appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Timeout while adding an auto increment column in task queue

2011-03-09 Thread Gaurav Sharma
Hi all

I am using mysql instance of google app engine. I have to add an auto
increment column to a table name actions. This table already contains
around 2 lacs of records. When i alter this table i am getting
following exceptions

Exception :class java.sql.SQLException: Timed out.
at com.google.appengine.api.rdbms.RdbmsApiProxyClient
$ApiProxyBlockingInterface.makeSyncCall(RdbmsApiProxyClient.java:103)
at com.google.appengine.api.rdbms.RdbmsApiProxyClient
$ApiProxyBlockingInterface.exec(RdbmsApiProxyClient.java:54)
at
com.google.storage.speckle.jdbc.internal.SpeckleProtoClient.executeSql(SpeckleProtoClient.java:
80)
at
com.google.storage.speckle.jdbc.internal.SpeckleProtoClient.executeSql(SpeckleProtoClient.java:
71)
at
com.google.storage.speckle.jdbc.SpeckleConnection.executeSql(SpeckleConnection.java:
400)
at
com.google.storage.speckle.jdbc.SpecklePreparedStatement.executeSqlImpl(SpecklePreparedStatement.java:
99)
at
com.google.storage.speckle.jdbc.SpeckleStatement.executeImpl(SpeckleStatement.java:
118)
at
com.google.storage.speckle.jdbc.SpeckleStatement.executeUpdateImpl(SpeckleStatement.java:
231)
at
com.google.storage.speckle.jdbc.SpeckleStatement.executeUpdate(SpeckleStatement.java:
241)

I am executing the following query:

Connection connection = ConnectionManager.getConnection(database);
connection1.setAutoCommit(true);
String updateQuery = alter table actions modify column
_autoincrement_ bigint(20) unsigned auto_increment  unique;
PreparedStatement stmt = connection1.prepareStatement(updateQuery);
stmt.executeUpdate(updateQuery, Statement.NO_GENERATED_KEYS);

I am executing these lines in task queue.

Its run fine on local server.


Regards

Rick

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Appstat filter defined on /* url pattern not working with federated login

2010-11-12 Thread Gaurav Sharma
Hello Everyone,

I have an application deployed on GoogleAppEngine and i am using both
openid and appstat.I have defined both of these as a filter i.e openid
filter  appstat filter on /* url pattern.

My issue is, when I use both of these simultaneously I starts
receiving 500 internal error.When I checked the case on a new
standalone application I found that appstat filter defined on /*
pattern does not work with federated login in Application setting 
gives Error: NOT_FOUND error while it works fine when defined on any
other url pattern except /*

Kindly suggest as because of this I am confused how to use both openid
filter  appstat filter simultaneously on /* pattern coz federated
login is necessary for openid work.

Any help or suggestion will be highly appreciated as even after a lot
of googling I am not able to find the answer.

Thanks,
Gaurav

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] org.datanucleus.exceptions.ClassNotPersistableException

2010-08-31 Thread Gaurav Munjal
3:34 PM
com.google.appengine.tools.development.LocalResourceFileServlet doGet
WARNING: No file found for: /favicon.ico
org.datanucleus.jdo.exceptions.ClassNotPersistenceCapableException:
The class The class mpstme.projects.mgs.classes.Customer is not
persistable. This means that it either hasnt been enhanced, or that
the enhanced version of the file is not in the CLASSPATH (or is hidden
by an unenhanced version), or the Meta-Data/annotations for the class
are not found. is not persistable. This means that it either hasnt
been enhanced, or that the enhanced version of the file is not in the
CLASSPATH (or is hidden by an unenhanced version), or the Meta-Data
for the class is not found.
NestedThrowables:
org.datanucleus.exceptions.ClassNotPersistableException: The class
mpstme.projects.mgs.classes.Customer is not persistable. This means
that it either hasnt been enhanced, or that the enhanced version of
the file is not in the CLASSPATH (or is hidden by an unenhanced
version), or the Meta-Data/annotations for the class are not found.

Getting this error!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Getting an error while using Struts 2 with Google App Engine

2010-06-08 Thread Gaurav Munjal
I referred to this post
http://whyjava.wordpress.com/2009/08/30/creating-struts2-application-on-google-app-engine-gae/

Getting this error

Jun 8, 2010 10:31:06 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via
com.google.apphosting.utils.jetty.JettyLogger
Jun 8, 2010 10:31:06 AM
com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\Gaurav
Munjal\workspace\SampleStruts\war\WEB-INF/appengine-web.xml
Jun 8, 2010 10:31:06 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: fa...@null line:2 col:6 : org.xml.sax.SAXParseException: The
processing instruction target matching [xX][mM][lL] is not allowed.
Jun 8, 2010 10:31:06 AM
com.google.apphosting.utils.config.AbstractConfigXmlReader getTopLevelNode
SEVERE: Received SAXException parsing the input stream for C:\Users\Gaurav
Munjal\workspace\SampleStruts\war\WEB-INF/web.xml
org.xml.sax.SAXParseException: The processing instruction target matching
[xX][mM][lL] is not allowed.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
 at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
 at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:701)
 at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:1016)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:669)
 at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:954)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
 at
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
 at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
 at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
 at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
 at org.mortbay.xml.XmlParser.parse(XmlParser.java:230)
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode(AbstractConfigXmlReader.java:206)
 at
com.google.apphosting.utils.config.AbstractConfigXmlReader.parse(AbstractConfigXmlReader.java:228)
at
com.google.apphosting.utils.config.WebXmlReader.processXml(WebXmlReader.java:142)
 at
com.google.apphosting.utils.config.WebXmlReader.processXml(WebXmlReader.java:22)
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.readConfigXml(AbstractConfigXmlReader.java:111)
 at
com.google.apphosting.utils.config.WebXmlReader.readWebXml(WebXmlReader.java:73)
at
com.google.appengine.tools.development.AbstractContainerService.loadAppEngineWebXml(AbstractContainerService.java:237)
 at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:144)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
 at
com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:162)
at
com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
 at
com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:113)
at
com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
Jun 8, 2010 10:31:06 AM
com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
SEVERE: Received exception processing C:\Users\Gaurav
Munjal\workspace\SampleStruts\war\WEB-INF/web.xml
com.google.apphosting.utils.config.AppEngineConfigException: Received
SAXException parsing the input stream for C:\Users\Gaurav
Munjal\workspace\SampleStruts\war\WEB-INF/web.xml
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.getTopLevelNode(AbstractConfigXmlReader.java:214)
 at
com.google.apphosting.utils.config.AbstractConfigXmlReader.parse(AbstractConfigXmlReader.java:228)
at
com.google.apphosting.utils.config.WebXmlReader.processXml(WebXmlReader.java:142)
 at
com.google.apphosting.utils.config.WebXmlReader.processXml(WebXmlReader.java:22)
at
com.google.apphosting.utils.config.AbstractConfigXmlReader.readConfigXml(AbstractConfigXmlReader.java:111

[appengine-java] Re: Delete all Datastore entries locally

2010-05-31 Thread Gaurav Munjal
Thanks a lot.

On May 28, 4:57 pm, jnizet jni...@gmail.com wrote:
 http://code.google.com/intl/fr/appengine/docs/java/tools/devserver.ht...

 On 28 mai, 13:07, Gaurav Munjal mail2gauravmun...@gmail.com wrote:



  I have made some changes in the class file, whose objects were
  persisted... Now I need to empty the local datastore. Is there a way?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Delete all Datastore entries locally

2010-05-28 Thread Gaurav Munjal
I have made some changes in the class file, whose objects were
persisted... Now I need to empty the local datastore. Is there a way?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] delete the entries in the datastore

2010-05-23 Thread Gaurav Munjal
Ya, you can delete all the entries through your app engine account. After
logging in check the entries in the datastore, Select all and delete.

On Sat, May 22, 2010 at 10:18, Chau Huynh cmhu...@gmail.com wrote:

 Have you tried searching the groups, this topic was discussed in detail
 with experience shared..

 http://groups.google.com/group/google-appengine-java/search?group=google-appengine-javaq=delete+all+entitiesqt_g=Search+this+group

 In summary, advise from the group is to use Task Queue to work on mass
 volume data.


 On Sat, May 22, 2010 at 7:41 AM, drift elysium drift2elys...@gmail.comwrote:

 Hi all,


 Is there a way to delete all the entries in the datastore after deploying
 the application to the app engine?

 Thanks

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


  --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




-- 
Regards,
Gaurav Munjal
http://www.google.com/profiles/mail2gauravmunjal

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] problem with using session.getAttribute()

2009-11-04 Thread gaurav

in my application a servlet stores the user's details when she starts
with the application as follows

User user=new User();
HttpSession session=req.getSession();
user.setUser(userName);
user.setRole(user);
session.setAttribute(user, user);
RequestDispatcher rd=req.getRequestDispatcher(/HomePage.jsp);
rd.forward(req, resp);

After this servlet stored the User object in session, every jsp in the
application receives the User object from session using a helper class

public class UserIdentifier
{
public static String getUser(HttpServletRequest req)
{
HttpSession session=req.getSession(false);
User userObj=(User)session.getAttribute(user);
String role=userObj.getRole(); // HERE IS THE ERROR
String user=null;
if(role.equals(admin))
{
user=(String)session.getAttribute(user2);
if(user==null)
{
return null;
}
}
if(role.equals(user))
{
user=userObj.getUser();
}
return user;
}
}

The User class is serializable and sessions-enabledtrue/sessions-
enabled is present in appengine-web.xml

it works fine on my local machine but when i deployed to app engine,
it throws a nullpointer exception on the line where i called
userObj.getRole();
it indicates that userObj is null,  i dont understand why it is not
able to pick the User object from the session


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Google Analytics tracking code on GAE

2009-10-19 Thread Gaurav

common... gae does not interfere with your jsp or servlet output.
any javascript will work. i am using analytics code and a lot of other
javascript.
only explanation i can give is that you deployed to the wrong version,
or something
like that.

On Oct 19, 9:56 am, Prashant antsh...@gmail.com wrote:
 I am using GWT, Adsense, Analytics and YUI, all of them are working fine
 with 
 Servletshttp://code.google.com/appengine/docs/java/gettingstarted/creating.html
 .

 Anyway, today i tried javascript with JSP also and it 
 works,http://gaeapptest.appspot.com/test.jsp.

 You guys must be doing something wrong or may be your builder is not
 recompiling the JSPs every time you change your code and then you feel like
 GWE removed JS code ! try creating a new project and share some code next
 time if problem persists.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Page taking too long to process. Need advice.

2009-09-20 Thread Gaurav

The JSP page I created is using too much of CPU and showing high
latency.

The page lists all the entities of type Person.class. (At present
there are 43 entities in the datastore.)
(Person is a root entity)

Following is the method to return the list of all Person objects in
the datastore :-

public class ListPersons {

public static ListPerson allPersons(){

PersistenceManager pm = PMF.get().getPersistenceManager();
Query query = pm.newQuery(Person.class);
ListPerson results = (ListPerson) query.execute();
return results;
}
}


The JSP page code :

%
ListPerson peopleList = ListPersons.allPersons();
IteratorPerson iter = peopleList.iterator();
while(iter.hasNext()){
Person p = (Person) iter.next();
out.print(br/+p.getFullName());
}

%


Request logs for this page:

09-20 01:29AM 35.604 / 200 848ms 1383cpu_ms 1072api_cpu_ms 1kb
09-20 01:29AM 33.286 / 200 850ms 1344cpu_ms 1072api_cpu_ms 1kb
09-20 01:29AM 29.196 / 200 807ms 1383cpu_ms 1072api_cpu_ms 1kb
09-20 01:29AM 24.946 / 200 792ms 1364cpu_ms 1072api_cpu_ms 1kb
09-20 01:29AM 20.197 / 200 839ms 1383cpu_ms 1072api_cpu_ms 1kb
09-20 01:26AM 55.564 / 200 779ms 1364cpu_ms 1072api_cpu_ms 1kb
09-20 01:26AM 38.545 / 200 737ms 1344cpu_ms 1072api_cpu_ms 1kb
09-20 01:26AM 36.355 / 200 869ms 1325cpu_ms 1072api_cpu_ms 1kb
09-20 01:26AM 34.205 / 200 817ms 1402cpu_ms 1072api_cpu_ms 1kb
09-20 01:26AM 32.245 / 200 782ms 1364cpu_ms 1072api_cpu_ms 1kb

Clearly I am doing something wrong. I just don't know what it is.
The page is displaying the results correctly. It's just taking too
long.

How can I optimize it? Need help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: How to delete data?

2009-09-20 Thread Gaurav

I agree. I often find myself changing my Class structure just to be
able to run efficiently on Datastore.
It's not like that I mind optimizing my code. It's just that in the
past in the past 3 days I have spent only 10% time in writing the
program logic and 90% in wondering how to read and write efficiently
from the Datastore.
That wasn't the case with JDBC.

Anyways I found this video helpful in understanding how to use the
Datastore effitiently.
http://www.youtube.com/watch?v=AgaL6NGpkB8

On Sep 21, 3:47 am, ?? levi.yourch...@gmail.com wrote:
 Also, let's say I want to set all fields named toilet to value
 flush in entities with existing field value of full of it.

 ? are you kidding me ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-19 Thread Gaurav

I am facing the same Issue.

Code:
p = new Person(fullName);
Key k = KeyFactory.createKey(Person.class.getSimpleName(),
fullName.hashCode());
p.setKey(k);

Error:
javax.jdo.JDOFatalUserException: Attempt was made to manually set the
id component of a Key primary key. If you want to control the value of
the primary key, set the name component instead.

On Sep 18, 1:10 pm, Morgoth nmarc...@yahoo.com wrote:
 Hi,

 I'm trying to set the primary key in order to be able to read from DB
 the exact object faster. Looking at that 
 tutorialhttp://code.google.com/appengine/docs/java/datastore/creatinggettinga...
 this should be possible. Nevertheless all my attempts using
 Key k = KeyFactory.createKey(Unit.class.getSimpleName(), 1);
 or guessing with any other variations I always receive:

 javax.jdo.JDOFatalUserException: Attempt was made to manually set the
 id component of a Key primary key.  If you want to control the value
 of the primary key, set the name component instead.

 What I'm doing wrong? Is it possible at all to set my own part of the
 primary key? What set the name component means? AFAIK the key
 contains appID, object kind and ID, there is no name as part of the
 key.

 Sorry if my question is stupid, but I'm just starting with GWT.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: Problem with JDO - Attempt was made to manually set the id component of a Key primary key

2009-09-19 Thread Gaurav

Opps! got it.

Key k = KeyFactory.createKey(Person.class.getSimpleName(),
String.valueOf(fullName.hashCode()));

instead of

Key k = KeyFactory.createKey(Person.class.getSimpleName(),
fullName.hashCode());


On Sep 19, 2:07 pm, Gaurav ano...@gmail.com wrote:
 I am facing the same Issue.

 Code:
 p = new Person(fullName);
 Key k = KeyFactory.createKey(Person.class.getSimpleName(),
 fullName.hashCode());
 p.setKey(k);

 Error:
 javax.jdo.JDOFatalUserException: Attempt was made to manually set the
 id component of a Key primary key. If you want to control the value of
 the primary key, set the name component instead.

 On Sep 18, 1:10 pm, Morgoth nmarc...@yahoo.com wrote:



  Hi,

  I'm trying to set the primary key in order to be able to read from DB
  the exact object faster. Looking at that 
  tutorialhttp://code.google.com/appengine/docs/java/datastore/creatinggettinga...
  this should be possible. Nevertheless all my attempts using
  Key k = KeyFactory.createKey(Unit.class.getSimpleName(), 1);
  or guessing with any other variations I always receive:

  javax.jdo.JDOFatalUserException: Attempt was made to manually set the
  id component of a Key primary key.  If you want to control the value
  of the primary key, set the name component instead.

  What I'm doing wrong? Is it possible at all to set my own part of the
  primary key? What set the name component means? AFAIK the key
  contains appID, object kind and ID, there is no name as part of the
  key.

  Sorry if my question is stupid, but I'm just starting with GWT.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---