[appengine-java] Re: Exception while getting data from HttpSession

2009-09-23 Thread Simon

Can you show the code for your Twitter class?

On Sep 22, 9:48 pm, Tahir Akram  wrote:
> I am getting following exception while getting data from session. I
> have following 2 servlets. One set session and other retrieve
> attribute from it. I have also sett session enable tag in appengine
> web xml file. (note: Using twitter4j)
>
> [FIRST SERVLET]
>
>  Twitter twitter = new Twitter();
>                    twitter.setOAuthConsumer("", "");
>                    RequestToken requestToken = null;
>                 try {
>                         requestToken = twitter.getOAuthRequestToken();
>                         log.info("OAuth token has been taken");
>                 } catch (TwitterException e) {
>                         log.warning(e.toString());
>                 }
>
>                 HttpSession session = request.getSession();
>                 if (session.getAttribute("twitter")==null){
>                         session.setAttribute("twitter", twitter);
>                         out.println("-> session 
> is set");
>                 }
>
>                 if (session.getAttribute("token")==null){
>                         session.setAttribute("token", requestToken);
>                         out.println("-> session 
> is set");
>                 }
>                 String authUrl = requestToken.getAuthorizationURL();
>
> [SECOND SERVLET]
>
>                         HttpSession session = request.getSession();
>
>                         twitter = (Twitter)session.getAttribute("twitter");
>                         r  = (RequestToken)session.getAttribute("token");
>
>                         twitter.setOAuthAccessToken(r.getAccessToken());
>
>                         twitter.updateStatus("Hello World!");
>
> #
> 09-22 01:34PM 12.913
>
> EXCEPTION
> javax.servlet.ServletException: java.lang.ArrayStoreException:
> [Ljava.lang.String;
>         at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
> (AppVersionHandlerMap.java:239)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle
> (HandlerWrapper.java:139)
>         at org.mortbay.jetty.Server.handle(Server.java:313)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 506)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
> (HttpConnection.java:830)
>         at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
> (RpcRequestParser.java:76)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>         at
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
> (JettyServletEngineAdapter.java:139)
>         at com.google.apphosting.runtime.JavaRuntime.handleRequest
> (JavaRuntime.java:235)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:4950)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:4948)
>         at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
> (BlockingApplicationHandler.java:24)
>         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> 359)
>         at com.google.net.rpc.impl.Server$2.run(Server.java:823)
>         at com.google.tracing.LocalTraceSpanRunnable.run
> (LocalTraceSpanRunnable.java:56)
>         at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
> (LocalTraceSpanBuilder.java:516)
>         at com.google.net.rpc.impl.Server.startRpc(Server.java:778)
>         at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
>         at com.google.net.rpc.impl.ServerConnection.messageReceived
> (ServerConnection.java:437)
>         at com.google.net.rpc.impl.RpcConnection.parseMessages
> (RpcConnection.java:319)
>         at com.google.net.rpc.impl.RpcConnection.dataReceived
> (RpcConnection.java:290)
>         at com.google.net.async.Connection.handleReadEvent(Connection.java:
> 428)
>         at com.google.net.async.EventDispatcher.processNetworkEvents
> (EventDispatcher.java:762)
>         at com.google.net.async.EventDispatcher.internalLoop
> (EventDispatcher.java:207)
>         at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
> 101)
>         at com.google.net.rpc.RpcService.runUntilServerShutdown
> (RpcService.java:251)
>         at com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run
> (JavaRuntime.java:392)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.ArrayStoreException: [Ljava.lang.String;
>         at java.io.ObjectInputStream.readArray(Unknown Source)
>         at java.io.ObjectInputStream.readObject0(Unknown Source)
>         at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
>         at java.io.ObjectInputStream.readSerialData(Unknown Source)
>         at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
>         at java.io.ObjectInputStream.readObject0(Unknown S

[appengine-java] Re: DisplayTag JSP

2009-11-16 Thread Simon
If you have any objects in that resultset which are lazily loaded,
then closing the entity manager before you've looped through the
resultset will produce an exception and the route to the data store to
retrieve the data has been closed.

You have two options:

1) Aggressively fetch the data which you're looping through, so that
all data is retrieved from the data store before you iterate over it.
2) Close the entity manager after you've looped through the required
data.

On Nov 16, 3:51 am, YONG  wrote:
> Hi, I want to know what is the different of this code when compiling
> and execute in GAE.
>
> <%
>         EntityManager em = EMF.getInstance().createEntityManager();
>         List users = (List) em.createQuery(
>                         "SELECT FROM " + 
> User.class.getName()).getResultList();
>         request.setAttribute("rs", users);
>         em.close();
> %>
>
>          sort="list" pagesize="10" class="display">
>                          headerClass="sortable" />
>                          headerClass="sortable" />
>         
>         
>         
>         
> 
>
> The above code is giving error code HTTP 500. However, when I change
> to
>
> <%
>         EntityManager em = EMF.getInstance().createEntityManager();
>         List users = (List) em.createQuery(
>                         "SELECT FROM " + 
> User.class.getName()).getResultList();
>         request.setAttribute("rs", users);
>         // em.close(); // just comment this line and move it down
> %>
>
>          sort="list" pagesize="10" class="display">
>                          headerClass="sortable" />
>                          headerClass="sortable" />
>         
>         
>         
>         
> 
>
> <%
>         em.close();
> %>
>
> Then the JSP is running and show the result in displaytag table.
>
> Anyone can explain why?

--

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




[appengine-java] Re: Tweak static file without re-deploying

2010-03-23 Thread Simon
It depends why you're making the tweaks - if you are just testing the
CSS to make sure a certain "tweak" has the desired affect, then you
could use something like Firebug to change the CSS on a particular
page until it's correct.  However, if you want that change to persist
across multiple pages then I don't see how you can do that without
redeploying.

On Mar 22, 8:45 pm, "Ikai L (Google)"  wrote:
> Poorly worded first sentence should read: "Unless I am mistaken,
> there's no way to only push static assets without pushing the rest of
> the application."
>
> On Mon, Mar 22, 2010 at 1:45 PM, Ikai L (Google)  wrote:
>
>
>
> > There's no way to just update static assets. I find that I always have
> > to update my HTML files whenever I update my static assets anyway. As
> > a safeguard against caches, it's a common practice to reference your
> > CSS and JavaScript files like this
>
> > 
>
> > Most browsers and proxies should respect cache policies, but this is
> > an almost foolproof way of doing it.
>
> > On Mon, Mar 22, 2010 at 1:38 PM, Steve Pritchard  wrote:
> >> Hi all,
>
> >> Is there any way to tweak or add a static file (such as a .css file)
> >> using without redeploying the whole application.  I do not mean from
> >> inside the servlet engine - I understand why this is not allowed.  I
> >> mean, does the deployer have a 'light-weight' mode that will allow it
> >> to 'zap'  the present deployment static file.
>
> >> It seems overkill to redeploy the whole application just to modify one
> >> or 2 characters in a .css file.
>
> >> Thanks,
> >> Steve
>
> >> --
> >> 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 
> >> athttp://groups.google.com/group/google-appengine-java?hl=en.
>
> > --
> > Ikai Lan
> > Developer Programs Engineer, Google App Engine
> >http://googleappengine.blogspot.com|http://twitter.com/app_engine
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App 
> Enginehttp://googleappengine.blogspot.com|http://twitter.com/app_engine

-- 
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: Removing items from a List using JDO

2010-03-23 Thread Simon
Your relationship looks to be unidirectional (unless you didn't post
all of the XYZMusicList class).

Looking at the document link you posted it would seem to suggest that
you need to either use the Join annotation on the "djLists" element or
either annotate the list as a collection with a foreign key.  I'm just
guessing however, as I've never used the JDO annotations.

On Mar 23, 2:53 am, alosii  wrote:
> I've looked at some examples and see nothing wrong. A little help from
> the community would be appreciated.  =)

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-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 JPA Lifecycle Callbacks

2010-05-06 Thread Simon
Has anyone managed to get the JPA lifecycle callbacks to work?

I've annotated methods with @PrePersist and @PostLoad and the methods
just never get called.  I followed the documentation at
http://www.datanucleus.org/products/accessplatform_2_0/jpa/lifecycle_callbacks.html
just to make sure that my methods had the correct signatures.

-- 
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: read operation that fails with a write error

2010-05-06 Thread Simon
I would put the DataNucleus classes onto debug.  This will then let
you know where you're accidentally modifying your objects in the
background which causes the objects to be flagged as dirty - that will
be the cause of your unexpected writes.

On May 5, 4:13 pm, temrad  wrote:
> I've a strange issue ...
> My application is a JSF one using primefaces. Access to the Datastore
> is protected by a DAO (sort of) layer. JPA is used.
> A page showing a quite great number of entites (just showing, not
> enabling to modify them) ends with the following exception:
>
> Uncaught exception from servlet
> com.google.apphosting.api.ApiProxy$RequestTooLargeException: The
> request to API call datastore_v3.Put() was too large.
>         at com.google.apphosting.runtime.ApiProxyImpl
> $AsyncApiFuture.rpcFinished(ApiProxyImpl.java:270)
>         at com.google.net.rpc.RpcStub$RpcCallbackDispatcher
> $1.runInContext(RpcStub.java:1025)
>         at com.google.tracing.TraceContext$TraceContextRunnable
> $1.run(TraceContext.java:444)
>         at com.google.tracing.TraceContext.runInContext(TraceContext.java:
> 684)
>         at com.google.tracing.TraceContext
> $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java:
> 322)
>         at com.google.tracing.TraceContext
> $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java:
> 314)
>         at com.google.tracing.TraceContext
> $TraceContextRunnable.run(TraceContext.java:442)
>         at com.google.net.rpc.RpcStub
> $RpcCallbackDispatcher.rpcFinished(RpcStub.java:1046)
>         at com.google.net.rpc.RPC.internalFinish(RPC.java:2047)
>         at com.google.net.rpc.impl.RpcNetChannel.finishRpc(RpcNetChannel.java:
> 2338)
>         at
> com.google.net.rpc.impl.RpcNetChannel.messageReceived(RpcNetChannel.java:
> 1265)
>         at
> com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:
> 319)
>         at
> com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:
> 290)
>         at com.google.net.async.Connection.handleReadEvent(Connection.java:
> 474)
>         at
> com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:
> 831)
>         at
> com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:
> 207)
>         at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:
> 103)
>         at com.google.net.async.GlobalEventRegistry
> $2.runLoop(GlobalEventRegistry.java:95)
>         at com.google.net.async.LoopingEventDispatcher
> $EventDispatcherThread.run(LoopingEventDispatcher.java:378)
>
> I cannot understand how a read only list can fail on a "write error"
> operation.
> The snippet of the method that causes the eror is the following:
>
>         public List getAlarmsByUser(final String uId) {
>                 final List result = new ArrayList();
>                 execute(new Runnable() {
>                         public void run(EntityManager em) {
>                                 User user = em.find(User.class, uId);
>                                 List alarms = 
> (List)user.getAlarms();
>                                 em.clear();
>                                 for (Alarm alarm : alarms) {
>                                         AlarmDTO alarmDTO = new AlarmDTO();
>                                         hydrateDTO(alarmDTO, alarm);
>                                         result.add(alarmDTO);
>                                 }
>                         }
>                 });
>                 return result;
>         }
>
> The "execute" method just creates an entityManager, open a transaction
> before calling the run method and then, call commit or rollback at the
> end.
>
> hydrateDTO copies values from the JPA entity alarm to the AlarmDTO.
>
> I've tried to execute this method outside any transaction. The result
> is the same ...
>
> Can someone can explain me why GAE try to write something and what it
> tries to write ...
>
> --
> 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 
> 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: DataNucleus JPA Lifecycle Callbacks

2010-05-06 Thread Simon
Is all of your JPA configuration in annotations, or do you also
configure your entities through XML?

On May 6, 10:07 am, Sudhir Ramanandi  wrote:
> I have life cycle listeners working proper locally.. not tried on cloud
> yet..
>
>
>
> On Thu, May 6, 2010 at 2:32 PM, Simon  wrote:
> > Has anyone managed to get the JPA lifecycle callbacks to work?
>
> > I've annotated methods with @PrePersist and @PostLoad and the methods
> > just never get called.  I followed the documentation at
>
> >http://www.datanucleus.org/products/accessplatform_2_0/jpa/lifecycle_...
> > just to make sure that my methods had the correct signatures.
>
> > --
> > 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.
>
> --
> Sudhir Ramanandihttp://www.ramanandi.org
>
> --
> 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 
> 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: DataNucleus JPA Lifecycle Callbacks

2010-05-06 Thread Simon
Well I'm confused then.  I've annotated my class with @PostLoad,
@PrePersist and @PreUpdate.

The @PrePersist and @PreUpdate methods never get called, whether the
methods are located in the @Entity annotated class or in a defined
@EntityListeners annotated class.  I've tried leaving the persistence
to the DN dirty-checking persistence and also by manually re-
persisting the entity using the EntityManager's persist method.

The @PostLoad method is only ever called if the entity is loaded via
the EntityManager's find method - if you retrieve a list of the
entities via a JPA defined query then the @PostLoad method just isn't
called.

To the couple of people who have this working, have you got some
example code/configuration you can share?

On May 6, 10:15 am, Chau Huynh  wrote:
> My entity classes were annotated, and work both in local and appspot. Thanks
>
>
>
> On Thu, May 6, 2010 at 4:02 PM, Simon  wrote:
> > Has anyone managed to get the JPA lifecycle callbacks to work?
>
> > I've annotated methods with @PrePersist and @PostLoad and the methods
> > just never get called.  I followed the documentation at
>
> >http://www.datanucleus.org/products/accessplatform_2_0/jpa/lifecycle_...
> > just to make sure that my methods had the correct signatures.
>
> > --
> > 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 
> 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: DataNucleus JPA Lifecycle Callbacks

2010-05-06 Thread Simon
Thanks for the example Chau, it looks identical to my configuration.
I'll try to create a mini-project and see if I can duplicate the
issue, because it definitely isn't working locally.

On May 6, 10:33 am, Chau Huynh  wrote:
> Here you are ..
>
> import java.io.Serializable;
> import java.util.Calendar;
> import java.util.Date;
>
> import javax.persistence.Entity;
> import javax.persistence.GeneratedValue;
> import javax.persistence.GenerationType;
> import javax.persistence.Id;
> import javax.persistence.PostLoad;
> import javax.persistence.PrePersist;
> import javax.persistence.PreUpdate;
>
> @Entity
> public class LeaveItem implements Serializable {
>     private static final long serialVersionUID = 1L;
>
>     @Id
>     @GeneratedValue (strategy = GenerationType.IDENTITY)
>     private Long id;
>
>     private Date dateStart;
>
>     transient private int start;
>
>     transient private int end;
>
>     transient private int month;
>
>     transient private int year;
>
>     @SuppressWarnings("unused")
>     private int monthTag; // de-normalize
>
>     @SuppressWarnings("unused")
>     @PostLoad
>     private void postLoad() {
>         Calendar calendar = Calendar.getInstance();
>         calendar.setTime(dateStart);
>         start = calendar.get(Calendar.DAY_OF_MONTH);
>         month = calendar.get(Calendar.MONTH) + 1;
>         year = calendar.get(Calendar.YEAR);
>     }
>
>     @SuppressWarnings("unused")
>     @PrePersist
>     @PreUpdate
>     private void setMonthTag() {
>         this.monthTag = DateUtil.toIntTag(dateStart); // to QMM
>     }
>
>     
>
>
>
> }
> On Thu, May 6, 2010 at 4:24 PM, Simon  wrote:
> > Well I'm confused then.  I've annotated my class with @PostLoad,
> > @PrePersist and @PreUpdate.
>
> > The @PrePersist and @PreUpdate methods never get called, whether the
> > methods are located in the @Entity annotated class or in a defined
> > @EntityListeners annotated class.  I've tried leaving the persistence
> > to the DN dirty-checking persistence and also by manually re-
> > persisting the entity using the EntityManager's persist method.
>
> > The @PostLoad method is only ever called if the entity is loaded via
> > the EntityManager's find method - if you retrieve a list of the
> > entities via a JPA defined query then the @PostLoad method just isn't
> > called.
>
> > To the couple of people who have this working, have you got some
> > example code/configuration you can share?
>
> > On May 6, 10:15 am, Chau Huynh  wrote:
> > > My entity classes were annotated, and work both in local and appspot.
> > Thanks
>
> > > On Thu, May 6, 2010 at 4:02 PM, Simon  wrote:
> > > > Has anyone managed to get the JPA lifecycle callbacks to work?
>
> > > > I've annotated methods with @PrePersist and @PostLoad and the methods
> > > > just never get called.  I followed the documentation at
>
> > > >http://www.datanucleus.org/products/accessplatform_2_0/jpa/lifecycle_.
> > ..
> > > > just to make sure that my methods had the correct signatures.
>
> > > > --
> > > > 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 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
> 

[appengine-java] Re: DataNucleus JPA Lifecycle Callbacks

2010-05-06 Thread Simon
Well I've found the following.  For JPA-annotated classes the
@PrePersist and @PreUpdate methods are only called if DN detects that
the object is dirty.  I have the problem that the @PrePersist and the
@PreUpdate methods are the things which actually make the objects
dirty - I only modify transient fields which were supposed to get
merged into persistent collections before the object gets persisted.
I'll fudge around this one I guess and somehow flag the object as
dirty.

However, I still expect the @PostLoad method to get called if I load a
collection of objects via a NamedQuery and that just doesn't seem to
happen - is this a bug, as I can't find anything in the JPA spec which
states that @PostLoad methods are only called on retrieving objects
via ID?

On May 6, 10:38 am, Simon  wrote:
> Thanks for the example Chau, it looks identical to my configuration.
> I'll try to create a mini-project and see if I can duplicate the
> issue, because it definitely isn't working locally.
>
> On May 6, 10:33 am, Chau Huynh  wrote:
>
>
>
> > Here you are ..
>
> > import java.io.Serializable;
> > import java.util.Calendar;
> > import java.util.Date;
>
> > import javax.persistence.Entity;
> > import javax.persistence.GeneratedValue;
> > import javax.persistence.GenerationType;
> > import javax.persistence.Id;
> > import javax.persistence.PostLoad;
> > import javax.persistence.PrePersist;
> > import javax.persistence.PreUpdate;
>
> > @Entity
> > public class LeaveItem implements Serializable {
> >     private static final long serialVersionUID = 1L;
>
> >     @Id
> >     @GeneratedValue (strategy = GenerationType.IDENTITY)
> >     private Long id;
>
> >     private Date dateStart;
>
> >     transient private int start;
>
> >     transient private int end;
>
> >     transient private int month;
>
> >     transient private int year;
>
> >     @SuppressWarnings("unused")
> >     private int monthTag; // de-normalize
>
> >     @SuppressWarnings("unused")
> >     @PostLoad
> >     private void postLoad() {
> >         Calendar calendar = Calendar.getInstance();
> >         calendar.setTime(dateStart);
> >         start = calendar.get(Calendar.DAY_OF_MONTH);
> >         month = calendar.get(Calendar.MONTH) + 1;
> >         year = calendar.get(Calendar.YEAR);
> >     }
>
> >     @SuppressWarnings("unused")
> >     @PrePersist
> >     @PreUpdate
> >     private void setMonthTag() {
> >         this.monthTag = DateUtil.toIntTag(dateStart); // to QMM
> >     }
>
> >     
>
> > }
> > On Thu, May 6, 2010 at 4:24 PM, Simon  wrote:
> > > Well I'm confused then.  I've annotated my class with @PostLoad,
> > > @PrePersist and @PreUpdate.
>
> > > The @PrePersist and @PreUpdate methods never get called, whether the
> > > methods are located in the @Entity annotated class or in a defined
> > > @EntityListeners annotated class.  I've tried leaving the persistence
> > > to the DN dirty-checking persistence and also by manually re-
> > > persisting the entity using the EntityManager's persist method.
>
> > > The @PostLoad method is only ever called if the entity is loaded via
> > > the EntityManager's find method - if you retrieve a list of the
> > > entities via a JPA defined query then the @PostLoad method just isn't
> > > called.
>
> > > To the couple of people who have this working, have you got some
> > > example code/configuration you can share?
>
> > > On May 6, 10:15 am, Chau Huynh  wrote:
> > > > My entity classes were annotated, and work both in local and appspot.
> > > Thanks
>
> > > > On Thu, May 6, 2010 at 4:02 PM, Simon  wrote:
> > > > > Has anyone managed to get the JPA lifecycle callbacks to work?
>
> > > > > I've annotated methods with @PrePersist and @PostLoad and the methods
> > > > > just never get called.  I followed the documentation at
>
> > > > >http://www.datanucleus.org/products/accessplatform_2_0/jpa/lifecycle_.
> > > ..
> > > > > just to make sure that my methods had the correct signatures.
>
> > > > > --
> > > > > 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.
> &g

[appengine-java] Re: Fwd: JPA entity listner callbacks are not invoked when using Query API

2010-06-09 Thread Simon
I've had the same problem and to be honest my solution was to move
away from using JPA onto Objectify - at least there I know what is
happening, rather than relying on a partial implementation of the JPA
spec.  It's much better suited to the underlying datastore anyway,
since JPA just isn't a good fit for BigTable.

On Jun 8, 10:10 am, Sudhir Ramanandi  wrote:
> Ohh, sorry.. in the example, I gave a wrong class name
> "UnownedRelationLoader"
> Its FooEntityListner and still it does not work
>
> public class FooEntityListner {
> public void postLoad(BaseEntity entity) {
> ---
>
>
>
> }
> -- Forwarded message --
> From: Sudhir Ramanandi 
> Date: Tue, Jun 8, 2010 at 2:37 PM
> Subject: JPA entity listner callbacks are not invoked when using Query API
> To: google-appengine-java@googlegroups.com
>
> When an entity is loaded using query, postLoad() call back is not invoked.
> postLoad() works only with entityManager.find(clazz, id)
>
> As per the JPA specification:
> "The PostLoad method is invoked before a query result is returned or
> accessed or before an association is traversed."
>
> Example:
>
> @EntityListeners(value={FooEntityListner.class})
> @Entity
> public class Foo extends BaseEntity {
>
> }
>
> public class UnownedRelationLoader {
> public void postLoad(BaseEntity entity) {
> ---
> }
>
> Query q = getEntityManager().createQuery("select from " +
> Foo.class.getName());
>
> callback will not be called in above case.
>
> Reported the issue 
> herehttp://code.google.com/p/googleappengine/issues/detail?id=3326
> Please vote for it.
>
> --
> Sudhir Ramanandihttp://www.ramanandi.org
>
> --
> Sudhir Ramanandihttp://www.ramanandi.org- 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: Fwd: JPA entity listner callbacks are not invoked when using Query API

2010-06-09 Thread Simon
I meant to add, that I asked the same question a few weeks ago with no
resolution -
http://groups.google.com/group/google-appengine-java/browse_thread/thread/5e3b24316423385f/e348c376c2f8e7a8?lnk=gst&q=jpa+callback#e348c376c2f8e7a8

On Jun 9, 9:33 am, Simon  wrote:
> I've had the same problem and to be honest my solution was to move
> away from using JPA onto Objectify - at least there I know what is
> happening, rather than relying on a partial implementation of the JPA
> spec.  It's much better suited to the underlying datastore anyway,
> since JPA just isn't a good fit for BigTable.
>
> On Jun 8, 10:10 am, Sudhir Ramanandi  wrote:
>
>
>
> > Ohh, sorry.. in the example, I gave a wrong class name
> > "UnownedRelationLoader"
> > Its FooEntityListner and still it does not work
>
> > public class FooEntityListner {
> > public void postLoad(BaseEntity entity) {
> > ---
>
> > }
> > -- Forwarded message --
> > From: Sudhir Ramanandi 
> > Date: Tue, Jun 8, 2010 at 2:37 PM
> > Subject: JPA entity listner callbacks are not invoked when using Query API
> > To: google-appengine-java@googlegroups.com
>
> > When an entity is loaded using query, postLoad() call back is not invoked.
> > postLoad() works only with entityManager.find(clazz, id)
>
> > As per the JPA specification:
> > "The PostLoad method is invoked before a query result is returned or
> > accessed or before an association is traversed."
>
> > Example:
>
> > @EntityListeners(value={FooEntityListner.class})
> > @Entity
> > public class Foo extends BaseEntity {
>
> > }
>
> > public class UnownedRelationLoader {
> > public void postLoad(BaseEntity entity) {
> > ---
> > }
>
> > Query q = getEntityManager().createQuery("select from " +
> > Foo.class.getName());
>
> > callback will not be called in above case.
>
> > Reported the issue 
> > herehttp://code.google.com/p/googleappengine/issues/detail?id=3326
> > Please vote for it.
>
> > --
> > Sudhir Ramanandihttp://www.ramanandi.org
>
> > --
> > Sudhir Ramanandihttp://www.ramanandi.org-Hide quoted text -
>
> > - Show quoted text -- 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: Fwd: JPA entity listner callbacks are not invoked when using Query API

2010-06-09 Thread Simon
If you're not trying to write a cross-platform app, I'd really
recommend giving Objectify or one of the alternatives (Twig, SimpleDS)
a try.

My conversion from JPA to Objectify took me very little time,
primarily due to the excellent documentation.  Spin-up time on GAE
reduced significantly as well!

On Jun 9, 10:17 am, Sudhir Ramanandi  wrote:
> Really.. using JPA has been a tragedy for me...  I doubt if a real project
> can be built on App engine's current JPA support..
>
>
>
>
>
> On Wed, Jun 9, 2010 at 2:03 PM, Simon  wrote:
> > I've had the same problem and to be honest my solution was to move
> > away from using JPA onto Objectify - at least there I know what is
> > happening, rather than relying on a partial implementation of the JPA
> > spec.  It's much better suited to the underlying datastore anyway,
> > since JPA just isn't a good fit for BigTable.
>
> > On Jun 8, 10:10 am, Sudhir Ramanandi  wrote:
> > > Ohh, sorry.. in the example, I gave a wrong class name
> > > "UnownedRelationLoader"
> > > Its FooEntityListner and still it does not work
>
> > > public class FooEntityListner {
> > > public void postLoad(BaseEntity entity) {
> > > ---
>
> > > }
> > > -- Forwarded message --
> > > From: Sudhir Ramanandi 
> > > Date: Tue, Jun 8, 2010 at 2:37 PM
> > > Subject: JPA entity listner callbacks are not invoked when using Query
> > API
> > > To: google-appengine-java@googlegroups.com
>
> > > When an entity is loaded using query, postLoad() call back is not
> > invoked.
> > > postLoad() works only with entityManager.find(clazz, id)
>
> > > As per the JPA specification:
> > > "The PostLoad method is invoked before a query result is returned or
> > > accessed or before an association is traversed."
>
> > > Example:
>
> > > @EntityListeners(value={FooEntityListner.class})
> > > @Entity
> > > public class Foo extends BaseEntity {
>
> > > }
>
> > > public class UnownedRelationLoader {
> > > public void postLoad(BaseEntity entity) {
> > > ---
> > > }
>
> > > Query q = getEntityManager().createQuery("select from " +
> > > Foo.class.getName());
>
> > > callback will not be called in above case.
>
> > > Reported the issue herehttp://
> > code.google.com/p/googleappengine/issues/detail?id=3326
> > > Please vote for it.
>
> > > --
> > > Sudhir Ramanandihttp://www.ramanandi.org
>
> > > --
> > > Sudhir Ramanandihttp://www.ramanandi.org-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.
>
> --
> Sudhir Ramanandihttp://www.ramanandi.org- 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: What would you recommend: Objectify or Twig?

2010-06-15 Thread Simon
There's a big thread at
http://groups.google.com/group/google-appengine-java/browse_thread/thread/79078132130a3dfe/d64fb8631ebfbe76?lnk=gst&q=objectify+twig#d64fb8631ebfbe76
where the authors of the two frameworks discuss the respective
benefits of their frameworks, for different scenarios.  It's probably
worth having a read, although it's getting a bit old now.

Personally I've found Objectify very good - very thorough
documentation and it works for me :)

On Jun 15, 9:51 am, Marcel Overdijk  wrote:
> What would you recommend: Objectify or Twig?

-- 
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 Entity Group

2010-06-22 Thread Simon
I suggest you read the documentation for storing data, in both the
Python and Java sections.

For example, the Python sections gives a good overview of Entity
Groups here - 
http://code.google.com/appengine/docs/python/datastore/keysandentitygroups.html

On Jun 22, 9:49 am, MANISH DHIMAN  wrote:
> Hi All
> Please provide me some detail information about entity group.

-- 
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: Limiting the number of requests per IP each minute

2010-06-29 Thread Simon
Ignoring the GAE-side of the question, how are you planning on
handling people who are behind proxies and routers?  Multiple people
will all look like they are coming from the same IP address - maybe
this isn't an issue for you!

>From a GAE perspective you might want to do some reading around
sharding counters. e.g. 
http://code.google.com/appengine/articles/sharding_counters.html

On Jun 28, 12:17 pm, mscwd01  wrote:
> I assume my idea was the best anyone can come up with?
>
> On Jun 27, 10:27 am, mscwd01  wrote:
>
>
>
> > Hey,
>
> > I am developing an app which "awards" users for visiting a specific
> > link. However, I want to ensure this is not abused by people writing
> > scripts to visit the link rather than manually viewing it.
>
> > Is there a way to check how many times a specific IP address has
> > accessed your application within the last minute and deny access if
> > the visit count is higher than, say, 20.
>
> > I guess I could use the memcache to insert the users IP (if they have
> > not visited before), then on each subsequent visit check if the IP
> > exists and if so increment the visit count. However, will this work if
> > you have thousands of concurrent users?
>
> > Is there a better way?
>
> > Many thanks- 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: Application restart for almost every request? What happened?

2010-06-29 Thread Simon
You probably want to have a read of the following FAQ -
http://code.google.com/appengine/kb/java.html#What_Is_A_Loading_Request

On Jun 29, 4:13 am, opok  wrote:
> Error Message: "This request caused a new process to be started for
> your application, and thus caused your application code to be loaded
> for the first time. This request may thus take longer and use more CPU
> than a typical request for your application."
>
> My App just read a cache string with small size (if not exist query
> from database) and then output the response, why it always turns out
> that it need to restart the whole application? It happens in 95% of
> incoming requests.

-- 
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: Application restart for almost every request? What happened?

2010-06-29 Thread Simon
There is no real workaround, since they are cycling your application
out since it's getting such low traffic as explained in the FAQ.

The best you can do is minimise the loading time, by removing
dependencies on complicated frameworks and using lazy initialisation.
As soon as your application starts getting a more consistent amount of
traffic the problem will be minimised, although you will still get
some loading requests as the GAE backend potentially load balances
your application.

On Jun 29, 1:14 pm, opok  wrote:
> OK,  I did that.
> But is there any workaround or some other way to avoid this, I am sure
> that my app is run with low resource requirement, it indeed have no
> reason to restart, but currently it restarts almost in every incoming
> request!
>
> On 6月29日, 下午8时05分, Jake  wrote:
>
>
>
> > Hey,
>
> > Actually, what you probably want to do is star this 
> > issue:http://code.google.com/p/googleappengine/issues/detail?id=2931
>
> > It's been happening for awhile now, but generally only to low-traffic
> > users, so it hasn't gotten much attention.  Creeping up in the list,
> > though!
>
> > Jake
>
> > On Jun 29, 4:44 am, Simon  wrote:
>
> > > You probably want to have a read of the following FAQ 
> > > -http://code.google.com/appengine/kb/java.html#What_Is_A_Loading_Request
>
> > > On Jun 29, 4:13 am, opok  wrote:
>
> > > > Error Message: "This request caused a new process to be started for
> > > > your application, and thus caused your application code to be loaded
> > > > for the first time. This request may thus take longer and use more CPU
> > > > than a typical request for your application."
>
> > > > My App just read a cache string with small size (if not exist query
> > > > from database) and then output the response, why it always turns out
> > > > that it need to restart the whole application? It happens in 95% of
> > > > incoming requests.- 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: AppEngine SDK 1.3.5 ECLIPSE UPGRADE PROBLEM

2010-07-02 Thread Simon
Reading the stacktrace, you appear to be deploying two versions of
DataNucleus into the same web application.  I'd try clearing up your
dependencies and redeploying.

On Jul 1, 2:45 pm, Andreas  wrote:
> hi, i have just upgraded in eclipse the appengine sdk 1.3.4->1.3.5 .
> however there are some problems that occured, although my application
> was functioning good before the update. The web server returns a HTTP
> Error 500 internal server error.the console outputs the following :
>
> INFO: The server is running athttp://localhost:/
> Jul 1, 2010 4:40:26 PM com.google.apphosting.utils.jetty.JettyLogger
> warn
> WARNING: Error for /insert
> java.lang.ExceptionInInitializerError
>         at core.insertModule.doGet(insertModule.java:65)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 511)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1166)
>         at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi­lter.java:
> 51)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans­actionCleanupFilter.java:
> 43)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile­Filter.java:
> 122)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 388)
>         at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> 216)
>         at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> 182)
>         at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> 765)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 418)
>         at
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEn­gineWebAppContext.java:
> 70)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>         at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:349)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 152)
>         at org.mortbay.jetty.Server.handle(Server.java:326)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 542)
>         at org.mortbay.jetty.HttpConnection
> $RequestHandler.headerComplete(HttpConnection.java:923)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> 409)
>         at org.mortbay.thread.QueuedThreadPool
> $PoolThread.run(QueuedThreadPool.java:582)
> Caused by: javax.jdo.JDOFatalInternalException: Unexpected exception
> caught.
> NestedThrowables:
> java.lang.reflect.InvocationTargetException
>         at
> javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOH­elper.java:
> 1186)
>         at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> 803)
>         at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> 1086)
>         at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:
> 914)
>         at util.PMF.(PMF.java:8)
>         ... 28 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp­l.java:
> 25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime­.java:
> 100)
>         at javax.jdo.JDOHelper$16.run(JDOHelper.java:1956)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at javax.jdo.JDOHelper.invoke(JDOHelper.java:1951)
>         at
> javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOH­elper.java:
> 1159)
>         ... 32 more
> Caused by: org.datanucleus.exceptions.NucleusException: Plugin
> (Bundle) "org.datanucleus.store.appengine" is already registered.
> Ensure you dont have multiple JAR versions of the same plugin in the
> classpath. The URL "file:/home/petrucci/Hbasewrk/Helium/war/WEB-INF/
> lib/datanucleus-appengi

[appengine-java] Re: Request was aborted after waiting too long to attempt to service your request.

2010-07-02 Thread Simon
It's a loading request - please read the FAQ on what causes it and how
to minimise their occurrence at 
http://code.google.com/appengine/kb/java.html#What_Is_A_Loading_Request

On Jul 2, 11:00 am, sree  wrote:
> application id: su-raksha
> version: appengine-java-sdk-1.3.5
>
> precompilation enabled
>
> what is the reason for the below message in the log ?
>
> 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.
>
> response will be
> Error: Server Error
>
> please explain the cause and how to solve it ?

-- 
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: Breaking change in data store?

2010-07-09 Thread Simon
I know that there was planned downtime yesterday (see
http://groups.google.com/group/google-appengine-downtime-notify if you
aren't monitoring it already) as part of their plan to try and fix
their datastore performance issues (mentioned here
http://googleappengine.blogspot.com/2010/07/upcoming-datastore-downtime.html).
It sounds to me like the problems your facing are very much linked to
these changes!


On Jul 8, 10:39 am, Marc Guillemot  wrote:
> Hi,
>
> yesterday my application worked just fine. Today data isn't reachable
> with a simple query anymore (data is here, I can find it through the
> Data Viewer).
>
> Here is the exception thrown:
> 
> Uncaught exception from servlet
> The primary key for mymodel.JarData is an unencoded string but the key
> of the corresponding entity in the datastore does not have a name.  You
> may want to either change the primary key to be an encoded string (add
> the "gae.encoded-pk" extension), change the primary key to be of type
> com.google.appengine.api.datastore.Key, or, if you're certain that this
> class will never have a parent, change the primary key to be of type Long.
> org.datanucleus.store.appengine.FatalNucleusUserException: The primary
> key for mymodel.JarData is an unencoded string but the key of the
> corresponding entity in the datastore does not have a name.  You may
> want to either change the primary key to be an encoded string (add the
> "gae.encoded-pk" extension), change the primary key to be of type
> com.google.appengine.api.datastore.Key, or, if you're certain that this
> class will never have a parent, change the primary key to be of type Long.
>         at
> org.datanucleus.store.appengine.DatastoreFieldManager.fetchStringPKField(Da­tastoreFieldManager.java:246)
>         at
> org.datanucleus.store.appengine.DatastoreFieldManager.fetchStringField(Data­storeFieldManager.java:192)
>         at
> org.datanucleus.state.AbstractStateManager.replacingStringField(AbstractSta­teManager.java:1180)
> 
> 
>
> My question: how can it happen, that changes in DataStore have such
> breaking consequences? And how often will it happen?
>
> Cheers,
> Marc.
> --
> Blog:http://mguillem.wordpress.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: "The request is invalid for an unspecified reason."

2010-07-09 Thread Simon
What version of the SDK are you using?  I was under the impression
that the limit had been increased to 3000 files across the
application, with the following limits:

- 150 MB max combined size of code files
- 10 MB max individual size of any file
- 1000 files max per directory (not counting files in subdirectories)


On Jul 8, 1:00 pm, "myownwaste...@googlemail.com"
 wrote:
> For the records: I've hit the static files limit (1000).
> reducing the number of files prevents the deployment error.
>
> On Jul 8, 9:10 am, "myownwaste...@googlemail.com"
>
>
>
>  wrote:
> > App deployment fails with "The request is invalid for an unspecified
> > reason."
>
> > What the heck should that mean? The app runs fine in development mode.
> > Is there any way to figure out what might go wrong? App engine logs?
> > Constraints?
>
> > Thanks in advance, Heiko- 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 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] Re: Unable to execute query for a large number of entities

2010-07-19 Thread Simon
I believe (and this may be wrong) that the index data is only created
when the object is inserted/updated.  Therefore, any existing data
will be not covered by the new index and won't be retrieved with any
queries which are based upon the index.

Updating them or reuploading them should solve the issue.

On Jul 16, 9:18 am, Ice13ill  wrote:
> I created and uploaded an index for those 2 params:
>
>      source="auto">
>         
>         
>     
>
> After building it i can now execute the query i needed, but i have
> another problem: the retrieved data is incomplete :(
> I run an GQL query in Datastore viewer and the data is there, it seems
> that the app engine sdk does not serve it even with the composite
> indexes.
> Could it help if I reupload the data ? Or if i use low level api to
> get the entities ? (theoretically, it should work right? because it
> seams that the information is not indexed as it should)
>
> On Jul 15, 6:28 pm, Ice13ill  wrote:
>
>
>
> > I uploaded about 100.000 entities into datastore and I need to execute
> > a type of query that shouldn't require composite indexes.
> > But i get this:
>
> > The built-in indices are not efficient enough for this query and your
> > data. Please add a composite index for this query..  An index is
> > missing but we are unable to tell you which one due to a bug in the
> > App Engine SDK
>
> > My entity has three fields (String): type, value, parent so i created
> > an index like this:
>
> > 
> >     > source="auto">
> >         
> >         
> >         
> >     
> > 
>
> > The query uses only equality filters but sometimes only 2 params are
> > used (type and value, let's say)
>
> > Does that meen that i have to create another index ?
> > Or can something else help ?- 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: Query result sets are not modifiable

2010-08-27 Thread Simon
You'll have to do something like the following:

- Iterate over the new contact methods and persist them.
- Retrieve the Person object.
- Iterate over the newly persisted contact methods and add their keys
to the Person's list of contact methods

At the moment you're just trying to add objects to a filtered result
set of random contact methods, which doesn't make much sense :)


On Aug 26, 12:54 am, Shaun  wrote:
> I have no idea how this doesn't seem to come up anywhere when I
> search, but for some reason when I try to add an item to a List
> that has been pulled out of the datastore I get this error:
>
> java.lang.UnsupportedOperationException: Query result sets are not
> modifiable
>         at
> org.datanucleus.store.query.AbstractQueryResult.add(AbstractQueryResult.jav­a:
> 221)
>         at
> com.appointment.actions.ContactActions.updateContactMethods(ContactActions.­java:
> 1186)
>
> My code looks like this:
>
> public List updateContactMethods(List
> pPassedContactMethods,List pDatastoreContactMethodKeys) {
> 
> PersistenceManager pm = PMF.get().getPersistenceManager();
> Query query = pm.newQuery(ContactMethod.class);
> query.setFilter("key == :keyList");
> query.execute(pDatastoreContactMethodKeys);
> List pDataStoreContactMethods = (List)
> pm.newQuery(query).execute(pDatastoreContactMethodKeys);
> 
> for (ContactMethod lContactMethod : pPassedContactMethods) {
> pDataStoreContactMethods.add(lContactMethod);}
>
> pm.close();
> return pDataStoreContactMethods;
>
> }
>
> The goal is that when someone adds a new ContactMethod the system
> picks that up and adds it to the set of Keys reference in that
> Person's List contactsmethods to allow the managing of an unowned
> relationship.
>
> Thanks ahead of time for any help!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-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: DatastoreService.getCurrentTransaction() throws NoSuchElementException even after PersistenceManager.currentTransaction().begin()

2010-08-27 Thread Simon
Check to make sure you have all of the test Jar files in your
classpath - I remember having this error and I was missing one of them
(can't remember which one I'm afraid...)


On Aug 26, 10:38 pm, Arnold  wrote:
> When using JDO persistence manager to begin a transaction,
> DatastoreService().getCurrentTransaction() seems to fail.
>
> A unit test:
> --
> public class TransactionTest{
>     private final LocalServiceTestHelper helper =
>         new LocalServiceTestHelper(new
> LocalDatastoreServiceTestConfig());
>
>     @Before
>     public void setUp() {
>         helper.setUp();
>     }
>
>     @After
>     public void tearDown() {
>         helper.tearDown();
>     }
>
>         @Test
>         public void test(){
>                 PersistenceManager pm = PMF.get().getPersistenceManager();
>                 Transaction tx = pm.currentTransaction();
>                 try{
>                         tx.begin();
>
> DatastoreServiceFactory.getDatastoreService().getCurrentTransaction();
>
>                         tx.commit();
>                 }finally{
>                         if(pm.currentTransaction().isActive()){
>                                 pm.currentTransaction().rollback();
>                         }
>                         pm.close();
>                 }
>
>         }}
>
> --
>
> The test fails with stack trace:
> --
> java.lang.IllegalStateException: java.util.NoSuchElementException
>         at
> com.google.appengine.api.datastore.TransactionStackImpl.peek(TransactionSta­ckImpl.java:
> 70)
>         at
> com.google.appengine.api.datastore.DatastoreServiceImpl.getCurrentTransacti­on(DatastoreServiceImpl.java:
> 307)
>         at TransactionTest.test(TransactionTest.java:37)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp­l.java:
> 25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.junit.runners.model.FrameworkMethod
> $1.runReflectiveCall(FrameworkMethod.java:44)
>         at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.­java:
> 15)
>         at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.j­ava:
> 41)
>         at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.ja­va:
> 20)
>         at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
> 28)
>         at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
> 31)
>         at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.ja­va:
> 73)
>         at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.ja­va:
> 46)
>         at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
>         at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
>         at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
>         at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:
> 28)
>         at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:
> 31)
>         at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
>         at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestRe­ference.java:
> 46)
>         at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:
> 38)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestR­unner.java:
> 467)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestR­unner.java:
> 683)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner­.java:
> 390)
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunne­r.java:
> 197)
> Caused by: java.util.NoSuchElementException
>         at java.util.LinkedList.getFirst(LinkedList.java:109)
>         at
> com.google.appengine.api.datastore.TransactionStackImpl.peek(TransactionSta­ckImpl.java:
> 68)
>         ... 26 more
>
> --
>
> As a result, the example shown here:
>
> http://code.google.com/appengine/docs/java/taskqueue/overview.html#Ta...
>
> does not work.
>
> Can someone help shade some light on what I may be missing?
>
> 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 gro

[appengine-java] Re: JDO Concurrent Modification Exception

2010-09-29 Thread Simon
You're not going to be able to use Java synchronisation, since you
have no guarantee that multiple user requests are even coming into the
same JVM.

What's the exact error/exception you're getting?  If you're carrying
out a lot of updates on the same objects with multiple users, you may
need to re-think your persistence design to support this.

On Sep 27, 4:54 pm, mscwd01  wrote:
> Anyone?
>
> I have done more searching and cant find anything JDO specific to
> handle concurrency so I am assuming it's normal Java locking that'll
> need to be implemented?
>
> On Sep 27, 9:48 am, mscwd01  wrote:
>
>
>
> > Hey,
>
> > My app has been getting a higher number of requests per second
> > recently and as a result I've seen an increase in the number of
> > concurrent modification exceptions occurring when I persist objects to
> > the datastore. The problem arises as I perform a lot of updates on a
> > particular object and if two or more people make a request for this
> > object at the same time I see the exception.
>
> > My question is, is there a "proper" way to handle this within JDO
> > other than using normal Java synchronization?
>
> > Thanks!- 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: Disappointment about JPA relationships :(

2010-10-25 Thread Simon
I agree the documentation isn't fabulous for JPA, in that a vast
majority of it focuses on the JDO implementation and you end up having
to work out which bits of DataNucleus documentation should be used and
is relevant for GAE.  However, to give the team a bit of credit the
restrictions you are talking about are clearly documented at
http://code.google.com/appengine/docs/java/datastore/transactions.html.

Having been through the pain with trying a JPA-based implementation
and reading through these message groups, it is quite clear that JDO
and JPA are just a very poor fit for the underlying datastore - using
the low-level API, or one of the open-source libraries such as
Objectify, Twig or Slim3 is probably a safer bet.

On Oct 25, 4:01 am, Shawn Brown  wrote:
> > I'm just here because i feel i need to rant a little. I came here expecting
> > way too much.
>
> Been there with JDO -- the docs are not adequate.
>
> I don't know your exact requirements but I suspect you'll find many on
> this list who found objectify to be the "simplest convenient interface
> to the Google App Engine 
> datastore".http://code.google.com/p/objectify-appengine/
>
> Shawn

-- 
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: Memory based application, static field, data lost

2010-10-27 Thread Simon
Yoyo, you are aware that you only have to enable your account as
billable and that it doesn't actually cost anything as long as you
stay within the free quota?  See the Quota page for more info (http://
code.google.com/appengine/docs/quotas.html#Blobstore)

On Oct 27, 9:12 am, Ian Marshall  wrote:
> Indeed.
>
> Don't rely on the mem cache to keep your pictures for a long time,
> since they will eventually be removed from the cache. The datastore is
> GAE's sole persistent data store (except queued tasks in a non-
> databasey way), and GAE give us a free amount of storage.
>
> On Oct 26, 5:03 pm, nischalshetty  wrote:
>
> > GAE runs multiple instances which means your code would be run on
> > multiple JVMs as well which means the static field will be multiple as
> > well. A lot of "as wells" here but I hope you get the point.
>
> > Use statics for constants that do not change. For everything else
> > persist either in memcache or datastore.
>
> > -N
>
> > On Oct 26, 4:17 pm, yoyo  wrote:
>
> > > Thanks for your answear.
>
> > > So, GOE discard instances in cases of low usage. I didn't know.
>
> > > My app is an image board, like 4chan.org.
>
> > > The blowstore api in only available for billing account.
> > > I can't use the blowstore because my app isn't commercial. I write it
> > > only for fun and i don't want to pay for it.
>
> > > I'll use the memcache service. It's not important if some of pictures
> > > are lost. There is no guarantee, but I hope keep most of pictures into
> > > it.
> > > Else... well I'll see.
>
> > > I've some refactoring to do. Thanks again for your answear.

-- 
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: DEPLOYMENT FAILING AGAIN

2010-12-12 Thread Simon
Try turning pre-compilation off and then deploy again.

On Dec 12, 1:51 am, Sumi  wrote:
> Suddenly deployment is failing again...without any changes..
>
> I face the same problem 2 days ago..wasted all day and now again same thing
> is happening...
>
> Anybody knows why this is having and when this will be resolved...

-- 
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: Synchronized reads/writes on a memcache variable

2010-12-14 Thread Simon
The synchronized block won't work at all, since it's not guaranteed
that you only have a single instance of your application running at
any point in time.  As soon as you have multiple instances then you
will be synchronizing in different JVMs and hence you'll get multiple
threads accessing the cache, and hence the same problem will occur.

You could probably use the Memcache increment/decrement functionality
to hook together a rough cross-instance synchronization, since they
increment and decrement atomically.

On Dec 14, 5:22 am, Michael Weinberg  wrote:
> You can use the standard Java synchronization to synchronize the task
> threads, e.g.
>
> synchronized (YourMemcachedDataClass.class) {
>   YourMemcachedDataClass cachedData =
> (YourMemcachedDataClass)cache.get(CACHE_KEY);
>
>   if (cachedData == null)
>      cachedData = new YourMemcachedDataClass ();
>
>   cachedData.add(...);
>   cachedData.set(...);
>
>   cache.put(CACHE_KEY, cachedData);
>
> }
>
> this way only 1 thread at a time will get into the synchronized block.
>
> Hope it helps..
>
> Michael Weinberg
>
> On Dec 13, 11:41 am, Ice13ill  wrote:
>
> > Maybe there's something that i don't know very well about the memcache
> > service and this problem is simpler then i thing it is... If so,
> > please advice :)
>
> > On Dec 13, 6:38 pm, Ice13ill  wrote:
>
> > > I need advice for implementing concurrent access to a memcache
> > > variable, when used by multiple running tasks.
> > > The problem is this: I have a number of tasks reading from datastore
> > > and doing some processing.
> > > When the processing is complete, i add a String to a List stored in
> > > memcache. So i need to get the List from memcache, add a new element,
> > > and put it back. The pb is that if 2 tasks write on that variable, i
> > > get an exception (I understand that the memcache service gives me a
> > > "clone" of the object, not the object itself, or am I wrong ?)
> > > So how can i avoid more than one tasks writing in the same object ?

-- 
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: DEPLOYMENT FAILING AGAIN

2010-12-15 Thread Simon
Hi,

I don't know why the pre-compilation has to be turned off - as far as
I understand it, this activity occurs on the Google servers and it's
there that the problem occurs.  In one of the other deployment issue
threads, Ikai mentioned that you can get around this issue by turning
the pre-compilation off, so I'm just repeating that information!

On Dec 14, 10:25 pm, J Handal  wrote:
> Simon
>
> I have exactly the same problem.I upgraded de JRE and JDK to version 6 build
> 23(Last one)
>
> Why the jsp file don't compile?
>
> If you get the solution please let me know.

-- 
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: Synchronized reads/writes on a memcache variable

2010-12-15 Thread Simon
Hi,

I think the following should work with the following caveats:
- there's a small danger that if the server blows up before it
releases the lock, that no threads would be able to update your cache,
but since it's only a cache of data. This is easily mitigated by
introducing a task which periodically resets the lock.
- I still believe that there's the possibility that separate instances
will get a non-updated object, even if you use the locking, since I'm
assuming it takes x-amount of time for the changes in MemCache to
propagate throughout the instances.  I may be wrong in this assumption
however.

Anyway, your code would go something like:

boolean lockAcquired = false;

try {
lockAcquired = acquireLock();
doStuff();
} finally {
if (lockAcquired) {
releaseLock();
}
}


With the locking code being:

public static boolean acquireLock() {

boolean lockAcquired = true;
try {
while (increment() != 1) {
decrement();
Thread.sleep(500);
}
} catch (Throwable t) {
// Log error
lockAcquired = false;
}

return lockAcquired;
}

public static void releaseLock() {
decrement();
}

private static void decrement() {
MemcacheServiceFactory.getMemcacheService().increment("LOCK",
-1, 0L);
}

private static Long increment() {
return
MemcacheServiceFactory.getMemcacheService().increment("LOCK", 1, 0L);
}

On Dec 14, 9:56 pm, Jay Young  wrote:
> Grr.  Just noticed another issue.  The cache item that you get the
> index is not the same item as the lock, so really you need two
> different cache items, one to make sure you have a unique value for
> the lock, and the lock itself.  The code above is correct, you just
> need different keys for the first two cache reads.
>
> If you can generate a guaranteed-unique name (maybe the thread ID +
> time?), you can drop the first cache item and use that as the lock
> value.  This would also prevent the issue with the code above if the
> lockIndex item is ever evicted and re-read at the same time (thus
> returning 0 for both), or if it overflows the long.
>
> (I honestly don't know if this is iron-clad, but intuitively it seems
> like it would work with only very minor edge cases.)
>
> On Dec 14, 4:08 pm, Andrei Cosmin Fifiiþã 
> wrote:
>
> > H, super...
> > I was thinking of smth like (val mod 2) == 0/1 (true/false), but the lock
> > reading wasn't safe.
> > Thanks!
>
> > On 14 December 2010 20:57, Jay Young  wrote:
>
> > > Except return lockIndex should just be return true.
>
> > > --
> > > 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 > >  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: Synchronized reads/writes on a memcache variable

2010-12-15 Thread Simon
I guess it depends on how much throughput you're expecting through the
bit of the system which requires the lock - I agree that if there is
huge contention then this isn't the way to go, although I'd argue that
you should be changing your design anyway since synchronizing across a
distributed architecture for a lot of threads is just unadvisable.

Memcache API calls currently take ~3ms according to the status page -
running a quick (and dirty ;) ) test with 100 threads attempting to
lock using the above method averages out at ~40ms for one of the
threads to obtain the lock.  If the API call times increase from 3 to
10ms, the time taken for one of the threads to obtain the lock
actually decreases to ~30ms!  The biggest risk you run is that because
it isn't FIFO, there may be a large portion of time before a
particular thread obtains the lock and so it may time out.

On Dec 15, 3:06 pm, Jay Young  wrote:
> I considered the increment decrement approach, but it creates a race
> condition with the counter.  Having many different threads/tasks
> trying to grab the lock at the same time  could increment the number
> above one, even when no one has the lock because there is still a
> period of time between the increment() and decrement().  Remember,
> these are RPC calls going over the network.  If any part of that
> interaction is slow, there will be even longer periods between the +1
> and -1.  I think this method errs on the side of accidentally locking
> when there isn't a lock.  The only negatives I see would apply to any
> lock that's implemented in a cache.
>
> On Dec 15, 8:23 am, Simon  wrote:
>
> > Hi,
>
> > I think the following should work with the following caveats:
> > - there's a small danger that if the server blows up before it
> > releases the lock, that no threads would be able to update your cache,
> > but since it's only a cache of data. This is easily mitigated by
> > introducing a task which periodically resets the lock.
> > - I still believe that there's the possibility that separate instances
> > will get a non-updated object, even if you use the locking, since I'm
> > assuming it takes x-amount of time for the changes in MemCache to
> > propagate throughout the instances.  I may be wrong in this assumption
> > however.
>
> > Anyway, your code would go something like:
>
> > boolean lockAcquired = false;
>
> > try {
> >     lockAcquired = acquireLock();
> >     doStuff();} finally {
>
> >     if (lockAcquired) {
> >         releaseLock();
> >     }
>
> > }
>
> > With the locking code being:
>
> >     public static boolean acquireLock() {
>
> >         boolean lockAcquired = true;
> >         try {
> >             while (increment() != 1) {
> >                 decrement();
> >                 Thread.sleep(500);
> >             }
> >         } catch (Throwable t) {
> >             // Log error
> >             lockAcquired = false;
> >         }
>
> >         return lockAcquired;
> >     }
>
> >     public static void releaseLock() {
> >         decrement();
> >     }
>
> >     private static void decrement() {
> >         MemcacheServiceFactory.getMemcacheService().increment("LOCK",
> > -1, 0L);
> >     }
>
> >     private static Long increment() {
> >         return
> > MemcacheServiceFactory.getMemcacheService().increment("LOCK", 1, 0L);
> >     }
>
> > On Dec 14, 9:56 pm, Jay Young  wrote:
>
> > > Grr.  Just noticed another issue.  The cache item that you get the
> > > index is not the same item as the lock, so really you need two
> > > different cache items, one to make sure you have a unique value for
> > > the lock, and the lock itself.  The code above is correct, you just
> > > need different keys for the first two cache reads.
>
> > > If you can generate a guaranteed-unique name (maybe the thread ID +
> > > time?), you can drop the first cache item and use that as the lock
> > > value.  This would also prevent the issue with the code above if the
> > > lockIndex item is ever evicted and re-read at the same time (thus
> > > returning 0 for both), or if it overflows the long.
>
> > > (I honestly don't know if this is iron-clad, but intuitively it seems
> > > like it would work with only very minor edge cases.)
>
> > > On Dec 14, 4:08 pm, Andrei Cosmin Fifiiþã 
> > > wrote:
>
> > > > H, super...
> > > > I was thinking of smth like (val mod 2) == 0/1 (true/false), but the 
> > > >

[appengine-java] Re: java.lang.IllegalStateException: Primary key for object of type xxx is null.

2009-08-24 Thread Simon Blackwell

Same issue here. The trouble seems to be in DatastoreFieldManager

private Key getKeyForObject(Object pc) {
ApiAdapter adapter = getStoreManager().getOMFContext
().getApiAdapter();
Object internalPk = adapter.getTargetKeyForSingleFieldIdentity
(adapter.getIdForObject(pc));
ObjectManager om = getObjectManager();
AbstractClassMetaData acmd =
om.getMetaDataManager().getMetaDataForClass(pc.getClass(),
getClassLoaderResolver());
return EntityUtils.getPkAsKey(internalPk, acmd, om);
  }

internalPk is null because adapter.getIdForObject(pc) is null

public Object getIdForObject(Object obj)
{
if (!isPersistable(obj))
{
return null;
}
return ((PersistenceCapable)obj).jdoGetObjectId(); <--- this
returns null
}

The error only seems to occur when saving child objects. In the case
from the original poster, that means if the Employee were saved after
adding the Evaluation in a transient state or if the Evaluation were
added to an Employee that pointed to a persistent object, the code
would work. Of course, this means that the entire state of the
Employee would be re-saved.

Try replacing "em.persist(evaluationBean);" with

EmployeeBean e = evaluationBean.getEmployee();
em.persist(e);

However, this may result in an error "Attempt was made to manually set
the id component of a Key primary key" ... even if you have no code
that sets a primary key! If you trace into the AppEngine code you will
find this comment:

 if (key.getName() == null) {
// This means an id was provided to an incomplete Key,
// and that means the user is trying to set the id manually,
which
// we don't support.

I'm suspicious that if you use real Keys instead of encoded strings,
stuff may work. Unfortunately, this means that the same class files
can't be used on the client and sever because GWT does not support
client side Key references.

On Aug 12, 1:03 am, kfc  wrote:
> I have the same problem
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: java.lang.IllegalStateException: Primary key for object of type xxx is null.

2009-08-24 Thread Simon Blackwell

Ok ... a little more trial and error. See if these changes fix your
issue using the reverse save method I proposed above. They fixed mine.

Change Employee

 @Extension(vendorName="datanucleus", key="gae.encoded-pk",
value="true")
private String id;
  @Persistent
@Extension(vendorName="datanucleus", key="gae.pk-id",
value="true")
private Long keyId;

Change Evaluation

@Extension(vendorName="datanucleus", key="gae.encoded-pk",
value="true")
private String id;
  @Persistent
@Extension(vendorName="datanucleus", key="gae.pk-id",
value="true")
private Long keyId;

On Aug 24, 10:37 pm, Simon Blackwell  wrote:
> Same issue here. The trouble seems to be in DatastoreFieldManager
>
> private Key getKeyForObject(Object pc) {
>     ApiAdapter adapter = getStoreManager().getOMFContext
> ().getApiAdapter();
>     Object internalPk = adapter.getTargetKeyForSingleFieldIdentity
> (adapter.getIdForObject(pc));
>     ObjectManager om = getObjectManager();
>     AbstractClassMetaData acmd =
>         om.getMetaDataManager().getMetaDataForClass(pc.getClass(),
> getClassLoaderResolver());
>     return EntityUtils.getPkAsKey(internalPk, acmd, om);
>   }
>
> internalPk is null because adapter.getIdForObject(pc) is null
>
> public Object getIdForObject(Object obj)
>     {
>         if (!isPersistable(obj))
>         {
>             return null;
>         }
>         return ((PersistenceCapable)obj).jdoGetObjectId(); <--- this
> returns null
>     }
>
> The error only seems to occur when saving child objects. In the case
> from the original poster, that means if the Employee were saved after
> adding the Evaluation in a transient state or if the Evaluation were
> added to an Employee that pointed to a persistent object, the code
> would work. Of course, this means that the entire state of the
> Employee would be re-saved.
>
> Try replacing "em.persist(evaluationBean);" with
>
> EmployeeBean e = evaluationBean.getEmployee();
> em.persist(e);
>
> However, this may result in an error "Attempt was made to manually set
> the id component of a Key primary key" ... even if you have no code
> that sets a primary key! If you trace into the AppEngine code you will
> find this comment:
>
>  if (key.getName() == null) {
>         // This means an id was provided to an incomplete Key,
>         // and that means the user is trying to set the id manually,
> which
>         // we don't support.
>
> I'm suspicious that if you use real Keys instead of encoded strings,
> stuff may work. Unfortunately, this means that the same class files
> can't be used on the client and sever because GWT does not support
> client side Key references.
>
> On Aug 12, 1:03 am, kfc  wrote:
>
>
>
> > I have the same problem
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] built in security features of GAE

2009-09-15 Thread George Simon
Has anyone know the built in security features in GAE.

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-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: built in security features of GAE

2009-09-20 Thread George Simon

Thanks Jason.

We are migrating our apps to GAE in 2-3 months, so our customers may
ask some of the security measures. Though I know GAE is fully secured
environment and google take security very seriously, I would like to
know
1. Any firewall running?
2. Do you provide any safeguards to prevent the user's credentials
from being captured by a spyware?
3. Incase of the system failure how fast we are notified...

If you can share some informartion, it will be great.

Thanks in Advance.

On 9/16/09, Jason (Google)  wrote:
> This can mean several things, so you'll have to be more specific.
>
> To see the list of restrictions in place to help secure Google's back-end
> infrastructure, see the documentation on the App Engine sandbox:
>
> http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox
>
> If you're referring to the built-in services Google offers for
> authenticating and authorizing users, then you should see the following
> links:
>
> http://code.google.com/appengine/docs/java/users/
> http://code.google.com/appengine/docs/java/config/webxml.html#Security_and_Authentication
>
> HTTPS (secure URL) support is discussed here:
>
> http://code.google.com/appengine/docs/java/config/webxml.html#Secure_URLs
>
> Let me know if you were looking for something else.
>
> - Jason
>
> On Tue, Sep 15, 2009 at 4:30 AM, George Simon
> wrote:
>
>> Has anyone know the built in security features in GAE.
>>
>> 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-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~--~~~~--~~--~--~---



[appengine-java] Re: How to speed up JSP compile time?

2009-12-30 Thread Simon Vogensen
Hi

Im having the same problems.. every time I change a .jsp file it takes
up to 3 min to recompile it..
My project is very small, there's almost no data in the datastore. The
jsp file is also very small.
I should say that im running appengine through devmode on a mac with
snow leopard.
I have tried profiling with Visualvm and get the following hotspots
(this shows the load of one jsp recompile)..

org.apache.tools.ant.taskdefs.StreamPumper.run()40.26772208150 
ms
(40.3%) 2
org.mortbay.jetty.Server.handle(org.mortbay.jetty.HttpConnection)
20.24753104662 ms (20.2%)   13
java.lang.UNIXProcess$2$1.run() 20.171682   104270 ms (20.2%)   1
java.util.concurrent.ThreadPoolExecutor$Worker.run()10.060698   52005
ms (10.1%)  1
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()  9.137142
47231 ms (9.1%) 2
com.google.appengine.api.datastore.dev.LocalDatastoreService.runQuery
(com.google.appengine.tools.development.LocalRpcService.Status,
com.google.apphosting.api.DatastorePb.Query) 0.0101551  58.5 ms (0%)11

Most of the time when recompiling it seems its waiting for IO or
something - the cpu is almost idle.

My ant target looks like this..

  

  



  
  
  
  
  
  
  
  


  

  

Cheers
Simon

On Nov 17, 6:04 pm, Toby Reyelts  wrote:
> On Sat, Nov 14, 2009 at 1:01 PM, Steph  wrote:
> > This happens:
> > - running dev_appserver
> > - with JSP files of just any size.
> > - seems to be blocking on initializing the datastore
>
> Can you elaborate on this part a bit more? What are you seeing that makes
> you think it's "initializing the datastore"? Are you restarting the entire
> dev_appserver after modifying the jsp? How large is your datastore (e.g. how
> many entities, how many properties per entity, average size of each
> property).
>
> If you can file an issue with a very simple webapp that reproduces the
> problem, that would be the best way for us to track the problem down.
> Alternatively, you could hook a profiler up to the dev_appserver yourself
> (for example, visualvm, hprof, or jprofiler). With three minutes of
> execution time, there should be a pretty obvious hotspot.
>
>
>
>
>
> > I tried to set --jvm_flag=-Xmx1G in my dev_appserver.cmd file but it
> > does not seem to help much (i don't use eclipse)
> > Another other advice?
>
> > On Nov 13, 12:00 pm, Toby Reyelts  wrote:
> > > Wow, that sounds bad. You're saying that this happens while running the
> > > dev_appserver (not appcfg), and you're only modifying one JSP file? Is
> > that
> > > JSP file huge? Try raising the heap size of your JVM. For example, if
> > you're
> > > using Eclipse, set -Xmx1G in the JVM arguments for your launch config. If
> > > you're running the dev_appserver from the command line, use
> > > --jvm_flag=-Xmx1G.On Fri, Nov 13, 2009 at 12:51 PM, Steph <
> > steph@gmail.com> wrote:
> > > > When modifying a JSP in the war directory, it can take up to 3 minutes
> > > > for the JSP to recompile and the page to render (I am on a brand new
> > > > dual-core CPU 2.66 Ghz).
>
> > > > Is there a way that the JSP compile time can be speed up? This
> > > > slowness makes development almost unbearable. Thanks for your help.
>
> > > > --
>
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Google App Engine for Java" group.
> > > > To post to this group, send email to
> > > > google-appengine-j...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-appengine-java+unsubscr...@googlegroups.com > > >  unsubscr...@googlegroups.com> > unsubscr...@googlegroups.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-appengine-java?hl=.
>
> > --
>
> > 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 > unsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=.

--

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 speed up JSP compile time?

2009-12-30 Thread Simon Vogensen
Hi again

The funny thing is that on my machine (a macbook pro 2.66 ghz dual
core) all jsp files takes about 1:45 minutes to compile.. even the
ones with no logic..

Cheers
Simon

On Dec 30, 2:50 pm, Simon Vogensen  wrote:
> Hi
>
> Im having the same problems.. every time I change a .jsp file it takes
> up to 3 min to recompile it..
> My project is very small, there's almost no data in the datastore. The
> jsp file is also very small.
> I should say that im running appengine through devmode on a mac with
> snow leopard.
> I have tried profiling with Visualvm and get the following hotspots
> (this shows the load of one jsp recompile)..
>
> org.apache.tools.ant.taskdefs.StreamPumper.run()        40.26772        
> 208150 ms
> (40.3%) 2
> org.mortbay.jetty.Server.handle(org.mortbay.jetty.HttpConnection)
> 20.24753        104662 ms (20.2%)       13
> java.lang.UNIXProcess$2$1.run() 20.171682       104270 ms (20.2%)       1
> java.util.concurrent.ThreadPoolExecutor$Worker.run()    10.060698       52005
> ms (10.1%)      1
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()      9.137142
> 47231 ms (9.1%) 2
> com.google.appengine.api.datastore.dev.LocalDatastoreService.runQuery
> (com.google.appengine.tools.development.LocalRpcService.Status,
> com.google.apphosting.api.DatastorePb.Query) 0.0101551  58.5 ms (0%)    11
>
> Most of the time when recompiling it seems its waiting for IO or
> something - the cpu is almost idle.
>
> My ant target looks like this..
>
>   
>      classname="com.google.gwt.dev.DevMode">
>       
>         
>         
>         
>       
>       
>       
>       
>       
>       
>       
>       
>         
>          value="com.google.appengine.tools.development.gwt.AppEngineLauncher"/>
>       
>     
>   
>
> Cheers
> Simon
>
> On Nov 17, 6:04 pm, Toby Reyelts  wrote:
>
>
>
> > On Sat, Nov 14, 2009 at 1:01 PM, Steph  wrote:
> > > This happens:
> > > - running dev_appserver
> > > - with JSP files of just any size.
> > > - seems to be blocking on initializing the datastore
>
> > Can you elaborate on this part a bit more? What are you seeing that makes
> > you think it's "initializing the datastore"? Are you restarting the entire
> > dev_appserver after modifying the jsp? How large is your datastore (e.g. how
> > many entities, how many properties per entity, average size of each
> > property).
>
> > If you can file an issue with a very simple webapp that reproduces the
> > problem, that would be the best way for us to track the problem down.
> > Alternatively, you could hook a profiler up to the dev_appserver yourself
> > (for example, visualvm, hprof, or jprofiler). With three minutes of
> > execution time, there should be a pretty obvious hotspot.
>
> > > I tried to set --jvm_flag=-Xmx1G in my dev_appserver.cmd file but it
> > > does not seem to help much (i don't use eclipse)
> > > Another other advice?
>
> > > On Nov 13, 12:00 pm, Toby Reyelts  wrote:
> > > > Wow, that sounds bad. You're saying that this happens while running the
> > > > dev_appserver (not appcfg), and you're only modifying one JSP file? Is
> > > that
> > > > JSP file huge? Try raising the heap size of your JVM. For example, if
> > > you're
> > > > using Eclipse, set -Xmx1G in the JVM arguments for your launch config. 
> > > > If
> > > > you're running the dev_appserver from the command line, use
> > > > --jvm_flag=-Xmx1G.On Fri, Nov 13, 2009 at 12:51 PM, Steph <
> > > steph@gmail.com> wrote:
> > > > > When modifying a JSP in the war directory, it can take up to 3 minutes
> > > > > for the JSP to recompile and the page to render (I am on a brand new
> > > > > dual-core CPU 2.66 Ghz).
>
> > > > > Is there a way that the JSP compile time can be speed up? This
> > > > > slowness makes development almost unbearable. Thanks for your help.
>
> > > > > --
>
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "Google App Engine for Java" group.
> > > > > To post to this group, send email to
> > > > > google-appengine-j...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > > > google-appengine-java+unsubscr...@googlegroups.com > > > >  unsubscr...@googlegroups.com> > > unsubscr...@googlegroups.com>
> &

[appengine-java] Re: How to speed up JSP compile time?

2010-01-10 Thread Simon Vogensen
Hi

When I start my project with appengine alone (without gwt devmode) it
compiles fast - so this may be a problem with AppEngineLauncher?

Here's my target starting appengine


http://localhost:8080/${gwt.startupUrl}"/>

  
  
    
  

Cheers
Simon

On Dec 30 2009, 8:29 pm, Simon Vogensen  wrote:
> Hi again
>
> The funny thing is that on my machine (a macbook pro 2.66 ghz dual
> core) all jsp files takes about 1:45 minutes to compile.. even the
> ones with no logic..
>
> Cheers
> Simon
>
> On Dec 30, 2:50 pm, Simon Vogensen  wrote:
>
>
>
> > Hi
>
> > Im having the same problems.. every time I change a .jsp file it takes
> > up to 3 min to recompile it..
> > My project is very small, there's almost no data in the datastore. The
> > jsp file is also very small.
> > I should say that im running appengine through devmode on a mac with
> > snow leopard.
> > I have tried profiling with Visualvm and get the following hotspots
> > (this shows the load of one jsp recompile)..
>
> > org.apache.tools.ant.taskdefs.StreamPumper.run()        40.26772        
> > 208150 ms
> > (40.3%) 2
> > org.mortbay.jetty.Server.handle(org.mortbay.jetty.HttpConnection)
> > 20.24753        104662 ms (20.2%)       13
> > java.lang.UNIXProcess$2$1.run() 20.171682       104270 ms (20.2%)       1
> > java.util.concurrent.ThreadPoolExecutor$Worker.run()    10.060698       
> > 52005
> > ms (10.1%)      1
> > sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()      9.137142
> > 47231 ms (9.1%) 2
> > com.google.appengine.api.datastore.dev.LocalDatastoreService.runQuery
> > (com.google.appengine.tools.development.LocalRpcService.Status,
> > com.google.apphosting.api.DatastorePb.Query) 0.0101551  58.5 ms (0%)    11
>
> > Most of the time when recompiling it seems its waiting for IO or
> > something - the cpu is almost idle.
>
> > My ant target looks like this..
>
> >   
> >      > classname="com.google.gwt.dev.DevMode">
> >       
> >         
> >         
> >         
> >       
> >       
> >       
> >       
> >       
> >       
> >       
> >       
> >         
> >          > value="com.google.appengine.tools.development.gwt.AppEngineLauncher"/>
> >       
> >     
> >   
>
> > Cheers
> > Simon
>
> > On Nov 17, 6:04 pm, Toby Reyelts  wrote:
>
> > > On Sat, Nov 14, 2009 at 1:01 PM, Steph  wrote:
> > > > This happens:
> > > > - running dev_appserver
> > > > - with JSP files of just any size.
> > > > - seems to be blocking on initializing the datastore
>
> > > Can you elaborate on this part a bit more? What are you seeing that makes
> > > you think it's "initializing the datastore"? Are you restarting the entire
> > > dev_appserver after modifying the jsp? How large is your datastore (e.g. 
> > > how
> > > many entities, how many properties per entity, average size of each
> > > property).
>
> > > If you can file an issue with a very simple webapp that reproduces the
> > > problem, that would be the best way for us to track the problem down.
> > > Alternatively, you could hook a profiler up to the dev_appserver yourself
> > > (for example, visualvm, hprof, or jprofiler). With three minutes of
> > > execution time, there should be a pretty obvious hotspot.
>
> > > > I tried to set --jvm_flag=-Xmx1G in my dev_appserver.cmd file but it
> > > > does not seem to help much (i don't use eclipse)
> > > > Another other advice?
>
> > > > On Nov 13, 12:00 pm, Toby Reyelts  wrote:
> > > > > Wow, that sounds bad. You're saying that this happens while running 
> > > > > the
> > > > > dev_appserver (not appcfg), and you're only modifying one JSP file? Is
> > > > that
> > > > > JSP file huge? Try raising the heap size of your JVM. For example, if
> > > > you're
> > > > > using Eclipse, set -Xmx1G in the JVM arguments for your launch 
> > > > > config. If
> > > > > you're running the dev_appserver from the command line, use
> > > > > --jvm_flag=-Xmx1G.On Fri, Nov 13, 2009 at 12:51 PM, Steph <
> > > > steph@gmail.com> wrote:
> > > > > > When modifying a JSP in the war directory, it can take up to 3 
> > > > > > minutes
> > > > > > for the JSP to recompile and the page to re

[appengine-java] Re: Two fields of sister classes in an entity!

2011-04-20 Thread Simon Knott
What storage mechanism are you using JPA or JDO?  I'm assuming that if 
you've got the error message for your Card object, that it would be a 
two-minute job to test the scenario you're querying about.

Cheers,
Simon

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



[appengine-java] Re: Cheapest way to update a versioned object?

2011-04-20 Thread Simon Knott
Just be warned that some users were complaining that their entities were 
being flushed within seconds, a couple of months ago.  I personally haven't 
experienced this, however.

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



[appengine-java] Re: java.lang.IllegalArgumentException: query not found

2011-04-21 Thread Simon Knott
Hi,

What version of the SDK are you using?  The increase to the time allocated 
for backgrounds tasks only took place in v1.4 onwards.  Also, there was a 
bug in the development server pre version 1.4.3, which meant that the tasks 
didn't have a 10 minute timeout.

Cheers,
Simon

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



[appengine-java] Re: Index Names now throwing an error

2011-05-05 Thread Simon Knott
How have you managed to create a Java property which starts with a number?

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



[appengine-java] Gmail IMAP and SMTP using OAuth

2011-05-30 Thread George Simon
Hi Guys,

Anyone knows about integrating Gmail IMAP and SMTP using OAuth on GAE. Both
of them using sockets. Also if I use GAE Mail java API to send mails,
from address(sender) becoming an issue as only the app developers email
address can be added.

Basically my app is integrated to Google APPS and I am looking  to send
mails on behalf of the logged in user.

Any thoughts on this?

Thanks in advance

George Simon

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



Re: [appengine-java] Unable to find the webapp directory

2011-05-31 Thread George Simon
dev_appserver.cmd *"*C:\Program Files\GoogleAppEngine
\appengine-java-sdk-1.3.0\demos\guestbook\war*"*

On Mon, May 30, 2011 at 3:05 PM, Suresh  wrote:

> hi
>
> i have just installed the java sdk. after extracting the files from
> the appengine-java-sdk-1.3.0 jar, I am trying to start the server
> with
> at the command line with the following:
>
>
> C:\Program Files\GoogleAppEngine\appengine-java-
> sdk-1.3.0\bin>dev_appserver.cmd C:\Program Files\GoogleAppEngine
> \appengine-java-sdk-1.3.0\demos\guestbook\war
>
>
> I get the following error message:
>
>
> Unable to find the webapp directory Files\GoogleAppEngine\appengine-
> java-sdk-1.3.0\demos\guestbook\war
>
>
> can anyone help?
>
>
> Thx
>
>
> --
> 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-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.



Re: [appengine-java] can we use Spreadsheet api in GAE Java?

2011-06-02 Thread George Simon
Hi Rambo,
   First update appengine-web.xml by adding


  


Also refer to the simple steps from Google

http://code.google.com/apis/spreadsheets/data/2.0/developers_guide_java.html


Thanks

George


On Thu, Jun 2, 2011 at 1:56 PM, Rambo  wrote:

> Hi friends...!
>
>Am new to Google app engine
> Am deploying projects in GAE using Java codes
>
> But i dont know how to use Spreadsheet api in that
>
>
> Can we use spreadsheet api...?
>
> If so please tell me how...?
>
>
> 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-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-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Usage of this forum

2011-06-15 Thread Simon Knott
Hi,

I suspect that it is because your last few posts have been asking questions 
about only GWT - if you keep you GAE questions in this forum and the GWT 
questions in the GWT forum, I suspect you'll get more responses!

Cheers,
Simon

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



[appengine-java] Re: Reading static XML file on App Engine

2011-07-19 Thread Simon Knott
The link you've provided  states that you can't use FileInputStream, as it's 
not a whitelisted class.  

Have you tried placing the XML file into your classes directory and using 
getClass().*getResourceAsStream()?*

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



[appengine-java] Re: Reading static XML file on App Engine

2011-07-19 Thread Simon Knott
Oops, read that link without any coffee!  It obviously states that you *can*use 
the FileInputStream class - have you tried dropping the "war" bit off 
your filepath?

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



[appengine-java] Re: Slow DataStore on the Development Server after update

2011-08-05 Thread Simon Knott
Are you experiencing into the new functionality of the SDK, which is 
emulating the eventual consistency of a High-replication datastore?  This is 
turned on by default in the newest SDKs - see this post for more info - 
https://groups.google.com/forum/#!topic/objectify-appengine/ECNbSVgEcSQ

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



[appengine-java] Re: Multiple PersistenceManagerFactory with Singleton?

2011-08-09 Thread Simon Knott
Whilst I don't know what could cause this error, what makes you believe that 
"static" and "static final" are equivalent?  Static variables are in no way 
implicitly final.

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



[appengine-java] Re: Entity modelling

2011-08-09 Thread Simon Knott
Given that the target GAE datastore should be optimised for reads, since 
writes are expensive, normalization of data is by no means the way to go.

Are Categories and Groups joined in any way? i.e. Has a specific Category 
got a set of groups, or the other way around?  If not, then storing the 
group/category as a property within the Forum seems fine to me.  

I would strongly suggest that you read up on the datastore before proceeding 
however - the GAE datastore doesn't really consist of tables.  I would read 
the following docs in their entirety before doing too much more work:

   - Datastore Overview - 
   http://code.google.com/appengine/articles/datastore/overview.html
   - Java Datastore Docs - 
   http://code.google.com/appengine/docs/java/datastore/
   - Objectify Docs - These give a good overview of restrictions and best 
   practices when working with the datastore 
   http://code.google.com/p/objectify-appengine/wiki/Concepts?tm=6
   

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



[appengine-java] Re: Multiple PersistenceManagerFactory with Singleton?

2011-08-10 Thread Simon Knott
If that was your original code, that could definitely cause the problem - 
two threads can both hit that method at the same time and create a new 
PersistenceManager.

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



[appengine-java] Re: javax.mail.SendFailedException: Send failure:Unauthorized Sender: Unauthorized sender

2011-08-15 Thread Simon Knott
There is another thread for this issue, on the main GAE forum, which has 
been answered by a Googler - 
https://groups.google.com/d/msg/google-appengine/Zx85suFS3zc/o5SeyhH4eSkJ

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



[appengine-java] Re: QUOTAs, usage limits

2011-08-16 Thread Simon Knott
It means that you will very likely require a proxy server in the middle.  

GAE doesn't allow you to present a single, static IP address and all 
GAE-hosted applications will be detected as the same IP range - I know for 
Twitter / Facebook there have been a number of developers who have hit 
"their" quota because other applications have been hitting the service from 
the same IP.

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



[appengine-java] Re: Simple Throttling filter doesn't work

2011-08-16 Thread Simon Knott
A few questions / comments:

   - How many instances can you see being started in your GAE application, 
   in the admin console?  This code only works on the assumption that you have 
   one JVM running and it's very likely that you have more than one.  i.e.  To 
   put it bluntly, this code is almost completely useless on GAE.
   - Have you set your application to be thread safe?  If you have, then 
   this code would probably work for a brief moment of time until your thread 
   count increased slightly.
   
Also, GAE already has DOS protection - see this link for more info 
http://code.google.com/appengine/docs/java/config/dos.html

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/671D03GBNjEJ.
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.



Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Simon Knott
A few questions:

   - Is this happening on your development or production server?
   - Have you created any custom indexes?  
   - Also, have you turned off property indexes at all?
   
Cheers,
Simon

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/IxEeeJoYuSQJ.
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.



Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Simon Knott
Can you post your Entity class, with annotations, and the code for setting 
up the "today" variable in the query?  My only guess at the moment is that 
the millisecond component of the date is not equal.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/15A6BS6YfD4J.
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.



Re: [appengine-java] Re: date comparison fails

2011-08-16 Thread Simon Knott
Hmm, can you please check the milliseconds components of both the stored 
object and your query object.  You're resetting all properties of the time 
apart from the milliseconds bit!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/l0GOxIMTmKoJ.
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.



Re: [appengine-java] Re: date comparison fails

2011-08-17 Thread Simon Knott
Hi,

Have you tried the following on the Calendar object?

today.set(Calendar.MILLISECOND, 0);

Cheers,
Simon

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



[appengine-java] Re: Java PaaS shoutout

2011-08-18 Thread Simon Knott
Comments below - I'd say that the person who wrote the article did very 
little research, or was using some very out of date resources, if that 
article was really written in Feb this year.

On Thursday, 18 August 2011 10:57:34 UTC+1, Thomas Wiradikusuma wrote:
>
> Hi guys, 
>
> I just stumbled upon this article: 
> http://www.ibm.com/developerworks/java/library/j-paasshootout 
>
> Are these constraints/limitations still valid? (the article date is 
> April 2011) 
>
> "GAE forces any application-initiated connection to close after 5 to 
> 10 seconds" 
>

URLFetch requests have the following constaints:
* By default, the deadline for a fetch is 5 seconds. The maximum deadline is 
10 seconds for HTTP requests and 10 minutes for task queue and cron job 
requests.*
 
I'm not aware of any timeout for datastore connections, other than the fact 
that the datastore operation needs to occur within the 30 seconds, for a 
user's web request, or within 10 minutes, for cron and task queue 
operations.


> "But its raw performance is often slow.. ..GAE often takes 1 to 3 
> seconds to respond to database-related requests." 
>

Almost all of my datastore operations happen within 10s of milliseconds, 
although this obviously depends on the datastore operation which is taking 
place and whether you're querying a vast amount of data.  If it often took 
that long for database requests, no one would use it!  To be fair to the 
author, at the time of writing they may have been experiencing a lot of 
database latency spikes, as only the Master/Slave datastore was available at 
that time.  Since May, the High Replication datastore has been available 
which has removed a vast majority of these spikes.
 

> "One tip: Set up a cron job inside GAE to load your own website every 
> 2 to 3 minutes to keep the JVM active." 
>

Or pay and have "Always On", which has been around since last December.  
Instances do get spun-up and spun-down on a regular basis, but if you've 
built your application well and make use of warm up requests then I'd say 
there is no need to use a cron job.  Over the coming months, more controls 
will be added to the admin control panel to remove this requirement as well, 
I believe, as you'll be able to control how many instances are around in the 
background to handle user load spikes.
 

>
> "GAE limits the returned dataset of each query to 1,000 rows" 
>

This limitation was removed in August 2010.
 

> "GAE allows only 100 indexes per table"
>

The default quota per application is 200, although I do believe you can 
request a quota increase. 
 

> "GAE provides no easy way to delete indexes that are no longer in use"
>

You can vacuum the indexes at any time using the appcfg command line tool:
http://code.google.com/appengine/docs/java/tools/uploadinganapp.html#Deleting_Unused_Indexes
 

> "doesn't support free text search in the database" 
>

True - I believe it's on the road map.
 

> "no standard API for directly accessing BigTable, you must write data- 
> import and data-export logic into servlets inside your own 
> application, and use your own web interface to import or export data"
>

There is a "Remote API" for both the Python and Java SDK:
http://code.google.com/appengine/docs/java/tools/remoteapi.html

The Python API has been available since 2009...
 

> "some of the components in GAE still feel experimental rather than 
> production-ready" 
>

Hence it's in beta :) 

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



[appengine-java] Re: Java PaaS shoutout

2011-08-18 Thread Simon Knott
Hmm not sure where I got February from - replace all references to February 
with April!

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



[appengine-java] Re: java.net.DatagramPacket supported ?

2011-08-24 Thread Simon Knott
There is no way to query a server using UDP packets on GAE - the only 
supported transport protocol is HTTP.

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



[appengine-java] Re: Always On not working properly

2011-08-25 Thread Simon Knott
There have been a few threads discussing this recently.  It appears that 
they are bringing in the new instance scheduler in the background, which 
will eventually replace the "Always On" concept.  Unfortunately this has the 
side effect that the current Always On instances aren't being used in the 
way they were before.

There's a very good explanation by a Googler in this 
thread: 
https://groups.google.com/d/msg/google-appengine/nRtzGtG9790/d0hB-q9__S8J

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



[appengine-java] Re: how to port application from the AppEngine to other webcontainers, e.g.Jboss or tomcat?

2011-08-25 Thread Simon Knott
Is this a serious question?

Your web app's WAR can just be installed into JBoss or Tomcat - then all 
you'll have to do is rewrite all of your code which uses the datastore, 
memcache, and any of the other GAE SDK APIs...

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



[appengine-java] Re: Problem with Memcache

2011-08-26 Thread Simon Knott
Hi,

There have been a number of issues with MemCache availability over the last 
few days.  You need to ensure that your code is written in such a way that 
if MemCache is unavailable, your application carries on as normal (if 
possible) - at the end of the day it's only a cache, not a datastore.

Cheers,
Simon

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



[appengine-java] Re: Problem with Memcache

2011-08-26 Thread Simon Knott
Hi,

According to the API docs, a* MemcacheServiceException * 
<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheServiceException.html>will
 
be thrown "for backend non-availability or similar error states which may 
occur, but are not necessarily indicative of a coding or usage error by the 
application".

I would go on the assumption that if an exception has occurred, that the 
operation you were attempting to do has not occurred.  i.e.  If you've 
attempted to clear the cache and get an exception, I'd assume that the cache 
still has data in it.

Cheers,
Simon

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



[appengine-java] Re: Problem with Memcache

2011-08-26 Thread Simon Knott
Hi,

Additionally, it seems you can specify the error handling you would like in 
your application using the ErrorHandler 
<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/ErrorHandler.html>interface
 
and the 
MemcacheService.setErrorHandler<http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService.html#setErrorHandler%28com.google.appengine.api.memcache.ErrorHandler%29>method.

Cheers,
Simon

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



[appengine-java] Re: Always On not working properly

2011-08-26 Thread Simon Knott
Are you talking about static resources, or your Java compiled code?  The 
former can be cached on the front-end servers, so you need to use some 
cache-busting techniques to get around that if you are updating static 
resources.  I can't say I've ever experienced issues with Java code being 
stale.

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



[appengine-java] Re: Always On not working properly

2011-08-26 Thread Simon Knott
I should add that, as far as I'm aware, GAE is still in beta - it is due to 
come out of beta by the end of the year I believe.

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



[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Simon Knott
You're not placing anything in your session which isn't serializable are 
you?  

Given that everything seems to be failing when it's starting up a new 
instance, which is when it will attempt to read the session out of the 
datastore/memcache, it may be that it can't deserialize your data.

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



[appengine-java] Re: Loading requests timeout with DeadlineExceededException while reading classes

2011-08-31 Thread Simon Knott
How are you deploying your classes?  Under WEB-INF/classes, or as a custom 
JAR file?

Another developer posted that they had a massive performance improvement 
deploying their classes in a JAR file - see 
https://groups.google.com/d/msg/google-appengine/Gl7OaMOHJD8/i_ti0KceockJ 
for the relevant thread.

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



[appengine-java] Re: URLFetch Http Method "DELETE" returns http response 400

2011-09-05 Thread Simon Knott
You may want to raise a Production issue, if this is happening after you've 
deployed the code:
http://code.google.com/p/googleappengine/issues/entry?template=Production%20issue

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



[appengine-java] Re: Data updated using key is not shown when searched through other attribute

2011-09-05 Thread Simon Knott
I strongly suggest you read the documentation about the datastore around 
queries- 
what you're experiencing is the eventual consistency of queries, which can 
occur in Production and is highlighted in the development environment.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/C8VYwuqhWugJ.
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.



Re: [appengine-java] Data updated using key is not shown when searched through other attribute

2011-09-05 Thread Simon Knott
There isn't an issue because it was designed in - see the SDK release 
notesfor 1.5.1

The eventual consistency of queries can and will happen in Production - if 
you are using the High Replication datastore in Production, read all of the 
Java 
documentation before 
you start coding, as there are significant "gotchas" if you develop 
blind.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/q7NvPTnckXIJ.
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.



Re: [appengine-java] Data updated using key is not shown when searched through other attribute

2011-09-05 Thread Simon Knott
Have a read of the Development Server 
info - 
this explains how to set it from both the command line or through the 
Eclipse plug-in GUI.

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



[appengine-java] Re: Google App Engine NO LONGER FOR SMALL DEVELOPERS!!!!!!!

2011-09-09 Thread Simon Knott
When you state that "*As of now, there are no data store reads and writes*", 
quite clearly there are datastore reads and writes somewhere in your 
application - if there weren't and Google were miscalculating this, then 
everyone would be up in arms.

If your application is "almost" working as a static application, what 
dynamic data are you displaying?  Have you turned on appstats and looked at 
the resulting stats to determin which queries are causing your issues?

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



[appengine-java] Re: Help: Memcache - not hitting at all

2011-09-13 Thread Simon Knott
My only two comments are:


   - MemCache can contain null values - it wouldn't be the cause of your 
   issue but it's worth checking for null, rather than assuming that the 
   returned value has a length.
   - Your data will never stay in MemCache for 30 days - how often are your 
   calls between put and get?  The longest I've seen data stay in MemCache is 
   around a day and it can be as little as a few minutes.
   

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



[appengine-java] Re: Can't connect with database

2011-09-13 Thread Simon Knott
Hi,

You can't connect GAE applications to external databases directly.  The only 
external connections which are allowed are connections over the HTTP 
protocol.

Cheers,
Simon

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



[appengine-java] Re: Can't connect with database

2011-09-13 Thread Simon Knott
Sorry, I should also have added that GAE doesn't currently support PHP 
either!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/--tLaDBuXYYJ.
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.



Re: [appengine-java] Help: Memcache - not hitting at all

2011-09-13 Thread Simon Knott
Hi,

I'd hope that the value is never null, it was just an observation.  How long 
is there between a *putById *and a *hasById*?

Cheers,
Simon

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



[appengine-java] Re: disable warmup-requests-enabled

2011-09-14 Thread Simon Knott
Hi,

I think you've misunderstood warm-up requests.  GAE will spin-up and 
tear-down your application very often, especially if you have very little 
traffic going through.  The warm-up requests are simply a mechanism for 
carrying out some initialisation, so that if a new instance is required to 
handle some additional load the main loading request is smaller in 
duration.  By disabling warm-up requests, you are simply telling GAE that 
you don't support this initialisation optimisation.

At the moment, there is an "Always On" option which allows you to always 
have three instances available.  However, this will be disappearing with the 
new pricing structure at the end of the month.

Cheers,
Simon

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



[appengine-java] Re: Threads

2011-09-18 Thread Simon Knott
There is a very high possibility that your application will run in multiple 
JVMs, so you should avoid synchronizing between threads.

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



[appengine-java] Re: .A research: how long will your java app instance start up fully?

2011-09-29 Thread Simon Knott
3-4 seconds

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



[appengine-java] Re: ThreadLocal seems not to be working sometimes

2011-09-30 Thread Simon Knott
It's much better practice to set the ThreadLocal as final and static, in my 
experience.  i.e.

  private static final ThreadLocal localUser = new 
ThreadLocal();


If you don't do this, then you've got the danger that a separate thread can 
re-initialise the ThreadLocal between your first and second statement.


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



[appengine-java] Re: Prerelease SDK 1.5.5 available for download!

2011-10-03 Thread Simon Knott
Wow, great job!

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



[appengine-java] Re: Namespaces and filter instances

2011-10-10 Thread Simon Knott
Hi,

Unfortunately setting the namespace in the init method won't work, as the 
setting of the Namespace is on a per-thread basis (see 
http://thoughts.inphina.com/2010/09/16/multi-tenancy-in-google-app-engine-scope-of-namespacemanager/
 
for more info on how it works under the hood).

The better option would be to create a single request filter which 
interrogates the request context and sets the namespace for that request, or 

create two filters which just set the correct namespace and apply them to 
separate URL patterns.

Cheers,
Simon

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



[appengine-java] Re: Namespaces and filter instances

2011-10-10 Thread Simon Knott
And I've just re-read your post - apologies, as this was exactly what you 
were suggesting and it will work fine!

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



[appengine-java] Re: Namespaces and filter instances

2011-10-10 Thread Simon Knott
Re-reading your post, I've realised that this is almost what you were 
proposing anyway - the only difference is that you can't use the init 
method.

You'll need to store the namespace passed into the init method and use it to 
call the NamespaceManager in the doFilter method.

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



[appengine-java] Re: unablr to add entities to datastore

2011-10-20 Thread Simon Knott
Hi,

You need to add the index to the datastore-indexes.xml file - the "auto" one 
is auto-generated on the development server, as an indication as to which 
indexes you need to create for the query to work in the Production 
environment.

Please see 
http://code.google.com/appengine/docs/java/config/indexconfig.html for more 
information.

Cheers,
Simon

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



[appengine-java] Re: Size limit for POST Request ?

2011-10-25 Thread Simon Knott
As far as I can see, from SDK 1.5.5 onwards the following is true:

Each incoming HTTP request can be no larger than 32MB.
>

This came from http://code.google.com/appengine/docs/quotas.html 

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



[appengine-java] Re: GAE app completely down for over an hour due to com.google.appengine.api.memcache.MemcacheServiceException: Memcache put: Error setting single item

2011-10-26 Thread Simon Knott
Can you post one of the exceptions which was thrown from your JSP pages? 
 That seems a little strange to me!

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



[appengine-java] Re: GAE app completely down for over an hour due to com.google.appengine.api.memcache.MemcacheServiceException: Memcache put: Error setting single item

2011-10-27 Thread Simon Knott
Thanks for the update Jerome.  I had wondered whether the error had 
occurred in Session management, since you weren't calling it explicitly.

This definitely needs to fail invisibly - a failure in Memcache, when the 
datastore is still available, shouldn't cause session management to fail!

Cheers,
Simon

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



[appengine-java] Re: Uncaught exception from servlet java.lang.UnsupportedClassVersionError with HelloWorld guest book example?

2011-11-15 Thread Simon Knott
JRE7 isn't supported, you need to use JDK6.

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



[appengine-java] Re: HUGE range (30 seconds+) in startup times

2011-11-24 Thread Simon Knott
A couple of other people in the group have resolved this issue by JARing up 
their custom classes, rather than loading them up from the WEB-INF/classes.

You'll notice that all of your errors come from class resolution or 
classpath scanning - it seems the file system on GAE is particularly slow, 
so by loading the classes from a single resource you can get much more 
consistent load times.  The more frameworks you use with classpath 
scanning, the more the filesystem impacts your load times.


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



[appengine-java] Re: exception in 1.60 and unable to run the app

2011-11-25 Thread Simon Knott
That error looks like you are using the wrong version of the supplied 
DataNucleus library with GAE SDK 1.6



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



[appengine-java] Re: max list properties

2011-11-30 Thread Simon Knott
Hi,

The limit is actually 5000 indexed properties per entity - see this post 
for a more detailed explanation:

https://groups.google.com/d/msg/google-appengine/1fTct9AO1MY/FmjJBcye9OAJ

Cheers,
Simon

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



[appengine-java] Re: max list properties

2011-11-30 Thread Simon Knott
Another couple of useful links:

http://stackoverflow.com/questions/5131247/google-app-engine-datastore-index-cap

and

http://code.google.com/appengine/docs/python/datastore/queries.html#Big_Entities_and_Exploding_Indexes

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine-java/-/xmTJNBw5e9EJ.
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.



  1   2   >