forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <scher...@gmail.com>
Subject Re: problems updating an old dispatcher site
Date Thu, 26 Aug 2010 10:01:37 GMT
On Thu, 2010-08-26 at 10:41 +0200, Vicent Mas wrote:
> Hi,
> 
> I'm trying to update my project website. It uses dispatcher and was
> setup before the
> merge of the dispatcher and the core plugins. The website has several
> customisations
> of contracts (mainly core plugin contracts) and pelt html panels.
> 
> Now I've an updated my local repository of forrest but cannot build my
> website. It seems
> that it is not able to find my custom contracts. A $ forrest run of my
> site gives the following
> browser message:
> 
> Internal Server Error
> 
> Message: null
> 
> Description: No details available.
> 
> Sender: org.apache.cocoon.servlet.CocoonServlet
> 
> Source: Cocoon Servlet
> 
> cause
> 
> Could not setup the transformer for the contract "noFt".
> javax.xml.transform.TransformerConfigurationException:
> javax.xml.transform.TransformerException: Fatal:
> javax.xml.transform.TransformerException: Errors in XSLT
> transformation:
> Fatal: java.lang.NullPointerException
> 
> 
> Request URI
> 
> index.html
> 
> request-uri
> 
> /index.html

Hmm, yeah the noFT is a fallback if no contract is found, however it
should not fail like this since I added this functionality with the
merge. It should simply add the note "Error 440 - Template not found."
instead. 

> 
> 
> Editing my customised pelt html panels and removing from them the
> calls to customised contracts fixes the problem. That is
> why I think that customised contracts are not found (the above message
> doesn't means very much for me :-(

So you are saying that the panels can be found?

http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/locationmap.xml?view=markup

<!-- for panel -->
...
<location
src="{lm:themer.project.dir}/themes/{global:dispatcher.theme}/panels/{1}{global:dispatcher.panel.ext}"
/>
<location
src="{lm:themer.project.dir}/themes/{global:dispatcher.fallback.theme}/panels/{1}{global:dispatcher.panel.ext}"
/>

<!-- for contract -->
...
<location
src="{lm:themer.project.dir}/themes/{global:dispatcher.theme}/{1}/{2}{global:dispatcher.contract.ext}"
/>
<location
src="{lm:themer.project.dir}themes/{global:dispatcher.fallback.theme}/{1}/{2}{global:dispatcher.contract.ext}"
/>

Meaning they are pointing to the same root. However let us see your
setup:

> 
> The organization of my website folder is:
> 
> root/
>     src/
>         documentation/
>                 classes/
>                 conf/
>                 content/
>                 resources/
>                    images/
>                    schema/
>                    stylesheets/
>                    themes/
>                        common/html/   # My customised contracts are here
>                        common.fv
>                        pelt/
>                            css/
>                            images/
>                            panels/   # My customised panels are here
>                        pelt.fv
>                 translations/
> 

Can you do a test for me? Place ONE customized contract into pelt/html
instead of common/html and activate the contract. Does the problem still
is visible? 

Do you have a custom locationmap, since that could as well override the
default behavior. 

What are the values for the following seen in
http://localhost:8888/index.props:
dispatcher.contract-ext
dispatcher.fallback.theme
dispatcher.theme

My guess right now (depends on which version your dispatcher site was
based on) that dispatcher.contract-ext are not ".contract.xml" and if it
is that value then your custom contracts may not have this extension.
The easiest way is to move them to the new name. 

Mind as well <property value=".structurer.xml"
name="dispatcher.theme-ext"/>

Meaning the structurer should as well use the new extension.

HTH

salu2



> How can I get forrest  working as I want? Have I to change the above
> organization of folders?
> Or have I to change some configuration file so the customised
> contracts can be found?
> 
> TIA
> 
> PS: having a look to the Dispatcher quickstart page I've seen it still
> contains references to the
> core plugin so it seems to be outdated.

Yeah, patches to update that page are highly welcome. ;)
salu2

> 
> Vicent
> 

-- 
Thorsten Scherler <thorsten.at.apache.org>
Open Source Java <consulting, training and solutions>


Mime
View raw message