tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Pfau (JIRA)" <...@tapestry.apache.org>
Subject [jira] Commented: (TAPESTRY-2257) Base classes of pages are not loaded even if located in base package
Date Fri, 14 Mar 2008 14:54:26 GMT

    [ https://issues.apache.org/jira/browse/TAPESTRY-2257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578779#action_12578779
] 

Jens Pfau commented on TAPESTRY-2257:
-------------------------------------

Ok, the problem only appears if the concrete page class constructor calls a non-default super
constructor. Important notice: the constructor of the concrete class does not have any parameters,
so only its default constructor is overridden. Maybe it is a problem of javaassist?

> Base classes of pages are not loaded even if located in base package
> --------------------------------------------------------------------
>
>                 Key: TAPESTRY-2257
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2257
>             Project: Tapestry
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.0.10
>         Environment: Linux, Sun JDK 1.6
>            Reporter: Jens Pfau
>
> Some of my pages inherit from a common abstract base class but even if I move this to
<root package>.base, I receive the following application exception:
> Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: caught an exception
while obtaining a class file for <root package>.pages.MyPage
> 	at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:241)
> 	at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findInstantiator(ComponentInstantiatorSourceImpl.java:223)
> 	at $ComponentInstantiatorSource_118ac384906.findInstantiator($ComponentInstantiatorSource_118ac384906.java)
> 	at org.apache.tapestry.internal.services.PageElementFactoryImpl.newRootComponentElement(PageElementFactoryImpl.java:257)
> 	at $PageElementFactory_118ac384934.newRootComponentElement($PageElementFactory_118ac384934.java)
> 	at org.apache.tapestry.internal.services.PageLoaderProcessor.loadRootComponent(PageLoaderProcessor.java:413)
> 	at org.apache.tapestry.internal.services.PageLoaderProcessor.loadPage(PageLoaderProcessor.java:391)
> 	at org.apache.tapestry.internal.services.PageLoaderImpl.loadPage(PageLoaderImpl.java:60)
> 	at $PageLoader_118ac384932.loadPage($PageLoader_118ac384932.java)
> 	at org.apache.tapestry.internal.services.PagePoolCache.checkout(PagePoolCache.java:188)
> 	at org.apache.tapestry.internal.services.PagePoolImpl.checkout(PagePoolImpl.java:107)
> 	at $PagePool_118ac384931.checkout($PagePool_118ac384931.java)
> 	at org.apache.tapestry.internal.services.RequestPageCacheImpl.get(RequestPageCacheImpl.java:43)
> 	at $RequestPageCache_118ac384930.get($RequestPageCache_118ac384930.java)
> 	at $RequestPageCache_118ac384903.get($RequestPageCache_118ac384903.java)
> 	at org.apache.tapestry.internal.services.LinkFactoryImpl.createPageLink(LinkFactoryImpl.java:239)
> 	at $LinkFactory_118ac384935.createPageLink($LinkFactory_118ac384935.java)
> 	at org.apache.tapestry.internal.structure.PageImpl.createPageLink(PageImpl.java:161)
> 	at org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.createPageLink(InternalComponentResourcesImpl.java:128)
> 	at org.apache.tapestry.corelib.components.PageLink.beginRender(PageLink.java:73)
> 	at org.apache.tapestry.corelib.components.PageLink.beginRender(PageLink.java)
> 	at org.apache.tapestry.internal.structure.ComponentPageElementImpl$11$1.run(ComponentPageElementImpl.java:338)
> 	at org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:874)
> 	... 62 more
> Caused by: java.lang.ClassNotFoundException: caught an exception while obtaining a class
file for <root package>.pages.MyPage
> 	at javassist.Loader.findClass(Loader.java:359)
> 	at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:73)
> 	at javassist.Loader.loadClass(Loader.java:311)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> 	at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:237)
> 	... 84 more
> Caused by: java.lang.RuntimeException: Base class <root package>.base.AbstractPage
(super class of <root package>.pages.MyPage) is not in a controlled package and is therefore
not valid. You should try moving the class to package <root package>.base.
> 	at org.apache.tapestry.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:126)
> 	at $ComponentClassTransformer_118ac384913.transformComponentClass($ComponentClassTransformer_118ac384913.java)
> 	at org.apache.tapestry.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:162)
> 	at javassist.Loader.findClass(Loader.java:340)
> 	... 88 more

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message