Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.1.1
-
Fix Version/s: 1.2-M1
-
Component/s: Configuration
-
Labels:None
Description
Using a 1.1.1 project, if you reference application configuration using the ConfigurationHolder.config object in a WAR deployment, you will get a NullPointerException. The ConfigurationHolder.config object appears to be null in WAR deployments. This occurs both if you create a WAR and deploy it to a servlet container, or if you execute the run-war command from your project root.
Attachments
Issue Links
| This issue relates to: | ||||
| GRAILS-7580 | Reoccurance of GRAILS 4673 |
|
|
|
I've written an application that does:
def read = { def one = grailsApplication.config.test.value1 def two = ConfigurationHolder.config.test.value2 render "one = $one, two = $two" }And it works fine in both WAR and run-app. I have however committed a functional test to cover this behavior. You'll have to attach an application that reproduces the problem and re-open if you want us to take this issue further.
def read = { def one = grailsApplication.config.test.value1 def two = ConfigurationHolder.config.test.value2 render "one = $one, two = $two" }