[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 roy.smith@googlemail.com 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.



[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 rsmaan...@gmail.com wrote:
 we can set it in following way

   public class User {

 @Persistent(defaultFetchGroup=true)
 private SetString 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;iwordLength - 2;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 ListUser 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);
     ListUser c = (ListUser)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] 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.init(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.



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.



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 fromwindowstoli...@gmail.comwrote:

 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.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
 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 giannim%2bunsubscr...@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.



[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 jeanhs...@gmail.com 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=11160vers...

 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.



[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 drift2elys...@gmail.com 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: 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 cont...@arobass.com 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] 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] 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.



[google-appengine] Re: How to provide different custom domain name to different version of same application

2010-07-04 Thread Claude Vedovini
As far as I know this is not possible. To have a beta or test version
of your app it is better to create a new application.
It's especially a good practice since otherwise your production and
your beta versions are going to share the same datastore which is not
a good thing.
Depending on changes you made to your beta they will apply to the
prod's data which might not be able to handle them.
Plus if you do testing with your beta you'll need test datasets and
you don't want to mess with your prod

HTH


On Jul 3, 4:02 pm, Gaurav testmail.testu...@gmail.com wrote:
 Hello,

 I am developing my application on GoogleAppEngine  I want to know
 that how can I provide different domain names to different version of
 an application.

 Suppost my application is  app1  having two versions 1 (Default)
 and beta.Now these version can be accessible as :

 version 1  of app1 at :  http://app1.appspot.com
 version beta  of app1 at :  http://beta.latest.app1.appspot.com

 I want to associate these with my custom domain mydomain.com, such
 that :
             version 1  of app1 at :  http://mydomain.com
             version beta  of app1 at :  http://beta.mydomain.com

 I am able to make first association i.ehttp://mydomain.comfor
 version 1 but don't know how to associate http://beta.mydomain.com;
 with beta version...

 So please tell me how can I associate different subdomain with
 different versions of same application and Even is it possible or
 not...??

 I will be very great full for any guidance as I have already googled a
 lot but not found any relevant detail so far and stucked at this
 point...

 Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@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.



Re: [google-appengine] Abridged summary of google-appengine@googlegroups.com - 19 Messages in 12 Topics

2010-07-04 Thread tamer fares
Hello Sir / Madam,
We (me and my partner) have a very good idea, but we wanna work with it as a
new project in google code (http://code.google.com/)
how can I do that?
And Is it necessary to be related to google products?
thanks

Regards
ENG. Tamer Fares

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@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.



[google-appengine] Re: HTTPS is working while regular HTTP is not

2010-07-04 Thread gil
Hi,

yes it is, and it's seems to be fixed now.

On Jul 4, 6:43 am, ekampf eka...@gmail.com wrote:
 Hi Gil,
   If your ISP is Bezeqint, they're currently blocking all appspot.com
 access for some unknown reason...

 Regards,
 Eran

 On Jul 3, 3:34 pm, gil gilmich...@gmail.com wrote:

  Hi,

  I have created a very simple application (hello world),
  if i will access it viahttps://gmhellotest.appspot.com/itwill work
  but usinghttp://gmhellotest.appspot.com/Iam getting not found.

  am I missing something?

  gil

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@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.