Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0.3
-
Fix Version/s: 1.0.4
-
Component/s: None
-
Labels:None
-
Environment:jdk6u10
Description
run the application created and browse the main page.
Fatal Error occurred ![]()
[Fatal Error] :-1:-1: Premature end of file.
see the attached app.
Thanks,
Daniel.Sun
D:\_DEV\grails_apps\Grails103>grails run-app Welcome to Grails 1.0.3 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: D:\D\MY_DEV\grails-1.0.3 Base Directory: D:\_DEV\grails_apps\Grails103 Note: No plugin scripts found Running script D:\D\MY_DEV\grails-1.0.3\scripts\RunApp.groovy Environment set to development [groovyc] Compiling 1 source file to C:\Documents and Settings\Daniel\.grails\1.0.3\projects\Grail s103\classes [copy] Copying 1 file to C:\Documents and Settings\Daniel\.grails\1.0.3\projects\Grails103 Running Grails application.. 2008-06-10 21:49:55.631::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2008-06-10 21:49:55.787::INFO: jetty-6.1.4 2008-06-10 21:49:56.06::INFO: No Transaction manager found - if your webapp requires one, please co nfigure one. 2008-06-10 21:49:56.428:/Grails103:INFO: Set web app root system property: 'Grails103-development-0 .1' = [D:\_DEV\grails_apps\Grails103\web-app\] 2008-06-10 21:49:56.428:/Grails103:INFO: Initializing log4j from [file:C:\Documents and Settings\Da niel/.grails/1.0.3/projects/Grails103/resources/log4j.properties] 2008-06-10 21:49:56.459:/Grails103:INFO: Initializing Spring root WebApplicationContext [0] spring.GrailsWebApplicationContext Refreshing org.codehaus.groovy.grails.commons.spring.GrailsWe bApplicationContext@1364ee5: display name [org.codehaus.groovy.grails.commons.spring.GrailsWebApplic ationContext@1364ee5]; startup date [Tue Jun 10 21:49:59 CST 2008]; parent: org.springframework.web. context.support.XmlWebApplicationContext@177ab84 [0] spring.GrailsWebApplicationContext Bean factory for application context [org.codehaus.groovy.gra ils.commons.spring.GrailsWebApplicationContext@1364ee5]: org.springframework.beans.factory.support.D efaultListableBeanFactory@b0c5a 2008-06-10 21:50:03.050:/Grails103:INFO: Initializing Spring FrameworkServlet 'grails' 2008-06-10 21:50:03.126::INFO: Started SelectChannelConnector@0.0.0.0:8080 Server running. Browse to http://localhost:8080/Grails103 2008-06-10 21:50:10.296:/Grails103:INFO: GSP servlet initialized [Fatal Error] :-1:-1: Premature end of file.
-
Hide
- Grails103-bug-report-10062008.zip
- 10/Jun/08 8:53 AM
- 17 kB
- Daniel.Sun
-
- grails-app/conf/BootStrap.groovy 0.1 kB
- grails-app/conf/Config.groovy 3 kB
- grails-app/conf/DataSource.groovy 0.6 kB
- grails-app/conf/UrlMappings.groovy 0.2 kB
- grails-app/conf/spring/resources.groovy 0.0 kB
- grails-app/.../UserController.groovy 2 kB
- grails-app/domain/User.groovy 0.0 kB
- grails-app/i18n/messages.properties 2 kB
- grails-app/i18n/messages_de.properties 3 kB
- grails-app/i18n/messages_es.properties 3 kB
- grails-app/i18n/messages_fr.properties 2 kB
- grails-app/i18n/messages_it.properties 2 kB
- grails-app/i18n/messages_ja.properties 2 kB
- grails-app/i18n/messages_nl.properties 3 kB
- grails-app/.../messages_pt_BR.properties 3 kB
- grails-app/i18n/messages_ru.properties 4 kB
- grails-app/i18n/messages_th.properties 5 kB
- grails-app/.../messages_zh_CN.properties 2 kB
- grails-app/views/error.gsp 1 kB
- grails-app/views/layouts/main.gsp 0.7 kB
- grails-app/views/user/create.gsp 2 kB
- grails-app/views/user/edit.gsp 2 kB
- grails-app/views/user/list.gsp 1 kB
- grails-app/views/user/show.gsp 2 kB
- test/integration/UserTests.groovy 0.1 kB
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
You're right, Graeme.
I tested the toy app with other browsers, no such an error occurred ![]()
Cheers,
Daniel.Sun
Mase - a workaround is to remove "xml" from the list of mime types:
grails.mime.types = [ html: ['text/html','application/xhtml+xml'],
xml: ['text/xml', 'application/xml'], <--- REMOVE THIS LINE
...
One more issue is that when you comment out the xml line workaround - you then break IE6 so it no longer works.
Please note that the withFormat tag will always render an xml file, rather than the HTML file, even when the XML line is removed. We have to set the format=html or add the .html extension to see our GSP pages
Firefox sends a header as
text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
My hunch is that the parsing of this request header is being processed as
text/html - 0
application/xhtml+xml - 0
application/xml - 0.9
which automatically gives xml precedence over any other defined types.
not just Firefox 3
I get this with Firefox/2.0.0.14 (Linux)
Not on every page, but when displaying XML.
I am using
withFormat { xml { render(contentType:"text/xml")
} }
Just a few implementation notes. We were defaulting to a q value of 0, which is incorrect according to the spec. So we now default to 1.0 which gives the correct precedence order in Firefox 3, but incorrect in Firefox 2. However, more specific XML types like application/xhtml+xml now take precendence over less specific ones if they have the same q value so this fixes the issue in Firefox 2.
If others have problems in different browsers please open separate issues.
Yes its related to usage of firefox 3, we will fix it soon, the error doesn't occur in other browsers