forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: Error to resolve contract: Error Premature end of file.
Date Tue, 01 Mar 2016 12:17:36 GMT
On 01/03/16 10:57, Miguel Valencia wrote:
> Hi
> 
>  I have detected an error in my project with Apache Cocoon using dispatcher
> plugin.
> 
> ERROR cocoon.access - Internal Cocoon Problem
> Caused by: org.apache.forrest.dispatcher.exception.ContractException:
> Could not invoke the transformation for the contract "meta". Error java:
> javax.xml.transform.TransformerException: Premature end of file.
> 
> Error sequence is:
> a) Ask some page of my project
> b) Wait until expire jx cache
> c) Ask again the same page
> 
> The web page of my project using forrest, so using structurer that are
> composite with contracts and caching with jx tag. 
> 
> Example jx caching:
> 
> jx:cache-key=
> "${Packages.org.apache.forrest.dispatcher.impl.helper.Key
> (cocoon.request).toString()}"
> jx:cache-validity=
> "${Packages.org.apache.excalibur.source.impl.validity.
> ExpiresValidity(300000)}">
> 
> Example call to contract:
> 
> <forrest:contract name="comun/meta"
> dataURI="servlet:conector:/estatico/drupal/metadatos.xml">
>   <forrest:property name="url">/${getRequest}/</forrest:property>
> </forrest:contract>
> 
> 
> Sometimes to resolve some contracts, dispatcher can not get XSLT of contract
> and then appear this error.
> 
> Two things I have seen:
> 1) If not used jx cache this error not appear.
> 2) I have debug this problema until class:
> org.apache.forrest.dispatcher.impl.CocoonResolver and if put synchronized
> block here:
> 
> source = resolver.resolveURI(uri);      
> stream = new BufferedInputStream(source.getInputStream());
> 
> then, it seems that error not show.
> 
> has anyone seen this error before?
> 
> Thanks
> 


Hola Miguel, como estamos? ;)

It looks like that either the data url of the contract or the
${getRequest} is not resolved.

${getRequest} is a xml, coming from where?

salu2

-- 
Thorsten Scherler <thorsten.at.apache.org>
codeBusters S.L. - web based systems
<consulting, training and solutions>
http://www.codebusters.es/


Mime
View raw message