tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Drobiazko (JIRA)" <j...@apache.org>
Subject [jira] Closed: (TAP5-1226) Unable to locate asset 'context:images/brandingLogos' (the file does not exist).
Date Mon, 02 Aug 2010 15:29:16 GMT

     [ https://issues.apache.org/jira/browse/TAP5-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Igor Drobiazko closed TAP5-1226.
--------------------------------

    Resolution: Invalid

The error message "Unable to locate asset 'context:images/brandingLogos' (the file does not
exist)." is telling you that the resouce does not exists. If you want to inject an Asset,
you should provide the path to the resource containing the file name. It is not possible to
inject the a folder.


> Unable to locate asset 'context:images/brandingLogos' (the file does not exist).
> --------------------------------------------------------------------------------
>
>                 Key: TAP5-1226
>                 URL: https://issues.apache.org/jira/browse/TAP5-1226
>             Project: Tapestry 5
>          Issue Type: Bug
>    Affects Versions: 5.1.0.5
>            Reporter: SMITA PRASAD
>
> I am using an Asset in the PageLayoutBasic.java 
> 	@Inject
> 	@Path("context:images/brandingLogos/")
> 	private Asset brandingLogos;
> But in the test class this asset is not loaded. 
> The images folder is in WebContent.
> I am using the PageTester for testing like this--
> tester = new PageTester("com.companyName.apps.projectName", "ProjectName", "/WebContent",projectNameTestModule.class);
> The exception is thrown as below--
> java.lang.RuntimeException: Exception assembling root component of page ExceptionReport:
Exception assembling embedded 
> component 'pagelayoutbasic' (of type com.proquest.apps.onesearch.components.PageLayoutBasic,
within ExceptionReport): Unable 
> to locate asset 'context:images/brandingLogos' (the file does not exist).
> 	at 
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:110)
> 	at org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:159)
> 	at $PageLoader_12a329095fc.loadPage($PageLoader_12a329095fc.java)
> 	at org.apache.tapestry5.internal.services.PagePoolCache.checkout(PagePoolCache.java:210)
> 	at org.apache.tapestry5.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:114)
> 	at $PagePool_12a329095f6.checkout($PagePool_12a329095f6.java)
> 	at org.apache.tapestry5.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:51)
> 	at $RequestPageCache_12a329095f5.get($RequestPageCache_12a329095f5.java)
> 	at $RequestPageCache_12a329095f3.get($RequestPageCache_12a329095f3.java)
> 	at 
> org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.j
> ava:69)
> 	at $RequestExceptionHandler_12a329095bb.handleRequestException($RequestExceptionHandler_12a329095bb.java)
> 	at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
> 	at $RequestHandler_12a329095c1.service($RequestHandler_12a329095c1.java)
> 	at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)
> 	at $RequestHandler_12a329095c1.service($RequestHandler_12a329095c1.java)
> 	at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)
> 	at $RequestHandler_12a329095c1.service($RequestHandler_12a329095c1.java)
> 	at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> 	at $RequestHandler_12a329095c1.service($RequestHandler_12a329095c1.java)
> 	at org.apache.tapestry5.internal.test.EndOfRequestCleanupFilter.service(EndOfRequestCleanupFilter.java:42)
> 	at $RequestHandler_12a329095c1.service($RequestHandler_12a329095c1.java)
> 	at org.apache.tapestry5.internal.services.URLRewriterRequestFilter.service(URLRewriterRequestFilter.java:47)
> 	at $RequestHandler_12a329095c1.service($RequestHandler_12a329095c1.java)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
> 	at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
> 	at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
> 	at $RequestHandler_12a329095c1.service($RequestHandler_12a329095c1.java)
> 	at $RequestHandler_12a329095ad.service($RequestHandler_12a329095ad.java)
> 	at org.apache.tapestry5.test.PageTester.renderPage(PageTester.java:173)
> 	at com.proquest.apps.onesearch.components.citation.IndexFieldTest.testRender(IndexFieldTest.java:64)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
> 	at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
> 	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
> 	at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
> 	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
> 	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
> 	at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
> 	at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
> 	at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
> 	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
> 	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
> 	at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
> 	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Exception assembling
embedded component 
> 'pagelayoutbasic' (of type com.proquest.apps.onesearch.components.PageLayoutBasic, within
ExceptionReport): Unable to locate 
> asset 'context:images/brandingLogos' (the file does not exist). [at 
> classpath:com/proquest/apps/onesearch/base/AbstractErrorPageBase.tml, line 1]
> 	at 
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:168)
> 	at org.apache.tapestry5.internal.pageload.PageLoaderImpl$12.execute(PageLoaderImpl.java:956)
> 	at org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.runActions(ComponentAssemblerImpl.java:202)
> 	at 
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:88)
> 	... 52 more
> Caused by: java.lang.RuntimeException: Unable to locate asset 'context:images/brandingLogos'
(the file does not exist).
> 	at org.apache.tapestry5.internal.services.AssetSourceImpl.getLocalizedAssetFromResource(AssetSourceImpl.java:128)
> 	at org.apache.tapestry5.internal.services.AssetSourceImpl.getAssetInLocale(AssetSourceImpl.java:93)
> 	at org.apache.tapestry5.internal.services.AssetSourceImpl.getAsset(AssetSourceImpl.java:83)
> 	at $AssetSource_12a3290959c.getAsset($AssetSource_12a3290959c.java)
> 	at com.proquest.apps.onesearch.components.PageLayoutBasic.<init>(PageLayoutBasic.java)
> 	at $Instantiator_12a32909621.newInstance($Instantiator_12a32909621.java)
> 	at 
> org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.<init>(InternalComponentResourcesImpl.java:132)
> 	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.<init>(ComponentPageElementImpl.java:545)
> 	at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.newChild(ComponentPageElementImpl.java:627)
> 	at 
> org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleEmbeddedComponent(ComponentAssemblerImpl.java:141)
> 	... 55 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message