我试图将5.3.8版本中的工作项目升级到5.4.1但由于某些原因,2个页面在setuprender时为一个空白的命名样式表抛出异常并且我搜索了所有的代码库和找不到任何这样糟糕的声明。
在SetupRender [workflow / content / Input:slider]中渲染队列错误:无法找到资产' context:styles /""' (该文件不存在)。
不确定是什么原因,从@import删除样式表后,它不会抛出任何错误。
引起:java.lang.RuntimeException:无法找到资产' context:styles /""' (该文件不存在)。 在org.apache.tapestry5.internal.services.AssetSourceImpl.getLocalizedAssetFromResource(AssetSourceImpl.java:390)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.AssetSourceImpl.getAssetInLocale(AssetSourceImpl.java:305)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.AssetSourceImpl.getAsset(AssetSourceImpl.java:131)〜[tapestry-core-5.4.1.jar:?] 在$ AssetSource_cf1a8b3ad15d.getAsset(未知来源)〜[?:?] 在org.apache.tapestry5.internal.services.assets.CSSURLRewriter.replaceURLs(CSSURLRewriter.java:177)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.CSSURLRewriter.access $ 100(CSSURLRewriter.java:46)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.CSSURLRewriter $ 1.perform(CSSURLRewriter.java:109)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.CSSURLRewriter $ 1.perform(CSSURLRewriter.java:104)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.ioc.internal.OperationTrackerImpl.perform(OperationTrackerImpl.java:110)〜[tapestry-ioc-5.4.1.jar:?] 在org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.perform(PerThreadOperationTracker.java:84)〜[tapestry-ioc-5.4.1.jar:?] 在org.apache.tapestry5.ioc.internal.RegistryImpl.perform(RegistryImpl.java:1266)〜[tapestry-ioc-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.CSSURLRewriter.filter(CSSURLRewriter.java:102)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.CSSURLRewriter.getStreamableResource(CSSURLRewriter.java:94)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.SRSMinimizingInterceptor.getStreamableResource(SRSMinimizingInterceptor.java:38)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.UTF8ForTextAssets.getStreamableResource(UTF8ForTextAssets.java:40)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor.getStreamableResource(SRSCachingInterceptor.java:55)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.SRSCompressingInterceptor.getStreamableResource(SRSCompressingInterceptor.java:38)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.JavaScriptStackMinimizeDisabler.getStreamableResource(JavaScriptStackMinimizeDisabler.java:61)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor.getStreamableResource(SRSCachingInterceptor.java:48)〜[tapestry-core-5.4.1.jar:?] 在$ StreamableResourceSource_cf1a8b3ad183.getStreamableResource(未知来源)〜[?:?] 在org.apache.tapestry5.internal.services.AbstractAssetFactory $ 1.toClientURL(AbstractAssetFactory.java:87)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.services.javascript.StylesheetLink.getURL(StylesheetLink.java:76)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.importStylesheet(JavaScriptSupportImpl.java:408)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.services.ajax.JavaScriptSupportImpl.importStylesheet(JavaScriptSupportImpl.java:399)〜[tapestry-core-5.4.1.jar:?] 在$ JavaScriptSupport_cf1a8b3ad316.importStylesheet(未知来源)〜[?:?] 在$ JavaScriptSupport_cf1a8b3ad1cc.importStylesheet(未知来源)〜[?:?] 在org.apache.tapestry5.internal.transform.ImportWorker $ 2.work(ImportWorker.java:60)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.transform.ImportWorker $ 2.work(ImportWorker.java:57)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.func.ArrayFlow.each(ArrayFlow.java:67)〜[tapestry-func-5.4.1.jar:?] 在org.apache.tapestry5.func.ArrayFlow.each(ArrayFlow.java:30)〜[tapestry-func-5.4.1.jar:?] 在org.apache.tapestry5.internal.transform.ImportWorker $ 8.advise(ImportWorker.java:275)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)〜[plastic-5.4.1.jar:?] 在org.apache.tapestry5.internal.transform.ImportWorker $ 8.advise(ImportWorker.java:271)〜[tapestry-core-5.4.1.jar:?] 在org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:92)〜[plastic-5.4.1.jar:?] at mycompany.myproject.web.components.Slider.setupRender(Slider.java)〜[Slider.class:?] 在org.apache.tapestry5.internal.structure.ComponentPageElementImpl $ SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)〜[tapestry-core-5.4.1.jar:?] at org.apache.tapestry5.internal.structure.ComponentPageElementImpl $ AbstractPhase.invoke(ComponentPageElementImpl.java:133)〜[tapestry-core-5.4.1.jar:?] ... 92更多
答案 0 :(得分:0)
Tapestry 5.4.1尝试修复CSS中的URL。在你的一个CSS中的某个地方有一个指向例如图像被破坏或Tapestry无法正确识别。
在堆栈跟踪之前,Tapestry还应记录其执行的缩写操作堆栈。此堆栈应包含包含Rewriting relative URLs in
的行和当前处理的CSS的名称 - 检查其内容以及包含url(
文本的任何行。可能某个地方你有url("")
或url("styles/"")
等无效引用,你需要修复或删除它们。
如果您仍然卡住了,我建议您按照以下步骤查找错误:
org.apache.tapestry5.internal.services.AssetSourceImpl.getLocalizedAssetFromResource
设置断点(第390行); org.apache.tapestry5.internal.services.assets.CSSURLRewriter.replaceURLs
处的局部变量; input
,matcher
,completeURLPatter
,output
- 它们应该提供关于CSS的哪个部分触发异常的线索。