Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample does not run with the dev server. #1

Open
ludoch opened this issue Apr 6, 2013 · 9 comments
Open

Sample does not run with the dev server. #1

ludoch opened this issue Apr 6, 2013 · 9 comments

Comments

@ludoch
Copy link

ludoch commented Apr 6, 2013

With ninja-appengine-demo
mvn gae:run
gives
WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext@3622e177{/,/Users/ludo/a/tmp/ninja-appengine/ninja-appengine-demo/target/ninja-appengine-demo-1.0.2-SNAPSHOT}
java.lang.ClassCastException: com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to com.google.appengine.tools.development.ApiProxyLocal
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.init(ServeBlobFilter.java:54)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)

@raphaelbauer
Copy link
Contributor

On Sat, Apr 6, 2013 at 5:52 PM, ludoch [email protected] wrote:

With ninja-appengine-demo
mvn gae:run
gives
WARNING: Failed startup of context
com.google.appengine.tools.development.DevAppEngineWebAppContext@3622e17https://github.com/com.google.appengine.tools.development.DevAppEngineWebAppContext/ninja-appengine/commit/3622e177
{/,/Users/ludo/a/tmp/ninja-appengine/ninja-appengine-demo/target/ninja-appengine-demo-1.0.2-SNAPSHOT}
java.lang.ClassCastException:
com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to
com.google.appengine.tools.development.ApiProxyLocal
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.init(ServeBlobFilter.java:54)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)


Reply to this email directly or view it on GitHubhttps://github.com//issues/1
.

Hi Ludoch,

thanks for having a look :)
I am open to opinions here. The way the plugin works is not via the gae:run
facilities, but via a simple jetty:run.

This also means I have to wire the gae proxy stuff (mailer, database admin
console etc) myself. The advantage is that reloading works really fast and
without any issues - among other things.

It is a bit modeled after the play-gae plugin
https://github.com/guillaumebort/play-gae.

So - I did not play around with gae:run, but only used jetty:run.

But in theory gae:run should work fine...

Best,

Raphael

@ludoch
Copy link
Author

ludoch commented Apr 6, 2013

ok, I need to find a clean solution...

@raphaelbauer
Copy link
Contributor

Hi Ludoch,

I was thinking about that. And actually I really like the idea of integrating the dev server in a clean way. I played around inside a branch (not really cleaned up). But you should be able to do a mvn appengine:devserver... All stuff like _ah/admin and so on is accessible as well.
See https://github.com/reyez/ninja-appengine/tree/feature-full-gae-devserver-support
(be aware that the testcases do not run => compile with mvn install -DskipTests).

Two things were you maybe can help me:

  1. How can I make reloads of the devserver seamless (were should I compile my stuff => what files must I touch to trigger reloads). This does not work right now... Actually I would like to make it work like the jetty conf in the pom.xml of ninja-appengine-demo.
  2. I have to make up my mind how to implement best a testserver (aka NinjaTest). These tests are pretty powerful, but I have to make sure that a ApiProxy for the LocalDevEnvironment is there... Not sure how to deal with that best... But does not seem to be too complicated...

Would be great getting some feedback!

Thanks!

Raphael

@raphaelbauer
Copy link
Contributor

Okay I fixed everything... Please have a look at:
https://github.com/reyez/ninja-appengine/tree/feature-full-gae-devserver-support

Feedback really appreciated. Reloading is done by touching appengine-web.xml automatically.

But one more thing: When reloading the devserver that way I am getting permgempspace out of memory errors really quickly... I added 512m already to the maven options by default. Do you know any remedy?

Thanks for your feedback!

@ludoch
Copy link
Author

ludoch commented Apr 7, 2013

Whao...It's gonna be very nice very quickly...We'll see what we can do on our side soon. It has to be as simple as Jetty...

@raphaelbauer
Copy link
Contributor

On Tue, Apr 9, 2013 at 10:38 AM, Samuel Liard [email protected]:

Just download your last link, but I can't launch "mvn gae:run" or "mvn
appengine:devserver"

I miss something ?


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-16100682
.

The branch I created allows to use mvn appengine:devserver. But I have to
do some cleaning...

Simply hit jetty:run (in branch develop or in released version) and go :)

ra

@ludoch
Copy link
Author

ludoch commented Apr 23, 2013

Humm now seeing again the initial exception using a fresh refresh...

@raphaelbauer
Copy link
Contributor

On Tue, Apr 23, 2013 at 4:47 AM, ludoch [email protected] wrote:

Humm now seeing again the initial exception using a fresh refresh...


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-16836207
.

Hmm...

That can happen if something with the compilation and the mode goes wrong.

Try:
mvn clean appengine:devserver -Pappengine-dev (recommended as with the
official devserver)

or

mvn clean jetty:dev -Pjetty-dev

The important thing is the "clean". It should work then :)

Let me know if that helps!

Best,

Raphael

@mattjonesorg
Copy link

I've run into this problem a few times lately, and I'm writing the current solution here to help me find it again:

mvn clean appengine:devserver -Pdevserver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants