Weird issue with "health-check" controller when using run-war

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Weird issue with "health-check" controller when using run-war

townsfolk
Hello, I'm experiencing the weirdest error I've ever seen while developing with Grails.

I am using the latest version of Grails, 2.3.4.

I have a HealthCheckController:
[code]
class HealthCheckController {

    static defaultAction = "index"

    def grailsApplication

    def index() {
        render(text:"<xml>some xml</xml>",contentType:"text/xml",encoding:"UTF-8")
    }
}

[/code]

When I run the app using run-app, or if I package the app up and deploy it to a separate tomcat instance, it works fine.

However, when I run the app using run-war, I get this error:
[quote]

Error 500: Internal Server Error

URI
/health
Class
java.lang.IllegalArgumentException
Message
Method name must not be null

Trace

    Line | Method
->>   41 | retrieveAction in grails.plugin.cache.web.ProxyAwareMixedGrailsControllerHelper
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    200 | doFilter       in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter . . . in grails.plugin.cache.web.filter.AbstractFilter
|   1145 | runWorker      in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run            in java.lang.Thread
[/quote]

I've tried running the app in dev mode "dev run-war", but I get the same error.

Any Grails based controllers don't work, they all return the same error. I'm using Spring-Security (not the plugin), along with Spring Security OAuth2. The OAuth controllers work - I'm able to retrieve the access token, etc.

I'm at a loss because I've never seen this error before, and doing a search on it didn't result in anything that was helpful.

In summary, if I run using "run-app", it works. If I package the app and deploy it to tomcat, it works. It doesn't work when I use "run-war", even in dev mode.

Any help would be greatly appreciated.

Thanks,
Eric
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with "health-check" controller when using run-war

Graeme Rocher-2
Seen this error reported before, you able to attach an example to a JIRA issue?


On Wed, Jan 15, 2014 at 10:22 PM, Eric Berry <[hidden email]> wrote:
Hello, I'm experiencing the weirdest error I've ever seen while developing with Grails.

I am using the latest version of Grails, 2.3.4.

I have a HealthCheckController:
[code]
class HealthCheckController {

    static defaultAction = "index"

    def grailsApplication

    def index() {
        render(text:"<xml>some xml</xml>",contentType:"text/xml",encoding:"UTF-8")
    }
}

[/code]

When I run the app using run-app, or if I package the app up and deploy it to a separate tomcat instance, it works fine.

However, when I run the app using run-war, I get this error:
[quote]

Error 500: Internal Server Error

URI
/health
Class
java.lang.IllegalArgumentException
Message
Method name must not be null

Trace


    Line | Method
->>   41 | retrieveAction in grails.plugin.cache.web.ProxyAwareMixedGrailsControllerHelper
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    200 | doFilter       in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter . . . in grails.plugin.cache.web.filter.AbstractFilter
|   1145 | runWorker      in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run            in java.lang.Thread
[/quote]

I've tried running the app in dev mode "dev run-war", but I get the same error.

Any Grails based controllers don't work, they all return the same error. I'm using Spring-Security (not the plugin), along with Spring Security OAuth2. The OAuth controllers work - I'm able to retrieve the access token, etc.

I'm at a loss because I've never seen this error before, and doing a search on it didn't result in anything that was helpful.

In summary, if I run using "run-app", it works. If I package the app and deploy it to tomcat, it works. It doesn't work when I use "run-war", even in dev mode.

Any help would be greatly appreciated.

Thanks,
Eric



--
Graeme Rocher
Grails Project Lead
SpringSource
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with "health-check" controller when using run-war

Lari Hotari -
In reply to this post by townsfolk

Here's one with the same error message:
http://jira.grails.org/browse/GRAILS-10983

btw. I've committed this change related to grails.plugin.cache.web.ProxyAwareMixedGrailsControllerHelper :
https://github.com/grails-plugins/grails-cache/commit/76cd26a2
this hasn't been released yet. Could you test it with a custom build of cache plugin? Do you get a different error message?

What's the root cause exception in target/stacktrace.log file? (please paste it to pastebin or gist)

Lari
 
15.01.2014 23:22, Eric Berry wrote:
Hello, I'm experiencing the weirdest error I've ever seen while developing with Grails.

I am using the latest version of Grails, 2.3.4.

I have a HealthCheckController:
[code]
class HealthCheckController {

    static defaultAction = "index"

    def grailsApplication

    def index() {
        render(text:"<xml>some xml</xml>",contentType:"text/xml",encoding:"UTF-8")
    }
}

[/code]

When I run the app using run-app, or if I package the app up and deploy it to a separate tomcat instance, it works fine.

However, when I run the app using run-war, I get this error:
[quote]

Error 500: Internal Server Error

URI
/health
Class
java.lang.IllegalArgumentException
Message
Method name must not be null

Trace

    Line | Method
->>   41 | retrieveAction in grails.plugin.cache.web.ProxyAwareMixedGrailsControllerHelper
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    200 | doFilter       in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter . . . in grails.plugin.cache.web.filter.AbstractFilter
|   1145 | runWorker      in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run            in java.lang.Thread
[/quote]

I've tried running the app in dev mode "dev run-war", but I get the same error.

Any Grails based controllers don't work, they all return the same error. I'm using Spring-Security (not the plugin), along with Spring Security OAuth2. The OAuth controllers work - I'm able to retrieve the access token, etc.

I'm at a loss because I've never seen this error before, and doing a search on it didn't result in anything that was helpful.

In summary, if I run using "run-app", it works. If I package the app and deploy it to tomcat, it works. It doesn't work when I use "run-war", even in dev mode.

Any help would be greatly appreciated.

Thanks,
Eric

Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with "health-check" controller when using run-war

townsfolk
In reply to this post by Graeme Rocher-2
Hi Graeme,
   I will try and get an example put together. My fear is that it's something to do with my using Spring Security and Spring Security OAuth (not the plugins), so it'll take a little while to pull the relevant parts out into a workable project.

Eric


On Thu, Jan 16, 2014 at 4:52 AM, Graeme Rocher <[hidden email]> wrote:
Seen this error reported before, you able to attach an example to a JIRA issue?


On Wed, Jan 15, 2014 at 10:22 PM, Eric Berry <[hidden email]> wrote:
Hello, I'm experiencing the weirdest error I've ever seen while developing with Grails.

I am using the latest version of Grails, 2.3.4.

I have a HealthCheckController:
[code]
class HealthCheckController {

    static defaultAction = "index"

    def grailsApplication

    def index() {
        render(text:"<xml>some xml</xml>",contentType:"text/xml",encoding:"UTF-8")
    }
}

[/code]

When I run the app using run-app, or if I package the app up and deploy it to a separate tomcat instance, it works fine.

However, when I run the app using run-war, I get this error:
[quote]

Error 500: Internal Server Error

URI
/health
Class
java.lang.IllegalArgumentException
Message
Method name must not be null

Trace


    Line | Method
->>   41 | retrieveAction in grails.plugin.cache.web.ProxyAwareMixedGrailsControllerHelper
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    200 | doFilter       in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter . . . in grails.plugin.cache.web.filter.AbstractFilter
|   1145 | runWorker      in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run            in java.lang.Thread
[/quote]

I've tried running the app in dev mode "dev run-war", but I get the same error.

Any Grails based controllers don't work, they all return the same error. I'm using Spring-Security (not the plugin), along with Spring Security OAuth2. The OAuth controllers work - I'm able to retrieve the access token, etc.

I'm at a loss because I've never seen this error before, and doing a search on it didn't result in anything that was helpful.

In summary, if I run using "run-app", it works. If I package the app and deploy it to tomcat, it works. It doesn't work when I use "run-war", even in dev mode.

Any help would be greatly appreciated.

Thanks,
Eric



--
Graeme Rocher
Grails Project Lead
SpringSource



--
Learn from the past. Live in the present. Work towards the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with "health-check" controller when using run-war

townsfolk
In reply to this post by Lari Hotari -
Thanks Lari,
  I've never built a plugin from source, but I'll give it a try.

Eric


On Thu, Jan 16, 2014 at 8:04 AM, Lari Hotari <[hidden email]> wrote:

Here's one with the same error message:
http://jira.grails.org/browse/GRAILS-10983

btw. I've committed this change related to grails.plugin.cache.web.ProxyAwareMixedGrailsControllerHelper :
https://github.com/grails-plugins/grails-cache/commit/76cd26a2
this hasn't been released yet. Could you test it with a custom build of cache plugin? Do you get a different error message?

What's the root cause exception in target/stacktrace.log file? (please paste it to pastebin or gist)

Lari

 
15.01.2014 23:22, Eric Berry wrote:
Hello, I'm experiencing the weirdest error I've ever seen while developing with Grails.

I am using the latest version of Grails, 2.3.4.

I have a HealthCheckController:
[code]
class HealthCheckController {

    static defaultAction = "index"

    def grailsApplication

    def index() {
        render(text:"<xml>some xml</xml>",contentType:"text/xml",encoding:"UTF-8")
    }
}

[/code]

When I run the app using run-app, or if I package the app up and deploy it to a separate tomcat instance, it works fine.

However, when I run the app using run-war, I get this error:
[quote]

Error 500: Internal Server Error

URI
/health
Class
java.lang.IllegalArgumentException
Message
Method name must not be null

Trace

    Line | Method
->>   41 | retrieveAction in grails.plugin.cache.web.ProxyAwareMixedGrailsControllerHelper
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|    200 | doFilter       in grails.plugin.cache.web.filter.PageFragmentCachingFilter
|     63 | doFilter . . . in grails.plugin.cache.web.filter.AbstractFilter
|   1145 | runWorker      in java.util.concurrent.ThreadPoolExecutor
|    615 | run . . . . .  in java.util.concurrent.ThreadPoolExecutor$Worker
^    722 | run            in java.lang.Thread
[/quote]

I've tried running the app in dev mode "dev run-war", but I get the same error.

Any Grails based controllers don't work, they all return the same error. I'm using Spring-Security (not the plugin), along with Spring Security OAuth2. The OAuth controllers work - I'm able to retrieve the access token, etc.

I'm at a loss because I've never seen this error before, and doing a search on it didn't result in anything that was helpful.

In summary, if I run using "run-app", it works. If I package the app and deploy it to tomcat, it works. It doesn't work when I use "run-war", even in dev mode.

Any help would be greatly appreciated.

Thanks,
Eric




--
Learn from the past. Live in the present. Work towards the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with "health-check" controller when using run-war

burtbeckwith
Clone the source, or download the zip of the source. Change the version to one that doesn't conflict with a current or future version (e.g. add "-foo" or something) to avoid having to worry about deleting it from the cache and run 'grails compile' followed by 'grails maven-install'. Now you can add a dependency in BuildConfig.groovy with the version you used as if it had been released to the main repo.

Burt

townsfolk wrote
Thanks Lari,
  I've never built a plugin from source, but I'll give it a try.

Eric
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with "health-check" controller when using run-war

townsfolk
Thanks Burt!

I checked out the master branch, installed it, and then ran my app using 'run-war'. Unfortunately, I got the same error, so doesn't look like it helped.

Any other ideas?

One question, I changed the version in 'CacheGrailsPlugin.groovy' to:
[quote]
def version = '1.1.2-TEST-SNAPSHOT'
[/quote]

Then updated the cache plugin version in my BuildConfig, but saw this as I compiled the project:
[quote]
| Updating snapshot plugin 'cache' with version '1.1.1'
[/quote]

Not sure if I missed a step, but


On Thu, Jan 16, 2014 at 3:58 PM, burtbeckwith <[hidden email]> wrote:
Clone the source, or download the zip of the source. Change the version to
one that doesn't conflict with a current or future version (e.g. add "-foo"
or something) to avoid having to worry about deleting it from the cache and
run 'grails compile' followed by 'grails maven-install'. Now you can add a
dependency in BuildConfig.groovy with the version you used as if it had been
released to the main repo.

Burt


townsfolk wrote
> Thanks Lari,
>   I've never built a plugin from source, but I'll give it a try.
>
> Eric





--
View this message in context: http://grails.1312388.n4.nabble.com/Weird-issue-with-health-check-controller-when-using-run-war-tp4653331p4653384.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Learn from the past. Live in the present. Work towards the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor
Reply | Threaded
Open this post in threaded view
|

Re: Weird issue with "health-check" controller when using run-war

townsfolk
Sorry, key-stroke sent the email before I was finished.

Thanks Burt!

I checked out the master branch, installed it, and then ran my app using 'run-war'. Unfortunately, I got the same error, so doesn't look like it helped.

Any other ideas?

One question, I changed the version in 'CacheGrailsPlugin.groovy' to:
[quote]
def version = '1.1.2-TEST-SNAPSHOT'
[/quote]

Then updated the cache plugin version in my BuildConfig, but saw this as I compiled the project:
[quote]
| Updating snapshot plugin 'cache' with version '1.1.1'
[/quote]

Not sure if I missed a step, but that output makes me think I'm not using my local version?

mavenLocal() is in my BuildConfig, and I do see 1.1.2-TEST-SNAPSHOT in my .m2/repository directory.



On Sun, Jan 19, 2014 at 4:38 PM, Eric Berry <[hidden email]> wrote:
Thanks Burt!

I checked out the master branch, installed it, and then ran my app using 'run-war'. Unfortunately, I got the same error, so doesn't look like it helped.

Any other ideas?

One question, I changed the version in 'CacheGrailsPlugin.groovy' to:
[quote]
def version = '1.1.2-TEST-SNAPSHOT'
[/quote]

Then updated the cache plugin version in my BuildConfig, but saw this as I compiled the project:
[quote]
| Updating snapshot plugin 'cache' with version '1.1.1'
[/quote]

Not sure if I missed a step, but


On Thu, Jan 16, 2014 at 3:58 PM, burtbeckwith <[hidden email]> wrote:
Clone the source, or download the zip of the source. Change the version to
one that doesn't conflict with a current or future version (e.g. add "-foo"
or something) to avoid having to worry about deleting it from the cache and
run 'grails compile' followed by 'grails maven-install'. Now you can add a
dependency in BuildConfig.groovy with the version you used as if it had been
released to the main repo.

Burt


townsfolk wrote
> Thanks Lari,
>   I've never built a plugin from source, but I'll give it a try.
>
> Eric





--
View this message in context: http://grails.1312388.n4.nabble.com/Weird-issue-with-health-check-controller-when-using-run-war-tp4653331p4653384.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





--
Learn from the past. Live in the present. Work towards the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor



--
Learn from the past. Live in the present. Work towards the future.
Blog: http://eric-berry.blogspot.com
jEdit <http://www.jedit.org> - Programmer's Text Editor