[appengine-java] Re: problem with storing data in datastore

2010-07-14 Thread Vishakha
I did use printstacktrace but it is not giving any exceptions.
I did try logging and was getting garbage value for the stream but
what i cant understand is why is it happening only when i deploy my
app since everything works perfectly fine on local datastore.

On Jul 13, 11:30 pm, Shyam Visamsetty 
wrote:
> So, if you are directly accessing the stream, it is still in memory
> and not stored anywhere. I think you should try logging the stream you
> receive. I think it is hitting a null ptr exception for some reason.
> did you use printstacktrace in your catch block?
>
> Thanks,
> Shyam.
>
> On Jul 13, 1:47 am, Vishakha  wrote:
>
> > Hi I am akriti's team member.
>
> > This is part of my servlet code.
>
> > public void doPost(HttpServletRequest request, HttpServletResponse
> > response)  throws ServletException, IOException {
> >                 {
> >         ServletFileUpload upload = new ServletFileUpload();
>
> >         try{
> >             FileItemIterator iter = upload.getItemIterator(request);
>
> >             while (iter.hasNext()) {
> >                 FileItemStream item = iter.next();
> >                 String name = item.getFieldName();
> >                 InputStream stream = item.openStream();
> >                // try{
> >                  Kml kml = Kml.unmarshal(stream);
>
> >                 //if (kml == null)
> >                         {
> >                                 Feature feature = kml.getFeature();
> >                                 processFeature(null, feature);
> >                         }
>
> > On Jul 13, 12:31 pm, Pieter Coucke  wrote:
>
> > > Could it be that the file upload tries to store the file in a temporary
> > > directory somewhere?
>
> > > --
> > > Pieter Coucke
> > > Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be-Hide quoted 
> > > text -
>
> > - Show quoted text -

-- 
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: Or filters cannot be applied to multiple properties

2010-07-14 Thread Vikas Hazrati
Hi John, I quickly skimmed over the twig project, it seems that it
works directly on top of the datastore. Does that mean that I do not
need to use datanucleus or does twig work in conjunction with that and
I would need both.

On Jul 14, 9:30 pm, John Patterson  wrote:
> Twig Persist has support for OR queries on multiple properties.
>
> http://code.google.com/p/twig-persist/
>
> You example is coded like this:
>
> TypedFindCommand command =
>         datastore.find().type(Person.class).addFilter)"active", EQUAL, true);
> command.addChildQuery().addFilter("firstName", EQUAL, aFirstName);
> command.addChildQuery().addFilter("lastName", EQUAL, aLastName);
> Iterator people = command.returnResultsNow();
>
> On 14 Jul 2010, at 19:10, Vikas Hazrati wrote:
>
>
>
> > Further to my previous question
> >http://groups.google.com/group/google-appengine/browse_thread/
> > thread/...
> > in which we were getting the following error 
> > 'or' filters can only check equality
> > Now for the sake of datanucleus and datastore we changed the
> > functionality to be equality for the time being
> > so the query reads like
> > @NamedQuery(name="User.findActiveByUsernamePattern",
> >                query="SELECT DISTINCT user " +
> >                                "FROM User as user " +
> >                                "WHERE (firstName = :pattern OR
> > lastName = :pattern) " +
> >                                "AND (active = true) " +
> >                                "ORDER BY firstName, lastName")
> > and now I get
> > org.datanucleus.store.appengine.query.DatastoreQuery
> > $UnsupportedDatastoreFeatureException: Problem with query  > FROM
> > User as user WHERE (user.firstName = :pattern OR user.lastName
> > = :pattern) AND (user.active = true) ORDER BY user.firstName,
> > user.lastName>: Or filters cannot be applied to multiple properties
> > (found both firstName and lastName).
> > A search on the net does not show too many results for the problem
> > that we are facing.
> > Are we the only ones facing this issue? No one else is trying to port
> > a legacy application to GAE? Isn't this quite a normal routine
> > query in JPA???
> > @datanucleus, @gae please respond.
> > Regards | Vikas
> >www.inphina.com
> >www.thoughts.inphina.com
>
> > --
> > 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 
> > athttp://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.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: problem with storing data in datastore

2010-07-14 Thread Vishakha
I did use printstacktrace but it is not giving any exceptions.
I did try logging and was getting garbage value for the stream but
what i cant understand is why is it happening only when i deploy my
app since everything works perfectly fine on local datastore.

On Jul 13, 11:30 pm, Shyam Visamsetty 
wrote:
> So, if you are directly accessing the stream, it is still in memory
> and not stored anywhere. I think you should try logging the stream you
> receive. I think it is hitting a null ptr exception for some reason.
> did you use printstacktrace in your catch block?
>
> Thanks,
> Shyam.
>
> On Jul 13, 1:47 am, Vishakha  wrote:
>
> > Hi I am akriti's team member.
>
> > This is part of my servlet code.
>
> > public void doPost(HttpServletRequest request, HttpServletResponse
> > response)  throws ServletException, IOException {
> >                 {
> >         ServletFileUpload upload = new ServletFileUpload();
>
> >         try{
> >             FileItemIterator iter = upload.getItemIterator(request);
>
> >             while (iter.hasNext()) {
> >                 FileItemStream item = iter.next();
> >                 String name = item.getFieldName();
> >                 InputStream stream = item.openStream();
> >                // try{
> >                  Kml kml = Kml.unmarshal(stream);
>
> >                 //if (kml == null)
> >                         {
> >                                 Feature feature = kml.getFeature();
> >                                 processFeature(null, feature);
> >                         }
>
> > On Jul 13, 12:31 pm, Pieter Coucke  wrote:
>
> > > Could it be that the file upload tries to store the file in a temporary
> > > directory somewhere?
>
> > > --
> > > Pieter Coucke
> > > Onthoo BVBAhttp://www.onthoo.comhttp://www.koopjeszoeker.be-Hide quoted 
> > > text -
>
> > - Show quoted text -

-- 
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: Or filters cannot be applied to multiple properties

2010-07-14 Thread Vikas Hazrati
Thanks for the link Simon

On Jul 14, 7:34 pm, Simon  wrote:
> The "Query Filters" section under the following link it explains the
> problem you're 
> hitting:http://code.google.com/appengine/docs/java/datastore/queriesandindexe...
>
> On Jul 14, 1:10 pm, Vikas Hazrati  wrote:
>
>
>
> > Further to my previous 
> > questionhttp://groups.google.com/group/google-appengine/browse_thread/thread/...
> > in which we were getting the following error 
> > 'or' filters can only check equality
> > Now for the sake of datanucleus and datastore we changed the
> > functionality to be equality for the time being
> > so the query reads like
> > @NamedQuery(name="User.findActiveByUsernamePattern",
> >                 query="SELECT DISTINCT user " +
> >                                 "FROM User as user " +
> >                                 "WHERE (firstName = :pattern OR
> > lastName = :pattern) " +
> >                                 "AND (active = true) " +
> >                                 "ORDER BY firstName, lastName")
> > and now I get
> > org.datanucleus.store.appengine.query.DatastoreQuery
> > $UnsupportedDatastoreFeatureException: Problem with query  > FROM
> > User as user WHERE (user.firstName = :pattern OR user.lastName
> > = :pattern) AND (user.active = true) ORDER BY user.firstName,
> > user.lastName>: Or filters cannot be applied to multiple properties
> > (found both firstName and lastName).
> > A search on the net does not show too many results for the problem
> > that we are facing.
> > Are we the only ones facing this issue? No one else is trying to port
> > a legacy application to GAE? Isn't this quite a normal routine
> > query in JPA???
> > @datanucleus, @gae please respond.
> > Regards | Vikaswww.inphina.comwww.thoughts.inphina.com

-- 
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: PDF Files

2010-07-14 Thread Daniel
But it says that on" Will it play in App Engine"

That its incompatible:

iText
Version(s): ?
Status: INCOMPATIBLE

* iText relies on several classes not in the JRE class whitelist
including java.awt.Color and java.nio.MappedByteBuffer. A bug has been
filed at 
http://sourceforge.net/tracker/?func=detail&atid=365255&aid=2810312&group_id=15255.

On Jul 15, 7:51 am, Shyam Visamsetty  wrote:
> Chris,
>
> Did you want to generate a PDF File on the GAE?
> If yes, you can use the iText library for generating the pdfs on the
> app engine. You can have a servlet to download the PDF file you
> generated.
>
> Thanks,
> Shyam Visamsetty
>
> On Jul 14, 1:36 pm, chrischelmi  wrote:
>
> > Helle every body,
> > I am working on a Google App Engine Project that consists of uploading
> > PDF files and displaying it after.
> > I use a Blob to store the PDF file
> > i want to do a process to download this PDF file by giving the a
> > specifics name.
> > Is there a way to generaye PDF files with GAE?
> > i have a process to display the PDF but i want to download it direcly
> > from an URL.

-- 
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: PDF Files

2010-07-14 Thread Shyam Visamsetty
Chris,

Did you want to generate a PDF File on the GAE?
If yes, you can use the iText library for generating the pdfs on the
app engine. You can have a servlet to download the PDF file you
generated.

Thanks,
Shyam Visamsetty


On Jul 14, 1:36 pm, chrischelmi  wrote:
> Helle every body,
> I am working on a Google App Engine Project that consists of uploading
> PDF files and displaying it after.
> I use a Blob to store the PDF file
> i want to do a process to download this PDF file by giving the a
> specifics name.
> Is there a way to generaye PDF files with GAE?
> i have a process to display the PDF but i want to download it direcly
> from an URL.

-- 
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: Check capability API for write-access?

2010-07-14 Thread coltsith
bump bump pump it up!

On Jul 8, 6:01 am, coltsith  wrote:
> Is there a way to do this? I've like to be able to check if the data
> store is read only before I start all the work, rather than catch the
> CapabilityAPI exception.
>
> 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.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Eclipse Plugin and Proxy Server

2010-07-14 Thread ogbigpo...@verizon.net
I can't deploy my application from work because we are behind a proxy
server. How do I configure the plugin to use the proxy server ?

-- 
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] PDF Files

2010-07-14 Thread chrischelmi
Helle every body,
I am working on a Google App Engine Project that consists of uploading
PDF files and displaying it after.
I use a Blob to store the PDF file
i want to do a process to download this PDF file by giving the a
specifics name.
Is there a way to generaye PDF files with GAE?
i have a process to display the PDF but i want to download it direcly
from an URL.

-- 
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] How to handle simultaneous requests (for same action) ?

2010-07-14 Thread Ikai L (Google)
Is this a slow running request? App Engine favors many small requests. We
will not autoscale your application if the majority of your requests take a
long time to complete.

On Fri, Jul 9, 2010 at 5:42 AM, sree  wrote:

> sending request simultaneously with 15 seconds time interval for the
> same action will throw an server error
>
> for example
> /generateReport.do?start=0&end=100
>
> when request for /generateReport.do is sent every 15 seconds like
>
> after 15 seconds: /generateReport.do?start=101&end=200
> after 30 seconds: /generateReport.do?start=201&end=300
> after 45 seconds: /generateReport.do?start=301&end=400
> after 60 seconds: /generateReport.do?start=401&end=500
>
> then the following message will be logged in the logs for atleast 2 or
> 3 requests.
>
> Request was aborted after waiting too long to attempt to service your
> request. This may happen sporadically when the App Engine serving
> cluster is under unexpectedly high or uneven load. If you see this
> message frequently, please contact the App Engine team.
>
> how to handle the above condition ?
>
> --
> 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.
>
>


-- 
Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

-- 
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] Using Blobstore with JSF

2010-07-14 Thread Khor Yong Hao
I used common Blob but not BlobstoreService, and use non-jsf Servlet to
handle uploading, it is challenging to make it run.

On Wed, Jul 14, 2010 at 10:55 PM, John  wrote:

> Has anybody worked out how to use the Blobstore service with JSF. When
> writing a JSF form with facelets there is no option to specify the
> action - it is workedout automatically. Therefore I cannot use the
> createUploadUrl method to set the URL the form posts to.
>
> If the BlobstoreService had a method to create blobs then I could do
> this in a servlet filter and commons-fileupload. Will I have to have a
> non JSF Servlet in my application just to accomodate Blobstore?
>
> Thanks
>
> John
>
> --
> 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 
"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: Problem persist JDO- one to many

2010-07-14 Thread Luis Daniel Mesa Velasquez
It's only required for bidirectional mapping but he has a Torneo in
the Equipo, i assumed it was bidirectional by reading that... but i
could have been biased in the assumption... I found all the info here
useful... but i think the DOCS should be updated. I know all this info
ALREADY IS in the docs at
http://code.google.com/appengine/docs/java/datastore/relationships.html#Owned_One_to_One_Relationships
but since there's a little doubt it should be repeated in
http://code.google.com/appengine/docs/java/datastore/relationships.html#Owned_One_to_Many_Relationships

On Jul 13, 12:17 am, Prashant  wrote:
> Yes, it worked without explicitly detaching fields with just  
> defaultFetchGroup
> set to "true".
>
> btw,
> mappedBy property is required only for bi-directional mapping.
>
> --
> Prashantwww.claymus.com

-- 
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] No function with argument support for EL 2.2

2010-07-14 Thread NikNik77771
I'm having the same problem as described in the following thread:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/e9c9578f034dd1f9

Normally adding the appropriate JARs to the application enables the
new functionality in both Tomcat and Jetty. Unfortunately not on the
GAE.

Please, correct main page and vote for issue
http://code.google.com/p/googleappengine/issues/detail?id=3431&q=2.2&colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component#makechanges

-- 
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] Geomodel in Java

2010-07-14 Thread Mahsa
Hello,


I am developing a simple GIS cloud application using Google App Engine
& Geomodel. In this application, I would like to store latitude and
longitude of points from user, & later on query them using boundingbox
& proximity queries. I am experiencing problem while trying to access
the server through a browser. I appreciate it if someone help me with
this regard.

I am using Eclipse, and here is what I did:

1) Created a Web application project enabling only Google App Engine
(1.3.4)(as Google SDK)

2) Created a simple jsp file in "war" folder to get latitude &
longitude from user

3) Created two java classes, UseGeocell and ObjectToSave. UseGeocell
class is similar to the code in
http://code.google.com/p/javageomodel/source/browse/trunk/geocell/src/test/java/com/beoui/utils/HowToUseGeocell.java
ObjectToSave is exactly
http://code.google.com/p/javageomodel/source/browse/trunk/geocell/src/test/java/com/beoui/utils/ObjectToSave.java

4)In my Servlet I defined an object of type UseGeocell and called
testHowToSaveGeocellsInDatabase function in order to save latitude &
longitude that are obtained from the input

Here is my code:

My UseGeocell class:

package edu.pitt.Test8_Geomodel_GAE;

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.jdo.PersistenceManager;

import junit.framework.Assert;
import junit.framework.TestCase;

import com.beoui.geocell.GeocellManager;
import com.beoui.geocell.model.BoundingBox;
import com.beoui.geocell.model.CostFunction;
import com.beoui.geocell.model.GeocellQuery;
import com.beoui.geocell.model.Point;

/**
 * Unit test also used to explain how to use Geocell class.
 *
 * @author Alexandre Gellibert 
 *
 */
public class UseGeocell extends TestCase {

private final Logger log = Logger.getLogger("com.beoui.utils");
public ObjectToSave obj;

/**
 * First step is to save your entities.
 * In database, you don't save only latitude and longitude of
your point but also geocells around this point.
 */
public void testHowToSaveGeocellsInDatabase(double lat, double
lon) {
// Incoming data: latitude and longitude (Bordeaux for
instance)
//double lat = 44.838611;
//double lon = -0.578333;

// Transform it to a point
Point p = new Point(lat, lon);

// Generates the list of GeoCells
List cells = GeocellManager.generateGeoCell(p);

// Save your instance
obj = new ObjectToSave();
obj.setLatitude(lat);
obj.setLongitude(lon);
obj.setGeocells(cells);

//objDao.save(obj);

// Just checking that cells are not empty
Assert.assertTrue(cells.size() > 0);

// Show in the log what cells are going to be saved
log.log(Level.INFO, "Geocells to be saved for Point("+lat
+","+lon+") are: "+cells);
}

/**
 * Second step, now entities are in database, we can query on
them.
 * Here is the example of a bounding box query.
 *
 */
public void testHowToQueryOnABoundingBox(double latSW, double
lonSW, double latNE, double lonNE) {
// Incoming data: latitude and longitude of south-west and
north-east points (around Bordeaux for instance =) )
//double latSW = 44.8;
//double lonSW = -0.6;

   // double latNE = 44.9;
   // double lonNE = -0.7;

// Transform this to a bounding box
BoundingBox bb = new BoundingBox(latNE, lonNE, latSW, lonSW);

// Calculate the geocells list to be used in the queries
(optimize list of cells that complete the given bounding box)
List cells = GeocellManager.bestBboxSearchCells(bb,
null);

// OR if you want to use a custom "cost function"
List cells2 = GeocellManager.bestBboxSearchCells(bb,
new CostFunction() {

@Override
public double defaultCostFunction(int numCells, int
resolution) {
if(numCells > 100) {
return Double.MAX_VALUE;
} else {
return 0;
}
}
});

// Use this in a query
// In Google App Engine, you'll have something like below. In
hibernate (or whatever else), it might be a little bit different.
//String queryString = "select from ObjectToSave where
geocellsParameter.contains(geocells)";
// 

[appengine-java] Re: Deleted all the data, but Storable Data summary still shows 72%

2010-07-14 Thread Manu
The statistics are not updated instantly. You need to wait for 24
hours before the statistics show the correct figure.

Regards
Manaranjan

On Jul 13, 3:07 pm, Ronin  wrote:
> hi,
>
> I deleted all the objects, but Total Stored data still shows 72%.
> Why ?
> I tried to lookup the data using Datastore viewer, but could not see
> any objects.
>
> Thanks 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-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] Reading POST data in HttpServlet doPost

2010-07-14 Thread Marc
I have an HTTP request looking like this:

Request URL:
http://127.0.0.1:/data/fetch/country
Request Method:
POST
Request Headers
Content-Type:
text/xml; charset=UTF-8
Origin:
http://127.0.0.1:
Referer:
http://127.0.0.1:/
User-Agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.3 (KHTML,
like Gecko) Chrome/6.0.458.1 Safari/534.3
Request Payload




isc_RestDataSource_0
fetch
0
75
exact
isc_ListGrid_0



And I have:

public class TableManagerService extends HttpServlet {

  @Override
  public void doPost(HttpServletRequest req, HttpServletResponse res)
throws IOException {

Document doc = null;
try {
  DocumentBuilderFactory dbf =
DocumentBuilderFactory.newInstance();
  DocumentBuilder db = dbf.newDocumentBuilder();
  doc = db.parse(req.getInputStream());
} catch (ParserConfigurationException e) {
  e.printStackTrace();
} catch (SAXException e) {
  e.printStackTrace();
}

...
  }
}

but doc is always empty.
Are the parameters accessed before the processing of doPost that would
cause the request to have empty content?
req.getContentType returns text/xml
req.getCharacterEncoding returns UTF-8

-- 
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: Java Server Faces 2.0 does not works in GAE (for me)

2010-07-14 Thread NikNik77771
GAE does not support EL 2.2
I'm having the same problem as described in the following thread:
http://groups.google.com/group/google-appengine-java/browse_thread/thread/e9c9578f034dd1f9

Normally adding the appropriate JARs to the application enables the
new functionality in both Tomcat and Jetty. Unfortunately not on the
GAE.

Please, vote for issue
http://code.google.com/p/googleappengine/issues/detail?id=3431&q=2.2&colspec=ID%20Type%20Status%20Priority%20Stars%20Owner%20Summary%20Log%20Component#makechanges

On Jul 14, 12:11 am, SammyBar  wrote:
> Silly error...!
>
> I mistakenly named welcome.xhtml as welcome.xhml
>
> Sorry, JSF 2.0 works for me too!
>
> On 12 jul, 19:02, SammyBar  wrote:
>
>
>
> > Hi all,
>
> > I'm trying to config my first Java Server Faces project with GAE. I
> > have already configured my Eclipse following instructions published 
> > athttps://sites.google.com/a/wildstartech.com/adventures-in-java/Java-P...,
> > and also included the fix on the jsf-impl-gae.jar. I'm able to run my
> > project in Eclipse without errors. The console displays "INFO: The
> > server is running athttp://localhost:/";. It looks everything is
> > OK.
> > But when I direct the browser to the above mentioned URL, I get a HTTP
> > 404 error "/welcome.jsf not found"
> > I'm able to put a breakpoint in the index.jsp page at "<%
> > response.sendRedirect("welcome.jsf"); %>" It confirms me the app is
> > working because the breakpoint is reached, but it looks like the
> > server is unable to "understand" the "welcome.xhtml" file should be
> > processed as "welcome.jsf". Similarly by pointing the browser 
> > tohttp://localhost:/welcome.xhtmlalsoreturns a 404 error. What is
> > wrong with my configuration?
>
> > Any hint is welcomed.
> > Thanks in advance
> > Sammy
>
> > Follows the appengine-web.xml and web.xml files from my war/WEB-INF
> > folder which are copies of the reccommended files published in the
> > above mentioned site:
>
> > --- appengine-web.xml
> > 
> > 
> > http://appengine.google.com/ns/1.0";>
> >         TestJSF
> >         1
> >         true
>
> >         
> >         
> >                  > value="WEB-INF/
> > logging.properties"/>
> >         
>
> > 
>
> > --- web.xml
> > 
> > 
> > http://java.sun.com/xml/ns/javaee";
> >   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >   
> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/we...";>
> >   
> >     Wildstar Technologies, LLC. Google AppEngine JSF 2.0 Template
> >   
> >   
> >     Template JSF 2.0 application configured to run on the Google
> >     AppEngine for Java.
> >   
> >   
> >   
> >     javax.faces.STATE_SAVING_METHOD
> >     server
> >   
> >   
> >   javax.faces.DEFAULT_SUFFIX
> >     .xhtml
> >   
> >   
> >   
> >     com.sun.faces.expressionFactory
> >     com.sun.el.ExpressionFactoryImpl
> >   
> >   
> >     
> >       Set this flag to true if you want the JavaServer Faces
> >       Reference Implementation to validate the XML in your
> >       faces-config.xml resources against the DTD. Default
> >       value is false.
> >     
> >     com.sun.faces.validateXml
> >     true
> >   
> >   
> >   
> >     
> >       When enabled, the runtime initialization and default
> > ResourceHandler
> >       implementation will use threads to perform their functions. Set
> > this
> >       value to false if threads aren't desired (as in the case of
> > running
> >       within the Google Application Engine).
>
> >       Note that when this option is disabled, the ResourceHandler will
> > not
> >       pick up new versions of resources when ProjectStage is
> > development.
> >     
> >     com.sun.faces.enableThreading
> >     false
> >   
> >   
> >   
> >     Faces Servlet
> >     javax.faces.webapp.FacesServlet
> >     1
> >   
> >   
> >     Faces Servlet
> >     /faces/*
> >     *.jsf
> >   
> >   
> >     30
> >   
> >   
> >     index.jsp
> >     index.xhtml
> >     index.html
> >   
> > 

-- 
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: Java Server Faces 2.0 does not works in GAE (for me)

2010-07-14 Thread Khor Yong Hao
Yes, it worked for me too, http://fyhaosecs.appspot.com is part of my final
year project, I am working through.

-- 
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] Or filters cannot be applied to multiple properties

2010-07-14 Thread John Patterson

Twig Persist has support for OR queries on multiple properties.

http://code.google.com/p/twig-persist/

You example is coded like this:

TypedFindCommand command =
datastore.find().type(Person.class).addFilter)"active", EQUAL, true);
command.addChildQuery().addFilter("firstName", EQUAL, aFirstName);
command.addChildQuery().addFilter("lastName", EQUAL, aLastName);
Iterator people = command.returnResultsNow();



On 14 Jul 2010, at 19:10, Vikas Hazrati wrote:


Further to my previous question
http://groups.google.com/group/google-appengine/browse_thread/ 
thread/...

in which we were getting the following error 
'or' filters can only check equality
Now for the sake of datanucleus and datastore we changed the
functionality to be equality for the time being
so the query reads like
@NamedQuery(name="User.findActiveByUsernamePattern",
   query="SELECT DISTINCT user " +
   "FROM User as user " +
   "WHERE (firstName = :pattern OR
lastName = :pattern) " +
   "AND (active = true) " +
   "ORDER BY firstName, lastName")
and now I get
org.datanucleus.store.appengine.query.DatastoreQuery
$UnsupportedDatastoreFeatureException: Problem with query : Or filters cannot be applied to multiple properties
(found both firstName and lastName).
A search on the net does not show too many results for the problem
that we are facing.
Are we the only ones facing this issue? No one else is trying to port
a legacy application to GAE? Isn't this quite a normal routine
query in JPA???
@datanucleus, @gae please respond.
Regards | Vikas
www.inphina.com
www.thoughts.inphina.com

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




--
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: CloudCover: Cannot schedule instance of TestClass because of not an available class

2010-07-14 Thread Max Ross (Google)
Thanks for trying CloudCover!  Unfortunately CloudCover's support for
datastore tests rely on an App Engine feature called "Namespaces" that is
not yet available to all apps.  This feature should be widely available
soon, at which point your error message will go away.

Sorry for the trouble,
Max

On Sat, Jul 10, 2010 at 12:26 PM, luijar  wrote:

> I have not been able to successfully run any tests that involve
> datastore access: I am seeing the following:
>
> Application (nepal-dev), attempting to use namespace (1002_877806974),
> is not permitted to use datastore namespaces.
> java.lang.IllegalArgumentException: Application (nepal-dev),
> attempting to use namespace (1002_877806974), is not permitted to use
> datastore namespaces.
> at
>
> com.google.appengine.api.datastore.DatastoreApiHelper.translateError(DatastoreApiHelper.java:
> 34)
> at
>
> com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java:
> 67)
> at com.google.appengine.api.datastore.DatastoreServiceImpl
> $2.run(DatastoreServiceImpl.java:188)
> at
>
> com.google.appengine.api.datastore.TransactionRunner.runInTransaction(TransactionRunner.java:
> 30)
> at
>
> com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java:
> 176)
> at
>
> com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java:
> 156)
> at
>
> com.google.appengine.api.datastore.DatastoreServiceImpl.put(DatastoreServiceImpl.java:
> 148)
> at
>
> com.citrix.ws.nepal.gaetest.GAEUserTest.testCreateAndReadUser(GAEUserTest.java:
> 37)
>
> Any thoughts???
>
>
>
> On Jul 1, 1:13 pm, luijar  wrote:
> > Not sure what the problem is, all my queries are failing with this
> > message:
> >
> > Illegal argument
> > javax.jdo.JDOFatalUserException: Illegal argument at
> >
> org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(Nuc
> leusJDOHelper.java:
> > 344) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:252) at
> >
> > Environment: SDK 1.3.4
> > JUnit = 4
> >
> > Is there a code sample we can use as reference?, with all of the
> > required JAR files?. I haven't been able to run a single test that
> > requires accessing datastore.
> >
> > On Jun 30, 5:58 pm, luijar  wrote:
> >
> >
> >
> > > I am seeing this however,
> >
> > > Executing a simple query:
> >
> > > Illegal argument
> > > javax.jdo.JDOFatalUserException: Illegal argument at
> > >
> org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(Nuc
> leusJDOHelper.java:
> > > 344) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:252) at
> >
> > > This query works when the actual application is running, and it works
> > > in the Local testing Helper, but not with the
> > > CloudCoverLocalServiceTestHelper. Is there a specific version of App
> > > Engine I should be using? I am using 1.3.2.
> >
> > > On Jun 12, 11:57 pm, "Max Ross (Google)" 
> > > 
> >
> > > wrote:
> >
> > > > This most likely means that your tests aren't available as part of
> your
> > > > application.  Are you certain you uploaded them?
> >
> > > > On Fri, Jun 11, 2010 at 11:31 PM, Art  wrote:
> > > > > Dear group,
> >
> > > > > I would like to know how to make CloudCover (
> http://code.google.com/p/
> > > > > cloudcover/) work.
> >
> > > > > At cloudcover.html, even I clicked on the "Start New Run" button,
> the
> > > > > (default) test won't be executed.
> > > > > The cloudcover.html showed like:
> > > > > Run 1001: NOT_STARTED, Completed 0/0 (0%)
> > > > > Passed: 0 Too Slow: 0 Failed: 0 In Progress: 0 Not Started: 0
> > > > >
> com.google.appengine.testing.cloudcover.harness.junit3.JUnit3TestHarness
> > > > > (0)
> >
> > > > > I found the following logs in the GAE/J logs:
> > > > > W 06-11 10:45PM 49.387
> > > > > com.google.appengine.testing.cloudcover.harness.junitx.JUnitTestRun
> > > > > getTestIds: 1001: Cannot schedule instance of class
> > > > > com.appspot.waversbeach.server.MemcacheTest for execution because
> its
> > > > > String represenation,
> > > > > testInsert1(com.appspot.waversbeach.server.MemcacheTest), is not an
> > > > > available class.
> >
> > > > > W 06-11 10:45PM 49.395
> > > > > com.google.appengine.testing.cloudcover.harness.junitx.JUnitTestRun
> > > > > getTestIds: 1001: Cannot schedule instance of class
> > > > > com.appspot.waversbeach.server.MemcacheTest for execution because
> its
> > > > > String represenation,
> > > > > testInsert2(com.appspot.waversbeach.server.MemcacheTest), is not an
> > > > > available class.
> >
> > > > > MemcacheTest class is a really simple test class just for the trial
> > > > > purpose with CloudCover:
> > > > > public class MemcacheTest extends TestCase {
> > > > >public MemcacheTest( String name) {
> > > > >super( name);
> > > > >}
> >
> > > > >protected static Cache cache = null;
> >
> > > > >@Override
> > > > >protected void setUp() throws Exception {
> > > > >if ( c

Re: [appengine-java] How long is my application state hold on the app engine?

2010-07-14 Thread Ingo Jaeckel
aah alright. thanks Don for the clarification!

kind regards,
ingo

2010/7/14 Don Schwarz :
> That is correct.  You can not maintain state within the JVM and expect to
> get any long-term persistence or coherency.
>
> You should use either memcache (which provides coherency) or the datastore
> (which provides both).
>
> On Wed, Jul 14, 2010 at 3:38 PM, Ingo Jaeckel 
> wrote:
>>
>> hello everyone,
>>
>> i just had a look into the documentation
>> http://code.google.com/intl/de-DE/appengine/docs/java/runtime.html
>>
>> "App Engine uses multiple web servers to run your application, and
>> automatically adjusts the number of servers it is using to handle
>> requests reliably. A given request may be routed to any server, and it
>> may not be the same server that handled a previous request from the
>> same user."
>>
>> does this mean that there are n jvms on n servers running my
>> application. thus if i want to collect profiling information about my
>> server code i will always have to persist it in the db. it would not
>> be sufficient just to hold it within the app (thus within the jvm).
>> because i will have different application stats across the different
>> servers running my application in parallel and independently..
>>
>> can anyone confirm this claim?
>>
>> kind regards,
>> ingo
>>
>>
>> 2010/7/13 ingo :
>> > hello everyone,
>> >
>> > i want to collect some performance figures of my app on the server
>> > side. but i do not want to persist them in the database, i only want
>> > to collect them by changing the state of some class (i.e. changing
>> > class members like number of requests, number of method calls, etc). i
>> > want to read these values on the client side and display them in an
>> > administration panel (or a profiler-like ui).
>> >
>> > but currently i think the application state is at least lost after
>> > each new deployment. is this the only time the state is resetted? does
>> > a jvm holding my application state run all the time between each
>> > deployment?
>> >
>> > i have the same question regarding static members. i use singletons or
>> > static variables on server side to make sure they are constructed only
>> > once whenever their construction is expensive. so i want to make sure
>> > that the jvm holding the instances is running for a very long time to
>> > avoid reconstruction of them. however, it feels like the jvm is
>> > restarted relatively often (due to very low load on my app maybe) and
>> > thus the singletons are recreated during the jvm startup.
>> >
>> > kind regards,
>> > ingo
>> >
>> > --
>> > 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
>> "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
> "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 
"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] How long is my application state hold on the app engine?

2010-07-14 Thread Ingo Jaeckel
hello everyone,

i just had a look into the documentation
http://code.google.com/intl/de-DE/appengine/docs/java/runtime.html

"App Engine uses multiple web servers to run your application, and
automatically adjusts the number of servers it is using to handle
requests reliably. A given request may be routed to any server, and it
may not be the same server that handled a previous request from the
same user."

does this mean that there are n jvms on n servers running my
application. thus if i want to collect profiling information about my
server code i will always have to persist it in the db. it would not
be sufficient just to hold it within the app (thus within the jvm).
because i will have different application stats across the different
servers running my application in parallel and independently..

can anyone confirm this claim?

kind regards,
ingo


2010/7/13 ingo :
> hello everyone,
>
> i want to collect some performance figures of my app on the server
> side. but i do not want to persist them in the database, i only want
> to collect them by changing the state of some class (i.e. changing
> class members like number of requests, number of method calls, etc). i
> want to read these values on the client side and display them in an
> administration panel (or a profiler-like ui).
>
> but currently i think the application state is at least lost after
> each new deployment. is this the only time the state is resetted? does
> a jvm holding my application state run all the time between each
> deployment?
>
> i have the same question regarding static members. i use singletons or
> static variables on server side to make sure they are constructed only
> once whenever their construction is expensive. so i want to make sure
> that the jvm holding the instances is running for a very long time to
> avoid reconstruction of them. however, it feels like the jvm is
> restarted relatively often (due to very low load on my app maybe) and
> thus the singletons are recreated during the jvm startup.
>
> kind regards,
> ingo
>
> --
> 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 
"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] How long is my application state hold on the app engine?

2010-07-14 Thread Don Schwarz
That is correct.  You can not maintain state within the JVM and expect to
get any long-term persistence or coherency.

You should use either memcache (which provides coherency) or the datastore
(which provides both).

On Wed, Jul 14, 2010 at 3:38 PM, Ingo Jaeckel
wrote:

> hello everyone,
>
> i just had a look into the documentation
> http://code.google.com/intl/de-DE/appengine/docs/java/runtime.html
>
> "App Engine uses multiple web servers to run your application, and
> automatically adjusts the number of servers it is using to handle
> requests reliably. A given request may be routed to any server, and it
> may not be the same server that handled a previous request from the
> same user."
>
> does this mean that there are n jvms on n servers running my
> application. thus if i want to collect profiling information about my
> server code i will always have to persist it in the db. it would not
> be sufficient just to hold it within the app (thus within the jvm).
> because i will have different application stats across the different
> servers running my application in parallel and independently..
>
> can anyone confirm this claim?
>
> kind regards,
> ingo
>
>
> 2010/7/13 ingo :
> > hello everyone,
> >
> > i want to collect some performance figures of my app on the server
> > side. but i do not want to persist them in the database, i only want
> > to collect them by changing the state of some class (i.e. changing
> > class members like number of requests, number of method calls, etc). i
> > want to read these values on the client side and display them in an
> > administration panel (or a profiler-like ui).
> >
> > but currently i think the application state is at least lost after
> > each new deployment. is this the only time the state is resetted? does
> > a jvm holding my application state run all the time between each
> > deployment?
> >
> > i have the same question regarding static members. i use singletons or
> > static variables on server side to make sure they are constructed only
> > once whenever their construction is expensive. so i want to make sure
> > that the jvm holding the instances is running for a very long time to
> > avoid reconstruction of them. however, it feels like the jvm is
> > restarted relatively often (due to very low load on my app maybe) and
> > thus the singletons are recreated during the jvm startup.
> >
> > kind regards,
> > ingo
> >
> > --
> > 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
> "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 
"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] Using Blobstore with JSF

2010-07-14 Thread John
Has anybody worked out how to use the Blobstore service with JSF. When
writing a JSF form with facelets there is no option to specify the
action - it is workedout automatically. Therefore I cannot use the
createUploadUrl method to set the URL the form posts to.

If the BlobstoreService had a method to create blobs then I could do
this in a servlet filter and commons-fileupload. Will I have to have a
non JSF Servlet in my application just to accomodate Blobstore?

Thanks

John

-- 
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: Or filters cannot be applied to multiple properties

2010-07-14 Thread Simon
The "Query Filters" section under the following link it explains the
problem you're hitting:
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Queries

On Jul 14, 1:10 pm, Vikas Hazrati  wrote:
> Further to my previous 
> questionhttp://groups.google.com/group/google-appengine/browse_thread/thread/...
> in which we were getting the following error 
> 'or' filters can only check equality
> Now for the sake of datanucleus and datastore we changed the
> functionality to be equality for the time being
> so the query reads like
> @NamedQuery(name="User.findActiveByUsernamePattern",
>                 query="SELECT DISTINCT user " +
>                                 "FROM User as user " +
>                                 "WHERE (firstName = :pattern OR
> lastName = :pattern) " +
>                                 "AND (active = true) " +
>                                 "ORDER BY firstName, lastName")
> and now I get
> org.datanucleus.store.appengine.query.DatastoreQuery
> $UnsupportedDatastoreFeatureException: Problem with query  FROM
> User as user WHERE (user.firstName = :pattern OR user.lastName
> = :pattern) AND (user.active = true) ORDER BY user.firstName,
> user.lastName>: Or filters cannot be applied to multiple properties
> (found both firstName and lastName).
> A search on the net does not show too many results for the problem
> that we are facing.
> Are we the only ones facing this issue? No one else is trying to port
> a legacy application to GAE? Isn't this quite a normal routine
> query in JPA???
> @datanucleus, @gae please respond.
> Regards | Vikaswww.inphina.comwww.thoughts.inphina.com

-- 
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] Documentation request: case sensitivity of sender E-mail addresses

2010-07-14 Thread Ian Marshall
In the GAE/J documentation at "Google App Engine | Java | Services |
Mail | (Mail Java API) Overview | Receiving Mail" with URL

  
http://code.google.com/intl/en/appengine/docs/java/mail/overview.html#Receiving_Mail

it states

"Your app can receive email at addresses of the following form:
'str...@appid.appspotmail.com'"

I want my app to send E-mails with the sender address of this form,
but I have discovered the hard way that this form of sender E-mail
address must(?) be fully in lower case after the "@". Trying to send
from

  "administrat...@[myappid].appspotmail.com"

fails with the exception

"javax.mail.SendFailedException: Send failure
(javax.mail.MessagingException: Illegal Arguments
(java.lang.IllegalArgumentException: Unauthorized Sender: Unauthorized
sender))"

whilst sending from

  "administrat...@[myappid].appspotmail.com"

is permitted by GAE/J.

Jason's post in "unable to send email, got
javax.mail.SendFailedException" dated 13 July 2009 with URL

 
http://groups.google.com/group/google-appengine-java/browse_thread/thread/102d9e3012380b08/dc17a9b529a71c69?lnk=gst&q=SendFailedException&fwc=1

mentions this case sensitivity.

In the interests of continuous improvement, please could the
documentation be amended to point out the case sensitivity
requirements of (the various components of) sender addresses?

-- 
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] Documentation amendment request: allowed sender E-mail addresses

2010-07-14 Thread Ian Marshall
In the GAE/J documentation at "Google App Engine | Java | Services |
Mail | (Mail Java API) Overview | Sending Mail" with URL

  
http://code.google.com/intl/en/appengine/docs/java/mail/overview.html#Sending_Mail

it states

"... the sender address of a message must be the email address of an
administrator for the application, the Google Account email address of
the current user who is signed in, or any valid email receiving
address for the app (see Receiving Mail)."

In contrast, in the documentation at "Google App Engine | Java |
Services | Mail | Using JavaMail to Send Mail | Senders and
Recipients" with URL

  
http://code.google.com/intl/en/appengine/docs/java/mail/usingjavamail.html#Senders_and_Recipients

it states

"The sender must be either the address of a registered developer for
the application, or the address of the user for the current request
signed in with a Google Account."

Please can these two texts be unified by including "any valid email
receiving address for the app" in both parts?

(On a more minor point: the overview is very extensive with many of
the details repeated in the sections following. Again, Google might
care to eliminate duplication here.)

-- 
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] Loading Seed Data for Unit Testing

2010-07-14 Thread Vikas Hazrati
Hi,
We are using JPA for our Dao's to interact with the datastore. I was
wondering is there is a way to load seed data for unit testing. I can
insert the entities using JPA in the setup() method here
private final LocalServiceTestHelper helper = new
LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());
@Before
public void setUp() {
helper.setUp();
}
but I was wondering if the LocalServiceTestHelper / anyother has a
convenience method for loading the seed data from an XML file. The
data would be present like this


 
  
  
  
  
  

Regards | Vikas
www.inphina.com
www.thoughts.inphina.com

-- 
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] Or filters cannot be applied to multiple properties

2010-07-14 Thread Vikas Hazrati
Further to my previous question
http://groups.google.com/group/google-appengine/browse_thread/thread/...
in which we were getting the following error 
'or' filters can only check equality
Now for the sake of datanucleus and datastore we changed the
functionality to be equality for the time being
so the query reads like
@NamedQuery(name="User.findActiveByUsernamePattern",
query="SELECT DISTINCT user " +
"FROM User as user " +
"WHERE (firstName = :pattern OR
lastName = :pattern) " +
"AND (active = true) " +
"ORDER BY firstName, lastName")
and now I get
org.datanucleus.store.appengine.query.DatastoreQuery
$UnsupportedDatastoreFeatureException: Problem with query : Or filters cannot be applied to multiple properties
(found both firstName and lastName).
A search on the net does not show too many results for the problem
that we are facing.
Are we the only ones facing this issue? No one else is trying to port
a legacy application to GAE? Isn't this quite a normal routine
query in JPA???
@datanucleus, @gae please respond.
Regards | Vikas
www.inphina.com
www.thoughts.inphina.com

-- 
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] 'or' filters can only check equality

2010-07-14 Thread Vikas Hazrati
Hi,
We have the following named query in JPA which we want to execute on
the datastore
@NamedQuery(name="User.findActiveByUsernamePattern",
query="SELECT DISTINCT user " +
"FROM User as user " +
"WHERE firstName like :pattern OR
lastName like :pattern " +
"AND active = true " +
"ORDER BY firstName")
when we execute the test, we get the following error
org.datanucleus.store.appengine.query.DatastoreQuery
$UnsupportedDatastoreFeatureException: Problem with query : 'or' filters can only check
equality
What is the best way to resolve this? we can write 2 queries one for
firstName and other for lastname but that is ugly.
Regards | Vikas
www.inphina.com
www.thoughts.inphina,com

-- 
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] First app in google app engine; please see whether iv understood the usage of app engine

2010-07-14 Thread John Denley
Yes, Im pretty sure that is possible, but I have not done it myself. The
"sending data back to the external application" can be done using
theURLfetch process
You will have to hunt around a bit for how to have incoming requests. I have
looked into this in the past, but never followed through to implement it.
Feel free to share back on here once you figure it out! good luck, J

On 9 July 2010 18:43, emigrant  wrote:

> On Thu, 2010-07-08 at 23:19 +0100, John Denley wrote:
> > Your site looks great and seems to work pretty well too, I dont really
> > understand your question though, as you seem to have implemented in
> > pure javascript as it is currently. Your "GAE bit" could be a server
> > based function (and the data can be held in the GAE datastore too) and
> > the client can ask the server to do the java processing and then pass
> > back the results to be displayed on the screen.
> >
> > Hope that helps and makes sense!
> > John
>
> John,
> thanks for your encouraging reply.
> to make my question clear,
>
> is it possible to send user input from an external site, to the java
> application hosted in appspot and process the input and send the out put
> back to the external site?
>
> 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 
"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.