我被困在真正好奇的錯誤。 我有一個掛圖頁面,我試圖導入一個javascript文件。之前,我導入了extjs-version3.js文件(它工作完美),然後我想導入extjs-version4.js文件。所以,我從文件系統中刪除了version3文件,將version4文件添加到文件系統,並更改了我的tapestry頁面的java代碼以導入version4文件。但我總是得到錯誤,「version3文件不存在」!掛毯5:試圖加載JavaScript文件
在調試時,我改變了頁面的Java代碼,以便它現在不導入任何文件。
所以,現在我有一個頁面,不導入任何JavaScript文件,我仍然得到錯誤,「version3文件不存在」。
以下是確切的詳細信息。
MyPage.java其中導入了javascript文件。
@Import(
library = {
//"context:js/lib/extjs3/adapter/ext/ext-base-debug.js",
//"context:js/lib/extjs3/ext-all-debug-w-comments-v4.js",
/*"context:js/lib/ext_compat_layer/ext3-compat.js",
"context:js/lib/ext_compat_layer/ext3-core-compat.js",*/
//"context:js/page/ActivitiesTab.js",
//"context:js/lib/extjs3/ux/gridSearch/Ext.ux.grid.Search.js",
//"context:js/lib/extjs3/ux/gridSearch/Ext.ux.IconMenu.js",
//"context:js/lib/extjs3/ux/gridSearch/Ext.ux.Toast.js"
},
stylesheet = {
/*"context:js/lib/extjs3/resources/css/ext-all.css",
"context:js/lib/extjs3/resources/css/xtheme-gray.css",
"context:js/lib/extjs3/resources/css/theme-gray/core.css",*/
//"context:js/lib/extjs3/resources/css/icons.css",
//"context:js/lib/extjs3/resources/css/gridsearch.css"
}
)
錯誤的堆棧跟蹤我接受。
An unexpected application exception has occurred.
org.apache.tapestry5.ioc.internal.OperationException
Unable to locate asset 'context:js/lib/extjs3/ext-all-debug-w-comments.js' (the file does not exist).
trace
Constructing instance of page class net.semandex.salsa.tapestry.pages.ActivitiesTab
java.lang.RuntimeException
Unable to locate asset 'context:js/lib/extjs3/ext-all-debug-w-comments.js' (the file does not exist).
Hide uninteresting stack frames Stack trace
org.apache.tapestry5.internal.services.AssetSourceImpl.getLocalizedAssetFromResource(AssetSourceImpl.java:135)
org.apache.tapestry5.internal.services.AssetSourceImpl.getAssetInLocale(AssetSourceImpl.java:105)
org.apache.tapestry5.internal.services.AssetSourceImpl.getAsset(AssetSourceImpl.java:85)
org.apache.tapestry5.internal.transform.ImportWorker$5.map(ImportWorker.java:206)
org.apache.tapestry5.internal.transform.ImportWorker$5.map(ImportWorker.java:203)
org.apache.tapestry5.func.LazyMappedValue.get(LazyMappedValue.java:31)
org.apache.tapestry5.func.LazyFlow.first(LazyFlow.java:52)
org.apache.tapestry5.func.AbstractFlow$1.next(AbstractFlow.java:68)
org.apache.tapestry5.func.AbstractFlow.toMutableList(AbstractFlow.java:47)
org.apache.tapestry5.func.AbstractFlow.toMutableList(AbstractFlow.java:40)
org.apache.tapestry5.func.AbstractFlow.toList(AbstractFlow.java:205)
org.apache.tapestry5.internal.transform.ImportWorker.convertPathsToAssets(ImportWorker.java:202)
org.apache.tapestry5.internal.transform.ImportWorker.access$100(ImportWorker.java:40)
org.apache.tapestry5.internal.transform.ImportWorker$4.advise(ImportWorker.java:190)
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
net.semandex.salsa.tapestry.pages.ActivitiesTab.containingPageDidLoad(ActivitiesTab.java)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$4.run(ComponentPageElementImpl.java:120)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:977)
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.containingPageDidLoad(ComponentPageElementImpl.java:829)
org.apache.tapestry5.internal.structure.PageImpl.loaded(PageImpl.java:171)
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:190)
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:174)
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:173)
org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:81)
org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:74)
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55)
org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2326)
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321)
net.semandex.salsa.tapestry.services.AppModule$1.service(AppModule.java:164)
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:984)
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:974)
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
org.apache.tapestry5.internal.services.URLRewriterRequestFilter.service(URLRewriterRequestFilter.java:50)
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:80)
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:272)
org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:928)
org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
MyPage.tml文件非常簡單,沒有什麼可疑的,但如果需要,我可以張貼代碼。
爲什麼tapestry試圖加載一個未包含在任何頁面中的js文件?
更新:
逸岸,無論我在@Import註釋寫的文件是根據以前的代碼始終進口。所有頁面都發生這種情況。
實際上,ActivitiesTab是myPage,爲了簡單起見,我在此將其命名爲myPage。加載ActivitiesTab頁面本身時出現錯誤。 –
檢查我的更新問題,看來我在導入註釋中更改的內容沒有在Tapestry中得到更新,而且它總是試圖根據舊代碼加載文件。 –
@PratikPatel如果您還沒有嘗試重新啓動應用程序,則某些更改不會自動加載。如果這不起作用,請嘗試清理整個項目(刪除所有構建文件),以確保它不使用任何舊文件。 – Kapep