Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 0.4.1
-
Fix Version/s: 0.5-RC1
-
Component/s: Configuration
-
Labels:None
-
Environment:Mac OS X 10.4.8
Grails 0.4.1
Java 1.5.0_06
Description
I have MySQL configured in DevelopmentDataSource, HSQL configured in ProductionDataSource. When I run "grails dev war", the output says:
$ grails dev war
Welcome to Grails 0.4.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: /opt/grails
Base Directory: /Users/sdavis/Documents/presentations/grails/src/bookstore
Environment set to development
But catalina.out in Tomcat 5.5.20 reports:
Feb 13, 2007 3:49:52 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive bookstore.war
Attempting to load [13] core plugins
Grails plug-in [i18n] with version [0.4.1] loaded successfully
Grails plug-in [quartz] with version [0.4.1] loaded successfully
Grails plug-in [core] with version [0.4.1] loaded successfully
Grails plug-in [domainClass] with version [0.4.1] loaded successfully
Grails plug-in [controllers] with version [0.4.1] loaded successfully
Attempting to load [0] user defined plugins
Grails plug-in [dataSource] with version [0.4.1] loaded successfully
Grails plug-in [codecs] with version [0.4.1] loaded successfully
Grails plug-in [hibernate] with version [0.4.1] loaded successfully
Grails plug-in [services] with version [0.4.1] loaded successfully
Grails plug-in [scaffolding] with version [0.4.1] loaded successfully
[RuntimeConfiguration] Configuring for environment: Production
Building new Hibernate SessionFactory
58 beans defined in application context [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext;hashCode=7587680]
Using MessageSource [org.springframework.context.support.ReloadableResourceBundleMessageSource: basenames=[WEB-INF/grails-app/i18n/messages]]
Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@4806d3]
[GrailsContextLoader] Grails application loaded.
Initializing filter 'reloadFilter'
Filter 'reloadFilter' configured successfully
Initializing filter 'grailsWebRequest'
Filter 'grailsWebRequest' configured successfully
Initializing servlet 'grails'
FrameworkServlet 'grails': initialization started
Using context class [org.codehaus.groovy.grails.commons.spring.GrailsWebApplicationContext] for servlet 'grails'
Using MultipartResolver [org.springframework.web.multipart.commons.CommonsMultipartResolver@3b43d0]
Using LocaleResolver [org.springframework.web.servlet.i18n.CookieLocaleResolver@e10d51]
Unable to locate ThemeResolver with name 'themeResolver': using default [org.springframework.web.servlet.theme.FixedThemeResolver@ba648]
No HandlerAdapters found in servlet 'grails': using default
Unable to locate RequestToViewNameTranslator with name 'viewNameTranslator': using default [org.springframework.web.servlet.view.DefaultRequestToViewNameTranslator@809b0d]
FrameworkServlet 'grails': initialization completed in 74 ms
Servlet 'grails' configured successfully
Data is not going to MySQL.
Activity
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | 0.5 [ 12698 ] |
| Priority | Major [ 3 ] | Blocker [ 1 ] |
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | master | d0bb272... | 2007-04-17 06:09:02 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3855 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
lib/gant-0.2.5-SNAPSHOT.jar
MODIFY scripts/Package.groovy MODIFY scripts/War.groovy MODIFY src/commons/grails/util/GrailsUtil.java MODIFY src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsApplication.java |
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | cli-improvements | d0bb272... | 2007-04-17 06:09:02 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3855 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
lib/gant-0.2.5-SNAPSHOT.jar
MODIFY scripts/Package.groovy MODIFY scripts/War.groovy MODIFY src/commons/grails/util/GrailsUtil.java MODIFY src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsApplication.java |
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | 2.0.x | d0bb272... | 2007-04-17 06:09:02 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3855 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
lib/gant-0.2.5-SNAPSHOT.jar
MODIFY scripts/Package.groovy MODIFY scripts/War.groovy MODIFY src/commons/grails/util/GrailsUtil.java MODIFY src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsApplication.java |
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | hibernate4 | d0bb272... | 2007-04-17 06:09:02 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3855 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
lib/gant-0.2.5-SNAPSHOT.jar
MODIFY scripts/Package.groovy MODIFY scripts/War.groovy MODIFY src/commons/grails/util/GrailsUtil.java MODIFY src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsApplication.java |
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | 2.1.x | d0bb272... | 2007-04-17 06:09:02 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3855 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
lib/gant-0.2.5-SNAPSHOT.jar
MODIFY scripts/Package.groovy MODIFY scripts/War.groovy MODIFY src/commons/grails/util/GrailsUtil.java MODIFY src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsApplication.java |
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | 2.2.x | d0bb272... | 2007-04-17 06:09:02 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3855 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
lib/gant-0.2.5-SNAPSHOT.jar
MODIFY scripts/Package.groovy MODIFY scripts/War.groovy MODIFY src/commons/grails/util/GrailsUtil.java MODIFY src/commons/org/codehaus/groovy/grails/commons/DefaultGrailsApplication.java |
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | master | 1748960... | 2007-04-17 06:36:24 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3856 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
src/commons/grails/util/GrailsUtil.java
|
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | cli-improvements | 1748960... | 2007-04-17 06:36:24 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3856 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
src/commons/grails/util/GrailsUtil.java
|
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | 2.0.x | 1748960... | 2007-04-17 06:36:24 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3856 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
src/commons/grails/util/GrailsUtil.java
|
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | hibernate4 | 1748960... | 2007-04-17 06:36:24 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3856 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
src/commons/grails/util/GrailsUtil.java
|
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | 2.1.x | 1748960... | 2007-04-17 06:36:24 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3856 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
src/commons/grails/util/GrailsUtil.java
|
| Repository | Branch | Revision | Date | Author/Committer | Message |
| Grails Core | 2.2.x | 1748960... | 2007-04-17 06:36:24 -0700 | graeme / graeme | fix for git-svn-id: https://svn.codehaus.org/grails/trunk@3856 1cfb16fd-6d17-0410-8ff1-b7e8e1e2867d |
| Files Changed | |||||
|
MODIFY
src/commons/grails/util/GrailsUtil.java
|
| Status | Open [ 1 ] | In Progress [ 3 ] |
| Resolution | Fixed [ 1 ] | |
| Status | In Progress [ 3 ] | Closed [ 6 ] |
| Project Import | Thu Mar 24 21:22:24 CDT 2011 [ 1301019744151 ] |
| Workflow | jira [ 32149 ] | Grails [ 45006 ] |
| Workflow | Grails [ 45006 ] | Copy of Grails [ 52461 ] |
| Workflow | Copy of Grails [ 52461 ] | Grails [ 59871 ] |
| Workflow | Grails [ 59871 ] | Grails2 [ 67449 ] |
| Workflow | Grails2 [ 67449 ] | jira [ 78047 ] |
| Workflow | jira [ 78047 ] | Grails2 [ 80153 ] |
| Workflow | Grails2 [ 80153 ] | jira [ 88715 ] |
| Workflow | jira [ 88715 ] | Grails2 [ 96874 ] |
The grails environment is not passed into WARs, it assumes WARs will only be production.
I think we need to put the environment specified when the WAR is built into the application.properties files copied into the WAR, and read it from there perhaps. Bit ugly with non-war execution which would check grails.env var.
This actually might be better tackled by fixing deployment so it doesn't include all the files for each environment, and the datasources are therefore renamed to DataSource.groovy as appropriate, similar to what happens to log files.
This should be easy now that I changed the War target to copy all files to ./staging so that we can do the file modifications in there.