ninjaframework / ninja-appengine

Google App Engine support for Ninja Framework
Apache License 2.0
40 stars 21 forks source link

ClassCastException ApiProxyLocalImpl #10

Closed snvandoorn closed 10 years ago

snvandoorn commented 10 years ago

Installing ninjaframework for GoogleAppEngine (1.9.0) using the maven (3.3.1) archetype with (JavaSE 1.7.0_51) mvn appengine:devserver with or without -Dskiptests leads to

java.lang.ClassCastException: com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to com.google.appengine.tools.development.ApiProxyLocal

and a 503 SERVICE UNAVAILABLE in the web frontend.

It seems that the versions of ApiProxyLocal used in the libraries appengine-api-stubs and appengine-testing did not use the same build environment.

snvandoorn commented 10 years ago

Also cleaning the maven repository prior to building did not resolve the issue.

raphaelbauer commented 10 years ago

Did you specify the profile? mvn clean appengine:devserver -Pdevserver?

cheers,

Raphael

snvandoorn commented 10 years ago

Yes I did It did not make any difference though. Cheers, Sebastiaan

Von: "Raphael A. Bauer" notifications@github.com Antworten an: ninjaframework/ninja-appengine <reply+i-29499971-9a55740d4a10ad55ba1386ea3909314fd1863ee9-4717156@reply.git hub.com> Datum: Sonntag, 16. März 2014 08:45 An: ninjaframework/ninja-appengine ninja-appengine@noreply.github.com Cc: Sebastiaan van Doorn snvandoorn@googlemail.com Betreff: Re: [ninja-appengine] ClassCastException ApiProxyLocalImpl (#10)

Did you specify the profile? mvn clean appengine:devserver -Pdevserver?

cheers,

Raphael

‹ Reply to this email directly or view it on GitHub https://github.com/ninjaframework/ninja-appengine/issues/10#issuecomment-3775 1373 .

raphaelbauer commented 10 years ago

I just tried the following: mvn archetype:generate -DarchetypeGroupId=org.ninjaframework -DarchetypeArtifactId=ninja-appengine-blog-archetype (uses Ninja 3.0.3 and GAE 1.9.0)

then mvn clean appengine:devserver -Pdevserver

this works for me perfectly fine (including tests and devserver)...

If you still got problems could you please provide an example problem where the bug occurs? Otherwise it's a bit hard to debug....

Thanks!

Raphael

snvandoorn commented 10 years ago

Hi Raphael,

Thanks a lot. This archetype works well. There must be a ninja/gae archetype in maven, which did not work.

I noticed that the cookies are not encrypted. Is this a feature that is on the near term roadmap?

Thanks Sebastiaan

Von: "Raphael A. Bauer" notifications@github.com Antworten an: ninjaframework/ninja-appengine <reply+i-29499971-9a55740d4a10ad55ba1386ea3909314fd1863ee9-4717156@reply.git hub.com> Datum: Sonntag, 16. März 2014 10:24 An: ninjaframework/ninja-appengine ninja-appengine@noreply.github.com Cc: Sebastiaan van Doorn snvandoorn@googlemail.com Betreff: Re: [ninja-appengine] ClassCastException ApiProxyLocalImpl (#10)

I just tried the following: mvn archetype:generate -DarchetypeGroupId=org.ninjaframework -DarchetypeArtifactId=ninja-appengine-blog-archetype (uses Ninja 3.0.3 and GAE 1.9.0)

then mvn clean appengine:devserver -Pdevserver

this works for me perfectly fine (including tests and devserver)...

If you still got problems could you please provide an example problem where the bug occurs? Otherwise it's a but hard to debug....

Thanks!

Raphael

‹ Reply to this email directly or view it on GitHub https://github.com/ninjaframework/ninja-appengine/issues/10#issuecomment-3775 2730 .

raphaelbauer commented 10 years ago

Nice that it works now :)

Regarding cookies... no there is nothing on the roadmap for now. For our projects there is no need to.

But contributions are really welcome! If you want to contribute have a look at https://github.com/ninjaframework/ninja/blob/develop/ninja-core/src/main/java/ninja/session/SessionImpl.java

Session is hidden behind an interface, so it is easy to bind a custom (encrypted) implementation.

But because Sessions are security critical we'd have to really test such a new implementation heavily (I know some security people that might be willing to help).

A good starting point is for sure the new Session implementation of Rails - they, too changed from signed to encrypted cookies.

raphaelbauer commented 10 years ago

Ah - and if you want to discuss anything please post on the mailing list :) There are some really helpful people that might be willing to join in!