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