[appengine-java] Issue with OpenId Login implementation

2010-07-04 Thread vinothkumar
If we use  blogger as OpenId provider and login, the User object
doesn't have the email. This causes a Server Error "A server error has
occurred." when looking up the entity with User object in Datastore
viewer.

Also, with Wordpress as OpenId Provider, the email is received at the
first time login. With the "Always Allow" option, the email is not
received in subsequent logins, resulting in server error for the
entity with User object lookup.

It appears that the User class internally expects email to be
mandatory and toString method prints the same. Since the toString
prints empty, it could be failing some validation and resulting in
server error.

Please advise anything can be worked around to overcome this.

-- 
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] JDO Class enhancer and reflection: constructors added ?

2010-07-04 Thread Didier Durand
Hello,

My application code uses reflection on constructors to construct
objects in some "dynamic" mananer.
I noticed that when calling Class.getDeclaredConstructors() on my JDO-
enhanced classes, I have more constructors than the ones I explicitely
coded by myself.
[
Questions: [I could not figure the points below out by myself]
a) does the jdo class enhancer add some constructor(s) ?
b) under which algorithm ? I.e how many and with which parameters ?

I need to know this to take care of them properly in my reflection
code.
regards
didier

-- 
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] Which constructor called on PersistenceManager.getObjectById() ?

2010-07-04 Thread Didier Durand
Hello,

I would like to do a specific action when an object gets loaded from
the datastore.
I would like to do this action "from within the object itself".

Can somebody tell me
 a) which constructor gets called on this load from
datastore ?
 b) how do I detect that the constructor is called on a load
from datastore ? (to differentiate from a regular "new" in the
application)

thanks
regards
didied

-- 
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] Re: How to see the list of my applications?

2010-07-04 Thread Didier Durand
Hi,

After your login, put this address on in address bar of your browser
https://appengine.google.com/
didier


On Jul 3, 4:43 pm, tleroy  wrote:
> Hi everybody,
>
> maybe it's a basic question but I can't see the list of my
> applications.
> The only things I see when i log in my gae account is :
>
> Welcome to Google App Engine
>
> Before getting started, you want to learn more about developing and
> deploying applications.
> Learn more about Google App Engine by reading the Getting Started
> Guide, the FAQ, or the Developer's Guide.
> [Create an Application]
>
> I read there is an admin console I would like to access to it? I don't
> know how to do, please help me : )
>
> Thank you.

-- 
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] Re: regarding the keys in the datastore

2010-07-04 Thread Didier Durand
Hi,

You can also create your own keys (i.e. with the structure you want)
via KeyFactory.createKey()
regards
didier

On Jul 3, 9:58 pm, Deepika M  wrote:
> Hi,
>
> I have a question about the keys in the datastore.
>
> The keys are in sorted order when I view in the local datastore. For
> example, when I initially store say 10 entities and the keys range from 8000
> to 8009, then next time when I store 10 entities, the keys range from
> 8010-8019. That is the next key starts in the ascending order.
>
> But when I store in the app engine, the keys are not in order and random
> keys are assigned. For example , the first key will be 3001 and the next key
> will be 8343. So, the next time when I store the entities, some of them are
> assigned keys between 3001 and 8343. Can anyone please explain why? Is there
> a possible way to have the keys in sorted order in the app engine datastore?
>
> Thanks,
> Deepika

-- 
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] Re: Uploading to blobstore gives OutOfMemoryError

2010-07-04 Thread Adrian Petrescu
I'm having the exact same issue too, down to the line numbers in the
stack trace.

Has anyone figured out what is causing this? I find it hard to believe
we've all made the exact same identical mistake, all within the last
month. Is something wrong on Google's end?

Cheers,
Adrian

On Jun 2, 7:14 pm, Jean Hsu  wrote:
> Hi all,
>
> I am trying to set up a basic file upload to blobstore,  but I get
> this OutOfMemoryError:
>
> WARNING: Error for /_ah/upload/
> aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
> java.lang.OutOfMemoryError: Java heap space
>         at java.util.Arrays.copyOf(Arrays.java:2786)
>         at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
>         at
> javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
> 316)
>         at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
>         at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
>         at
> com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(UploadBlobServlet.java:
> 135)
>         at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
> $000(UploadBlobServlet.java:72)
>         at com.google.appengine.api.blobstore.dev.UploadBlobServlet
> $1.run(UploadBlobServlet.java:100)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at
> com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobServlet.java:
> 98)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 511);
>
> I used the Memory Analyzer on Eclipse and it said that the memory leak
> suspect is QueuedThreadPool.  I found this information about a memory
> leak bug:
>
> http://jira.codehaus.org/browse/JETTY-1188
>
> How can I figure out what release of jetty is running locally?  It
> looks like they fixed this in version 6.1.23:
>
> http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160&vers...
>
> Has anyone else had this issue?
>
> Thanks,
> Jean

-- 
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: [giannim] [appengine-java] app engine and db server elsewhere...

2010-07-04 Thread Gianni Mariani
SDC (Secure Data Connector) does allow you to connect to external data
sources securely through URL fetch.  If you can provide some kind of HTTP
RPC mechanism for your app to connect to then yes.

On Sun, Jul 4, 2010 at 5:47 AM, emigrant wrote:

> hi all,
> can i put my java app in google app engine and have conneciton to mysql
> database server outside?
>
> thanks a lot/
>
> --
> 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.
>
> --
> You received this message because you are subscribed to the Google Groups
> "giannim" group.
> To post to this group, send email to gian...@google.com.
> To unsubscribe from this group, send email to
> giannim+unsubscr...@google.com .
> For more options, visit this group at
> http://groups.google.com/a/google.com/group/giannim/?hl=en.
>
>


-- 
Gianni Mariani
Google, Sydney

-- 
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] Re: Any ETA for a backup/restore facility?

2010-07-04 Thread John Patterson
I have had success uploading data in bulk from Java using this  
RemoteDatastore code:


http://code.google.com/p/remote-datastore/

It is very easy to use and because it operates at the binary protocol  
buffer level it is very fast


Here is an example of using it to upload data:
public class UploadData
{
  public static void main(String[] args)
  {
// only call install once - often in a static initializer
RemoteDatastore.install();

// tell remote datastore where to connect
RemoteDatastore.divert("http://myVersion.latest.myApp.appspot.com/remote-datastore 
", "myApp", "myVersion");


// use standard datastore API to get a datastore service instance
DatastoreService service =  
DatastoreServiceFactory.getDatastoreService();


// create some entities
Entity entity1 = new Entity("myKindName");
entity1.setProperty("property1", "hello");

Entity entity2 = new Entity("myKindName");
entity2.setProperty("property1", "there");

// sends the data over http to your remote servlet and stores it  
in the live datastore

datastore.put(Arrays.asList(entity1, entity2);
  }
}

--
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] DataNucleus Enhancer failed to run

2010-07-04 Thread Ravi
Hi,
I was working happily, changed few lines of java code(didnt touch any
eclipse setting or installed any thing new or added extar jar in
classpth) and then started getting follwoing error. Please help spent
half a day and not able to understand how this error emerged. Googled
this error an dpeople are saying that if classpth goes long then this
error comes but i have not changed classpth since few days, just
writing new java files.

DataNucleus Enhancer has encountered a problem

Error
Sun Jul 04 18:45:14 BST 2010
Cannot run program "C:\Program Files (x86)\Java\jdk1.6.0_17\bin
\javaw.exe" (in directory "Y:\projects\New-Eclipse-Workspace
\TestGwt"): CreateProcess error=87, The parameter is incorrect


eclipse.buildId=
java.version=1.6.0_20
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product
org.eclipse.epp.package.jee.product -clean



java.io.IOException: Cannot run program "C:\Program Files (x86)\Java
\jdk1.6.0_17\bin\javaw.exe" (in directory "Y:\projects\New-Eclipse-
Workspace\TestGwt"): CreateProcess error=87, The parameter is
incorrect
at java.lang.ProcessBuilder.start(Unknown Source)
at
com.google.gdt.eclipse.core.ProcessUtilities.launchProcessAndActivateOnError(ProcessUtilities.java:
195)
at
com.google.appengine.eclipse.core.orm.enhancement.EnhancerJob.runInWorkspace(EnhancerJob.java:
78)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.io.IOException: CreateProcess error=87, The parameter
is incorrect
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 5 more

-- 
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] Re: SQL Like operator with %

2010-07-04 Thread Steve Osborne
That will work. Thank you very much Ravinder.

On Jul 2, 7:49 am, RAVINDER MAAN  wrote:
> we can set it in following way
>
>   public class User {
>
> @Persistent(defaultFetchGroup="true")
> private Set searchWords;
>
> public static void getCombination(String word,Set searchWords){
> word = word.trim().toUpperCase();
> if(word == null || "".equals(word))
> return ;
> int wordLength = word.length();
> while(true){
> for(int i=0;i searchWords.add(word.substring(i, wordLength));}
>
> for(int i=wordLength-1;i > 1;i--){
> searchWords.add(word.substring(0, i));}
>
> word = word.substring(1,wordLength-1);
> wordLength = word.length();
> if(wordLength <= 2)
> break;
> else
> searchWords.add(word);}
> return ;
> }
>
> public List search(String tag){
> PersistenceManager pm = PMF.getPM();
> Transaction tx=pm.currentTransaction();
> try
> {
>  tx.begin();
>
>     Query q = pm.newQuery("javax.jdo.query.JDOQL","SELECT FROM
> "+User.class.getName()+" WHERE searchWords == \""+tag.toUpperCase()+"\"");
>     q.setRange(0,10);
>     List c = (List)q.execute();
>     tx.commit();
>     return c;}
>
> finally
> {
>     if (tx.isActive())
>     {
>         tx.rollback();
>     }
>
>     pm.close();}
>
>  }
>
> }
>
> You can modify getCombination the way you want.
>
> --
>
> Regards,
> Ravinder Singh Maan

-- 
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] Re: regarding the keys in the datastore

2010-07-04 Thread Vaclav Bartacek
The datastore is DISTRIBITED and that's why.
You can assign keys manually using low-level datastore API - methods
allocateIds(..) of the class DatastoreService:
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/DatastoreService.html

Vaclav


On Jul 3, 9:58 pm, Deepika M  wrote:
> Hi,
>
> I have a question about the keys in the datastore.
>
> The keys are in sorted order when I view in the local datastore. For
> example, when I initially store say 10 entities and the keys range from 8000
> to 8009, then next time when I store 10 entities, the keys range from
> 8010-8019. That is the next key starts in the ascending order.
>
> But when I store in the app engine, the keys are not in order and random
> keys are assigned. For example , the first key will be 3001 and the next key
> will be 8343. So, the next time when I store the entities, some of them are
> assigned keys between 3001 and 8343. Can anyone please explain why? Is there
> a possible way to have the keys in sorted order in the app engine datastore?
>
> Thanks,
> Deepika

-- 
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] Re: Eclipse/Ant/SDK best practice

2010-07-04 Thread Robert Lancer
Helios has worked perfect for me with the new Google Plugin, I just
pointed it to my workspace directory and it picked up all my projects
with no problems.

On Jul 3, 11:43 pm, Roy  wrote:
> I do all my development in Eclipse, and then use ant for automated
> test and building my distros.
>
> Whenever there is a new G plugin for eclipes, I tend to have to
> download the SDKs twice; Once as part of the eclipse plugin and then a
> second time so I can include them in the classpaths in my ant scripts.
>
> Is this normal? or is there a better way to share SDKs between Eclipse
> and Ant
>
> also ...
>
> what are people's experiences with Helios and Google so far? I'm keen
> to upgrade from Galileo but don't have much slack time in the event of
> stuff not working

-- 
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.