RE: Cannot get component library to load
Eclipse docs for the Add directory entries option says adds an entry for each directory to the JAR file, even if the directory does only contain subdirectories. In my case, the component rendered in java code (beginRender/afterRender) e.g. src/main/java/.../components/Render.java did not have a corresponding template src/main/resources/.../components/Render.tml and thus left the entire resources folder hierarchy without files. Omitting said option excludes the empty folder hierarchy from the jar and in turn keeps Tapestry from accepting the component. Best regards, Jacob -Original Message- From: LanceWhite [mailto:groli...@gmail.com] Sent: Thursday, May 31, 2012 5:41 PM To: users@tapestry.apache.org Subject: RE: Cannot get component library to load Yeeha! That did it for me as well - have to look now see exactly what that does with the jar. Thanks a lot folks! Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713558.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Cannot get component library to load
This is starting to sound like an issue that should be fixed in tapestry rather than changing the way the jar is generated. It sounds like tapestry will act differently when referencing a classpath jar than if unzipping the jar and referencing a classpath directory. I think tapestry should act exactly the same in these two circumstances. There is an interesting conversation here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=243163 -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713575.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Cannot get component library to load
Hi, Not sure if this will help you, but I had the same problem when exporting my jar from eclipse. Checking the Add directory entries option in the JAR export solved it for me! Best regards, Jacob - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
RE: Cannot get component library to load
Yeeha! That did it for me as well - have to look now see exactly what that does with the jar. Thanks a lot folks! Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713558.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Interesting... I had to change findResources to getResource as findResources isn't publicly visible, but it dumped this : jar:file:/C:/Development/Projects/Test-Tapestry-Module/MyPlugin.jar!/org/test/pages/TestPage.class jar:file:/C:/Development/Projects/Test-Tapestry-Module/MyPlugin.jar!/org/test/pages/TestPage.tml So something knows the pages are there. Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713488.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Also, the classLoader here is an instance of org.apache.tapestry5.internal.plastic.PlasticClassLoader which obviously contains the module pages, whereas the one in the ClassNameLocator implementation is looking at one called ContextLoader@TestApp (where TestApp is the name in the web.xml). (I'm probably doing something reealy dumb for this not to work, but I just can't figure out what it is!) Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713489.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
I had to change findResources to getResource as findResources isn't publicly visible, but it dumped this : Can you try getResources() instead of getResource() -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713491.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Yeah - that just returns an Enumeration of URLs for each call. Each Enumeration has one entry, so jar:file:/C:/Development/Projects/Test-Tapestry-Module/MyPlugin.jar!/org/test/pages/TestPage.class for the class, and jar:file:/C:/Development/Projects/Test-Tapestry-Module/MyPlugin.jar!/org/test/pages/TestPage.tml for the tmll, so no difference. Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713493.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Yeah - that just returns an Enumeration of URLs for each call. Yes, with the added bonus that duplicate locations on the classpath will be exposed I'm baffled... I have no idea why this would work for the upload library but not yours... What container are you using? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713494.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
This might be caused by the location of your jar file C:/Development/Projects/Test-Tapestry-Module Where is the tapestry-upload.jar located? Is it inside a WAR? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713495.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Also, where are the tapestry jars? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713496.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
In a webapp, there is a hierarchy of classloaders with the web classloader inheriting from the application classloader which in turn inherits from the bootstrap classloader. Tapestry adds another classloader to the mix to confuse things further. I think something is going on with your classloader hierarchy that is slightly different to most people's setups. Can you provide exact details of how you are running your app and how you define your classpath(s)? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713501.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
This is with 5.3.3 by the way. Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713446.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Please copy/paste the following: 1. Your contributeComponentClassResolver() method 2. The fully qualified classname of one of your components. 3. A TML entry where you are trying to reference one of your components -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713448.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
OK, The library contains a page rather than a component (although a component copied in from teh tapestry upload library didn't work either...) If I try reference it from the main app, all I get is this : I would also expect the library pages to show on the list of available pages that Tapestry dumps when it starts running - the Upload component certainly does, and I'm not using it, so it's not as if that list only shows pages that are referenced. Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713450.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
The library contains a page rather than a component A page is a component ;) Have you included a Tapestry-Module-Classes entry in your jar's manifest? http://tapestry.apache.org/autoloading-modules.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713452.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Yep. Tapestry-Module-Classes: org.test.services.TestModule Where TestModule.java contains the contributeComponentClassResolver posted above. Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713453.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Hi Can you paste the jar contents (jar tvf your_jar_file.jar) regards Taha On May 28, 2012, at 8:42 PM, LanceWhite wrote: Yep. Tapestry-Module-Classes: org.test.services.TestModule Where TestModule.java contains the contributeComponentClassResolver posted above. Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713453.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Is there anything strange with your classpath? eg. multiple copies of the tapestry jars or multiple copies of your Page class / template? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713455.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Jar Contents META-INF MANIFEST.MF org test pages TestPage.class TestPage.tml services TestModule.class Only one copy of Tapestry my module jar. I've tried running it in Eclipse and standalone, and with 5.3.2, and it's still doesn't find anything. Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713466.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Have you contributed to the ComponentClassResolver in your TestModule :- public static void contributeComponentClassResolver( ConfigurationLibraryMapping configuration) { configuration.add(new LibraryMapping(mylib, org.test)); } then you can use it like a t:type='PageLink' t:page='myLib/TestPage' My Test Page/a regards Taha On May 28, 2012, at 9:17 PM, LanceWhite wrote: Jar Contents META-INF MANIFEST.MF org test pages TestPage.class TestPage.tml services TestModule.class Only one copy of Tapestry my module jar. I've tried running it in Eclipse and standalone, and with 5.3.2, and it's still doesn't find anything. Lance -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713466.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Cannot get component library to load
Strange, can you add the following to one of your pages/components in the main app (that is working) System.out.println(getClass().getClassLoader().findResources(org/test/pages/TestPage.class)); System.out.println(getClass().getClassLoader().findResources(org/test/pages/TestPage.tml)); -- View this message in context: http://tapestry.1045711.n5.nabble.com/Cannot-get-component-library-to-load-tp5713444p5713468.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org