gpt4 book ai didi

java - Jawr CSSServlet 抛出 StackOverflowError

转载 作者:搜寻专家 更新时间:2023-11-01 03:08:29 25 4
gpt4 key购买 nike

我正在将使用 Jawr 的 Hybris 应用程序部署到 Tomcat 服务器。在启动时,JawrServlet 抛出 StackOverflow 错误。

这个错误很难重现,但它总是在CSSServlet 处理过程中发生。记录后不久:

[JawrRequestHandler] Initializing jawr config for request handler named CSSServlet

这是在我的 web.xml 中配置 Servlet 的方式:

     <servlet>
<servlet-name>CSSServlet</servlet-name>
<servlet-class>net.jawr.web.servlet.JawrServlet</servlet-class>

<!-- Location in classpath of the config file -->
<init-param>
<param-name>configLocation</param-name>
<param-value>/jawrsetup.properties</param-value>
<!--<param-value>/jawrTEST.properties</param-value>-->
</init-param>
<init-param>
<param-name>type</param-name>
<param-value>css</param-value>
</init-param>
<init-param>
<param-name>mapping</param-name>
<param-value>/jawr-css</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

这是我的控制台日志中发生错误的部分:

INFO   | jvm 1    | main    | 2013/01/29 11:20:16.081 | 11:20:16,036 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/pause.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.082 | 11:20:16,036 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/pause-ie.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.082 | 11:20:16,036 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/left-hover.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.087 | 11:20:16,036 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/left-hover-ie.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.087 | 11:20:16,036 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/right-hover.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.087 | 11:20:16,045 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/right-hover-ie.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.092 | 11:20:16,045 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/play-hover.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.092 | 11:20:16,045 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/play-hover-ie.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.092 | 11:20:16,045 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/pause-hover.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.093 | 11:20:16,045 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bk-ruby/pause-hover-ie.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.097 | 11:20:16,045 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url('/images/bg.png')
INFO | jvm 1 | main | 2013/01/29 11:20:16.098 | 11:20:16,046 [WrapperSimpleAppMain] DEBUG [Base64PostProcessorCssImageUrlRewriter] Skip encoding image resource : url("/images/content-bg.png")
INFO | jvm 1 | main | 2013/01/29 11:20:16.098 | 11:20:16,057 [WrapperSimpleAppMain] INFO [Base64ImageEncoderPostProcessor] Base64 Postprocessing done
INFO | jvm 1 | main | 2013/01/29 11:20:16.098 | 11:20:16,058 [WrapperSimpleAppMain] DEBUG [AbstractChainedResourceBundlePostProcessor] postprocessing bundle:/bundles/dmlights.css
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | Jan 29, 2013 11:20:16 AM org.apache.catalina.core.ApplicationContext log
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | SEVERE: StandardWrapper.Throwable
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | java.lang.StackOverflowError
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | at java.util.regex.Pattern$LazyLoop.match(Unknown Source)
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | at java.util.regex.Pattern$GroupTail.match(Unknown Source)
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | at java.util.regex.Pattern$CharProperty.match(Unknown Source)
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | at java.util.regex.Pattern$Ques.match(Unknown Source)
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | at java.util.regex.Pattern$GroupHead.match(Unknown Source)
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | at java.util.regex.Pattern$LazyLoop.match(Unknown Source)
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | at java.util.regex.Pattern$GroupTail.match(Unknown Source)
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | at java.util.regex.Pattern$CharProperty.match(Unknown Source)
INFO | jvm 1 | main | 2013/01/29 11:20:16.198 | at java.util.regex.Pattern$Ques.match(Unknown Source)

最佳答案

我在使用 Jawr 3.3.3 和 Bootstrap 3.1.0 时遇到了同样的问题。解决方案是在 bootstrap.css ie 中做一个小的“修正”。改变:

a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}

到:

a[href]:after {
content: " \0028" attr(href) "\0029";
}
abbr[title]:after {
content: " \0028" attr(title) "\0029";
}

请注意,唯一发生变化的是左括号和右括号(以及对应的 CSS 代码)。

这样语义保持不变,但 jawr 不会失败。 :)(我很确定这是一个正则表达式的东西导致了这个......)

关于java - Jawr CSSServlet 抛出 StackOverflowError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14580656/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com