JBoss 4.2.3 seems to load the war file but gives a 404 page

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

JBoss 4.2.3 seems to load the war file but gives a 404 page

shaiw
Hi,

I deployed my Grails 2.1.1 application on JBoss 4.2.3.
During startup everything seems to get loaded except for the following warning:

2012-12-10 17:39:06,872 WARN  [org.codehaus.groovy.grails.web.servlet.DefaultGrailsApplicationAttributes] ApplicationContext not found in org.codehaus.groovy.grails.APPLICATION_CONTEXT attribute of servlet context.

There are no other errors.
However, when I'm trying to access the application I get 404 page.
The problem doesn't occur when running the application from GGTS or grails run-app.

Does anyone have any idea what could be the problem?

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

Re: JBoss 4.2.3 seems to load the war file but gives a 404 page

shaiw
I found out that the problem was with the redirect method.

Quote from 'Upgrading from previous versions of Grails - Reference Documentation'
http://grails.org/doc/2.1.1/guide/upgradingFromPreviousVersionsOfGrails.html

"Another side-effect of the changes to the redirect method is that it now always uses the grails.serverURL configuration option if it's set. Previous versions of Grails included default values for all the environments, but when upgrading to Grails 2.0 those values more often than not break redirection. So, we recommend you remove the development and test settings for grails.serverURL or replace them with something appropriate for your application."

I commented the grails.serverURL line in Config.groovy:
environments {
    production {
        //grails.serverURL = "http://www.changeme.com"
        hibernate.show_sql="false"
        hibernate.format_sql="false"
    }
    ...
}

and that solved the problem.

Cheers,
Shai