You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Kris Rasmussen <kr...@yahoo.com> on 2004/03/31 01:54:50 UTC

rc1 cannot find Contrib.library! Help.

I have been trying to upgrade to rc1, I've recompiled with it, packaged it all together (including the rc1 contrib jar) and every time i try to deploy it says :
 

javax.servlet.ServletException: Could not parse specification context:/WEB-INF/org/apache/tapestry/contrib/Contrib.library.	org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:834)	org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197)	org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158)	javax.servlet.http.HttpServlet.service(HttpServlet.java:743)	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)



root cause 
org.apache.tapestry.ApplicationRuntimeException: Could not parse specification context:/WEB-INF/org/apache/tapestry/contrib/Contrib.library.	org.apache.tapestry.engine.DefaultSpecificationSource.parseLibrarySpecification(DefaultSpecificationSource.java:192)	org.apache.tapestry.engine.DefaultSpecificationSource.getLibrarySpecification(DefaultSpecificationSource.java:303)	org.apache.tapestry.engine.Namespace.createNamespace(Namespace.java:307)	org.apache.tapestry.engine.Namespace.getChildNamespace(Namespace.java:150)	org.apache.tapestry.engine.AbstractEngine.addServices(AbstractEngine.java:1950)	org.apache.tapestry.engine.AbstractEngine.createServiceMap(AbstractEngine.java:1853)	org.apache.tapestry.engine.AbstractEngine.setupForRequest(AbstractEngine.java:1332)	org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:824)	org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197)	org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:743)	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)



 

 

What can I do????

 



---------------------------------
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

Re: Static content organization

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 31, 2004, at 10:31 AM, Shawn Church wrote:
> This is interesting and it does solve the problem of not letting Apache
> serve static content, but does it address the issue of eliminating
> redundant content.

Well, there would be duplicates, yes.  The definitive source would come 
from inside the application WAR file, and get copied out to a web 
server accessible directory if configured to do so.

>   For example, a company logo and site-wide
> navigation buttons which might typically be used in a Border page (as a
> header) would probably be linked statically, outside of the webapp.
> While the application may be able to function without these components,
> it can't exactly stand alone.

If you use PrivateAsset's for that logo, place a generic one in the 
WAR.  Then place the real company logo on the file system in the 
location it is written to by the externalizer.  Then the logo could be 
customized on the filesystem.

> Do you tend to avoid static links altogether?

Yes.  But we do something a little different for our CSS files - we use 
a custom ExternalAsset on the @Shell component and have 
application-specific configuration that creates points to that.  We 
developed this scheme before we plugging in the externalizer, though we 
could switch to using it.

>   Since AssetExternalizer
> does not overwrite existing files, it would be possible to cause
> Tapestry to construct simple URLs to common site-wide resources (such
> as /images/pic.gif).  In this case, the webapp images would all need to
> exist in the root of the webapp, and the org.apache.tapestry.asset.dir
> should be set to 'images'.  Is this the intended use for
> AssetExternalizer?

If you want to do something like this, I'd recommend you create your 
own service and link component.  The externalizer controls the path of 
the file under the configured directory, and in the case of DatePicker 
and such, the path is deep and not controllable.

It is very easy to experiment with the externalizer in a local app 
server.... set a JVM system property for each of the configuration 
properties, and point the directory to a local temporary directory, and 
a base URL of file:/// pointing to that directory.  Give it a try and 
see if it works for what you're after.

	Erik


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


Re: Static content organization

Posted by Shawn Church <sh...@boxity.com>.
Erik,

This is interesting and it does solve the problem of not letting Apache 
serve static content, but does it address the issue of eliminating 
redundant content.  For example, a company logo and site-wide 
navigation buttons which might typically be used in a Border page (as a 
header) would probably be linked statically, outside of the webapp.  
While the application may be able to function without these components, 
it can't exactly stand alone.  

Do you tend to avoid static links altogether?  Since AssetExternalizer 
does not overwrite existing files, it would be possible to cause 
Tapestry to construct simple URLs to common site-wide resources (such 
as /images/pic.gif).  In this case, the webapp images would all need to 
exist in the root of the webapp, and the org.apache.tapestry.asset.dir 
should be set to 'images'.  Is this the intended use for 
AssetExternalizer?

Shawn


Quoting Erik Hatcher <er...@ehatchersolutions.com>:

> Have a look at the Asset service, private assets, and how it uses the
>  
> AssetExternalizer.
> 
> We've recently configured our production environments with the two  
> properties listed here:
> 
> 
	<http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestr
y/asset/
> 
> AssetExternalizer.html>
> 
> For example, all the built-in JavaScript and images (the DatePicker
> is  
> a prime example) gets copied to an external directory that can be  
> served using Apache.
> 
> Tapestry's PrivateAsset is designed for the very concerns that have 
> 
> been brought up on this thread.  You can have the best of both
> worlds,  
> the application can be used stand-alone as a WAR-only, or configured
> to  
> serve static content through a web server.
> 
> 	Erik
> 
> On Mar 30, 2004, at 8:43 PM, Shawn Church wrote:
> 
> > I would like some opinions on how to best deal with static content.
>   
> > There
> > are simple instances where a web application and a web host will
> exist
> > one-to-one, but in other cases (such as for various independent  
> > applications
> > running within an intranet), I will have a single web host
> accessing
> > multiple web apps.
> >
> > I generally prefer to serve static content such as images,  
> > stylesheets, and
> > other assets from Apache and to let my app server handle only the 
> 
> > dynamic
> > content.  Most of the Tapestry examples I have seen pull everything
>  
> > into the
> > war file, but for sites with mixed content, this results in a
> potential
> > duplication of static content (in the web server context as well as
>  
> > within
> > each application).  I have begun adopting the practice of using
> > external-assets everywhere, but then of course the web app can't
> exist
> > completely on it's own.
> >
> > My goal is to make life as simple as possible for my designers as
> well  
> > as to
> > avoid clutter.  I've thought of having a central common asset  
> > repository
> > which is accessible from the file system but to have  
> > application-specific
> > content exist only within the app.  This however requires the  
> > designers to
> > search for "their stuff" in more than one location and complicates
> > re-deployment.
> >
> > I have tried various approaches in the past, but nothing has ever 
> 
> > worked
> > very well.  One of my main reasons for migrating to Tapestry was to
>  
> > help
> > separate design work from development, so I would appreciate some
> > application-structure ideas from other Tapestry users.
> >
> > Shawn
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 




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


Re: Static content organization

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Have a look at the Asset service, private assets, and how it uses the  
AssetExternalizer.

We've recently configured our production environments with the two  
properties listed here:

	<http://jakarta.apache.org/tapestry/doc/api/org/apache/tapestry/asset/ 
AssetExternalizer.html>

For example, all the built-in JavaScript and images (the DatePicker is  
a prime example) gets copied to an external directory that can be  
served using Apache.

Tapestry's PrivateAsset is designed for the very concerns that have  
been brought up on this thread.  You can have the best of both worlds,  
the application can be used stand-alone as a WAR-only, or configured to  
serve static content through a web server.

	Erik

On Mar 30, 2004, at 8:43 PM, Shawn Church wrote:

> I would like some opinions on how to best deal with static content.   
> There
> are simple instances where a web application and a web host will exist
> one-to-one, but in other cases (such as for various independent  
> applications
> running within an intranet), I will have a single web host accessing
> multiple web apps.
>
> I generally prefer to serve static content such as images,  
> stylesheets, and
> other assets from Apache and to let my app server handle only the  
> dynamic
> content.  Most of the Tapestry examples I have seen pull everything  
> into the
> war file, but for sites with mixed content, this results in a potential
> duplication of static content (in the web server context as well as  
> within
> each application).  I have begun adopting the practice of using
> external-assets everywhere, but then of course the web app can't exist
> completely on it's own.
>
> My goal is to make life as simple as possible for my designers as well  
> as to
> avoid clutter.  I've thought of having a central common asset  
> repository
> which is accessible from the file system but to have  
> application-specific
> content exist only within the app.  This however requires the  
> designers to
> search for "their stuff" in more than one location and complicates
> re-deployment.
>
> I have tried various approaches in the past, but nothing has ever  
> worked
> very well.  One of my main reasons for migrating to Tapestry was to  
> help
> separate design work from development, so I would appreciate some
> application-structure ideas from other Tapestry users.
>
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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


Static content organization

Posted by Shawn Church <sh...@boxity.com>.
I would like some opinions on how to best deal with static content.  There
are simple instances where a web application and a web host will exist
one-to-one, but in other cases (such as for various independent applications
running within an intranet), I will have a single web host accessing
multiple web apps.

I generally prefer to serve static content such as images, stylesheets, and
other assets from Apache and to let my app server handle only the dynamic
content.  Most of the Tapestry examples I have seen pull everything into the
war file, but for sites with mixed content, this results in a potential
duplication of static content (in the web server context as well as within
each application).  I have begun adopting the practice of using
external-assets everywhere, but then of course the web app can't exist
completely on it's own.

My goal is to make life as simple as possible for my designers as well as to
avoid clutter.  I've thought of having a central common asset repository
which is accessible from the file system but to have application-specific
content exist only within the app.  This however requires the designers to
search for "their stuff" in more than one location and complicates
re-deployment.

I have tried various approaches in the past, but nothing has ever worked
very well.  One of my main reasons for migrating to Tapestry was to help
separate design work from development, so I would appreciate some
application-structure ideas from other Tapestry users.

Shawn


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


Re: Static content organization

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Mar 30, 2004, at 11:14 PM, Eric Schneider wrote:
> A quick thought.  Can you have your application server mount the file 
> system
> on your web server?  We've done something similar.  I have a
> StaticContentPage that reads in content from the file system to fill 
> the
> body of the page .

We have something similar.  In our last app (Struts) we had a special 
action/JSP that would read a Velocity template from the filesystem.  We 
moved that concept to the database in our current Tapestry project and 
have a page that pulls "snippets" (still Velocity templates) from the 
database and renders them.  We can use our snippet rendering component 
within regular pages also, to render blocks of instructions/legalese.

	Erik


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


Re: Static content organization

Posted by Eric Schneider <er...@centralparksoftware.com>.
Shawn,

A quick thought.  Can you have your application server mount the file system
on your web server?  We've done something similar.  I have a
StaticContentPage that reads in content from the file system to fill the
body of the page .

Obviously there a some coupling issues with this approach.

eric.

----- Original Message -----
From: "Shawn Church" <sh...@boxity.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Tuesday, March 30, 2004 8:45 PM
Subject: Static content organization


> I would like some opinions on how to best deal with static content.  There
> are simple instances where a web application and a web host will exist
> one-to-one, but in other cases (such as for various independent
applications
> running within an intranet), I will have a single web host accessing
> multiple web apps.
>
> I generally prefer to serve static content such as images, stylesheets,
and
> other assets from Apache and to let my app server handle only the dynamic
> content.  Most of the Tapestry examples I have seen pull everything into
the
> war file, but for sites with mixed content, this results in a potential
> duplication of static content (in the web server context as well as within
> each application).  I have begun adopting the practice of using
> external-assets everywhere, but then of course the web app can't exist
> completely on it's own.
>
> My goal is to make life as simple as possible for my designers as well as
to
> avoid clutter.  I've thought of having a central common asset repository
> which is accessible from the file system but to have application-specific
> content exist only within the app.  This however requires the designers to
> search for "their stuff" in more than one location and complicates
> re-deployment.
>
> I have tried various approaches in the past, but nothing has ever worked
> very well.  One of my main reasons for migrating to Tapestry was to help
> separate design work from development, so I would appreciate some
> application-structure ideas from other Tapestry users.
>
> Shawn
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


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


Re: Static content organization

Posted by Shawn Church <sh...@boxity.com>.
Jonny,

Thanks for the input.  I tend to also prefer apps which can stand 
alone, but one problem I've had is that I usually need to run with 
expanded war files to be able to make simple page or image updates.

As a side note, one issue I've found with Tapestry is not being able to 
easily (or quickly anyway) deploy simple page changes without having to 
restart the app.  I have been developing with caching disabled, but it 
runs much too slowly for production use.  I plan to look into resource 
loading outside the webapp (to be able to hot-deploy page updates), but 
I haven't gotten there yet.

Shawn


Quoting Jonny Wray <jo...@yahoo.com>:

> 
> I've fought with this problem in the past, and not with tapestry. I
> think it's more a j2ee problem than a tapestry one.
> 
> As you say, you can have a central asset repository served by the
> apache front end but then your web apps aren't standalone. This is
> the
> trade off inherent to the j2ee web app model.
> 
> I've tryed both approaches in the past and found that having nothing
> centrally ended up being the best policy, unless you are sure that
> those central things are not going to change. I now make all my apps
> standalone. It means having multiple copies of jar files, gif files,
> etc around but you are sure that the app you test locally, package
> then
> deploy will work. Something that you cannot say when you rely on
> centralised assets. This deployment certainty is worth the trade off
> in
> my view.
> 
> --- Shawn Church <sh...@boxity.com> wrote:
> > I would like some opinions on how to best deal with static content.
> 
> > There
> > are simple instances where a web application and a web host will
> > exist
> > one-to-one, but in other cases (such as for various independent
> > applications
> > running within an intranet), I will have a single web host
> accessing
> > multiple web apps.
> > 
> > I generally prefer to serve static content such as images,
> > stylesheets, and
> > other assets from Apache and to let my app server handle only the
> > dynamic
> > content.  Most of the Tapestry examples I have seen pull
> everything
> > into the
> > war file, but for sites with mixed content, this results in a
> > potential
> > duplication of static content (in the web server context as well
> as
> > within
> > each application).  I have begun adopting the practice of using
> > external-assets everywhere, but then of course the web app can't
> > exist
> > completely on it's own.
> > 
> > My goal is to make life as simple as possible for my designers as
> > well as to
> > avoid clutter.  I've thought of having a central common asset
> > repository
> > which is accessible from the file system but to have
> > application-specific
> > content exist only within the app.  This however requires the
> > designers to
> > search for "their stuff" in more than one location and complicates
> > re-deployment.
> > 
> > I have tried various approaches in the past, but nothing has ever
> > worked
> > very well.  One of my main reasons for migrating to Tapestry was
> to
> > help
> > separate design work from development, so I would appreciate some
> > application-structure ideas from other Tapestry users.
> > 
> > Shawn
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tapestry-user-help@jakarta.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 




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


Re: Static content organization

Posted by Jonny Wray <jo...@yahoo.com>.
I've fought with this problem in the past, and not with tapestry. I
think it's more a j2ee problem than a tapestry one.

As you say, you can have a central asset repository served by the
apache front end but then your web apps aren't standalone. This is the
trade off inherent to the j2ee web app model.

I've tryed both approaches in the past and found that having nothing
centrally ended up being the best policy, unless you are sure that
those central things are not going to change. I now make all my apps
standalone. It means having multiple copies of jar files, gif files,
etc around but you are sure that the app you test locally, package then
deploy will work. Something that you cannot say when you rely on
centralised assets. This deployment certainty is worth the trade off in
my view.

--- Shawn Church <sh...@boxity.com> wrote:
> I would like some opinions on how to best deal with static content. 
> There
> are simple instances where a web application and a web host will
> exist
> one-to-one, but in other cases (such as for various independent
> applications
> running within an intranet), I will have a single web host accessing
> multiple web apps.
> 
> I generally prefer to serve static content such as images,
> stylesheets, and
> other assets from Apache and to let my app server handle only the
> dynamic
> content.  Most of the Tapestry examples I have seen pull everything
> into the
> war file, but for sites with mixed content, this results in a
> potential
> duplication of static content (in the web server context as well as
> within
> each application).  I have begun adopting the practice of using
> external-assets everywhere, but then of course the web app can't
> exist
> completely on it's own.
> 
> My goal is to make life as simple as possible for my designers as
> well as to
> avoid clutter.  I've thought of having a central common asset
> repository
> which is accessible from the file system but to have
> application-specific
> content exist only within the app.  This however requires the
> designers to
> search for "their stuff" in more than one location and complicates
> re-deployment.
> 
> I have tried various approaches in the past, but nothing has ever
> worked
> very well.  One of my main reasons for migrating to Tapestry was to
> help
> separate design work from development, so I would appreciate some
> application-structure ideas from other Tapestry users.
> 
> Shawn
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 


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


Static content organization

Posted by Shawn Church <sh...@boxity.com>.
I would like some opinions on how to best deal with static content.  There
are simple instances where a web application and a web host will exist
one-to-one, but in other cases (such as for various independent applications
running within an intranet), I will have a single web host accessing
multiple web apps.

I generally prefer to serve static content such as images, stylesheets, and
other assets from Apache and to let my app server handle only the dynamic
content.  Most of the Tapestry examples I have seen pull everything into the
war file, but for sites with mixed content, this results in a potential
duplication of static content (in the web server context as well as within
each application).  I have begun adopting the practice of using
external-assets everywhere, but then of course the web app can't exist
completely on it's own.

My goal is to make life as simple as possible for my designers as well as to
avoid clutter.  I've thought of having a central common asset repository
which is accessible from the file system but to have application-specific
content exist only within the app.  This however requires the designers to
search for "their stuff" in more than one location and complicates
re-deployment.

I have tried various approaches in the past, but nothing has ever worked
very well.  One of my main reasons for migrating to Tapestry was to help
separate design work from development, so I would appreciate some
application-structure ideas from other Tapestry users.

Shawn


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


Re: rc1 cannot find Contrib.library! (solved)

Posted by Kris Rasmussen <kr...@yahoo.com>.
Its funny how you always figure out the solution right after asking about it ;), even if you were trying for 2 hours before. It turns out that I had removed a / in the prefix of one of the library paths and that was the problem.
 
Kris

Kris Rasmussen <kr...@yahoo.com> wrote:
I have been trying to upgrade to rc1, I've recompiled with it, packaged it all together (including the rc1 contrib jar) and every time i try to deploy it says :


javax.servlet.ServletException: Could not parse specification context:/WEB-INF/org/apache/tapestry/contrib/Contrib.library. org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:834) org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197) org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158) javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)



root cause 
org.apache.tapestry.ApplicationRuntimeException: Could not parse specification context:/WEB-INF/org/apache/tapestry/contrib/Contrib.library. org.apache.tapestry.engine.DefaultSpecificationSource.parseLibrarySpecification(DefaultSpecificationSource.java:192) org.apache.tapestry.engine.DefaultSpecificationSource.getLibrarySpecification(DefaultSpecificationSource.java:303) org.apache.tapestry.engine.Namespace.createNamespace(Namespace.java:307) org.apache.tapestry.engine.Namespace.getChildNamespace(Namespace.java:150) org.apache.tapestry.engine.AbstractEngine.addServices(AbstractEngine.java:1950) org.apache.tapestry.engine.AbstractEngine.createServiceMap(AbstractEngine.java:1853) org.apache.tapestry.engine.AbstractEngine.setupForRequest(AbstractEngine.java:1332) org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:824) org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197) org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743) javax.servlet.http.HttpServlet.service(HttpServlet.java:856)







What can I do????





---------------------------------
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

---------------------------------
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.