Re: [appengine-java] CPU Quota Exceeded on Startup

2010-03-28 Thread m seleron
Hi,

The previous benchmark was carried out may be useful to you
http://groups.google.com/group/google-appengine/browse_thread/thread/11b2f2b425e10e38/

In the future, in the roadmap [Ability to reserve instances to reduce
application loading overhead]
By and expects to be alleviated.

thanks.

2010/3/27 Hanshew :
> I have uploaded a Ruby on Rails app that is very difficult to get
> going because of the CPU quota.  I can sometimes get access by hitting
> refresh multiple times.  After it gets going I can use it, but if I
> wait too long I begin to get the "Internal Server Error" message
> again.  This is a very simple Rails app.  This feature of appengine
> will make it incompatible with Rails apps if it persists.
>
> --
> 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] Spring 2.5 Transactions - anyone got this working?

2010-03-28 Thread Carl Ballantyne
Hi All,

I have been trying for a while now to get Spring managed transactions
working on GAE without success. I have searched these forums and the
web and find a few examples, all slightly different, and none of which
work for me. I am getting the error "class javax.jdo.JDOUserException:
Transaction is still active. You should always close your transactions
correctly using commit() or rollback()." This makes total sense to me
in that Spring is not closing the transaction but I don't understand
why I am getting it with the following configuration any ideas/
examples greatly appreciated.

When I don't use transactions it all works great. But I really need
the transactions and would love it to be controlled via Spring.

I am using the latest version of GAE 1.3.2.































-- 
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 2.5 Transactions - anyone got this working?

2010-03-28 Thread objectuser
I think you're going to be disappointed.

Spring transactions work in the SDK but not on the GAE host.

Here's how to set them up if you still want to do it (this currently
still works for me in the SDK 1.3.2):

http://objectuser.wordpress.com/2009/06/30/spring-jdo-in-google-app-engine/

But here's the defect that prevents it from working on the host:

http://code.google.com/p/googleappengine/issues/detail?id=1381

On Mar 28, 7:59 am, Carl Ballantyne  wrote:
> Hi All,
>
> I have been trying for a while now to get Spring managed transactions
> working on GAE without success. I have searched these forums and the
> web and find a few examples, all slightly different, and none of which
> work for me. I am getting the error "class javax.jdo.JDOUserException:
> Transaction is still active. You should always close your transactions
> correctly using commit() or rollback()." This makes total sense to me
> in that Spring is not closing the transaction but I don't understand
> why I am getting it with the following configuration any ideas/
> examples greatly appreciated.
>
> When I don't use transactions it all works great. But I really need
> the transactions and would love it to be controlled via Spring.
>
> I am using the latest version of GAE 1.3.2.
>
>  class="org.springframework.orm.jdo.LocalPersistenceManagerFactoryBean">
>         
> 
>
>  class="org.springframework.orm.jdo.JdoTransactionManager">
>          ref="persistenceManagerFactory" />
>         
>
> 
>
>  class="org.datanucleus.springframework.DataNucleusJdoDialect"/>
>
> 
>         
>          for="Throwable"  />
>          for="Throwable"/>
>          for="Throwable" />
>          for="Throwable" />
>         
>         
> 
>
> 
>
>          advice-ref="txAdvice"/>
> 

-- 
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: Class XXX has multiple relationship fields of type YYYY

2010-03-28 Thread Trung
Hi GAE team,

Any workarounds for this issue?

Thanks


On Feb 14, 8:55 am, Payam  wrote:
> The problem is still not solved.
> Although you can "persist" an object with multiple relations of the
> same type. When you actually query the object, the retrieved object
> has duplicates for the multiple relations.
> As in, if I were to persist instances A, B inside C. When I query for
> C, both objects retrieved will be A. There will be no B.
>
> This is a serious bug!
>
> On Jan 26, 4:54 pm, oth  wrote:
>
> > Michael,
>
> > In your jdoconfig.xml file add this entry:
>
> >  > name="datanucleus.appengine.allowMultipleRelationsOfSameType"
> > value="true"/>
>
> > Thanks
>
> > On Jan 26, 3:12 pm, Michael Shtelma  wrote:
>
> > > Hi all,
>
> > > I am also experiencing this problem on GAE 1.3.0.
> > > Using multipleRelationsOfSameTypeAreErrors helps not in all cases,
> > > when I am trying to read such entities I get mentioned exception.
> > > Are the any solution for the 1.3.0 ?
>
> > > Thanks,
> > > Michael
>
> > > On Jan 21, 9:20 am, cowper  wrote:
>
> > > > Hi,
> > > >   I have a similar issue with 1.3.0 however it arises when the types
> > > > are the same and not related to inheritance of any type.
>
> > > > The work around suggested doesn't seem to work. Is the workaround
> > > > valid for 1.3.0?
>
> > > > thx,
>
> > > > Conor
>
> > > > On Dec 4 2009, 9:52 pm, "Max Ross (Google)" 
> > > > +appeng...@google.com> wrote:
> > > > > SDK 1.2.8 contains a new check that detects if one of your JDO or JPA 
> > > > > model
> > > > > objects has two relationship fields of the same type.  For example:
>
> > > > > class A {
> > > > >   List bList;
> > > > >   List anotherBList;
>
> > > > > }
>
> > > > > Unfortunately I was a little too aggressive with this check, so the
> > > > > following also run afoul of the check:
>
> > > > > abstract class B {}
>
> > > > > class C extends B {}
> > > > > class D extends B {}
>
> > > > > class A {
> > > > >   List cList:
> > > > >   List dList;
>
> > > > > }
>
> > > > > If you get an exception that says
>
> > > > > Class XXX has multiple relationship fields of type .  This is not 
> > > > > yet
> > > > > supported.
>
> > > > > and your class hierarchy resembles the one above, you can disable 
> > > > > this check
> > > > > by with the following config property:
>
> > > > >  > > > > name="datanucleus.appengine.multipleRelationsOfSameTypeAreErrors"
> > > > > value="true"/>
>
> > > > > We'll get this fixed shortly.
>
> > > > > Sorry for the trouble,
> > > > > Max

-- 
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: Class XXX has multiple relationship fields of type YYYY

2010-03-28 Thread John Patterson
There are alternatives: Twig, Objectify, SimpleDS, Slim3, Siena.  Take  
your pick and get your app working today.


On 28 Mar 2010, at 21:47, Trung wrote:


Hi GAE team,

Any workarounds for this issue?

Thanks


On Feb 14, 8:55 am, Payam  wrote:

The problem is still not solved.
Although you can "persist" an object with multiple relations of the
same type. When you actually query the object, the retrieved object
has duplicates for the multiple relations.
As in, if I were to persist instances A, B inside C. When I query for
C, both objects retrieved will be A. There will be no B.

This is a serious bug!

On Jan 26, 4:54 pm, oth  wrote:


Michael,



In your jdoconfig.xml file add this entry:







Thanks



On Jan 26, 3:12 pm, Michael Shtelma  wrote:



Hi all,



I am also experiencing this problem on GAE 1.3.0.
Using multipleRelationsOfSameTypeAreErrors helps not in all cases,
when I am trying to read such entities I get mentioned exception.
Are the any solution for the 1.3.0 ?



Thanks,
Michael



On Jan 21, 9:20 am, cowper  wrote:



Hi,
  I have a similar issue with 1.3.0 however it arises when the  
types

are the same and not related to inheritance of any type.



The work around suggested doesn't seem to work. Is the workaround
valid for 1.3.0?



thx,



Conor



On Dec 4 2009, 9:52 pm, "Max Ross (Google)" 


+appeng...@google.com> wrote:
SDK 1.2.8 contains a new check that detects if one of your JDO  
or JPA model
objects has two relationship fields of the same type.  For  
example:



class A {
  List bList;
  List anotherBList;



}


Unfortunately I was a little too aggressive with this check, so  
the

following also run afoul of the check:



abstract class B {}



class C extends B {}
class D extends B {}



class A {
  List cList:
  List dList;



}



If you get an exception that says


Class XXX has multiple relationship fields of type .  This  
is not yet

supported.


and your class hierarchy resembles the one above, you can  
disable this check

by with the following config property:


name="datanucleus.appengine.multipleRelationsOfSameTypeAreErrors"

value="true"/>



We'll get this fixed shortly.



Sorry for the trouble,
Max


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




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



[appengine-java] Re: Could not open the requested socket: Address already in use: bind

2010-03-28 Thread Sarath
I had this issue too. This was very annoying. Ctrl+c closes ant but
not the appengine java process.

I started using App Engine plugin. It has no such problem.

=Sarath

On Mar 27, 5:25 am, nicolas melendez  wrote:
> if you use eclipse, you can kill it from debug window.
> NM
>
> On Fri, Mar 26, 2010 at 6:03 PM, Guillermo Schwarz <
>
> guillermo.schw...@gmail.com> wrote:
> > It seems to me that the problem is that after I run "ant runserver"
> > and I kill the running process using ctrl-c, what I kill is ant but
> > jetty keeps running. Actually I can still connect to the server and
> > perform HTTP requests.
>
> > What I would like is a way to tell ant that when it is killed, it will
> > also kill jetty. A workaround is to find the offending process and
> > kill it, which in Windows XP is like this:
>
> > 1. netstat -ao | grep 8080
> >  TCP    pc-icanales:8080       pc-icanales:0          LISTENING
> > 3932
>
> > This prints out a process number at the end.
> > 2. taskkill /pid 3932
>
> > Cheers,
> > Guillermo.
>
> > On 26 mar, 15:55, nicolas melendez  wrote:
> > > you have the  ports in used by another application or your app engine
> > > development server is already working.
> > > NM
>
> > > On Fri, Mar 26, 2010 at 4:51 PM, Guillermo Schwarz <
>
> > > guillermo.schw...@gmail.com> wrote:
> > > > The first time I run the local dev server, it works fine. I press ctrl-
> > > > c and then I always get:
>
> > > >     [java]
> > > >     [java] 
> > > >     [java] Could not open the requested socket: Address already in
> > > > use: bind
> > > >     [java] Try overriding --address and/or --port.
>
> > > > Any solution, besides changing the port every time I restart the
> > > > server?
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Google App Engine for Java" group.
> > > > To post to this group, send email to
> > > > google-appengine-j...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-appengine-java+unsubscr...@googlegroups.com
> > 
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-appengine-java?hl=en.
>
> > --
> > 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: GAEJ Access to Google Calendar, How to Authenticate ?

2010-03-28 Thread ska
Thank's Seleronm,

the AuthSubUtil was my missing part to fix my problem.

Regards
 Stephan

On 26 Mrz., 08:53, seleronm  wrote:
> Hi,
>
> Though I am not an expert.
> If you use not UserService but
> [com.google.gdata.client.http.AuthSubUtil] the problem might be
> solved.
>
> I think that this link is 
> useful.http://code.google.com/intl/us/apis/gdata/docs/auth/authsub.html
>
> Please try.
> thanks.
>
> > Hi GAEJ Experts,
>
> > I like to access (Read/Write) a GoogleCalendarfrom the Google App
> > Engine.
> > To learn how it works I have Up my Java Google App Application and on
> > my PC a smallCalendartest program.
> > Now I need the missing link how to combine both application's.
> > In my GAEJ servlet I get the current user with :
>
> >    UserService userService = UserServiceFactory.getUserService();
> >    User           user            = userService.getCurrentUser();
> > (after successfully login )
>
> > And have access to the user Nickname, email address ...
>
> > To access thecalendarI need the user and password.
> >     CalendarService myService = new CalendarService( "exampleCo-
> > exampleApp-1");
> >    myService.setUserCredentials( myAccount, myPassword );
>
> > I understand that I have no access to the User Password. For this
> > reason I think there must be a other way around to access the 
> > usercalendar's.
> > I  can't believe there is no other way to access the CalendarService ?
> > Any Idea ?
> > Magic Cookies ?
>
> > Regards
>
> >  Stephan

-- 
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] "captcha required" error when deployed, works locally

2010-03-28 Thread Brice
Good afternoon,

I'm working on the basics of a new appengine app and I've started
incorporating the Google Calendar API via the gdata client. The code I
have is quite simple at this point, just creating a CalendarService,
calling "setUserCredentials", requesting a feed (not sure if the URL
is right? - auth is for a HOSTED account), then checking that the
resultfeed is valid and has results.

When deployed locally, everything seems OK. I'm "hard coding" a
particular account, the app will interact with a particular calendar,
not every visitors/user's calendar - so doing AuthSub isn't what I'm
looking for.

In any case, it works locally and when I deploy to app engine, I get
"Captcha required" instead of the results I saw running locally.

I'm sure I'm missing something, but the docs I've looked through
either indicate that what I'm doing is correct or that what I'm trying
to do can't be done and I'm not sure what's what.

Thanks in advance!
Brice

-- 
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] Update to GAE/J 1.3.2 -> Project in Eclipse broken

2010-03-28 Thread Joa
I've tried to update GAE to 1.3.2. Now the project is broken and I
seem to be not even able to revert back to 1.3.1.


I've taken the following steps:
- Trying to locate instructions. Couldn't find any, so this must be
simple...
- Updated Google plugin through Help -> Check for updates. Checks out
- Then downloaded GAE 1.3.2 for Java, unzip
- Set Project Properties using Google > App Engine. "Use specific SDK"
set to 1.3.2. Now the project root in the Eclipse Package Explorer is
marked with an error. The project won't start any longer without an
error message and dumps stack traces. To my dismay, any changes in
this panel do not seem to have an impact whatsoever now.



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



[appengine-java] Re: Problem with login when testing locally

2010-03-28 Thread seleronm
Hi,

I think I want to try it.
Can post do you the source?

thanks.

> I'm getting this exception trying to use GAE to login in my local
> environment.
>
> java.lang.NullPointerException
>         at
> com.google.appengine.api.users.dev.LoginCookieUtils.encodeEmailAsUserId(LoginCookieUtils.java:
> 89)
>         at
> com.google.appengine.api.users.dev.LoginCookieUtils.createCookie(LoginCookieUtils.java:
> 41)
>         at
> com.google.appengine.api.users.dev.LocalLoginServlet.doPost(LocalLoginServlet.java:
> 90)
>         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:
> 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
> net.sourceforge.stripes.action.ForwardResolution.execute(ForwardResolution.java:
> 110)
>         at net.sourceforge.stripes.controller.DispatcherHelper
> $7.intercept(DispatcherHelper.java:508)
>         at
> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:
> 158)
>         at
> net.sourceforge.stripes.controller.HttpCacheInterceptor.intercept(HttpCacheInterceptor.java:
> 99)
>         at
> net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:
> 155)
>         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.executeResolution(DispatcherHelper.java:
> 502)
>         at
> net.sourceforge.stripes.controller.DispatcherServlet.executeResolution(DispatcherServlet.java:
> 286)
>         at
> net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:
> 170)
>         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
> net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:
> 247)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
>         at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
> 51)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
>         at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
> 43)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
>         at
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
> 121)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 360)
>         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.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 139)
>         at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:352)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 139)
>         at org.mortbay.jetty.Server.handle(Server.java:313)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 506)
>         at org.mortbay.jetty.HttpConnection
> $RequestHandler.content(HttpConnection.java:844)
>         at org.mortbay.jetty.HttpParser.parseNext(

Re: [appengine-java] Adding, updating and deleting fields in app engine's datastore

2010-03-28 Thread Chau Huynh
You might want to use wrapper class (Long instead of long) to add new field
to load existing data.

To remove a property, you will need to update your Java class first, right?
Later retrieval of an instance, the field is not get loaded, then you
save/persist and the field is gone.

About changing property name, my thought is why do you want to challenge
yourself on such matter? Why don't you just "remove" and "add" a new field?
http://code.google.com/appengine/articles/datastore/overview.html In this
series of articles explains what is behind your object, so it's not just
your entity/class only, there're indexes as well.

Reading the Google IO session, JDO/JPA is explained as the standard
interface to access GAE service. Just in case you want to move your app out
of GAE, you can still use the those.
You might want to read other alternatives also; Twig, Objectify recently
announced very cool features released...

Thanks.

On Sat, Mar 27, 2010 at 4:11 AM, jbdhl  wrote:

> I got an answer to the below questions in this thread:
>
> http://groups.google.com/group/google-appengine/browse_thread/thread/dc2dcf2e71bc1055
> but was recommended to ask here also. Here goes...
>
> I try to figure out how easy it is to ruin/break the data in app
> engine's datastore by accident (using JDO). Assume that a class, say
> MyClass, has a number of "persistent" members, e.g.
>   ...
>   int a
>   int b
>   int c
>   ...
> and assume a number of MyClass objects have been stored in app
> engine's persistent storage. Now, what will happen if...
>
>   1) a new persistent member variable, int d, is *added* to MyClass?
> The old objects in datastore did not have this variable, so what will
> their d-value be when they are fetched from datastore?
>
>   2) a persistent member variable, int b, is *removed* from MyClass?
> I guess the b field will be removed from all stored MyClass objects?
> If not, what will happen if b is re-added at some later point in time?
> Will the stored MyClass objects now get their old b-value back?
>
>   3) the type of a persistent member variable is changed, e.g. if a
> is converted to a String? What will the value of a be when the already
> stored objects are fetched from datastore?
>
> By the way: the app engine docs focuses on JDO as the interface to the
> datastore. Is JDO particularly superior to the alternatives? (JPA,
> Objectify, Twig, SimpleDS, Slim3)
>
> --
> 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] Workaround for Spring transactions throw GenericSignatureFormatError

2010-03-28 Thread Thomas
Please refer to
http://code.google.com/p/googleappengine/issues/detail?id=1381
comment #20

-- 
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: Best way to perform search on DataStore - Design Question

2010-03-28 Thread Tristan
another way is to implement a full-text search yourself...
implementing this would work:

http://www.miislita.com/term-vector/term-vector-3.html  (use tri-grams
instead of full words as tokens)

i would recommend low-level datastore api for that, also, your index
term entities will blow up beyond 1MB, i built mindash-datastore to
handle that

:) or you can wait for a few months for Google

On Mar 25, 3:05 pm, niraj  wrote:
> I am debating if I should use Compass or wait for Google to release
> something.
>
> I can wait for 3-4 months as my website is going to take that amount
> of time to complete.
>
> Niraj
>
> On Mar 16, 3:16 am, Toby  wrote:
>
>
>
> > I am using compass as well and it works fine. The indexing part is
> > costly and you might need to do task queue if you reindex large amount
> > of data. Starting the search manager is slow and it happens a lot due
> > to the suspend policy.
>
> > You can also take a look at this project:http://code.google.com/p/gaelucene/
>
> > I hope there will be a native solution by GAE one day (is there an
> > issue to vote for?)
>
> > On Mar 16, 10:21 am, yjun hu  wrote:
>
> > > haha, up to now,i use compass okay!
>
> > > On Tue, Mar 16, 2010 at 8:53 AM, objectuser  
> > > wrote:
> > > > I think there are a lot of posts here that conclude Compass is not
> > > > viable.  Has that changed?
>
> > > > On Mar 15, 12:23 am, yjun hu  wrote:
> > > > > you can try compass to make you project searchable. a simple demo
> > > > herehttp://hapeblog.appspot.com/blog.shtml?id=7002
>
> > > > > On Sun, Mar 14, 2010 at 8:36 PM, John Patterson  > > > >wrote:
>
> > > > > > Interesting to see the existence protected
> > > > Query.setFullTextSearch(String)
> > > > > > method when you open the Query class in Eclipse.  I suppose it 
> > > > > > won't be
> > > > too
> > > > > > far away.  I can't wait to see if they just give us a
> > > > take-it-or-leave-it
> > > > > > solution or also the tools required to roll your own.
>
> > > > > > On 14 Mar 2010, at 15:05, Robert Lancer wrote:
>
> > > > > >  Haha, like many of us you probably thought that GOOGLE app engine
> > > > > >> would have decent text search capabilities.
>
> > > > > >> It looks like your doing all you can do by creating the inverse 
> > > > > >> table,
> > > > > >> you may just want to star
> > > > > >>http://code.google.com/p/googleappengine/issues/detail?id=217
>
> > > > > >> On Mar 13, 8:59 pm, niraj  wrote:
>
> > > > > >>> My case:
> > > > > >>> I am building a website that has several searchable fields from
> > > > > >>> various entities (example Artist names from artist entity , Album
> > > > > >>> names from album entity). To have an efficient search capability I
> > > > > >>> have defined another Entity - SearchType which carries the 
> > > > > >>> Searchable
> > > > > >>> string and the Foreign key to the Entity. Instead of querying all 
> > > > > >>> the
> > > > > >>> Entities one my one - I query SearchType.
>
> > > > > >>> My preliminary tests indicate that the query  performance on
> > > > > >>> SearchType is not great (the names are indexed) . I need google
> > > > > >>> suggest like quick results in a drop down. What is the best way to
> > > > > >>> design this.
>
> > > > > >>> I have considered Memcache , but I dont think I can run queries on
> > > > > >>> Memcache . i.e I am running a startsWith() query on JDO today.
>
> > > > > >>> Any best practices .
>
> > > > > >> --
> > > > > >> You received this message because you are subscribed to the Google
> > > > Groups
> > > > > >> "Google App Engine for Java" group.
> > > > > >> To post to this group, send email to
> > > > > >> google-appengine-j...@googlegroups.com.
> > > > > >> To unsubscribe from this group, send email to
> > > > > >> google-appengine-java+unsubscr...@googlegroups.com > > > > >>  unsubscr...@googlegroups.com>
> > > >  > > >  %252bunsubscr...@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 > > > > >  unsubscr...@googlegroups.com>
> > > >  > > >  %252bunsubscr...@googlegroups.com>
>
> > > > > > .
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/google-appengine-java?hl=en.
>
> > > > > --
> > > > > dream or truth
>
> > > > --
> > > > 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-appeng

[appengine-java] Re: Update to GAE/J 1.3.2 -> Project in Eclipse broken

2010-03-28 Thread Moritz
I have the same problem: "The App Engine SDK '/{project-root}/war' on
the project's build path is not valid" where "{project-root} is the
root directory of my project.
When I create a new project, this error does not occur, but I cannot
spot any differences in the configuration files of both projects, so
I'm a bit stuck at the moment.

On 29 Mrz., 04:07, Joa  wrote:
> I've tried to update GAE to 1.3.2. Now the project is broken and I
> seem to be not even able to revert back to 1.3.1.
>
> I've taken the following steps:
> - Trying to locate instructions. Couldn't find any, so this must be
> simple...
> - Updated Google plugin through Help -> Check for updates. Checks out
> - Then downloaded GAE 1.3.2 for Java, unzip
> - Set Project Properties using Google > App Engine. "Use specific SDK"
> set to 1.3.2. Now the project root in the Eclipse Package Explorer is
> marked with an error. The project won't start any longer without an
> error message and dumps stack traces. To my dismay, any changes in
> this panel do not seem to have an impact whatsoever now.

-- 
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] Development server requires custom indexes for inequality filters on keys

2010-03-28 Thread James
I was trying to do an inequality query on the Keys of an entity on the
development server and received the following error:

SEVERE: QUERY ERROR:
com.google.appengine.api.datastore.DatastoreNeedIndexException: Query
com.google.appengine.api.datastore.dev.LocalCompositeIndexManager
$indexcomponentsonlyqu...@203ede49 requires the following index:





The App Engine docs specify that inequality filters on keys and
equality filters on other properties are supported by a default index
(http://code.google.com/appengine/docs/java/datastore/
queriesandindexes.html#Defining_Indexes_With_Configuration) and it
does work when I run in on AppEngine so it seems to be a Development
server problem. Anyone else encounter this problem?

James

-- 
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] Eventually consistent reads and JDO

2010-03-28 Thread Isdal
Hi all,

Thanks for all new new features in 1.3.2!

I was just wondering if it is possible to use the
"ReadPolicy.Consistency.EVENTUAL" feature and still use the JDO
interface.

I am currently getting a PersistenceManager with:
JDOHelper.getPersistenceManagerFactory("transactions-
optional");

Is there a way to tell the PersistenceManager to tell the datastore to
accept eventually consistent reads? Most of my app can handle stale
data, and any performance improvement would be great!

Thanks!

// Tomas

-- 
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] Mysql migration to app engine

2010-03-28 Thread Rodri
Hello,
I have a eclipse plugin that save logs in a mysql db.
I want to save the logs in my app engine,
How can i migrate the db to app engine?
Thanks and Regards
Rodrigo

-- 
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] Workflow Engine

2010-03-28 Thread David Sowerby
Has anyone successfully implemented a Java workflow engine on GAE?
(or perhaps considering it).
I'm thinking  of something like Bonita (http://www.bonitasoft.com/)
or
Enhydra Shark (http://www.enhydra.org/workflow/shark/index.html) and
would welcome feedback from anyone who has tried it

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



[appengine-java] Contacts/Address Book App?

2010-03-28 Thread iwas9409
Instead of writing a Contacts/Address Book App from scratch, is there
a place I can go to find canned apps that I can tweak OR can someone
send me anything to get me started?

-Tom

-- 
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] Lost record updates after server restart

2010-03-28 Thread mozey
Hello everyone,

I have a simple issue, and i'm sure its fix is simple as well. I have
written a simple app's scaffolding front end. And i notice that when i
add new records, they get persisted, but when i update records. The
effect will last until i restart my server. Where could i start
looking to get this fix?

-- 
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] Slow JAXB context initialization

2010-03-28 Thread maco
Hi !

I have a problem with JAXB context initialization. After some of my
model optimization the local development server takes to start up
(JAXBContext initialization included) about 7 seconds (as unit test it
takes 1 second only. My CPU 3.06 GHz Core 2 Duo - GAE 1.3.1). However,
on App Engine it takes still more than 30s quota limit thus I'm not
able to start it up.  It's about 300+ java classes. I have setup the
following as well  I locally did some measurement by profiler and the most
expensive operation was the following:
com.google.appengine.tools.development.DevAppServerFactory
CustomSecurityManager.checkPermission(java.security.Permission) Total
Time: 4 973 ms Calls: 86332

Could you, please, point me out where could be a problem? What can I
do make it run on GAE?

Thanks, Aurel.

-- 
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] Looking to brush-up on my Java

2010-03-28 Thread aeshanw
Its been a very long time since I used J2EE. been doing web dev in
LAMP for the past couple of years. Im looking to get back in the game.
Can anyone reccommend a good book on Java development for the
AppEngine?

I'm looking to get a good background on the Platform, which should
help me better understand the debug messages Im getting on my app.

Any suggestions?

Thanks alot!

-- 
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] JPA: Query contains stale data (bug or future)?

2010-03-28 Thread danblack
Hello.
I'm using JPA support for managing the App Engine datastore.
And I've got some problems.

I've got an entity  than contains entities (s).
Here is my actions.
I starts transaction then updates entity then flush updates to
database.
Than I gets all entities Item(s) for a container which contains my
updated Item.
But the list of retrieved items contains Item that does not have my
changes.
What is wrong with my code???


I've modelled this problem. (see code)

@Entity
public class Container implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key key;

@OneToMany(mappedBy = "container", fetch = FetchType.LAZY)
private List items = new ArrayList();

public void setKey(Key key) {
this.key = key;
}

public Key getKey() {
return key;
}

public void setItems(List items) {
this.items = items;
}

public List getItems() {
return items;
}

}

@Entity
public class Item implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key key;

@ManyToOne(fetch = FetchType.LAZY)
private Container container;

@Column
private String value;

public void setKey(Key key) {
this.key = key;
}

public Key getKey() {
return key;
}

public void setContainer(Container container) {
this.container = container;
}

public Container getContainer() {
return container;
}

public void setValue(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return "Item [key=" + key + ", value=" + value + "]";
}
}

@Service("TestLocalService")
public class LocalService {

protected final Log logger = LogFactory.getLog(getClass());

@Autowired
@Qualifier("jpaTemplate")
protected JpaTemplate jpaTemplate;

@Transactional(propagation = Propagation.REQUIRED)
public Key createContainer() {
Container container = new Container();
jpaTemplate.persist(container);
jpaTemplate.flush();
logger.fatal("new container" + container.getKey());
return container.getKey();
}

@Transactional(propagation = Propagation.REQUIRED)
public Key generateItems(Key containerKey) {
Container container = jpaTemplate.find(Container.class,
containerKey);
Key key = null;
for (int i = 0; i < 5; i++) {
Item item = new Item();
item.setContainer(container);
item.setValue(Integer.toString(i));
jpaTemplate.persist(item);
jpaTemplate.flush();
key = item.getKey();
logger.fatal("new item" + item);
}
return key;
}

@Transactional(propagation = Propagation.REQUIRED)
public void changeItems(Key containerKey, Key itemKey) {
Container container = jpaTemplate.find(Container.class,
containerKey);
Item changedItem = jpaTemplate.find(Item.class, itemKey);
changedItem.setValue("xxx"); //
<---
PROBLEM HERE
jpaTemplate.flush();
logger.fatal("changed item: " + changedItem);
for (Item item : container.getItems()) {
logger.fatal("list item: " + item); //
< PROBLEM
HERE
}
}

public static void testListSync(LocalService service) {
// MAIN TEST
Key containerKey = service.createContainer();
Key itemKey = service.generateItems(containerKey);
service.changeItems(containerKey, itemKey);
}
}


EXECUTION LOG

### CALL createContainer
datastore_v3.BeginTransaction
datastore_v3.Put
datastore_v3.Commit

## LOG createContainer
SEVERE: new containerContainer(684)
27.03.2010 6:16:17 ru.englishvocabulary.bl.local.test.LocalService
generateItems

### CALL generateItems
datastore_v3.BeginTransaction
datastore_v3.Get
datastore_v3.Put
datastore_v3.Put
datastore_v3.Put
datastore_v3.Put
datastore_v3.Put
datastore_v3.Commit

### LOG generateItems
SEVERE: new itemItem [key=Container(684)/Item(685), value=0]
27.03.2010 6:16:17 ru.englishvocabulary.bl.local.test.LocalService
genera

[appengine-java] Grails, Spring, and Thread Issue

2010-03-28 Thread hutch
Hi all - I am aware of the thread policies in GAE, but I am not sure
what changed, when I recently deployed a grails app (which i've done
in the past w\out issues), and now all of a sudden it appears that
Spring (as a part of grails) is attempting register a bean which
requires threading, and then of course throws the access exception.
Any thoughts on what might have changed?  Is there a way to catch this
exception and move on?

Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'shutdownHook': Initialization of bean failed;
nested exception is java.security.AccessControlException: access
denied (java.lang.RuntimePermission modifyThreadGroup)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:
519)
at
org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.doCreateBean(ReloadAwareAutowireCapableBeanFactory.java:
124)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:
450)
at org.springframework.beans.factory.support.AbstractBeanFactory
$1.getObject(AbstractBeanFactory.java:290)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:
222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:
287)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:
189)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:
557)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:
842)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:
416)
at
org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext.refresh(GrailsWebApplicationContext.java:
153)
at
org.codehaus.groovy.grails.commons.spring.DefaultRuntimeSpringConfiguration.getApplicationContext(DefaultRuntimeSpringConfiguration.java:
154)
at
org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:
170)
at
org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:
131)
at
org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:
102)
at
org.codehaus.groovy.grails.web.context.GrailsContextLoader.createWebApplicationContext(GrailsContextLoader.java:
68)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:
192)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:
47)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:
548)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:
191)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:
168)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
123)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
243)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5485)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5483)
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:
536)
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(RpcConne

[appengine-java] Problem with AppStats

2010-03-28 Thread George Tang
Hey Everyone,

I just downloaded the new SDK and i was excited to use app stats.
After following the instructions to set it up, I tried testing it on
my localdev server and I got a nullpointerexception

WARNING: /appstats/stats
java.lang.NullPointerException
at java.io.Reader.(Reader.java:61)
at java.io.InputStreamReader.(InputStreamReader.java:80)
at
com.google.appengine.tools.appstats.TemplateTool.loadTemplateSource(TemplateTool.java:
115)
at com.google.appengine.tools.appstats.Renderer
$1.loadTemplateSource(Renderer.java:41)
at
com.google.appengine.tools.appstats.TemplateTool.getTemplate(TemplateTool.java:
142)
at
com.google.appengine.tools.appstats.TemplateTool.format(TemplateTool.java:
100)
at com.google.appengine.tools.appstats.Renderer
$1.format(Renderer.java:51)
at
com.google.appengine.tools.appstats.Renderer.renderSummaries(Renderer.java:
66)
at
com.google.appengine.tools.appstats.AppstatsServlet.doGet(AppstatsServlet.java:
99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.tools.appstats.AppstatsFilter.doFilter(AppstatsFilter.java:
92)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
51)
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
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:349)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)

Anyone have any idea why?

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



[appengine-java] Charging Application Users for Data Storage

2010-03-28 Thread Gareth Davies
I am currently working on my first Java application for Google App
Engine. It would allow users to record discrete amounts of data
(recorded with an Android application) by posting to a service
(currently XML over HTTP). I have reviewed the Billing-related GAE
documents and understand that after a certain threshold I would have
to pay for additional storage space.

In the (however unlikely!) event that my app becomes popular and this
threshold is significantly exceeded I would like to pass on the cost
by charging users based on how much data they store. I had hoped that
there would be existing facilities within the Google platform (Apps,
Checkout etc.) that would make this relatively easy to setup, at least
from a technical standpoint. However, after searching this list and
the wider web I have not found much relevant information. Are there
any best practices/recommendations for how to go about this, or should
I be looking for a solution independent of the Google App Engine
plaform?

Thanks,
Gareth Davies

-- 
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] bouncycastle add provider failure

2010-03-28 Thread ZaeX
Hi,

I have tried to add the bouncycastle JCE provider in the code, it
works in Eclipse jetty server, but failed on GAE.
I wonder if it's because my coding mistake or 'Security.addProvider'
is forbidden by GAE.

the stack trace is here:
03-27 01:31AM 01.275
javax.servlet.ServletContext log: unavailable
java.lang.SecurityException: SHA1 digest error for org/bouncycastle/
jce/provider/BouncyCastleProvider.class
at
com.google.appengine.runtime.Request.process-4b6192778bef5418(Request.java)
at sun.security.util.ManifestEntryVerifier.verify(Unknown Source)
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarVerifier$VerifierStream.read(Unknown Source)
at sun.misc.Resource.getBytes(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:
428)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
263)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:
191)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:
168)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:
123)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:
243)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5485)
at com.google.apphosting.base.RuntimePb$EvaluationRuntime
$6.handleBlockingRequest(RuntimePb.java:5483)
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:
536)
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:404)
at java.lang.Thread.run(Unknown Source)

-- 
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] allowMultipleRelationsOfSameType = true

2010-03-28 Thread scott
I have upgraded to AE SDK 1.3.2, and am still having problems
retrieving a class that contains multiple properties of the same type,
i.e.

class A {

class B x;
class B y;

}

With the allowMultipleRelationsOfSameType= true, the persistence is
OK, but the retrieve returns duplicate value for properties of the
same type (even though it was saved with different values for x & y).

Is there a fix planned for this?

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



[appengine-java] Unable to read file in Classpath

2010-03-28 Thread Eurig Jones
My app has a configuration file which I place in the classpath and
read using commons-configuration's XMLConfiguration class...

XmlConfiguration config = new XmlConfiguration("config.xml");

Before I started porting my app to app engine, this worked fine. But
now I get this an exception (below). If I move the file to the War
folder it finds it and parses it ok. But the root of the war is not
where I want my config files to be!!


Caused by: java.security.AccessControlException: access denied
(java.io.FilePermission C:\Users\Eurig\config.xml read)
at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:
323)
at
java.security.AccessController.checkPermission(AccessController.java:
546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:
532)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.exists(File.java:731)
at
org.apache.commons.configuration.ConfigurationUtils.locate(ConfigurationUtils.java:
538)
at
org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:
213)
... 39 more

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



[appengine-java] Best way to manage your live JDO database?

2010-03-28 Thread George Tang
Hey all,

Just out of curiousity, how do you guys manage your live dbs? for your
development servers you obviously have the _ah/admin section, but what
do you use live?

Best,
George

-- 
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: log4j init fails

2010-03-28 Thread Eurig Jones
I'm getting the same problem. my log4j.properties is in the root of my
source folder and it's giving me this issue.

On Mar 12, 10:25 pm, Rajeev Dayal  wrote:
> Can you post a copy of your log4j.properties file?
>
> On Thu, Mar 11, 2010 at 12:45 PM, AJ Chen  wrote:
> > yes, log4j.properties is copied by the build. the app uses it.  the warning
> > message is weird.  thanks.
>
> > On Thu, Mar 11, 2010 at 8:10 AM, Rajeev Dayal  wrote:
>
> >> If you have your log4j.properties file at the root of your source tree, it
> >> should automatically be copied over to war/WEB-INF/classes whenever Eclipse
> >> performs a build of your project; you should not have to copy it over
> >> manually.
>
> >> I'm not sure why you're getting the error with regard to
> >> Datanucleus.Connection; I've added Don to this thread; he may have some
> >> insight into this.
>
> >> On Thu, Mar 11, 2010 at 3:33 AM, AJ Chen  wrote:
>
> >>> I have the default log4j.properties in WEB-INF/classes dir. but the
> >>> warning always comes up. the file is visible because I can change the log
> >>> level to ERROR to get rid of the warning.
> >>> -aj
>
> >>> On Fri, Feb 19, 2010 at 7:24 PM, Rusty Wright 
> >>> wrote:
>
>  I think you can simply put the log4j.properties file in the
>  WEB-INF/classes dir and you don't need any appengine-web.xml stuff for 
>  it.
>   Log4j looks for its configuration file "on the classpath" which means it
>  looks in WEB-INF/classes (and also in all of the jars in the lib 
>  directory).
>
>  AJ Chen wrote:
>
> > I have  log4j config in appengine-web.xml,
> > 
> >         > value="WEB-INF/logging.properties"/>
> >         > value="file:WEB-INF/classes/log4j.properties"/>
> >         > value="WEB-INF/monitor.properties"/>
> >    
> >   but GAE still complains about it:
> > log4j:WARN No appenders could be found for logger
> > (DataNucleus.Connection).
> > log4j:WARN Please initialize the log4j system properly.
>
> > Is there anything else that should be set?
>
> > thanks,
> > -aj
>
> > --
> > 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.
>
>  --
>  0x2B | ~0x2b  --  Hamlet
>
>  --
>  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.
>
> >>> --
> >>> AJ Chen, PhD
> >>> Chair, Semantic Web SIG, sdforum.org
> >>>http://web2express.org
> >>> twitter @web2express
> >>> Palo Alto, CA, USA
> >>> 650-283-4091
> >>> *Building social media monitoring pipeline, and connecting social
> >>> customers to CRM*
>
> >>>  --
> >>> 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.
>
> > --
> > AJ Chen, PhD
> > Chair, Semantic Web SIG, sdforum.org
> >http://web2express.org
> > twitter @web2express
> > Palo Alto, CA, USA
> > 650-283-4091
> > *Building social media monitoring pipeline, and connecting social customers
> > to CRM*
>
> > --
> > 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 fo

[appengine-java] Re: Blobstore UploadBlobServlet.java NPE

2010-03-28 Thread Miguel
I have the same problem.
It does not matter the url to the servlet i use to work with de keys
of the blobs, i always have the same NPC.

Any help about what we are doing wrong ?

Thanks

On 11 feb, 21:21, Stevko  wrote:
> I'm trying to post files into theblobstoreon my dev station using
> eclipse.
> The _BlobInfo_ objects are appearing within the datastore viewer but
> this exception keep getting thrown for the first time I post the form.
>
> Is there anyone with access to UploadBlobServlet.java that can point
> me to why I'm getting a NPE?
> --Andy.Stevko
>
> Feb 11, 2010 8:06:43 PM com.google.apphosting.utils.jetty.JettyLogger
> warn
> WARNING: /_ah/upload/
> ag5uaW51a3VtZW1vcmllc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGIYIDA
> java.lang.NullPointerException
>         at
> com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(Uploa 
> dBlobServlet.java:
> 365)
>         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(UploadBlobS 
> ervlet.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:
> 487)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1093)
>         at
> com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocat 
> ion.java:
> 67)
>         at
> com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipel 
> ine.java:
> 122)
>         at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:
> 110)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
>         at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFi 
> lter.java:
> 51)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
>         at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(Trans 
> actionCleanupFilter.java:
> 43)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
>         at
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFile 
> Filter.java:
> 121)
>         at org.mortbay.jetty.servlet.ServletHandler
> $CachedChain.doFilter(ServletHandler.java:1084)
>         at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
> 360)
>         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(DevAppEn 
> gineWebAppContext.java:
> 70)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 139)
>         at com.google.appengine.tools.development.JettyContainerService
> $ApiProxyHandler.handle(JettyContainerService.java:352)
>         at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
> 139)
>         at org.mortbay.jetty.Server.handle(Server.java:313)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 506)
>         at org.mortbay.jetty.HttpConnection
> $RequestHandler.content(HttpConnection.java:844)
>         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
>         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>         at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
> 396)
>         at org.mortbay.thread.BoundedThreadPool
> $PoolThread.run(BoundedThreadPool.java:442)

-- 
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] JPA query contains stale data.

2010-03-28 Thread danblack
Hello.
I'm using JPA for the App Engine datastore.
And I've got some problems.

I've got an entity  than contains entities (s).
Here is my actions.
I start transaction then update entity then flush updates to database.
Then I get all entities of class Item(s) for a container which
contains my updated Item.
But the list of retrieved items contains Item that does not have my
changes.
What is wrong with my code???


I've modelled this problem. (see code)

@Entity
public class Container implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key key;

@OneToMany(mappedBy = "container", fetch = FetchType.LAZY)
private List items = new ArrayList();

public void setKey(Key key) {
this.key = key;
}

public Key getKey() {
return key;
}

public void setItems(List items) {
this.items = items;
}

public List getItems() {
return items;
}

}

@Entity
public class Item implements Serializable {

private static final long serialVersionUID = 1L;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Key key;

@ManyToOne(fetch = FetchType.LAZY)
private Container container;

@Column
private String value;

public void setKey(Key key) {
this.key = key;
}

public Key getKey() {
return key;
}

public void setContainer(Container container) {
this.container = container;
}

public Container getContainer() {
return container;
}

public void setValue(String value) {
this.value = value;
}

public String getValue() {
return value;
}

@Override
public String toString() {
return "Item [key=" + key + ", value=" + value + "]";
}
}

@Service("TestLocalService")
public class LocalService {

protected final Log logger = LogFactory.getLog(getClass());


public Key createContainer() {
em.getTransaction().begin();
Container container = new Container();
em.persist(container);
em.flush();
logger.fatal("new container" + container.getKey());
em.getTransaction().commit();
return container.getKey();
}

public Key generateItems(Key containerKey) {
em.getTransaction().begin();
Container container = em.find(Container.class, containerKey);
Key key = null;
for (int i = 0; i < 5; i++) {
Item item = new Item();
item.setContainer(container);
item.setValue(Integer.toString(i));
em.persist(item);
em.flush();
key = item.getKey();
logger.fatal("new item" + item);
}
em.getTransaction().commit();
return key;
}

public void changeItems(Key containerKey, Key itemKey) {
em.getTransaction().begin();
Container container = em.find(Container.class, containerKey);
Item changedItem = em.find(Item.class, itemKey);
changedItem.setValue("xxx"); // 
<---
PROBLEM HERE
em.flush();
logger.fatal("changed item: " + changedItem);
for (Item item : container.getItems()) {
logger.fatal("list item: " + item); //
<--- PROBLEM HERE (Item contains a
stale value of the field )
}
em.getTransaction().commit();
}

public static void testListSync(LocalService service) {
// MAIN TEST
Key containerKey = service.createContainer();
Key itemKey = service.generateItems(containerKey);
service.changeItems(containerKey, itemKey);
}
}


EXECUTION LOG

### CALL createContainer
datastore_v3.BeginTransaction
datastore_v3.Put
datastore_v3.Commit

## LOG createContainer
SEVERE: new containerContainer(684)
27.03.2010 6:16:17 ru.englishvocabulary.bl.local.test.LocalService
generateItems

### CALL generateItems
datastore_v3.BeginTransaction
datastore_v3.Get
datastore_v3.Put
datastore_v3.Put
datastore_v3.Put
datastore_v3.Put
datastore_v3.Put
datastore_v3.Commit

### LOG generateItems
SEVERE: new itemItem [key=Container(684)/Item(685), value=0]
27.03.2010 6:16:17 ru.englishvocabulary.bl.local.test.LocalService
generateItems
SEVERE: new itemItem [key=Container(684)/Item(686), value=1]
27.03.2010 6:16:17 ru.englishv

[appengine-java] Problems loading a new JRuby on Rails app

2010-03-28 Thread AkitaOnRails
Hi, I've been following this tutorial http://gist.github.com/268192 on
how to load a Rails 2.3.5 app on the App Engine. It is very small,
using DataMapper and it's running properly in the local development
sandbox. It also published without any errors, but when I try to load
it (http://urlakita.appspot.com) I get log errors such as these:

javax.servlet.ServletContext log: unable to create shared application
instance
org.jruby.rack.RackInitializationException: IO error --
action_controller/routing/route

If I try to load many times, I get similar but slightly different
errors:

javax.servlet.ServletContext log: unable to create shared application
instance
org.jruby.rack.RackInitializationException: IO error --
action_controller/polymorphic_routes

javax.servlet.ServletContext log: unable to create shared application
instance
org.jruby.rack.RackInitializationException: IO error --
action_controller/mime_type

I remember something about file limitations on the free account. Is
there anything I can do to figure out the exact problem and how to fix
it?

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



[appengine-java] Re: Timeout using GData API

2010-03-28 Thread Kenyth
The same issue here. Has someone found a solution so far?

On Mar 26, 3:55 am, "Shinichiroh Takezaki [Virtual Technology]"
 wrote:
> Hi
>
> I made a patch that the GData API library to execute asynchronously.
>
> see:http://code.google.com/p/reflexworks/source/browse/trunk/gdataclientp...
>
> source:http://code.google.com/p/reflexworks/source/browse/#svn/trunk/gdatacl...
>
> Takezaki
>
> 2010/3/19 Alexandru Farcas 
>
>
>
> > i have the same problem ...
>
> > in some cases, for some searches I get this error and is very annoying
> > because I can not increase the timeout ...
> > It's very urgent to me ... so, if anyone can help me/us to resolve
> > this "problem"...
>
> > On Mar 18, 1:25 pm, Ice13ill  wrote:
> > > Everybody says that using the setConntectionTimeout() can set the
> > > maximum timeout to 10 seconds.
> > > I also tried setting service.setConnectionTimeout() (witch sets the
> > > timeout for the HttpUrlConnectiion object used to fetch data) but with
> > > no effect (contrary to what it says here:
> >http://code.google.com/appengine/docs/java/urlfetch/overview.html#Req...).
> > > I have read somewhere that this pb was fixed in an early release but
> > > it doesn't appear so.
> > > Can anyone help ?
>
> > > On Jan 20, 7:42 am, smile laugh  wrote:
>
> > > > I also get same error
>
> > > > is there someone can help me out
>
> > --
> > 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.
>
> --
> _/ 有限会社バーチャルテクノロジー 竹嵜 伸一郎
> _/ Virtual Technology, Ready to Cloud
> _/http://www.virtual-tech.net/

-- 
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: GWT Code Server Disconnected

2010-03-28 Thread Vaclav Bartacek
I use Linux and Apache Ant without problems.
  Linux  2.6.23.9-mactel x86_64
  java version "1.6.0_03" 64bit

  GWT SDK 2.0.3
  GAE SDK 1.3.1 or 1.3.2

See http://code.google.com/webtoolkit/doc/latest/tutorial/appengine.html
Here is the interesting part of my build.xml:

  
  

  
  
  

  

  

  

  

  


  

  



  

   

  




  

 
 
  
  
  
  
  
  
  
  
   
   

  


On Mar 26, 7:40 am, xVir  wrote:
> I too have this problem. Anyone knows how it can be solved?
>
> On 27 янв, 00:07, Greg Donald  wrote:
>
> > On Mon, Jan 25, 2010 at 12:04 PM, Greg Donald  wrote:
> > > When I create and attempt to run a new Google App Engine project
> > > (Java) I get this error:
>
> > > GWT Code Server Disconnected
> > > Most likely, you closed GWT development mode. Or you might have lost
> > > network connectivity. To fix this, try restarting GWT Development Mode
> > > and REFRESH this page.
>
> > > In Eclipse I am choosing File -> New -> Web Application Project.  Then
> > > I right-click on the project and run or debug it.  It suggests a URL
> > > for me like:
>
> > >http://localhost:/Test_gae.html?gwt.codesvr=127.0.1.1:9997
>
> > > and that's when I get the error message above.
>
> > > Also, the server is dead at this point.  I have to restart it to try 
> > > again.
>
> > > What am I doing wrong?  I'd like to think it's something I did, but I
> > > haven't even written any code yet.
>
> > Anyone?  Does this not work in Eclipse on Linux?
>
> > Thanks.
>
> > --
> > Greg Donald
> > destiney.com | gregdonald.com

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



[appengine-java] Re: "captcha required" error when deployed, works locally

2010-03-28 Thread dflorey
Unfortunately Google changed this without warning.
You'll have to handle the captcha now when dealing with user/password
credentials (or use authsub).
How to handle captchas is described in the docs, it's pretty
straightforward.

On Mar 28, 9:05 pm, Brice  wrote:
> Good afternoon,
>
> I'm working on the basics of a new appengine app and I've started
> incorporating the Google Calendar API via the gdata client. The code I
> have is quite simple at this point, just creating a CalendarService,
> calling "setUserCredentials", requesting a feed (not sure if the URL
> is right? - auth is for a HOSTED account), then checking that the
> resultfeed is valid and has results.
>
> When deployed locally, everything seems OK. I'm "hard coding" a
> particular account, the app will interact with a particular calendar,
> not every visitors/user's calendar - so doing AuthSub isn't what I'm
> looking for.
>
> In any case, it works locally and when I deploy to app engine, I get
> "Captcha required" instead of the results I saw running locally.
>
> I'm sure I'm missing something, but the docs I've looked through
> either indicate that what I'm doing is correct or that what I'm trying
> to do can't be done and I'm not sure what's what.
>
> Thanks in advance!
> Brice

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