Re: Error to resolve contract: Error Premature end of file.
Thorsten Scherler <[email protected]> Tue, 1 Mar 2016 13:17:36 +0100
| Newsgroups | gmane.text.xml.forrest.devel |
|---|---|
| Message-ID | <[email protected]> |
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/
signature.asc
(application/pgp-signature, 819 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJW1YhhAAoJEL1eTNV7kqwU6dUP/RC58FWMXC2S3WOrvoryUR1r 6nUD7rXAr2c3hUVh1AunRX4VaKenGzHf5EW9U2Ll0hkcgJttvia6ABU8dNXt679Q IzTZ0AgMdcP2Ga1dDNkMG5r1TkQ0ajfwdo+JDB283y0ltxJmZ0Mx/Ab+N+kvWQnh npM3tyFUrsKs1cyAc72rY3KE7NzJELtP0nZqZ+us2pHswfqqzSJhUA0qW8X+BLli jmLIKYM9KnDIgFiawDEbdEFyUBEF59D9J2vqho5HEOv7mebUF927pW1PmSS53mzM SAaGaCSpmKcIy7K7Ux9lfFwfuhvJzxQ+DqnjxwXzlmzI9D8wwIg4FzvALKdgJHIO +7DCep+mPSEmYP7S96OgjD1OJJq2Hcx3i3RkZVg4ZBlOv2i6Mbu5FMXueBRe8Cc5 AQhqhFMJ77obBjrKJOEbVOBFOWqL8XwxaL+NnN5fitGaq1CFqWX32kHI/4DxbHjK pd1Gga2y7GH5ajQ+6p6W0ZLR8OvOO9yTyfAZFDBSPlTC+uPIXzMGjrHTJyth4sTQ YpNgi3JtqbXHcq+zTwo/Pu2GvHMiiUKDz/2srlAm3s0OM9LlfZUeFXEm8XTq/fTM rwzU5cF6LopMCUW0nTf1B9lYzdfknflg6mhG0vlV3ZCeW6nv8V7VEyTp/Cf42b89 U4REhUmX9of6HS3ef1EX =wK/4 -----END PGP SIGNATURE-----