forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vicent Mas <uve...@gmail.com>
Subject Re: problems updating an old dispatcher site
Date Thu, 26 Aug 2010 12:11:32 GMT
2010/8/26 Thorsten Scherler <scherler@gmail.com>:
> 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
>
>
>

Hi,

you are absolutely right. Renaming the contracts  from somename.ft to
somename.contract.xml
was required. Also I've replaced my pelt.fv and common.fv with
pelt.structurer.xml and
common.structurer.xml (from
$FORREST_HOME/whiteboard/plugins/o.a.f.p.i.dispatcher/themer/themes).
And the common folder is the fallback location for contracts so I
don't have to move anything to another
place. Now things go more or less fine. Building the static website
still fails but at least $ forrest run works fine.
I see that some of my customisations doesn't behave as before so
further investigation is needed. So I'll
probably come back to the list later (sorry for not being more forrest
capable :-)

As a side effect of the new filename extension of contracts it seems
that the contracts functinality of the
Mozilla Forrestbar is not working. Is this list the proper place for
reporting that problem?

>>
>> 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
>

Indeed I'd like to write that patch but I'm afraid that my knowledge
of dispatcher is not deep enough.
However I don't discard doing it in the future.

Thanks,

Vicent


-- 
Share what you know, learn what you don't.

Mime
View raw message