Gaelyk 2.0 bug?

54 views
Skip to first unread message

Alex Garrett

unread,
May 22, 2013, 8:02:51 AM5/22/13
to Gaelyk
With the new Gaelyk2 I can no longer use

request.myVar = "blah"

in my groovlets.

Works in dev, but not on a gae server!

To reproduce what happens, I built the gaelyk template app
with datetime.groovy modified

request.setAttribute 'datetime', new Date().toString()
request.testMe = true

and get the same exception

groovy.lang.MissingPropertyException: No such property: testMe for
class: org.mortbay.jetty.Request
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:
50)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:
482)
at datetime.run(datetime.groovy:6)

Any hints before I change some 191 usages in my app, to get around
this

Ta

Alex Garrett

unread,
May 22, 2013, 11:08:17 PM5/22/13
to gae...@googlegroups.com
Well I have made some changes and have the template project going now.

i.e request object does work.

Now to work out what is different...

In the process I changed from Oracle JDK 7 to OpenJDK, but no idea if this is a contributor!

Alex

Alex Garrett

unread,
May 22, 2013, 11:27:37 PM5/22/13
to gae...@googlegroups.com
Sadly I'm still dead in the water.

I forgot I was only testing locally, where it works.

As soon as I use the proof (template project), 
and access the request object on a gae server, 
it throws the exception!

my code extensively uses the request object in goovlets and templates too.

If there are no answers, I have to find a way to back out of this upgrade.

Alex 

On Wednesday, 22 May 2013 22:02:51 UTC+10, Alex Garrett wrote:

Vladimír Oraný

unread,
May 23, 2013, 12:51:23 AM5/23/13
to gae...@googlegroups.com
HI Alex,

I've found the problem,

the template project is missing following line

classpath 'org.gradle.api.plugins:gradle-gae-plugin:0.8'

in build.gradle

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'org.gradle.api.plugins:gradle-gaelyk-plugin:0.4.1'
        classpath 'org.gradle.api.plugins:gradle-gae-plugin:0.8'
        classpath 'org.gradle.api.plugins:gradle-gae-geb-plugin:0.3'
    }
}

Thanks to this missing dependency, old fatjar plugin was used which wasn't capable of merging Groovy 2.0 extension module descriptors

Please let me know if it helps you we'll update the template as soon as possible


Cheers,
Vladimir 





2013/5/23 Alex Garrett <alex.g...@lexecorp.com>

--
--
You've received this message because you've subscribed to the Gaelyk Google Group.
To send an email to the group, please write to: gae...@googlegroups.com
To unsuscribe from this group: gaelyk+un...@googlegroups.com
To show more options: http://groups.google.fr/group/gaelyk?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Gaelyk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaelyk+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Alex Garrett

unread,
May 23, 2013, 12:58:31 AM5/23/13
to gae...@googlegroups.com
When I run Gaelyk locally I see

     public void javax.servlet.ServletRequestWrapper.setAttribute(java.lang.String,java.lang.Object)

as a method on the 'request' object. In fact I see lots of ServletRequestWrapper methods.

But on gae I only see the underlying jetty implementation

     org.mortbay.jetty.Request.setAttribute(java.lang.String,java.lang.Object)

So looking at the template project and search for ServletRequestWrapper, it comes up in

    servlet-api-2.5.jar

    appengine-api-1.0-sdk-1.8.0.jar

and 

    template-project-2.0.jar

Hmm, is this a build problem, classpath, loss of dynamic magic, or?

Vladimír Oraný

unread,
May 23, 2013, 1:03:10 AM5/23/13
to gae...@googlegroups.com
actually the gae gradle plugin is still using old fatjar version so the buildscript dependencies config closure should look like following

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'org.gradle.api.plugins:gradle-gaelyk-plugin:0.4.1'
        classpath 'org.gradle.api.plugins:gradle-gae-plugin:0.8', {
            exclude module: "gradle-fatjar-plugin"
        }
        classpath 'eu.appsatori:gradle-fatjar-plugin:0.2-rc1'
        classpath 'org.gradle.api.plugins:gradle-gae-geb-plugin:0.3'
    }
}


2013/5/23 Alex Garrett <alex.g...@lexecorp.com>

Alex Garrett

unread,
May 23, 2013, 1:33:32 AM5/23/13
to gae...@googlegroups.com, vlad...@orany.cz
Hi Vladimir

I've rebuilt my project...

And... 

It now runs on the app engine servers :---)

I have a lot of code to test now, but it's great to see it all running
on our test server instance

fingers crossed, and I'll keep you posted as I further test Gaelyk 2

regards 
Alex

Vladimír Oraný

unread,
May 23, 2013, 1:57:19 AM5/23/13
to gae...@googlegroups.com
Cool, let us know your progress! The updated template project should be available later today.

Guillaume Laforge

unread,
May 23, 2013, 7:51:16 AM5/23/13
to gae...@googlegroups.com
The updated template project is now up:

We've removed the old template.
And we'll update the link on the website in a short moment.

Guillaume


On Thu, May 23, 2013 at 7:57 AM, Vladimír Oraný <vlad...@orany.cz> wrote:
Cool, let us know your progress! The updated template project should be available later today.

--
--
You've received this message because you've subscribed to the Gaelyk Google Group.
To send an email to the group, please write to: gae...@googlegroups.com
To unsuscribe from this group: gaelyk+un...@googlegroups.com
To show more options: http://groups.google.fr/group/gaelyk?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Gaelyk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaelyk+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Guillaume Laforge
Groovy Project Manager
SpringSource, a division of VMware

Vladimír Oraný

unread,
May 23, 2013, 8:09:29 AM5/23/13
to gae...@googlegroups.com
The website is updated too. Please take a note that if you're updating your app to 2.0 you also need to update your build script as follows:

buildscript {
    dependencies {
        classpath 'org.gradle.api.plugins:gradle-gaelyk-plugin:0.4.1'
        classpath 'org.gradle.api.plugins:gradle-gae-plugin:0.8', {
            exclude module: "gradle-fatjar-plugin"
        }
        classpath 'eu.appsatori:gradle-fatjar-plugin:0.2-rc1'
        classpath 'org.gradle.api.plugins:gradle-gae-geb-plugin:0.3'
    }
}

fatjar plugin of the version at least 0.2-rc1 is needed to handle the Groovy 2.0 extension modules descriptors handled properly.


2013/5/23 Guillaume Laforge <glaf...@gmail.com>

Marcin Erdmann

unread,
May 23, 2013, 5:23:10 PM5/23/13
to gae...@googlegroups.com
We should probably release new versions of gradle-gae and gradle-gaelyk
plugins so all that ovewriting of fatjar plugin is not necessary. This
is all too complex for the users and in the ideal world they want to
only specify one dependency in their buildscript block - the one for
gradle-gaelyk-plugin.

Marcin

On 23/05/13 13:09, Vladim�r Oran� wrote:
> The website is updated too. Please take a note that if you're updating
> your app to 2.0 you also need to update your build script as follows:
>
> buildscript {
> dependencies {
> classpath 'org.gradle.api.plugins:gradle-gaelyk-plugin:0.4.1'
> classpath 'org.gradle.api.plugins:gradle-gae-plugin:0.8', {
> exclude module: "gradle-fatjar-plugin"
> }
> classpath 'eu.appsatori:gradle-fatjar-plugin:0.2-rc1'
> classpath 'org.gradle.api.plugins:gradle-gae-geb-plugin:0.3'
> }
> }
>
> fatjar plugin of the version at least 0.2-rc1 is needed to handle the
> Groovy 2.0 extension modules descriptors handled properly.
>
>
> 2013/5/23 Guillaume Laforge <glaf...@gmail.com <mailto:glaf...@gmail.com>>
>
> The updated template project is now up:
> http://dl.bintray.com/glaforge/gaelyk/gaelyk-template-project-2.0.1.zip?direct
>
> We've removed the old template.
> And we'll update the link on the website in a short moment.
>
> Guillaume
>
>
> On Thu, May 23, 2013 at 7:57 AM, Vladim�r Oran� <vlad...@orany.cz
> <mailto:vlad...@orany.cz>> wrote:
>
> Cool, let us know your progress! The updated template project
> should be available later today.
>
> --
> --
> You've received this message because you've subscribed to the
> Gaelyk Google Group.
> To send an email to the group, please write to:
> gae...@googlegroups.com <mailto:gae...@googlegroups.com>
> To unsuscribe from this group:
> gaelyk+un...@googlegroups.com
> <mailto:gaelyk%2Bunsu...@googlegroups.com>
> To show more options: http://groups.google.fr/group/gaelyk?hl=en
>
> ---
> You received this message because you are subscribed to the
> Google Groups "Gaelyk" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to gaelyk+un...@googlegroups.com
> <mailto:gaelyk%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>
> --
> Guillaume Laforge
> Groovy Project Manager
> SpringSource, a division of VMware
>
> Blog: http://glaforge.appspot.com/
> Social: @glaforge <http://twitter.com/glaforge> / Google+
> <https://plus.google.com/u/0/114130972232398734985/posts>
>
> --
> --
> You've received this message because you've subscribed to the Gaelyk
> Google Group.
> To send an email to the group, please write to:
> gae...@googlegroups.com <mailto:gae...@googlegroups.com>
> To unsuscribe from this group: gaelyk+un...@googlegroups.com
> <mailto:gaelyk%2Bunsu...@googlegroups.com>
> To show more options: http://groups.google.fr/group/gaelyk?hl=en
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Gaelyk" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to gaelyk+un...@googlegroups.com
> <mailto:gaelyk%2Bunsu...@googlegroups.com>.
Reply all
Reply to author
Forward
0 new messages