RE: Cannot get component library to load

2012-06-01 Thread Poder, 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

RE: Cannot get component library to load

2012-06-01 Thread Lance Java
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

RE: Cannot get component library to load

2012-05-31 Thread Poder, Jacob
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:

RE: Cannot get component library to load

2012-05-31 Thread LanceWhite
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

Re: Cannot get component library to load

2012-05-29 Thread LanceWhite
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

Re: Cannot get component library to load

2012-05-29 Thread LanceWhite
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

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
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

Re: Cannot get component library to load

2012-05-29 Thread LanceWhite
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

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
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

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
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

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
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.

Re: Cannot get component library to load

2012-05-29 Thread Lance Java
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

Re: Cannot get component library to load

2012-05-28 Thread LanceWhite
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.

Re: Cannot get component library to load

2012-05-28 Thread Lance Java
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:

Re: Cannot get component library to load

2012-05-28 Thread LanceWhite
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

Re: Cannot get component library to load

2012-05-28 Thread Lance Java
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:

Re: Cannot get component library to load

2012-05-28 Thread LanceWhite
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

Re: Cannot get component library to load

2012-05-28 Thread Taha Siddiqi
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

Re: Cannot get component library to load

2012-05-28 Thread Lance Java
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 -

Re: Cannot get component library to load

2012-05-28 Thread LanceWhite
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

Re: Cannot get component library to load

2012-05-28 Thread Taha Siddiqi
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

Re: Cannot get component library to load

2012-05-28 Thread Lance Java
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