what do you mean exactly by "trying to define a class in classloader" ? I didn't do anything special in creating these instances and just follow the normal route. The one thing that may have some, I dont'know : "dependency cycle thing" going on is:
SuperPage referencing component quickNavigation and quickNavigation referencing Superpage by using componentResources to travere the component-tree upwards. No sign of double recreating a base-class twice (in one pass) please keep the options coming, I will investigate further, Geert-Jan joshcanfield wrote: > > That error can be caused by trying to define a class in classloader which > already contains a class with the same name. I believe that Tapestry does > some magic with the component base classes when it is extending them... > maybe there is something causing Tapestry to try and recreate the base > class > twice? > > On Dec 21, 2007 10:37 AM, Britske <[EMAIL PROTECTED]> wrote: > >> >> As an addition: >> >> also pointing out what type of errors are likely to cause these errors >> would >> help. >> I know that mixing injection with components can give loader constraints, >> which is why i created an interface for SuperPage. Moreover, I can >> mimagine >> that cyclic references would cause errors as well. Are there any others >> that >> I should track in my code? >> >> Thanks again, >> Geert-Jan >> >> >> Britske wrote: >> > >> > I'm going slightly insane on this one.. >> > that's because everything worked fine, and after some slight >> modifications >> > (none that could cause such errors I believe) I can't backtrack >> anymore >> > where things went wrong. >> > >> > The error I'm getting is this: >> > >> > Could not convert 'page.quickNavigation' into a component parameter >> > binding: java.lang.LinkageError: Class >> > com/wrappt/aroer/base/AbstractNavigationContainer violates loader >> > constraints. >> > for full stack-trace see entirely below. >> > >> > location >> > classpath:com/wrappt/aroer/components/BaseLayout.tml, line 122, >> column >> > 77 >> > 117 <div class="h plain"> >> > 118 <h2>Verfijn de resultaten</h2> >> > 119 </div> >> > 120 <div class="c"> >> > 121 <!-- <t:quickForm t:id="quickForm"/>--> >> > 122 <t:delegate t:id="quickFormDelegate" t:to=" >> page.quickNavigation"/> >> > <-- here it happens >> > 123 </div> >> > 124 <div class="f"> </div> >> > 125 </div> >> > 126 </div> >> > 127 </div> >> > >> > the setup is not that simple, but here it goes anyway: >> > >> > - baselayout is a basic layout that wraps all pages as implemented in >> an >> > abstract class called superPage. >> > - all pages extend SuperPage. >> > - SuperPage implements ISuperPage (for mixing services with components) >> > - all pages have a quicknavigation component , although their >> > implementation can be different. >> > - each quickNavigation-component inherits from >> AbstractNavigationContainer >> > (which is where the loader constraint happens) >> > >> > the relevant parts: >> > >> > BaseLayout >> > ---------------------- >> > @Parameter(required = true) >> > private ISuperPage page; >> > public ISuperPage getPage() >> > { >> > return (ISuperPage)page; >> > } >> > >> > >> > SuperPage (implements ISuperPage) >> > -------------- >> > @Component(parameters={"page=this"}) >> > private BaseLayout bl; >> > >> > public abstract AbstractNavigationContainer getQuickNavigation(); >> > >> > Aanbiedingen extends SuperPage >> > ---------------------------------- >> > @Component private QuickFormAllResults quickNavigation; >> > public QuickFormAllResults getQuickNavigation() { >> > return this.quickNavigation; >> > } >> > >> > Aanbiedingen.tml >> > ---------------------- >> > <t:baselayout t:id="bl" >> > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> >> > <t:block> >> > <t:quickformallresults t:id="quickNavigation"/> >> > </t:block> >> > ... >> > </t:baselayout> >> > >> > and finally: >> > QuickFormAllResults extends AbstractNavigationContainer >> > --------------------- >> > // nothing intersteing here >> > >> > >> > AbstractNavigationContainer >> > ------------------------------- >> > public SuperPage getPage() >> > { >> > ..... //uses componentresources to recursively traverse the tree >> upwards >> > until it finds a componet >> > of type SuperPage and returns that.. >> > } >> > >> > >> > I'm really out of options, as I can't seem to comment enough lines to >> make >> > it work: when i comment quicknavigation in baselayout.tml the error >> > simply shifts to another component that implements >> > AbstractNavigationContainer >> > >> > Thanks a lot for any help! >> > Geert-Jan >> > >> > p.s: i was on 5.0.7 SNAPSHOT and now back on 5.0.6 >> > >> > stacktrace: >> > Caused by: java.lang.LinkageError: Class >> > com/wrappt/aroer/base/AbstractNavigationContainer violates loader >> > constraints >> > at java.lang.ClassLoader.defineClass1(Native Method) >> > at java.lang.ClassLoader.defineClass(ClassLoader.java:620) >> > at >> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) >> > at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) >> > at java.net.URLClassLoader.access$100(URLClassLoader.java:56) >> > at java.net.URLClassLoader$1.run(URLClassLoader.java:195) >> > at java.security.AccessController.doPrivileged(Native Method) >> > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) >> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) >> > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) >> > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) >> > at java.lang.Class.getDeclaredMethods0(Native Method) >> > at java.lang.Class.privateGetDeclaredMethods(Class.java:2395) >> > at java.lang.Class.getDeclaredMethods(Class.java:1763) >> > at java.beans.Introspector$1.run(Introspector.java:1265) >> > at java.security.AccessController.doPrivileged(Native Method) >> > at >> > >> java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1263) >> > at java.beans.Introspector.getTargetMethodInfo(Introspector.java >> :1129) >> > at java.beans.Introspector.getBeanInfo(Introspector.java:387) >> > at java.beans.Introspector.getBeanInfo(Introspector.java:159) >> > at >> > >> org.apache.tapestry.ioc.internal.services.PropertyAccessImpl.buildAdapter( >> PropertyAccessImpl.java:85) >> > ... 72 more >> > >> >> -- >> View this message in context: >> http://www.nabble.com/T5%3A-Linkage-error-....-violates-loader-constraints-tp14460169p14460173.html >> Sent from the Tapestry - User mailing list archive at >> Nabble.com<http://nabble.com/> >> . >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > -- > TheDailyTube.com. Sign up and get the best new videos on the internet > delivered fresh to your inbox. > > -- View this message in context: http://www.nabble.com/T5%3A-Linkage-error-....-violates-loader-constraints-tp14460169p14463292.html Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]