У меня есть страница Grails 2.4.5 GSP, которая загружает два iFrame:
<iframe scrolling="no"
src="${createLink(controller:'admin', action:'page1', id: serviceCard.id)}"></iframe>
<iframe scrolling="no"
src="${createLink(controller:'admin', action:'page2', id: serviceCard.id)}"></iframe>
После каждой второй перезагрузки или у меня возникает следующая проблема. Обратите внимание, что это не происходит все время.
В моем GSP я вижу Ошибка 500. Консоль показывает следующую ошибку:
2015-08-01 21:41:11,530 [http-nio-8080-exec-3] ERROR errors.GrailsExceptionResolver - ConcurrentModificationException occurred when processing request: [GET] /test/adminServiceCard/previewCard/4b6dc4730fd3acd80a
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <asset:stylesheet>: null
Line | Method
->> 527 | doFilter in /grails-app/views/adminServiceCard/previewCard.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Caused by GrailsTagException: Error executing tag <asset:stylesheet>: null
->> 6 | doCall in /grails-app/views/adminServiceCard/previewCard.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Caused by ConcurrentModificationException: null
->> 1456 | sort in java.util.ArrayList
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 175 | sort in java.util.Collections
| 145 | fileNameWithoutExtensionFromArtefact in asset.pipeline.AssetHelper
| 99 | loadRequiresForTree in asset.pipeline.DirectiveProcessor
| 76 | getFlattenedRequireList in ''
| 83 | getDependencyList in asset.pipeline.AssetPipeline
| 79 | doCall . . . . . in asset.pipeline.grails.AssetsTagLib$_closure2
| 6 | doCall in Users_mg_Documents_Grails_GGTS3_6_3_test_grails_app_views_adminServiceCard_previewCard_gsp$_run_closure1
| 10 | run . . . . . . in Users_mg_Documents_Grails_GGTS3_6_3_test_grails_app_views_adminServiceCard_previewCard_gsp
| 198 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter . . . . in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 62 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 1142 | runWorker . . . in java.util.concurrent.ThreadPoolExecutor
| 617 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run . . . . . . in java.lang.Thread
Изменить: Вот содержание adminServiceCardpreview_gsp.groovy.gsp
:
import org.codehaus.groovy.grails.plugins.metadata.GrailsPlugin
import org.codehaus.groovy.grails.web.pages.GroovyPage
import org.codehaus.groovy.grails.web.taglib.*
import org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException
import org.springframework.web.util.*
import grails.util.GrailsUtil
class gsp_majestella_adminServiceCardpreview_gsp extends GroovyPage {
public String getGroovyPageFileName() { "/WEB-INF/grails-app/views/adminServiceCard/preview.gsp" }
public Object run() {
Writer out = getOut()
Writer expressionOut = getExpressionOut()
registerSitemeshPreprocessMode()
printHtmlPart(0)
createTagBody(1, {->
printHtmlPart(1)
invokeTag('javascript','g',5,['library':("jquery"),'plugin':("jquery")],-1)
printHtmlPart(1)
invokeTag('stylesheet','asset',7,['src':("perfect-scrollbar/perfect-scrollbar.min.css")],-1)
printHtmlPart(2)
invokeTag('javascript','asset',8,['src':("perfect-scrollbar/perfect-scrollbar.jquery.min.js")],-1)
printHtmlPart(2)
invokeTag('javascript','asset',9,['src':("jquery.cycle.all.js")],-1)
printHtmlPart(1)
invokeTag('stylesheet','asset',11,['src':("preview.css")],-1)
printHtmlPart(3)
})
invokeTag('captureHead','sitemesh',13,[:],1)
printHtmlPart(4)
createTagBody(1, {->
printHtmlPart(5)
if(true && (showCard == true)) {
printHtmlPart(6)
if(true && (serviceCard.imageItems)) {
printHtmlPart(7)
expressionOut.print(createLink(controller:'image', action:'getImage', id:serviceCard.imageItems[0].id, absolute:true))
printHtmlPart(8)
}
printHtmlPart(9)
expressionOut.print(serviceCard?.title)
printHtmlPart(10)
expressionOut.print(serviceCard?.company?.name)
printHtmlPart(11)
}
printHtmlPart(12)
if(true && (showDetail == true)) {
printHtmlPart(13)
loop:{
int i = 0
for( imageItem in (serviceCard.imageItems) ) {
printHtmlPart(14)
expressionOut.print(createLink(controller:'image', action:'getImage', id:imageItem.id, absolute:true))
printHtmlPart(15)
i++
}
}
printHtmlPart(16)
expressionOut.print(raw(serviceCard.description))
printHtmlPart(17)
}
printHtmlPart(18)
})
invokeTag('captureBody','sitemesh',116,[:],1)
printHtmlPart(19)
}
public static final Map JSP_TAGS = new HashMap()
protected void init() {
this.jspTags = JSP_TAGS
}
public static final String CONTENT_TYPE = 'text/html;charset=UTF-8'
public static final long LAST_MODIFIED = 1438521220000L
public static final String EXPRESSION_CODEC = 'html'
public static final String STATIC_CODEC = 'none'
public static final String OUT_CODEC = 'none'
public static final String TAGLIB_CODEC = 'none'
}
Как я могу решить эту проблему?