-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
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
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:
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
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
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
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
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
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
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
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.
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
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.
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:
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
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:
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
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
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 -
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
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
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
22 matches
Mail list logo