[appengine-java] Performance issue for GAE auto-restart

2010-06-02 Thread Tin
Hi all:

We're using GAE to develop our project, but I found I have a
performance issue, when checking the logs I found the GAE will auto-
restart every 30-60 sec.
Someone tell me this's because if the web app wasn't used much, GAE
will dispose the instances, and after that made a load request to spin
up a new VM and servlet container.
So I write a very simple testing for confirm this:

-- Test Servlet --
   request.count = Counter.createOrIncrement("JspTest", 1);  // using
JPA to store a counter
   forward '/test.jsp';

-- Test JSP --
<%...@page contentType="text/html;charset=UTF-8" language="java"
isELIgnored="false" %>
<%...@include file="/includes/header.jsp"%>




  
  Count: ${count}  

<%...@include file="/includes/footer.jsp"%>

-- Log Messages --
06-02 10:27PM 57.036 com.liyue.web.ContextListener contextInitialized:
Web context inited.  --->> FIRST REQUEST
06-02 10:27PM 58.036 javax.servlet.ServletContext log: Action servlet
initialized.
06-02 10:28PM 06.379 [...].: com.liyue.web.Test spend : 8341
ms  --->> SPEND 8sec FOR INIT AND EXEC
...
06-02 10:28PM 39.401 [...].: com.liyue.web.Test spend : 56 ms
--->> VERY GOOD PERFORMANCE
...
06-02 10:30PM 03.502 [...].: com.liyue.web.Test spend : 60 ms
--->> VERY GOOD PERFORMANCE
...
06-02 10:32PM 52.688 com.liyue.web.ContextListener contextInitialized:
Web context inited.  --->> AUTO-RELOAD 
06-02 10:32PM 53.636 javax.servlet.ServletContext log: Action servlet
initialized.
06-02 10:33PM 01.669 [...].: com.liyue.web.Test spend : 8032
ms  --->> VERY POOR PERFORMANCE
...

I have no idea for how to solve this issue, but this may make us give
up using GAE, because our boss and customers couldn't accept this poor
performace.
But we have write lots of code for GAE, if you have any idea could
help us please tell me.

THANKS VERY VERY MUCH in advance !!!

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



[appengine-java] Re: Transaction exception when not using a transaction ?

2010-06-02 Thread Millisecond
Even though you're not using transactions, I think it's trying to make
the .close() call atomic (maybe with an internal implicit
transaction), failing or succeeding as a whole.  And as I understand
it, entities not in the same group can be stored on separate machines
so can't be operated on atomically.

I've worked around this by calling a flush() after most any change on
a PM-managed object until close().  If this has a huge number of reqs/
s, you may want to re-architect to get the objects in the same entity
group as multiple flushes won't be very efficient.

-C

On Jun 2, 8:26 pm, JD  wrote:
> I have a PersistenceManager
>
> PersistenceManager pm = PMF.get().getPersistenceManager();
>
> which I use to do a bunch of operations on different objects, but
> WITHOUT transaction (run queries, store entities and lookup entities).
>
> I then close the manager with pm.close() and get this obscure error
> that complains about multiple entity groups inside a transaction even
> though I am not using a transaction (you will notice that the error is
> not the usual one where it prints the different entity groups).
>
> I am not 100% confident but have the impression that this error
> started happening with the 1.3.4 release.
> 100% reproducible use case. Would appreciate input from App Engine
> developers.
>
> com.myapp.servlet.task.PopulateUserPages doAction: Illegal argument
> javax.jdo.JDOFatalUserException: Illegal argument
>         at
> org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(Nuc 
> leusJDOHelper.java:
> 344)
>         at
> org.datanucleus.jdo.JDOPersistenceManager.close(JDOPersistenceManager.java:
> 281)
>         at com.myapp.dao.jdo.DatastoreService.release(DatastoreService.java:
> 631)
>         at
> com.myapp.servlet.AbstractBaseServlet.releaseService(AbstractBaseServlet.ja 
> va:
> 243)
>         at
> com.myapp.servlet.task.PopulateUserPages.doAction(PopulateUserPages.java:
> 132)
>         at com.myapp.servlet.task.Dispatcher.doAction(Dispatcher.java:35)
>         at com.myapp.servlet.task.TaskServlet.doAction(TaskServlet.java:36)
>         at
> com.myapp.servlet.AbstractBaseServlet.doGenericAction(AbstractBaseServlet.j 
> ava:
> 194)
>         at
> com.myapp.servlet.AbstractBaseServlet.doPost(AbstractBaseServlet.java:
> 84)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 511)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1166)
>         at
> com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlo 
> bUploadFilter.java:
> 97)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>         at
> com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionF 
> ilter.java:
> 35)
>         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
> 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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionH 
> andlerMap.java:
> 238)
>         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
> com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequ 
> estParser.java:
> 76)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>         at
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceReques 
> t(JettyServletEngineAdapter.java:
> 135)
>         at
> com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
> 250)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5838)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5836)
>         at
> com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingAp 
> plicationHandler.java:
> 2

Re: [appengine-java] simple relation

2010-06-02 Thread John Patterson
You will need to use an ObjectDatastore instead of JDO if you want to  
use direct references as in your example.


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

If you @Embed Work in User you can retrieve all in a single query

http://code.google.com/p/twig-persist/wiki/Configuration#Storage_Options

On 3 Jun 2010, at 11:46, RAVINDER MAAN wrote:


Thanks Bill
I have experience with hibernate thats why i thought it could be  
possible.


On Thu, Jun 3, 2010 at 12:00 AM, Bill Milligan > wrote:


I believe you're going to have to change this to

class User {
String name;
List  workNames; // or List  workIds;
}

class Work {
String name;
String userName; // or Long userId;
}

This is actually you'd design this under the MDA paradigm,  
actually.  You need to be able to change each independently of the  
other.  As far as "automatic population", like an ORM would do, I  
don't think this is possible.  You'll have to do this manually.   
Honestly, you won't lose much by doing two queries.


On Wed, Jun 2, 2010 at 2:12 PM, RAVINDER MAAN   
wrote:

Thank you so much for your answer Bill
yes you are rite the way i wrote its many to many  
relation.Actually I want relation as below


class User{
Long id;
String username;
List workList;
}

class Work{
Long id;
String workname;
String username;

}
   you can see work class has username and user class too has  
username.In both classes primary key is id. I just want to know is  
there any way to get workList populated automatically on retrieval  
of user object.we can do it with 2 queries easily.we can reteriev  
user first then we can retrieve work object with second query.



On Wed, Jun 2, 2010 at 10:35 PM, Bill Milligan > wrote:


Are you trying one-to-many or many-to-many?  By using a third table  
it sounds like you're trying to do many-to-many, not one-to-many.


As best I can determine, the only real way to do this in GAE is to  
have a User class with a collection of string properties, containing  
the list of all Work ids.  In this case a bidirectional link would  
be probably quite useful, so that a Work could be identified by its  
User id.


Here's a scenario:  Retrieve User by user id.  Then, retrieve all  
Works in the list of work ids owned by the User.


Note that this is not true object composition, with a User  
containing a List of Collection, but rather an indirect reference.   
This pattern is useful in a lot of circumstances where you want to  
be able to break up your object model into more modular deployable  
applications.  On the other hand, I'd hate to be completely boxed in  
by this restriction.


I'm just getting started with GAE so I'm very much not an expert.   
I'd love to know anybody else's thoughts on the matter.


On Wed, Jun 2, 2010 at 12:10 AM, RAVINDER MAAN   
wrote:

Hello all
  can anybody please tell me how to implement simple one many
relation in java.I have user table and work table .Any user can do
many type of works.In user table i have userid but it is not primary
key of the user table.Then i have work table which has workid it is
also not primary key of the table.Normally in relation db we ca make
third table table which contains workid for every userid.What how can
we implement this thing appengine datastore.I want to have collection
all works in user object .can anybody please tell me how to define
this mapping?please note that in userid and workid are not primary
keys in both objects or tables.
Thanks in adavance.

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




--
Regards,
Ravinder Singh Maan


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

Re: [appengine-java] stuck indexes ?

2010-06-02 Thread RAVINDER MAAN
I see same problem it takes hours to build indexes.is there any faster way?

On Thu, Jun 3, 2010 at 10:03 AM, Bruce  wrote:

> Hi,
> I have an app at 'omwatcher.appspot.com' with a very small database,
> yet two indexes seem to be stuck with Status=Building.   Can someone
> help?
> Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>


-- 
Regards,
Ravinder Singh Maan

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



Re: [appengine-java] simple relation

2010-06-02 Thread RAVINDER MAAN
Thanks Bill
I have experience with hibernate thats why i thought it could be
possible.

On Thu, Jun 3, 2010 at 12:00 AM, Bill Milligan wrote:

>
> I believe you're going to have to change this to
>
> class User {
> String name;
> List  workNames; // or List  workIds;
> }
>
> class Work {
> String name;
> String userName; // or Long userId;
> }
>
> This is actually you'd design this under the MDA paradigm, actually.  You
> need to be able to change each independently of the other.  As far as
> "automatic population", like an ORM would do, I don't think this is
> possible.  You'll have to do this manually.  Honestly, you won't lose much
> by doing two queries.
>
> On Wed, Jun 2, 2010 at 2:12 PM, RAVINDER MAAN  wrote:
>
>> Thank you so much for your answer Bill
>> yes you are rite the way i wrote its many to many relation.Actually I
>> want relation as below
>>
>> class User{
>> Long id;
>> String username;
>> List workList;
>> }
>>
>> class Work{
>> Long id;
>> String workname;
>> String username;
>>
>> }
>>you can see work class has username and user class too has username.In
>> both classes primary key is id. I just want to know is there any way to get
>> workList populated automatically on retrieval of user object.we can do it
>> with 2 queries easily.we can reteriev user first then we can retrieve work
>> object with second query.
>>
>>
>> On Wed, Jun 2, 2010 at 10:35 PM, Bill Milligan 
>> wrote:
>>
>>>
>>> Are you trying one-to-many or many-to-many?  By using a third table it
>>> sounds like you're trying to do many-to-many, not one-to-many.
>>>
>>> As best I can determine, the only real way to do this in GAE is to have a
>>> User class with a collection of string properties, containing the list of
>>> all Work ids.  In this case a bidirectional link would be probably quite
>>> useful, so that a Work could be identified by its User id.
>>>
>>> Here's a scenario:  Retrieve User by user id.  Then, retrieve all Works
>>> in the list of work ids owned by the User.
>>>
>>> Note that this is not true object composition, with a User containing a
>>> List of Collection, but rather an indirect reference.  This pattern is
>>> useful in a lot of circumstances where you want to be able to break up your
>>> object model into more modular deployable applications.  On the other hand,
>>> I'd hate to be completely boxed in by this restriction.
>>>
>>> I'm just getting started with GAE so I'm very much not an expert.  I'd
>>> love to know anybody else's thoughts on the matter.
>>>
>>> On Wed, Jun 2, 2010 at 12:10 AM, RAVINDER MAAN wrote:
>>>
 Hello all
   can anybody please tell me how to implement simple one many
 relation in java.I have user table and work table .Any user can do
 many type of works.In user table i have userid but it is not primary
 key of the user table.Then i have work table which has workid it is
 also not primary key of the table.Normally in relation db we ca make
 third table table which contains workid for every userid.What how can
 we implement this thing appengine datastore.I want to have collection
 all works in user object .can anybody please tell me how to define
 this mapping?please note that in userid and workid are not primary
 keys in both objects or tables.
 Thanks in adavance.

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


>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to
>>> google-appengine-j...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>
>>
>>
>>
>> --
>> Regards,
>> Ravinder Singh Maan
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>  --
> 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 optio

[appengine-java] stuck indexes ?

2010-06-02 Thread Bruce
Hi,
I have an app at 'omwatcher.appspot.com' with a very small database,
yet two indexes seem to be stuck with Status=Building.   Can someone
help?
Thanks.

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



[appengine-java] Transaction exception when not using a transaction ?

2010-06-02 Thread JD
I have a PersistenceManager

PersistenceManager pm = PMF.get().getPersistenceManager();

which I use to do a bunch of operations on different objects, but
WITHOUT transaction (run queries, store entities and lookup entities).


I then close the manager with pm.close() and get this obscure error
that complains about multiple entity groups inside a transaction even
though I am not using a transaction (you will notice that the error is
not the usual one where it prints the different entity groups).

I am not 100% confident but have the impression that this error
started happening with the 1.3.4 release.
100% reproducible use case. Would appreciate input from App Engine
developers.

com.myapp.servlet.task.PopulateUserPages doAction: Illegal argument
javax.jdo.JDOFatalUserException: Illegal argument
at
org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:
344)
at
org.datanucleus.jdo.JDOPersistenceManager.close(JDOPersistenceManager.java:
281)
at com.myapp.dao.jdo.DatastoreService.release(DatastoreService.java:
631)
at
com.myapp.servlet.AbstractBaseServlet.releaseService(AbstractBaseServlet.java:
243)
at
com.myapp.servlet.task.PopulateUserPages.doAction(PopulateUserPages.java:
132)
at com.myapp.servlet.task.Dispatcher.doAction(Dispatcher.java:35)
at com.myapp.servlet.task.TaskServlet.doAction(TaskServlet.java:36)
at
com.myapp.servlet.AbstractBaseServlet.doGenericAction(AbstractBaseServlet.java:
194)
at
com.myapp.servlet.AbstractBaseServlet.doPost(AbstractBaseServlet.java:
84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java:
97)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
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
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
250)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5838)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5836)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
398)
at com.google.net.rpc.impl.Server$2.run(Server.java:852)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
576)
at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
442)
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)

[appengine-java] Re: Spring Roo + GWT Demo

2010-06-02 Thread EN
Scroll down for the "Deploy to Google App Engine" section:
http://blog.springsource.com/2010/06/02/using-springsource-tool-suite-2-3-3-m1-with-roo-and-gwt/

On May 30, 11:42 am, Marcel Overdijk  wrote:
> Yes would be cool if they finally share the code.
> It was a big announcement and people want to try it out, but it lacks
> information now...
>
> On May 28, 8:44 pm, caritos  wrote:
>
>
>
> > Looking for documentation to deploy Spring Roo + GWT + STS on GAE.
>
> > On May 28, 11:03 am, geoaxis  wrote:
>
> > > Hello,
> > > I believe that portions of the code for GWT is already in the GWT
> > > release.
>
> > > You can try out theROOspecific stuff with STS (screen cast 
> > > herehttp://www.thescreencast.com/2010/05/how-to-gwt-roo.html)
>
> > > --
> > > Shahzada Hatim
> > > @geoaxis on twitter, irc.freenode.net/#spring
>
> > > On May 23, 5:44 pm, yonny  wrote:
>
> > > > Hi all,
> > > >    Has the code for theroo+gwt demo at Google IO by Ben Alex and
> > > > Bruce Johnson been provided for download.. I'd like to have a look at
> > > > how they implemented the relationships.Any help would be gratly
> > > > appreciated.Thanks
>
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "Google App Engine for Java" group.
> > > > To post to this group, send email to 
> > > > google-appengine-j...@googlegroups.com.
> > > > To unsubscribe from this group, send email to 
> > > > google-appengine-java+unsubscr...@googlegroups.com.
> > > > For more options, visit this group 
> > > > 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] Nested Embedded Classes do not work with GAE 1.3.4?

2010-06-02 Thread Johnny
I have a simple 3 class example:

@PersistenceCapable
public class MyUser {
  @Persistent
  @Embedded
  private ContactDetails contactInfo;
...
}

@PersistenceCapable
@EmbeddedOnly
public class ContactDetails {
  @Persistent
  @Embedded
  private MyPostalAddress address
...
}

@PersistenceCapable
@EmbeddedOnly
public class MyPostalAddress {
  @Persistent
  private String postalAddress;
...
}

My main class
{
...
MyPostalAddress addr = new MyPostalAddress();
addr.setPostalAddress("123 Main St.");

ContactDetails cd = new ContactDetails();
cd.setAddress(addr);

MyUser user = new MyUser();
user.setContactInfo(cd).

pm.makePersistent(newUser);
tx.commit();
}


>>>
Once the makePersistent() call is invoked I receive the following
stacktrace.  If I don't have a nested embedded class and simply move
the MyPostalAddress out of ContactDetails and instead embed it into
MyUser everything works.  So I have 2 questions:

(1) The DataNucleus documentation (http://www.datanucleus.org/products/
accessplatform/jdo/orm/embedded.html#NestedPC) explicitly says the
nested embedded classes work with JDO but GAE documentation (http://
code.google.com/appengine/docs/java/datastore/
dataclasses.html#Embedded_Classes) doesn't mention that it does or
doesn't.  GAE only has a single example of an Embedded Class and that
is an inner class on top.  I have tried different paths but they all
point to GAE not supporting nested (more than 1 level deep) Embedded
Classes. Can anyone confirm or refute my conclusion?

(2)  Furthermore,  in my nested embedded class I also tried to have a
property that was a full entity onto itself (requires its own space)
and that was rejected.  I actually tried this model first and once
that didn't work I tried the simple example I gave above. My
stacktrace was different for this.  It was along the lines of index: 5
is out of bounds type message.  I didn't reproduce this since I
modified my code but it's all the same. So if somehow (show me please)
nested embedded classes work do they support non-simple properties
that are actually fully persistable entities themselves?

Thanks in advance.

STACKTRACE>>>


HTTP ERROR 500

Problem accessing /register.action. Reason:

Specified class class java.lang.String is not persistable

Caused by:

javax.jdo.JDOFatalUserException: Specified class class
java.lang.String is not persistable
at
org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:
354)
at
org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:
674)
at
org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:
694)
at
com.camelspeed.core.service.authentication.DefaultUserRegistrationServiceImpl.register(DefaultUserRegistrationServiceImpl.java:
56)
at
com.camelspeed.web.action.RegisterActionBean.register(RegisterActionBean.java:
48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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 net.sourceforge.stripes.controller.DispatcherHelper
$6.intercept(DispatcherHelper.java:467)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:
158)
at
net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:
113)
at
net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:
155)
at
net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:
74)
at
net.sourceforge.stripes.controller.DispatcherHelper.invokeEventHandler(DispatcherHelper.java:
465)
at
net.sourceforge.stripes.controller.DispatcherServlet.invokeEventHandler(DispatcherServlet.java:
278)
at
net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:
160)
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
net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:
247)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at org.springframework.security.web.FilterChainProxy
$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
at
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:
109)
at
org.springframework.security.web.access.intercept.FilterSecurityIntercepto

[appengine-java] Uploading to blobstore gives OutOfMemoryError

2010-06-02 Thread Jean Hsu
Hi all,

I am trying to set up a basic file upload to blobstore,  but I get
this OutOfMemoryError:

WARNING: Error for /_ah/upload/
aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2786)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
at
javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
316)
at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
at
com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(UploadBlobServlet.java:
135)
at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
$000(UploadBlobServlet.java:72)
at com.google.appengine.api.blobstore.dev.UploadBlobServlet
$1.run(UploadBlobServlet.java:100)
at java.security.AccessController.doPrivileged(Native Method)
at
com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobServlet.java:
98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511);

I used the Memory Analyzer on Eclipse and it said that the memory leak
suspect is QueuedThreadPool.  I found this information about a memory
leak bug:

http://jira.codehaus.org/browse/JETTY-1188

How can I figure out what release of jetty is running locally?  It
looks like they fixed this in version 6.1.23:

http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160&version=16044

Has anyone else had this issue?

Thanks,
Jean

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



[appengine-java] Re: Spring Roo + GWT Demo

2010-06-02 Thread Roger Itai
You can search "Deploy to Google App Engine" on this post
http://blog.springsource.com/2010/06/02/using-springsource-tool-suite-2-3-3-m1-with-roo-and-gwt/

On 28 maio, 15:44, caritos  wrote:
> Looking for documentation to deploy Spring Roo + GWT + STS on GAE.
>
> On May 28, 11:03 am, geoaxis  wrote:
>
> > Hello,
> > I believe that portions of the code for GWT is already in the GWT
> > release.
>
> > You can try out theROOspecific stuff with STS (screen cast 
> > herehttp://www.thescreencast.com/2010/05/how-to-gwt-roo.html)
>
> > --
> > Shahzada Hatim
> > @geoaxis on twitter, irc.freenode.net/#spring
>
> > On May 23, 5:44 pm, yonny  wrote:
>
> > > Hi all,
> > >    Has the code for theroo+gwt demo at Google IO by Ben Alex and
> > > Bruce Johnson been provided for download.. I'd like to have a look at
> > > how they implemented the relationships.Any help would be gratly
> > > appreciated.Thanks
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "Google App Engine for Java" group.
> > > To post to this group, send email to 
> > > google-appengine-j...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > google-appengine-java+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > 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] the support to JPA

2010-06-02 Thread Tao
Hi everyone

in the tuto, why there is so few articles with JPA?

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



Re: [appengine-java] "timestamp check failed" error

2010-06-02 Thread Ikai L (Google)
If I had to guess: your system clock is off. Try syncing it with a network
time server and try again.

On Wed, Jun 2, 2010 at 6:57 PM, iodsfjoipsdfi ijsdpfijd <
gaefjga...@gmail.com> wrote:

> Hi,
>
> I deployed some of my GAE apps to the production server some months
> ago and it worked perfectly.
> Recently I haven't been using GAE but now I have to.
>
> When I try to deploy my app to the production server I always get this
> error log:
>
> Unable to update:
> javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path validation
> failed: java.security.cert.CertPathValidatorException: timestamp check
> failed
>at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown
> Source)
>at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
>at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
>at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
>at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown
> Source)
>at
> com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown
> Source)
>at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown
> Source)
>at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
> Source)
>at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
> Source)
>at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown
> Source)
>at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
> Source)
>at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
> Source)
>at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown
> Source)
>at
>
> sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown
> Source)
>at
> sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
> Source)
>at
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown
> Source)
>at
>
> com.google.appengine.tools.admin.ServerConnection.connect(ServerConnection.java:
> 338)
>at
>
> com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:
> 133)
>at
>
> com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:
> 82)
>at
>
> com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:
> 532)
>at
>
> com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:
> 349)
>at
>
> com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:
> 111)
>at
> com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
> 56)
>at
>
> com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:
> 271)
>at
>
> com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:
> 145)
>at
>
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
> 38)
>at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: sun.security.validator.ValidatorException: PKIX path
> validation failed: java.security.cert.CertPathValidatorException:
> timestamp check failed
>at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
>at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
>at sun.security.validator.PKIXValidator.engineValidate(Unknown
> Source)
>at sun.security.validator.Validator.validate(Unknown Source)
>at
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown
> Source)
>at
>
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown
> Source)
>at
>
> com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown
> Source)
>... 23 more
> Caused by: java.security.cert.CertPathValidatorException: timestamp
> check failed
>at
> sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(Unknown
> Source)
>at
> sun.security.provider.certpath.PKIXCertPathValidator.doValidate(Unknown
> Source)
>at
> sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(Unknown
> Source)
>at java.security.cert.CertPathValidator.validate(Unknown Source)
>... 30 more
> Caused by: java.security.cert.CertificateNotYetValidException:
> NotBefore: Fri Mar 05 04:06:05 CET 2010
>at sun.security.x509.CertificateValidity.valid(Unknown Source)
>at sun.security.x509.X509CertImpl.checkValidity(Unknown Source)
>at
> sun.security.provider.certpath.BasicChecker.verifyTimestamp(Unknown
> Source)
>at sun.security.provider.certpath.BasicChecker.check(Unknown Source)
>  ... 34 more
> What am I doing wrong?
>
> --
> You received this message because you are subscribed to the Google Groups

[appengine-java] "timestamp check failed" error

2010-06-02 Thread iodsfjoipsdfi ijsdpfijd
Hi,

I deployed some of my GAE apps to the production server some months
ago and it worked perfectly.
Recently I haven't been using GAE but now I have to.

When I try to deploy my app to the production server I always get this
error log:

Unable to update:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path validation
failed: java.security.cert.CertPathValidatorException: timestamp check
failed
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown
Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown
Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown
Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown
Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown
Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown
Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown
Source)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown
Source)
at
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
Source)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown
Source)
at
com.google.appengine.tools.admin.ServerConnection.connect(ServerConnection.java:
338)
at
com.google.appengine.tools.admin.ServerConnection.send(ServerConnection.java:
133)
at
com.google.appengine.tools.admin.ServerConnection.post(ServerConnection.java:
82)
at
com.google.appengine.tools.admin.AppVersionUpload.send(AppVersionUpload.java:
532)
at
com.google.appengine.tools.admin.AppVersionUpload.beginTransaction(AppVersionUpload.java:
349)
at
com.google.appengine.tools.admin.AppVersionUpload.doUpload(AppVersionUpload.java:
111)
at
com.google.appengine.tools.admin.AppAdminImpl.update(AppAdminImpl.java:
56)
at
com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy(AppEngineBridgeImpl.java:
271)
at
com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace(DeployProjectJob.java:
145)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:
38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: sun.security.validator.ValidatorException: PKIX path
validation failed: java.security.cert.CertPathValidatorException:
timestamp check failed
at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
at sun.security.validator.PKIXValidator.doValidate(Unknown Source)
at sun.security.validator.PKIXValidator.engineValidate(Unknown
Source)
at sun.security.validator.Validator.validate(Unknown Source)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown
Source)
at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown
Source)
... 23 more
Caused by: java.security.cert.CertPathValidatorException: timestamp
check failed
at
sun.security.provider.certpath.PKIXMasterCertPathValidator.validate(Unknown
Source)
at
sun.security.provider.certpath.PKIXCertPathValidator.doValidate(Unknown
Source)
at
sun.security.provider.certpath.PKIXCertPathValidator.engineValidate(Unknown
Source)
at java.security.cert.CertPathValidator.validate(Unknown Source)
... 30 more
Caused by: java.security.cert.CertificateNotYetValidException:
NotBefore: Fri Mar 05 04:06:05 CET 2010
at sun.security.x509.CertificateValidity.valid(Unknown Source)
at sun.security.x509.X509CertImpl.checkValidity(Unknown Source)
at
sun.security.provider.certpath.BasicChecker.verifyTimestamp(Unknown
Source)
at sun.security.provider.certpath.BasicChecker.check(Unknown Source)
  ... 34 more
What am I doing wrong?

-- 
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: Security restrictions may not be entirely emulated errors in Dev mode with Spring 3.0 on 1.3.4

2010-06-02 Thread Andrew
Hi Bill,

Can you send me the steps to reproduce it so I can see if I am
observing the same thing please?

Regards,
Andrew.

On Jun 3, 10:32 am, Bill Milligan  wrote:
> If you've gotten past point 2, I'd love to see it.  Redeploying every time I
> make a change is driving me batty.

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



Re: [appengine-java] Re: Security restrictions may not be entirely emulated errors in Dev mode with Spring 3.0 on 1.3.4

2010-06-02 Thread Bill Milligan
If you've gotten past point 2, I'd love to see it.  Redeploying every time I
make a change is driving me batty.



On Wed, Jun 2, 2010 at 7:38 PM, Andrew  wrote:

> Thank you very much Bill.  The suggestion in point 1 worked a treat.
>
> To answer your other questions, I am using asm 2.1 and spring 3.0.2.
>
> My url pattern is:
>
> /*
>
> When I said that the app was actually running, I meant that even
> though there were those errors in the console, I was able to browse to
> the hello world file and it gave me the expected output so it appeared
> the errors actually hadn't stopped anything from working.
>
> If you would like me to send you my eclipse project in a zip file
> please let me know and I'm happy to do so.
>
> Best regards,
> Andrew.
>
> On Jun 3, 12:04 am, Bill  wrote:
> > Okay, a few things I found out --
> >
> > 1.  The suggestion athttp://
> code.google.com/p/googleappengine/issues/detail?id=2527
> > works quite well.  You'll find the afflicted appengine-agent.jar in
> > your eclipse plugins folder under
> > com.google.appengine.eclipse.sdkbundle./appengine-java-sdk-
> > /lib/agent.  Use jarjar to fix internal refs to its own asm
> > code, completely compartmentalizing it away from everything else.
> > Ignore the "ln -s" suggestion, I have no idea what that's about except
> > possibly it's someone's idea to avoid renaming a file, and the
> > "plugin.jar" to "plugin2.jar" is just an example.  It's not really
> > relevant.
> > 2.  It won't matter once you get this working.  Jetty will not be able
> > to find your hello.jsp.  I can't figure out why, but I believe it has
> > something to do with the URL pattern in web.xml.  I tried moving it
> > around without success.
> > 3.  Both problems are non-issues on production.  I deployed the hello
> > app out there and everything just worked.  On one hand it's good, but
> > on the other, this drastically disimproves my build-test-turnaround
> > time.
> >
> > On Jun 1, 10:56 pm, Andrew  wrote:
> >
> > > Hi,
> >
> > > I'm trying to get spring 3.0 up and running as per the blog post at
> >
> > >http://www.ardentlord.com/apps/blog/show/829881-spring-3-0-on-google-.
> ..
> >
> > > However I'm running into some issues when I try and start it up in
> > > Development (have not tried in production yet):
> >
> > > The console is showing a stack of these messages:
> >
> > > 02/06/2010 2:50:19 AM
> > > com.google.appengine.tools.development.agent.impl.Transformer
> > > transform
> > > SEVERE: Unable to instrument
> > >
> org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator.
> > > Security restrictions may not be entirely emulated.
> > > java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V
> >
> > > However as far as I can tell the app is actually running.
> >
> > > There was a thread in this group late last year that described a
> > > similar issue, and the suggested solution seemed to be to rename the
> > > plugin.jar file to plugin2.jar:
> >
> > >http://groups.google.com.au/group/google-appengine-java/browse_thread.
> ..
> >
> > > However the posters seemed to be using macs.  I am on Windows 7
> > > (Eclipse Galileo with the Google Plugin) and cannot locate this file -
> > > does anyone have any advice on where I may find it?
> >
> > > Best regards,
> > > Andrew.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

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



[appengine-java] Re: Security restrictions may not be entirely emulated errors in Dev mode with Spring 3.0 on 1.3.4

2010-06-02 Thread Andrew
Thank you very much Bill.  The suggestion in point 1 worked a treat.

To answer your other questions, I am using asm 2.1 and spring 3.0.2.

My url pattern is:

/*

When I said that the app was actually running, I meant that even
though there were those errors in the console, I was able to browse to
the hello world file and it gave me the expected output so it appeared
the errors actually hadn't stopped anything from working.

If you would like me to send you my eclipse project in a zip file
please let me know and I'm happy to do so.

Best regards,
Andrew.

On Jun 3, 12:04 am, Bill  wrote:
> Okay, a few things I found out --
>
> 1.  The suggestion 
> athttp://code.google.com/p/googleappengine/issues/detail?id=2527
> works quite well.  You'll find the afflicted appengine-agent.jar in
> your eclipse plugins folder under
> com.google.appengine.eclipse.sdkbundle./appengine-java-sdk-
> /lib/agent.  Use jarjar to fix internal refs to its own asm
> code, completely compartmentalizing it away from everything else.
> Ignore the "ln -s" suggestion, I have no idea what that's about except
> possibly it's someone's idea to avoid renaming a file, and the
> "plugin.jar" to "plugin2.jar" is just an example.  It's not really
> relevant.
> 2.  It won't matter once you get this working.  Jetty will not be able
> to find your hello.jsp.  I can't figure out why, but I believe it has
> something to do with the URL pattern in web.xml.  I tried moving it
> around without success.
> 3.  Both problems are non-issues on production.  I deployed the hello
> app out there and everything just worked.  On one hand it's good, but
> on the other, this drastically disimproves my build-test-turnaround
> time.
>
> On Jun 1, 10:56 pm, Andrew  wrote:
>
> > Hi,
>
> > I'm trying to get spring 3.0 up and running as per the blog post at
>
> >http://www.ardentlord.com/apps/blog/show/829881-spring-3-0-on-google-...
>
> > However I'm running into some issues when I try and start it up in
> > Development (have not tried in production yet):
>
> > The console is showing a stack of these messages:
>
> > 02/06/2010 2:50:19 AM
> > com.google.appengine.tools.development.agent.impl.Transformer
> > transform
> > SEVERE: Unable to instrument
> > org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator.
> > Security restrictions may not be entirely emulated.
> > java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V
>
> > However as far as I can tell the app is actually running.
>
> > There was a thread in this group late last year that described a
> > similar issue, and the suggested solution seemed to be to rename the
> > plugin.jar file to plugin2.jar:
>
> >http://groups.google.com.au/group/google-appengine-java/browse_thread...
>
> > However the posters seemed to be using macs.  I am on Windows 7
> > (Eclipse Galileo with the Google Plugin) and cannot locate this file -
> > does anyone have any advice on where I may find it?
>
> > Best regards,
> > Andrew.

-- 
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: Problems enabling Second-level cache with JPA

2010-06-02 Thread Erik Bengtson
Fixed in datanucleus 2.1 http://www.jpox.org/servlet/jira/browse/NUCCORE-539

On 4 mai, 21:22, Sérgio Lopes  wrote:
> Thanks for the reply.
>
> And about citing GAE caveats: maybe that's a good idea to promote your
> product (I can speak for myself: I never heard about datanucleus before GAE,
> and it seems like a nice product).
>
> About 1.1 support: although there is no more support, the current GAE
> version + datanucleus-cache-1.1 should have worked?
>
> Thanks in advance and congratulations for the product
>
>
>
> On Tue, May 4, 2010 at 13:32, datanucleus  wrote:
> > And DataNucleus docs for v2.0, v2.1 don't mention GAE/J since GAE/J
> > doesn't work with them, and we've been given no timescales when it
> > will.
> > The DN v1.1 docs mention GAE/J, but we have absolutely no intention of
> > mentioning caveats to specifications necessary to run GAE/J - since we
> > see no major reason why the vast majority of JDO3 and JPA2 can't be
> > handled cleanly with a NoSQL datastore.
>
> > Can't help you with your issue since v1.1 is no longer supported,
> > except commercially
>
> > --
> > 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.



Re: [appengine-java] MemCache expiring around once a day

2010-06-02 Thread Rahul Juneja
Ikai,

Yes you are right the expensive part is initializing
the EntityManagerFactory in my case. Is there any way we can improve
the performance on that.

Thanks,
Rahul
--
Rahul Juneja
http://techlabs.thoughtclicks.com


On Wed, Jun 2, 2010 at 12:55 PM, Ikai L (Google)  wrote:

> There's very little cost to "connecting" to the datastore. If this is an
> issue, I'd look at the low-level API for anything that could be a warm-up
> request. The expensive part of this is initializing your
> PersistenceManagerFactory/EntityManagerFactory, not establishing a datastore
> connection.
>
> On Tue, Jun 1, 2010 at 8:12 PM, Rahul Juneja wrote:
>
>> Ikai,
>> The problem is that i am not sure when the values in the cache will be
>> accessed. but anyways i have implemented it in such a way that if the value
>> is not found in cache it goes to database to fetch it, but another issue
>> there is that if you are making the database connection first time after the
>> new jvm instance has been kicked off as it happens in Appengine,  db
>> connection takes a while, sometimes around 6-7 seconds, which is kind of
>> slow.
>>
>> Nicolas,
>> Thats the reason i am fetching the data if not found in cache.
>>
>>
>> Thanks,
>> Rahul
>>
>> --
>> Rahul Juneja
>> http://techlabs.thoughtclicks.com
>>
>>
>> On Tue, Jun 1, 2010 at 9:41 PM, Ikai L (Google) wrote:
>>
>>> The items will get flushed if they are not getting used. If you're using
>>> items once every 24 hours ... you probably do not need a cache. Use the
>>> datastore instead. Rather than prevent the items from being flushed, build
>>> the ability to regenerate the cache into your system or don't even bother
>>> with Memcache.
>>>
>>> On Tue, Jun 1, 2010 at 6:24 PM, Rahul Juneja wrote:
>>>
 Ikai,

 I think you are right that the cache values are expiring via LRU as
 sometimes only some elements of the cache are flushed.
 But the question is my cache only has 20-30 entries and out of that 10
 least recently used entries are being flushed. Is there any way i can
 prevent this flushing as i don't want to flush if the cache is so small
 instead i want the cache only to flush LRU elements when the cache grows in
 size to maybe 100,000 entries.

 Any clues ?

 Thanks,
 Rahul

 --
 Rahul Juneja
 http://techlabs.thoughtclicks.com


 On Tue, Jun 1, 2010 at 6:56 PM, Ikai L (Google) wrote:

> No, there isn't a default expiration. How are you setting values to the
> cache? Could you be expiring the items via LRU? That is - you're not using
> the items in the cache, instead setting other items and pushing the older,
> unused items out?
>
> On Wed, May 26, 2010 at 6:43 PM, Rahul  wrote:
>
>> I have a  memcache and not to mention it does live between different
>> jvm instances when new jvm instances starts, i can access the cache
>> but once a while i don't find any values in cache and this happened
>> twice in last 24 hours. Is there any default expiration which is less
>> then 24-48 hours which i am not aware of.
>>
>> Any help or pointers on this is appreciated.
>>
>> Thanks,
>> Rahul
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
>
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog: http://googleappengine.blogspot.com
> Twitter: http://twitter.com/app_engine
> Reddit: http://www.reddit.com/r/appengine
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

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

>>>
>>

Re: [appengine-java] Already has the maximum number of versions, but I have only one.

2010-06-02 Thread Miroslav Genov
Today all day I get the same error when trying to upload an updated 
version of my application. I try to remove one existing version 
(currently I have 5 version of my app) but the administrative panel is 
failing with the following error: " A server error has occurred.".


Any idea what is causing it ?


Also I wanna mention that the upload of my application is really slow 
and I have to wait several minutes to upload only 1 file change.


Regards,
  Miroslav

On 05/06/2010 03:20 PM, Tim Yates wrote:

Hiya!  For the past 3 hours, been trying to update my app engine java
instance, but have been getting the error:

Error posting to URL: 
https://appengine.google.com/api/appversion/deploy?app_id=check-email&version=1&;
403 Forbidden

Too Many Versions (403)
The application already has the maximum number of versions.

I see on the system status that things are under investigation

http://code.google.com/status/appengine/

Is this one of the things being investigated?

Tim

PS:  I only have a single version deployed, and this version is set to
be the default

   


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



Re: [appengine-java] simple relation

2010-06-02 Thread Bill Milligan
I believe you're going to have to change this to

class User {
String name;
List  workNames; // or List  workIds;
}

class Work {
String name;
String userName; // or Long userId;
}

This is actually you'd design this under the MDA paradigm, actually.  You
need to be able to change each independently of the other.  As far as
"automatic population", like an ORM would do, I don't think this is
possible.  You'll have to do this manually.  Honestly, you won't lose much
by doing two queries.

On Wed, Jun 2, 2010 at 2:12 PM, RAVINDER MAAN  wrote:

> Thank you so much for your answer Bill
> yes you are rite the way i wrote its many to many relation.Actually I
> want relation as below
>
> class User{
> Long id;
> String username;
> List workList;
> }
>
> class Work{
> Long id;
> String workname;
> String username;
>
> }
>you can see work class has username and user class too has username.In
> both classes primary key is id. I just want to know is there any way to get
> workList populated automatically on retrieval of user object.we can do it
> with 2 queries easily.we can reteriev user first then we can retrieve work
> object with second query.
>
>
> On Wed, Jun 2, 2010 at 10:35 PM, Bill Milligan wrote:
>
>>
>> Are you trying one-to-many or many-to-many?  By using a third table it
>> sounds like you're trying to do many-to-many, not one-to-many.
>>
>> As best I can determine, the only real way to do this in GAE is to have a
>> User class with a collection of string properties, containing the list of
>> all Work ids.  In this case a bidirectional link would be probably quite
>> useful, so that a Work could be identified by its User id.
>>
>> Here's a scenario:  Retrieve User by user id.  Then, retrieve all Works in
>> the list of work ids owned by the User.
>>
>> Note that this is not true object composition, with a User containing a
>> List of Collection, but rather an indirect reference.  This pattern is
>> useful in a lot of circumstances where you want to be able to break up your
>> object model into more modular deployable applications.  On the other hand,
>> I'd hate to be completely boxed in by this restriction.
>>
>> I'm just getting started with GAE so I'm very much not an expert.  I'd
>> love to know anybody else's thoughts on the matter.
>>
>> On Wed, Jun 2, 2010 at 12:10 AM, RAVINDER MAAN wrote:
>>
>>> Hello all
>>>   can anybody please tell me how to implement simple one many
>>> relation in java.I have user table and work table .Any user can do
>>> many type of works.In user table i have userid but it is not primary
>>> key of the user table.Then i have work table which has workid it is
>>> also not primary key of the table.Normally in relation db we ca make
>>> third table table which contains workid for every userid.What how can
>>> we implement this thing appengine datastore.I want to have collection
>>> all works in user object .can anybody please tell me how to define
>>> this mapping?please note that in userid and workid are not primary
>>> keys in both objects or tables.
>>> Thanks in adavance.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to
>>> google-appengine-j...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>
>
>
> --
> Regards,
> Ravinder Singh Maan
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

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



Re: [appengine-java] simple relation

2010-06-02 Thread RAVINDER MAAN
Thank you so much for your answer Bill
yes you are rite the way i wrote its many to many relation.Actually I
want relation as below

class User{
Long id;
String username;
List workList;
}

class Work{
Long id;
String workname;
String username;

}
   you can see work class has username and user class too has username.In
both classes primary key is id. I just want to know is there any way to get
workList populated automatically on retrieval of user object.we can do it
with 2 queries easily.we can reteriev user first then we can retrieve work
object with second query.


On Wed, Jun 2, 2010 at 10:35 PM, Bill Milligan wrote:

>
> Are you trying one-to-many or many-to-many?  By using a third table it
> sounds like you're trying to do many-to-many, not one-to-many.
>
> As best I can determine, the only real way to do this in GAE is to have a
> User class with a collection of string properties, containing the list of
> all Work ids.  In this case a bidirectional link would be probably quite
> useful, so that a Work could be identified by its User id.
>
> Here's a scenario:  Retrieve User by user id.  Then, retrieve all Works in
> the list of work ids owned by the User.
>
> Note that this is not true object composition, with a User containing a
> List of Collection, but rather an indirect reference.  This pattern is
> useful in a lot of circumstances where you want to be able to break up your
> object model into more modular deployable applications.  On the other hand,
> I'd hate to be completely boxed in by this restriction.
>
> I'm just getting started with GAE so I'm very much not an expert.  I'd love
> to know anybody else's thoughts on the matter.
>
> On Wed, Jun 2, 2010 at 12:10 AM, RAVINDER MAAN wrote:
>
>> Hello all
>>   can anybody please tell me how to implement simple one many
>> relation in java.I have user table and work table .Any user can do
>> many type of works.In user table i have userid but it is not primary
>> key of the user table.Then i have work table which has workid it is
>> also not primary key of the table.Normally in relation db we ca make
>> third table table which contains workid for every userid.What how can
>> we implement this thing appengine datastore.I want to have collection
>> all works in user object .can anybody please tell me how to define
>> this mapping?please note that in userid and workid are not primary
>> keys in both objects or tables.
>> Thanks in adavance.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>



-- 
Regards,
Ravinder Singh Maan

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



[appengine-java] Dev Server: response.setHeader() has no effect

2010-06-02 Thread keyurva
On the dev server I call setHeader() on the response but it doesn't
seem to set it - coz when I call containsHeader() immediately after
calling setHeader() it returns false.

response.setHeader("Content-Encoding", "gzip");
logger.info(response.containsHeader("Content-Encoding")); //prints
false

Is this a known issue? It used to work in previous versions of the
SDK. I'm using 1.3.4

Thanks,
Keyur

P.S.: I know that the production server gzips the content itself. As
much as I don't like it, no I don't set the Content-Encoding header in
production.

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



Re: [appengine-java] Failure to write objects to HttpSession - NotSerializableException : LazyResult

2010-06-02 Thread Ikai L (Google)
The User isn't serializable. Are you using the standard User class or a
custom User class?

On Tue, Jun 1, 2010 at 8:03 PM, Shawn Draper  wrote:

> I am storing user-profile information in the data store and retrieving
> with the following code:
>
> public static User getUserByID ( String userName ) throws Exception
>{
>PersistenceManager mgr = PMF.getInstance
> ( ).getPersistenceManager ( );
>Query query = mgr.newQuery ( User.class );
>query.setFilter ( "userName == param" );
>query.declareParameters ( "String param" );
>
>try
>{
>List  results = (List ) query.execute
> ( userName );
>Iterator  i = results.iterator ( );
>if ( i.hasNext ( ) )
>return mgr.detachCopy ( i.next ( ) );
>else
>throw new Exception ( "Unable to locate user [" +
> userName + "]" );
>}
>finally
>{
>query.closeAll ( );
>mgr.close ( );
>}
>}
>
> I'm storing the data in the HttpSession object with the following
> code:
>
> req.getSession ( true ).setAttribute ( "USER", user );
> log ( "Session data loaded.  Redirecting to " + nxtactn + "..." );
> resp.sendRedirect ( nxtactn );
>
> The following Exception is thrown when the Servlet redirects.
>
> /Login
> java.lang.RuntimeException: java.io.NotSerializableException:
> org.datanucleus.store.appengine.query.LazyResult
>at
>
> com.google.apphosting.runtime.jetty.SessionManager.serialize(SessionManager.java:
> 361)
>at
>
> com.google.apphosting.runtime.jetty.SessionManager.createEntityForSession(SessionManager.java:
> 341)
>at com.google.apphosting.runtime.jetty.SessionManager
> $AppEngineSession.save(SessionManager.java:162)
>at
>
> com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
> 41)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1157)
>at
>
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
> 43)
>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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
> 238)
>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
>
> com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
> 76)
>at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>at
>
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
> 135)
>at
> com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
> 250)
>at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5838)
>at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5836)
>at
>
> com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
> 24)
>at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> 398)
>at com.google.net.rpc.impl.Server$2.run(Server.java:852)
>at
> com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
> 56)
>at
>
> com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
> 576)
>at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
>at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
>at
>
> com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
> 442)
>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.E

Re: [appengine-java] simple relation

2010-06-02 Thread Bill Milligan
Are you trying one-to-many or many-to-many?  By using a third table it
sounds like you're trying to do many-to-many, not one-to-many.

As best I can determine, the only real way to do this in GAE is to have a
User class with a collection of string properties, containing the list of
all Work ids.  In this case a bidirectional link would be probably quite
useful, so that a Work could be identified by its User id.

Here's a scenario:  Retrieve User by user id.  Then, retrieve all Works in
the list of work ids owned by the User.

Note that this is not true object composition, with a User containing a List
of Collection, but rather an indirect reference.  This pattern is useful in
a lot of circumstances where you want to be able to break up your object
model into more modular deployable applications.  On the other hand, I'd
hate to be completely boxed in by this restriction.

I'm just getting started with GAE so I'm very much not an expert.  I'd love
to know anybody else's thoughts on the matter.

On Wed, Jun 2, 2010 at 12:10 AM, RAVINDER MAAN  wrote:

> Hello all
>   can anybody please tell me how to implement simple one many
> relation in java.I have user table and work table .Any user can do
> many type of works.In user table i have userid but it is not primary
> key of the user table.Then i have work table which has workid it is
> also not primary key of the table.Normally in relation db we ca make
> third table table which contains workid for every userid.What how can
> we implement this thing appengine datastore.I want to have collection
> all works in user object .can anybody please tell me how to define
> this mapping?please note that in userid and workid are not primary
> keys in both objects or tables.
> Thanks in adavance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

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



Re: [appengine-java] guest book appln throws exception

2010-06-02 Thread Ikai L (Google)
You're using a JRE instead of a JDK. There are a couple of posts about
these:

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=Caused+by:+java.lang.ClassNotFoundException:com.sun.tools.javac.Main+servlet&qscrl=1

On Tue, Jun 1, 2010 at 10:37 PM, shanthi ramabhadran <77can...@gmail.com>wrote:

> The guestbook sample appln throws exceptions , any one can solve my
> problem?
>
> HTTP ERROR: 500
>
> Unable to compile class for JSP
>
> Generated servlet error:
>[javac] Caused by: java.lang.ClassNotFoundException:
> com.sun.tools.javac.Main
>[javac] at java.net.URLClassLoader$1.run(Unknown Source)
>[javac] at java.security.AccessController.doPrivileged(Native
> Method)
>[javac] at java.net.URLClassLoader.findClass(Unknown Source)
>[javac] at java.lang.ClassLoader.loadClass(Unknown Source)
>[javac] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown
> Source)
>[javac] at java.lang.ClassLoader.loadClass(Unknown Source)
>[javac] Exception in thread "main" Could not find the main class:
> com.sun.tools.javac.Main.  Program will exit.
>
>
>
> RequestURI=/
>
> Caused by:
>
> org.apache.jasper.JasperException: Unable to compile class for JSP
>
> Generated servlet error:
>[javac] Caused by: java.lang.ClassNotFoundException:
> com.sun.tools.javac.Main
>[javac] at java.net.URLClassLoader$1.run(Unknown Source)
>[javac] at java.security.AccessController.doPrivileged(Native
> Method)
>[javac] at java.net.URLClassLoader.findClass(Unknown Source)
>[javac] at java.lang.ClassLoader.loadClass(Unknown Source)
>[javac] at sun.misc.Launcher$AppClassLoader.loadClass(Unknown
> Source)
>[javac] at java.lang.ClassLoader.loadClass(Unknown Source)
>[javac] Exception in thread "main" Could not find the main class:
> com.sun.tools.javac.Main.  Program will exit.
>
>
>
>
>at
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:
> 84)
>at
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:
> 332)
>at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:
> 412)
>at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
>at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
>at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
>at
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:
> 511)
>at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
> 295)
>at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
> 292)
>at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
>at
> com.google.appengine.tools.development.PrivilegedJspServlet.access
> $101(PrivilegedJspServlet.java:23)
>at com.google.appengine.tools.development.PrivilegedJspServlet
> $2.run(PrivilegedJspServlet.java:59)
>at java.security.AccessController.doPrivileged(Native Method)
>at
>
> com.google.appengine.tools.development.PrivilegedJspServlet.service(PrivilegedJspServlet.java:
> 57)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 487)
>at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 362)
>at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
> 216)
>at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
> 181)
>at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
> 712)
>at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 405)
>at
>
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
> 70)
>at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:268)
>at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
>at
>
> com.google.appengine.tools.development.StaticFileUtils.serveWelcomeFileAsForward(StaticFileUtils.java:
> 80)
>at
>
> com.google.appengine.tools.development.LocalResourceFileServlet.maybeServeWelcomeFile(LocalResourceFileServlet.java:
> 254)
>at
>
> com.google.appengine.tools.development.LocalResourceFileServlet.doGet(LocalResourceFileServlet.java:
> 120)
>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:
> 487)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1093)
>at
>
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
> 51)
>at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:108

Re: [appengine-java] Using Task Queue while storing entities

2010-06-02 Thread Ikai L (Google)
Move method1() to a method inside a servlet invoked by the Task Queue, then
inside your servlet call queue.add().

On Tue, Jun 1, 2010 at 8:49 PM, drift elysium wrote:

> hi,
>
> I'd like to know how exactly I should include the code for TaskQueue.
>
> I saw this line in the docs.
>
> queue.add(url("/path?a=b&c=d").method(Method.GET))
>
>
> So, if I have a servlet like this and if the method1() takes a longer time
> and so I want to implement TaskQueue on it. How do I do it? Someone please
> help!
>
> public class sampleServlet extends HttpServlet{
>
>
> public void doPost(HttpServletRequest req, HttpServletResponse resp)
> throws ServletException, IOException {
>
>
> ...
>
>//calling the function method1()
>method1();
>..
>
>
>
> }
>
>
>  public void method1(){
>
>  //here the entities are persisted
>  }
> }
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>



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

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



Re: [appengine-java] MemCache expiring around once a day

2010-06-02 Thread Ikai L (Google)
There's very little cost to "connecting" to the datastore. If this is an
issue, I'd look at the low-level API for anything that could be a warm-up
request. The expensive part of this is initializing your
PersistenceManagerFactory/EntityManagerFactory, not establishing a datastore
connection.

On Tue, Jun 1, 2010 at 8:12 PM, Rahul Juneja  wrote:

> Ikai,
> The problem is that i am not sure when the values in the cache will be
> accessed. but anyways i have implemented it in such a way that if the value
> is not found in cache it goes to database to fetch it, but another issue
> there is that if you are making the database connection first time after the
> new jvm instance has been kicked off as it happens in Appengine,  db
> connection takes a while, sometimes around 6-7 seconds, which is kind of
> slow.
>
> Nicolas,
> Thats the reason i am fetching the data if not found in cache.
>
>
> Thanks,
> Rahul
>
> --
> Rahul Juneja
> http://techlabs.thoughtclicks.com
>
>
> On Tue, Jun 1, 2010 at 9:41 PM, Ikai L (Google)  wrote:
>
>> The items will get flushed if they are not getting used. If you're using
>> items once every 24 hours ... you probably do not need a cache. Use the
>> datastore instead. Rather than prevent the items from being flushed, build
>> the ability to regenerate the cache into your system or don't even bother
>> with Memcache.
>>
>> On Tue, Jun 1, 2010 at 6:24 PM, Rahul Juneja wrote:
>>
>>> Ikai,
>>>
>>> I think you are right that the cache values are expiring via LRU as
>>> sometimes only some elements of the cache are flushed.
>>> But the question is my cache only has 20-30 entries and out of that 10
>>> least recently used entries are being flushed. Is there any way i can
>>> prevent this flushing as i don't want to flush if the cache is so small
>>> instead i want the cache only to flush LRU elements when the cache grows in
>>> size to maybe 100,000 entries.
>>>
>>> Any clues ?
>>>
>>> Thanks,
>>> Rahul
>>>
>>> --
>>> Rahul Juneja
>>> http://techlabs.thoughtclicks.com
>>>
>>>
>>> On Tue, Jun 1, 2010 at 6:56 PM, Ikai L (Google) wrote:
>>>
 No, there isn't a default expiration. How are you setting values to the
 cache? Could you be expiring the items via LRU? That is - you're not using
 the items in the cache, instead setting other items and pushing the older,
 unused items out?

 On Wed, May 26, 2010 at 6:43 PM, Rahul  wrote:

> I have a  memcache and not to mention it does live between different
> jvm instances when new jvm instances starts, i can access the cache
> but once a while i don't find any values in cache and this happened
> twice in last 24 hours. Is there any default expiration which is less
> then 24-48 hours which i am not aware of.
>
> Any help or pointers on this is appreciated.
>
> Thanks,
> Rahul
>
> --
> You received this message because you are subscribed to the Google
> Groups "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>


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

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

>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "Google App Engine for Java" group.
>>> To post to this group, send email to
>>> google-appengine-j...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-appengine-java+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine-java?hl=en.
>>>
>>
>>
>>
>> --
>> Ikai Lan
>> Developer Programs Engineer, Google App Engine
>> Blog: http://googleappengine.blogspot.com
>> Twitter: http://twitter.com/app_engine
>> Reddit: http://www.reddit.com/r/appengine
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>

Re: [appengine-java] Security restrictions may not be entirely emulated errors in Dev mode with Spring 3.0 on 1.3.4

2010-06-02 Thread Bill Milligan
Originally, I'd thought something along the same lines, but this isn't the
case.  In my running server there's no asm running in my application
classpath, environment, or lib/ext.  It's only in GAE and my application.



On Wed, Jun 2, 2010 at 12:04 PM, Toby Reyelts  wrote:

> It looks like you have a version of ASM that is incompatible with the
> dev_appserver's version hanging around. Do you have ASM in your JRE's
> lib/ext folder?
>
> On Tue, Jun 1, 2010 at 10:56 PM, Andrew  wrote:
>
>> Hi,
>>
>> I'm trying to get spring 3.0 up and running as per the blog post at
>>
>>
>> http://www.ardentlord.com/apps/blog/show/829881-spring-3-0-on-google-app-engine
>>
>> However I'm running into some issues when I try and start it up in
>> Development (have not tried in production yet):
>>
>> The console is showing a stack of these messages:
>>
>> 02/06/2010 2:50:19 AM
>> com.google.appengine.tools.development.agent.impl.Transformer
>> transform
>> SEVERE: Unable to instrument
>> org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator.
>> Security restrictions may not be entirely emulated.
>> java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V
>>
>> However as far as I can tell the app is actually running.
>>
>> There was a thread in this group late last year that described a
>> similar issue, and the suggested solution seemed to be to rename the
>> plugin.jar file to plugin2.jar:
>>
>>
>> http://groups.google.com.au/group/google-appengine-java/browse_thread/thread/5e34079b5b3d58a1/b6db94a2df4ea58c?lnk=gst&q=Security+restrictions+may+not+be+entirely+emulated.#b6db94a2df4ea58c
>>
>> However the posters seemed to be using macs.  I am on Windows 7
>> (Eclipse Galileo with the Google Plugin) and cannot locate this file -
>> does anyone have any advice on where I may find it?
>>
>> Best regards,
>> Andrew.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine for Java" group.
>> To post to this group, send email to
>> google-appengine-j...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-appengine-java+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine-java?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

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



[appengine-java] Failure to write objects to HttpSession - NotSerializableException : LazyResult

2010-06-02 Thread Shawn Draper
I am storing user-profile information in the data store and retrieving
with the following code:

public static User getUserByID ( String userName ) throws Exception
{
PersistenceManager mgr = PMF.getInstance
( ).getPersistenceManager ( );
Query query = mgr.newQuery ( User.class );
query.setFilter ( "userName == param" );
query.declareParameters ( "String param" );

try
{
List  results = (List ) query.execute
( userName );
Iterator  i = results.iterator ( );
if ( i.hasNext ( ) )
return mgr.detachCopy ( i.next ( ) );
else
throw new Exception ( "Unable to locate user [" +
userName + "]" );
}
finally
{
query.closeAll ( );
mgr.close ( );
}
}

I'm storing the data in the HttpSession object with the following
code:

req.getSession ( true ).setAttribute ( "USER", user );
log ( "Session data loaded.  Redirecting to " + nxtactn + "..." );
resp.sendRedirect ( nxtactn );

The following Exception is thrown when the Servlet redirects.

/Login
java.lang.RuntimeException: java.io.NotSerializableException:
org.datanucleus.store.appengine.query.LazyResult
at
com.google.apphosting.runtime.jetty.SessionManager.serialize(SessionManager.java:
361)
at
com.google.apphosting.runtime.jetty.SessionManager.createEntityForSession(SessionManager.java:
341)
at com.google.apphosting.runtime.jetty.SessionManager
$AppEngineSession.save(SessionManager.java:162)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:
41)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
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.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:
238)
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
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:
76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
135)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
250)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5838)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5836)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:
24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
398)
at com.google.net.rpc.impl.Server$2.run(Server.java:852)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:
56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:
576)
at com.google.net.rpc.impl.Server.startRpc(Server.java:807)
at com.google.net.rpc.impl.Server.processRequest(Server.java:369)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:
442)
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.rpc.RpcService.runUntilServerShutdown(RpcService.java:
251)
at com.google.apphosting.runtime.JavaRuntime
$RpcRunnable.run(JavaRuntime.java:413)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.NotSerializableException:
org.datanucleus.store.appengine.query.LazyResult

[appengine-java] Re: Security restrictions may not be entirely emulated errors in Dev mode with Spring 3.0 on 1.3.4

2010-06-02 Thread Bill

Okay, a few things I found out --

1.  The suggestion at 
http://code.google.com/p/googleappengine/issues/detail?id=2527
works quite well.  You'll find the afflicted appengine-agent.jar in
your eclipse plugins folder under
com.google.appengine.eclipse.sdkbundle./appengine-java-sdk-
/lib/agent.  Use jarjar to fix internal refs to its own asm
code, completely compartmentalizing it away from everything else.
Ignore the "ln -s" suggestion, I have no idea what that's about except
possibly it's someone's idea to avoid renaming a file, and the
"plugin.jar" to "plugin2.jar" is just an example.  It's not really
relevant.
2.  It won't matter once you get this working.  Jetty will not be able
to find your hello.jsp.  I can't figure out why, but I believe it has
something to do with the URL pattern in web.xml.  I tried moving it
around without success.
3.  Both problems are non-issues on production.  I deployed the hello
app out there and everything just worked.  On one hand it's good, but
on the other, this drastically disimproves my build-test-turnaround
time.

On Jun 1, 10:56 pm, Andrew  wrote:
> Hi,
>
> I'm trying to get spring 3.0 up and running as per the blog post at
>
> http://www.ardentlord.com/apps/blog/show/829881-spring-3-0-on-google-...
>
> However I'm running into some issues when I try and start it up in
> Development (have not tried in production yet):
>
> The console is showing a stack of these messages:
>
> 02/06/2010 2:50:19 AM
> com.google.appengine.tools.development.agent.impl.Transformer
> transform
> SEVERE: Unable to instrument
> org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator.
> Security restrictions may not be entirely emulated.
> java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V
>
> However as far as I can tell the app is actually running.
>
> There was a thread in this group late last year that described a
> similar issue, and the suggested solution seemed to be to rename the
> plugin.jar file to plugin2.jar:
>
> http://groups.google.com.au/group/google-appengine-java/browse_thread...
>
> However the posters seemed to be using macs.  I am on Windows 7
> (Eclipse Galileo with the Google Plugin) and cannot locate this file -
> does anyone have any advice on where I may find it?
>
> Best regards,
> Andrew.

-- 
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] simple relation

2010-06-02 Thread RAVINDER MAAN
Hello all
   can anybody please tell me how to implement simple one many
relation in java.I have user table and work table .Any user can do
many type of works.In user table i have userid but it is not primary
key of the user table.Then i have work table which has workid it is
also not primary key of the table.Normally in relation db we ca make
third table table which contains workid for every userid.What how can
we implement this thing appengine datastore.I want to have collection
all works in user object .can anybody please tell me how to define
this mapping?please note that in userid and workid are not primary
keys in both objects or tables.
Thanks in adavance.

-- 
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: JSP code debug: Compiled JSP location in local environment

2010-06-02 Thread Philip Tucker
FYI, on a Mac I found it in /var/folders/zz/zzzivhrRnAmviuee++-ZXU+
+NMs/-Tmp-/Jetty_127_0_0_1__war.g0qk00/jsp/org/apache/jsp

-- 
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: Security restrictions may not be entirely emulated errors in Dev mode with Spring 3.0 on 1.3.4

2010-06-02 Thread Bill


I am stuck at precisely the same point.  Which version of asm are you
using?  I've tried 3.3 and 2.1.  I'm assuming you're using the latest
Spring?  That article uses the old M2 from a year back.

It almost appears that the ClassLoader is doing some on-the-fly
rewriting of class code, but that this operation requires a
constructor.  Sounds great until you need an interface like
org.objectweb.asm.ClassWriter.

Are you also getting a ClassNotFoundException:
org.springframework.asm.ClassVisitor?  I can't figure this one out,
either.

When you say "the app is actually running" what do you mean by this?
I get nothing but 404s in my browser.

Finally, what do you have in your url-pattern for your dispatcher
servlet mapping in your web.xml?  (I'm using "/*" which I understand
has problems in jetty, but I'm not clear on what to change this to, or
if this is even necessary.  I've also tried just "/".)

On Jun 1, 10:56 pm, Andrew  wrote:
> Hi,
>
> I'm trying to get spring 3.0 up and running as per the blog post at
>
> http://www.ardentlord.com/apps/blog/show/829881-spring-3-0-on-google-...
>
> However I'm running into some issues when I try and start it up in
> Development (have not tried in production yet):
>
> The console is showing a stack of these messages:
>
> 02/06/2010 2:50:19 AM
> com.google.appengine.tools.development.agent.impl.Transformer
> transform
> SEVERE: Unable to instrument
> org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator.
> Security restrictions may not be entirely emulated.
> java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V
>
> However as far as I can tell the app is actually running.
>
> There was a thread in this group late last year that described a
> similar issue, and the suggested solution seemed to be to rename the
> plugin.jar file to plugin2.jar:
>
> http://groups.google.com.au/group/google-appengine-java/browse_thread...
>
> However the posters seemed to be using macs.  I am on Windows 7
> (Eclipse Galileo with the Google Plugin) and cannot locate this file -
> does anyone have any advice on where I may find it?
>
> Best regards,
> Andrew.

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



Re: [appengine-java] Security restrictions may not be entirely emulated errors in Dev mode with Spring 3.0 on 1.3.4

2010-06-02 Thread Toby Reyelts
It looks like you have a version of ASM that is incompatible with the
dev_appserver's version hanging around. Do you have ASM in your JRE's
lib/ext folder?

On Tue, Jun 1, 2010 at 10:56 PM, Andrew  wrote:

> Hi,
>
> I'm trying to get spring 3.0 up and running as per the blog post at
>
>
> http://www.ardentlord.com/apps/blog/show/829881-spring-3-0-on-google-app-engine
>
> However I'm running into some issues when I try and start it up in
> Development (have not tried in production yet):
>
> The console is showing a stack of these messages:
>
> 02/06/2010 2:50:19 AM
> com.google.appengine.tools.development.agent.impl.Transformer
> transform
> SEVERE: Unable to instrument
> org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator.
> Security restrictions may not be entirely emulated.
> java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V
>
> However as far as I can tell the app is actually running.
>
> There was a thread in this group late last year that described a
> similar issue, and the suggested solution seemed to be to rename the
> plugin.jar file to plugin2.jar:
>
>
> http://groups.google.com.au/group/google-appengine-java/browse_thread/thread/5e34079b5b3d58a1/b6db94a2df4ea58c?lnk=gst&q=Security+restrictions+may+not+be+entirely+emulated.#b6db94a2df4ea58c
>
> However the posters seemed to be using macs.  I am on Windows 7
> (Eclipse Galileo with the Google Plugin) and cannot locate this file -
> does anyone have any advice on where I may find it?
>
> Best regards,
> Andrew.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
>

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



[appengine-java] Re: node allocation

2010-06-02 Thread theresia freska
Yes, I mean the node as computational unit, the JVM. Thanks for the
clear explanation!

On Jun 1, 4:28 pm, Wilson MacGyver  wrote:
> I think he wants to control how many JVMs GAE spawn up to run
> your app. obviously the answer is no.
>
> On Tue, Jun 1, 2010 at 10:17 AM, Tristan  wrote:
>
> ...
>
>
>
> > On Jun 1, 3:46 am, theresia freska  wrote:
> >> Hi,
>
> >> Sorry for not being clear. I mean thenodeinvolved in running my app
> >> in the cloud --> the PC. I would like to control how many computers
> >> will run my app. Is it possible?
>
> >> On Jun 1, 6:58 am, Tristan  wrote:
>
> >> > Can you elaborate on what you mean by "node" in the context of Google
> >> > App Engine?
>
> >> > On May 30, 7:49 am, theresia freska  wrote:
>
> >> > > Hi list,
>
> >> > > Is there any way to control how many nodes we want to use? I want to
> >> > > compare request time of using n nodes to run my app. Thanks!
>
> --
> Omnem crede diem tibi diluxisse supremum.

-- 
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: JSONMarshaller on GAE

2010-06-02 Thread François
This is happening locally. I'm using eclipse galileo.

I tested all the tips i found on this page
http://groups.google.com/group/google-appengine-java/browse_thread/thread/67cb7cdaefc8429f
but i'm still stuck.

Thank you for your time.

On 2 juin, 00:42, "Ikai L (Google)"  wrote:
> Is this exception happening locally or in production? Are you using an IDE?
> Which one?
>
>
>
> On Tue, Jun 1, 2010 at 7:01 AM, François  wrote:
> > I'm trying to add the jar of jsonmarshaller to my application but i'm
> > getting the classdefnotfound exception even though my jar is inside
> > the web-inf/lib folder and has been added to the build path.
>
> > here is the jar i'm adding
> >http://code.google.com/p/jsonmarshaller/downloads/detail?name=json-0
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog:http://googleappengine.blogspot.com
> Twitter:http://twitter.com/app_engine
> Reddit:http://www.reddit.com/r/appengine

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



[appengine-java] Re: Debug Local var.

2010-06-02 Thread ww34ww34
Yes ,you're right...
I got it!
Dummy problem, thank's a lot!

On 2 Giu, 00:54, "Ikai L (Google)"  wrote:
> Try setting your default logging level to .INFO or .FINE. You're probably
> seeing some of the info printed to your console, but not all.
>
>
>
> On Mon, May 24, 2010 at 4:37 AM, ww34ww34  wrote:
> > I'm new on GAE.
> > I need to debug some var,  on my development server (local).
> > Or to see local log. How?
>
> > SDK 1.3.3.1
> > my "logging.proprieties" look like this
> > 
>
> > # A default java.util.logging configuration.
> > # (All App Engine logging is through java.util.logging by default).
> > #
> > # To use this configuration, copy it into your application's WEB-INF
> > # folder and add the following to your appengine-web.xml:
> > #
> > # 
> > #   
> > # 
> > #
>
> > # Set the default logging level for all loggers to WARNING
> > .level = WARNING
> > 
>
> > my test class look like this
> > 
> > import java.io.IOException;
> > import javax.servlet.http.*;
>
> > import java.util.logging.Level;
> > import java.util.logging.Logger;
>
> > @SuppressWarnings("serial")
> > public class TestServlet extends HttpServlet {
> >        private final static Logger LOGGER =
> > Logger.getLogger(TestServlet.class.getName());
> >        public void doGet(HttpServletRequest req, HttpServletResponse resp)
> >        throws IOException {
> >                resp.setContentType("text/plain");
> >                resp.getWriter().println("Hello, world");
>
> >                LOGGER.info("An informational message.");
> >                LOGGER.warning("A warning message.");
> >                LOGGER.severe("An error message.");
>
> >        }
> > }
>
> > 
>
> > Thank's ..
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google App Engine for Java" group.
> > To post to this group, send email to
> > google-appengine-j...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-appengine-java+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> Ikai Lan
> Developer Programs Engineer, Google App Engine
> Blog:http://googleappengine.blogspot.com
> Twitter:http://twitter.com/app_engine
> Reddit:http://www.reddit.com/r/appengine

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