Cron job with Google App Engine

291 views
Skip to first unread message

Loann Neveu

unread,
May 27, 2013, 9:02:45 AM5/27/13
to ninja-f...@googlegroups.com
Hello,

I have problems to run cron jobs on backend instance with Google App Engine. (I don't use the Ninja cron jobs)
When the cron job is called, I have those errors (GAE log) :

  1. "GET /_ah/start HTTP/1.1" 404 234 - - ms=597 cpu_ms=454 cpm_usd=0.000026 loading_request=1 instance=0 app_engine_release=1.8.0 
  2. Could not instantiate listener ninja.servlet.NinjaServletListener
    java.lang.ClassNotFoundException: ninja.servlet.NinjaServletListener
and a 404 error :

"GET /cron/checkbet.do HTTP/1.1" 404 234

Have you got any solutions for this ? Do I have to add something in appengine-web.xml or web.xml files ?
Thank you !

Loann

Raphael André Bauer

unread,
May 27, 2013, 10:35:08 AM5/27/13
to ninja-f...@googlegroups.com
On Mon, May 27, 2013 at 3:02 PM, Loann Neveu <neveu...@gmail.com> wrote:
> Hello,
>
> I have problems to run cron jobs on backend instance with Google App Engine.
> (I don't use the Ninja cron jobs)
> When the cron job is called, I have those errors (GAE log) :
>
> "GET /_ah/start HTTP/1.1" 404 234 - - ms=597 cpu_ms=454 cpm_usd=0.000026
> loading_request=1 instance=0 app_engine_release=1.8.0
>
> Could not instantiate listener ninja.servlet.NinjaServletListener
> java.lang.ClassNotFoundException: ninja.servlet.NinjaServletListener

There are missing some libraries from the war you are trying to
deploy... not sure why...
what is the exact command you are using to upload your app to the
backend? (mvn something)...


Best,

Raphael

Loann Neveu

unread,
May 27, 2013, 7:31:23 PM5/27/13
to ninja-f...@googlegroups.com
I use : mvn appengine:update -Pdeployment to upload my app on the production server 
and to create and update my backend : appcfg backends <dir> update [backend]

Thanks,

Loann

Raphael André Bauer

unread,
May 28, 2013, 3:43:06 AM5/28/13
to ninja-f...@googlegroups.com
On Tue, May 28, 2013 at 1:31 AM, Loann Neveu <neveu...@gmail.com> wrote:
> I use : mvn appengine:update -Pdeployment to upload my app on the production
> server
> and to create and update my backend : appcfg backends <dir> update [backend]

Hi Loann,


to be honest, I never used backends before. But from what I know you
can try three things:

1) Does your regular frontend instance work with Ninja? Or does it
emit the same error as your backend instances?
2) run mvn clean appengine:update -Pdeployment ("clean")
3) do NOT use the default appcfg command, but use the mvn
appengine:backends_update and so on commands. More here:
https://developers.google.com/appengine/docs/java/backends/overview

In general Ninja only uses default and standard components (servlets,
the official Google AppEngine maven plugin and so on). I am almost
100% sure that Ninja works without any issues on backend instances.

Let me know if that works for you :)


Best,


Raphael






>
> Thanks,
>
> Loann
>
> Le lundi 27 mai 2013 16:35:08 UTC+2, Ra Bauer a écrit :
>>
>> On Mon, May 27, 2013 at 3:02 PM, Loann Neveu <neveu...@gmail.com> wrote:
>> > Hello,
>> >
>> > I have problems to run cron jobs on backend instance with Google App
>> > Engine.
>> > (I don't use the Ninja cron jobs)
>> > When the cron job is called, I have those errors (GAE log) :
>> >
>> > "GET /_ah/start HTTP/1.1" 404 234 - - ms=597 cpu_ms=454 cpm_usd=0.000026
>> > loading_request=1 instance=0 app_engine_release=1.8.0
>> >
>> > Could not instantiate listener ninja.servlet.NinjaServletListener
>> > java.lang.ClassNotFoundException: ninja.servlet.NinjaServletListener
>>
>> There are missing some libraries from the war you are trying to
>> deploy... not sure why...
>> what is the exact command you are using to upload your app to the
>> backend? (mvn something)...
>>
>>
>> Best,
>>
>> Raphael
>
> --
> You received this message because you are subscribed to the Google Groups
> "ninja-framework" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ninja-framewo...@googlegroups.com.
> To post to this group, send email to ninja-f...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ninja-framework/7de41117-9457-40bc-9920-8d36a35ac86c%40googlegroups.com?hl=en.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
inc: http://ars-machina.raphaelbauer.com
tech: http://ars-codia.raphaelbauer.com
web: http://raphaelbauer.com

Loann Neveu

unread,
May 28, 2013, 4:42:32 AM5/28/13
to ninja-f...@googlegroups.com
Thx a lot Raphael !!
It's work with the maven command :)

Loann

Raphael André Bauer

unread,
May 29, 2013, 3:55:56 AM5/29/13
to ninja-f...@googlegroups.com
On Tue, May 28, 2013 at 10:42 AM, Loann Neveu <neveu...@gmail.com> wrote:
> Thx a lot Raphael !!
> It's work with the maven command :)

Cool!

Would be really great getting some feedback about how Ninja works as
backend instance :)


Best,


Raphael
Reply all
Reply to author
Forward
0 new messages