[daisy] Error: Could not find daisyContextPath

Bruno Dumon bruno at outerthought.org
Mon Jun 11 04:56:00 CDT 2007


Hi,

I've fixed the cause of this problem.

You can work around it by resolving a "wikidata:" source before starting
the book publishing. For example, if you're using flowscript this can be
done with:

daisy.resolve("wikidata:/external-include-rules.xml")

(it doesn't matter which file you resolve)

If you prefer you can also fix the sources by adding these lines to the
start of BookPublishTask.run:

Request request = ContextHelper.getRequest(context);
request.setAttribute("daisyContextPath", daisyContextPath);

See also SVN revision 4089.

Your code is certainly welcome, it doesn't matter if it's not perfect,
it can serve as a starting point for others to continue. Just attach it
to a jira issue (issues.cocoondev.org).

On Fri, 2007-06-08 at 11:34 +0200, Hofmann. David wrote:
> 
> Hello,
> 
>  
> 
> I developed an extension that automatically publishes a book (which
> we’d like to use with a build system).
> 
> This generally works fine, but if I try to trigger the book
> publication directly after the server was started, I get the error:
> 
>  
> 
> [ERROR] <6/8/07 11:11:49 AM> Error producing book.
> java.lang.RuntimeException: Could not find daisyContextPath, is
> MountPointAction in the pipeline? at
> org.outerj.daisy.frontend.WikiHelper.getDaisyContextPath(WikiHelper.java:38) at
> 
> org.outerj.daisy.frontend.components.wikidatasource.WikiDataSourceFactory.getSource(WikiDataSourceFactory.java:66) at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:208) at
> 
> org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:558) at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:541) at org.outerj.daisy.books.publisher.impl.publicationtype.PublicationTypeBuilder.build(PublicationTypeBuilder.java:46) at
> 
> org.outerj.daisy.books.publisher.impl.BookPublishTask.run(BookPublishTask.java:103) at
> 
> org.outerj.daisy.books.publisher.impl.BackgroundTaskExecutor.run(BackgroundTaskExecutor.java:78) at
> 
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> Source) at
> 
> java.lang.Thread.run(Thread.java:595)
> 
>  
> 
> If I publish a book manually, and then again try to trigger the
> request, the error does not occur anymore. What can I do to prevent
> this error?
> 
>  
> 
> I noticed that this “feature” was already talked about on the mailing
> list, but apparently was not implemented yet. If you would like to
> integrate it for future releases, I could send you the code as a
> starting point, but I’m quite sure it still needs some improvement.
> 
>  
> 
> Best regards,
> 
> David
> 

> 
-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org



More information about the daisy mailing list