Deploying Grails Atmosphere app in JBoss 7 - grails

Greeting,
I'm trying to make this example work in Grails 2.1 using atmosphere plugin. When running in development environment on Tomcat it does not work, probably because Tomcat does not support web-services.
So I'm deploying it on JBoss 7.1. It does not work as well. And the following exception could be found in the log file
AtmosphereFramework exception: java.lang.IllegalStateException: The servlet or filters
that are being used by this request do not support async operation
I found the article related to async servlets support in Grails. Seems that Servlet3AsyncWebXmlProcessor should add async support to web.xml. But somebody should invoke it.
I think that atmosphere plugin is responsible for allowing async communication.
Have I missed something? Could you please help to make it work on AS7?
Ideally, I would like to figure out the way of running atmosphere applications in development environment? Is it possible?

Related

Spring security not working with Grails project on JBoss Application Server

I have a big(multiple custom plugin based) Grails project, which runs perfectly fine on Tomcat server.
Now for a new customer we need to deploy it on JBoss Application server. It seems to deploy fine without any error but when I try to login on the first page which is implemented using Spring Security plugin. It does not log me in. I have tried going to a valid URL to check if its a problem of redirecting but it is not the case.
Please note it is not showing any error on the log. And since it is not properly executable in development environment so each time I need to build a WAR file to test it.
Grails version: 2.4.4
Spring security version: ':spring-security-core:2.0-RC4'
JBoss version: wildfly-9.0.2.Final
I tried some setups, and they all worked as a simple new project.
I used grails 2.4.4 and spring-security 2.0-RC4.
Here are a few things you could try:
Use latest spring-security version 2.0.0
compile "org.grails.plugins:spring-security-core:2.0.0"
Add jboss plugin and generate deployment xmls (this is needed for grails 2.5.4)
build ':jbossas:1.0'
$grails generate-boss-deploy 6
Create a brand new Wildfly install and deploy your app.
I can only think about a infrastructure problem, since I got no problem with the same setup. I running on Mac, with java 8 and Wildfly 9.0.2 final. Tested grails 2.4.4 and 2.5.4, spring security 2.0-RC4 and 2.0.0.
Best,
Eder

Remote-control plugin with Grails 2.4

Is anyone using the remote-control plugin with Grails 2.4.x? I'm working on upgrading an app from 2.2.4 to to 2.4.3. I've got it all working except for a few integration tests, and a bunch of functional tests. In our functional tests, I'm getting the following error:
groovyx.remote.RemoteControlException: Error sending command chain to 'http://localhost:8080/<appname>/grails-remote-control'
at groovyx.remote.transport.http.HttpTransport.send(HttpTransport.groovy:65)
at groovyx.remote.client.RemoteControl.sendCommandChain(RemoteControl.groovy:114)
at groovyx.remote.client.RemoteControl.exec(RemoteControl.groovy:73)
at groovyx.remote.client.RemoteControl.exec(RemoteControl.groovy:67)
at groovyx.remote.client.RemoteControl.call(RemoteControl.groovy:81)
at PatientTests.oneTimeSetUp(PatientTests.groovy:17)
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/<appname>/grails-remote-control
at groovyx.remote.transport.http.HttpTransport$_send_closure1.doCall(HttpTransport.groovy:62)
at groovyx.remote.transport.http.HttpTransport.send(HttpTransport.groovy:53)
I am using the 1.5 version of the remote-control plugin. Any ideas or insights would be much appreciated.
Thanks,
Dave
I faced this problem today with Grails 2.4.3 and remote control 1.5
I initially thought the issue was related to https://jira.grails.org/browse/GRAILS-10661
In my case, it was simply that I had a disconnected grails instance already running on port 8080 that I wasn't aware of.
Killing the errant process solved the issue for me.
Hope that helps.
Regards,
Peter

Deploying Grails app on Cloud Foundry

I developed a Grails app using spring source to deploy it on cloud foundry. It seems that it has been deployed well but the url does not work. Could some one help me!
Thanks,
Reza
To access your log files using the grails plugin, use grails cf-logs.
That will surely show you how your application is behaving.
As the others have pointed out use
grails cf-logs
to see the logging results of your app.
It may also have happend that your application didn't start up properly. So try to restart it by typing:
grails cf-stop
grails cf-start
The Cloud Foundry plugin/Grails console may get stale while starting the app ("Starting app .........") but just keep hitting the deployment URL and as soon it's running you can quit and restart Grails.

websphere url context error (JSPG0036E)

Issue on Websphere 6.1 I hope I'm missing something obvious: We have an application which gets deployed to a configured Websphere environment. We're trying to mimic this WebSphere configuration on a different platform (Linux vs Solaris), but maybe we're missing some obvious settings. The application deploys and starts without an error, but after logon on url localhost:port/app/index.jsp
(via j_spring_security_check) Websphere redirects to localhost:port/index.jsp. This gives an JSP processing Error (HTTPError 404), with code JSPG0036E.
The webapplication is wrapped in an ear, because those are the standards here. And that ear works well on our solaris WAS 6.1 environment but not on the linux WAS. Furthermore in development we've the wrapped war running on Tomcat without problem.
I think I missed the context root somewhere but It's not to be found in Websphere's console, I wouldn't be surprised if it is a Websphere (6.1.0.33) Bug, hopefully I'm wrong or are there workarounds?

Cloudfoundry Grails deployment problems - no thread-bound request found

This works locally. Set up: Grails 2.0.3. Debain Linux. I've deployed other applications successfully to Cloud Foundry.
Apparently this thing can happen as a consequence of the Spring Security Plugin not being happy with the resources plugin. Removing the resources plugin doesn't cure this.
This is the problem:
Class: java.lang.IllegalStateException
Message: No thread-bound request found: Are you referring to request attributes outside of
an actual web request, or processing a request outside of the originally receiving thread?
If you are actually operating within a web request and still receive this message, your
code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use
RequestContextListener or RequestContextFilter to expose the current request.
Adding the org.springframework.web.context.request.RequestContextListener and its loader to web.xml and importing them into the page doesn't help either.
There is much about this on the web, but in my case it only happens on Cloud Foundry.
Cloud Foundry runs on Java 1.6, like my machine. The logs say the same as the quote above, with stack traces identical to what I've found on the web.
Any ideas? I'm stuck. I've spent the best of two days on this.
Thanks.
Adding compile ":webxml:1.4.1" to the plugins section of BuildConfig.groovy should fix that. Credit to http://support.cloudfoundry.com/entries/21371626-grails-mongodb-deployment-fails

Resources