You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Jessica Mong <je...@googlemail.com> on 2009/03/08 00:38:55 UTC
Template load/parse error - empty node returned
Hello
Velocity: 1.4
Velocity-tools:1.4
What:
The node object inside template has no children after reload, despite of
the template file on disk is not empty. No exceptions are thrown.
When happens:
While template file on disk is updating (overwrite with a copy operation),
template is reloaded by ResourceManagerImpl (Velocity engine is serving a
huge amount of requests).
Many thanks for any help.
Regards.
Jessica
Re: Template load/parse error - empty node returned
Posted by Jessica Mong <je...@gmail.com>.
Hello Byron,
Good point Byron, this is what I thought and I'm still thinking about the
reason of a blank page. The template files are copied, but only these,
which are included with 'parse' directive. The template, which is returned
as blank page is not copied or even moved at all.
Bye,
Jessica
Byron Foster-2 wrote:
>
> What OS is this? If you are using the 'cp' command on the command
> line with Linux then try 'mv' instead.
>
> On Mar 9, 2009, at 16:24 , Jessica Mong wrote:
>
>> I will raise a new Jira issue after some investigation. I will put
>> some
>> error messages inside FileResourceLoader and spring
>> VelocityView.doRender
>> (which obtains template object), to check if resource.data is null
>> or empty.
>>
>> Currently the work-around I have is to reload template in a
>> VelocityView.doRender() if node is null or empty and to return
>> always 'true'
>> by ResourceLoader.isSourceModified() to avoid caching templates
>> which can be
>> empty because of error.
>>
>> The template that the problem is related to, has many multi-level
>> parse()
>> directives and some custom toolboxes. So parsing operation is quite
>> complex.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Template-load-parse-error---empty-node-returned-tp22393174p22516406.html
Sent from the Velocity - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
Re: Template load/parse error - empty node returned
Posted by Byron Foster <by...@base2.cc>.
What OS is this? If you are using the 'cp' command on the command
line with Linux then try 'mv' instead.
On Mar 9, 2009, at 16:24 , Jessica Mong wrote:
> I will raise a new Jira issue after some investigation. I will put
> some
> error messages inside FileResourceLoader and spring
> VelocityView.doRender
> (which obtains template object), to check if resource.data is null
> or empty.
>
> Currently the work-around I have is to reload template in a
> VelocityView.doRender() if node is null or empty and to return
> always 'true'
> by ResourceLoader.isSourceModified() to avoid caching templates
> which can be
> empty because of error.
>
> The template that the problem is related to, has many multi-level
> parse()
> directives and some custom toolboxes. So parsing operation is quite
> complex.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
Re: Template load/parse error - empty node returned
Posted by Jessica Mong <je...@gmail.com>.
Hello,
I will raise a new Jira issue after some investigation. I will put some
error messages inside FileResourceLoader and spring VelocityView.doRender
(which obtains template object), to check if resource.data is null or empty.
Currently the work-around I have is to reload template in a
VelocityView.doRender() if node is null or empty and to return always 'true'
by ResourceLoader.isSourceModified() to avoid caching templates which can be
empty because of error.
The template that the problem is related to, has many multi-level parse()
directives and some custom toolboxes. So parsing operation is quite complex.
Bye,
Jessica
Nathan Bubna wrote:
>
> Would you open a new JIRA issue for this?
> https://issues.apache.org/jira/browse/VELOCITY
>
> On Mon, Mar 9, 2009 at 12:10 PM, Jessica Mong <je...@gmail.com>
> wrote:
>>
>> Hello,
>>
>> I synchronized the Velocity engine and still the same problem, also
>> upgraging to Velocity 1.6.1 doesn't help.
>>
>> Bye,
>> Jessisa
>>
>>
>> Nathan Bubna wrote:
>>>
>>> Hmm. There were a number of concurrency bugs cleaned up between 1.4
>>> and 1.6.x. (like VELOCITY-383, VELOCITY-610, VELOCITY-24 and a few
>>> others). If you are able to move to 1.6, you may well find this has
>>> already been fixed.
>>>
>>> On Sat, Mar 7, 2009 at 4:38 PM, Jessica Mong
>>> <je...@googlemail.com> wrote:
>>>> Hello
>>>>
>>>> Velocity: 1.4
>>>> Velocity-tools:1.4
>>>>
>>>> What:
>>>> The node object inside template has no children after reload, despite
>>>> of
>>>> the template file on disk is not empty. No exceptions are thrown.
>>>>
>>>> When happens:
>>>> While template file on disk is updating (overwrite with a copy
>>>> operation),
>>>> template is reloaded by ResourceManagerImpl (Velocity engine is serving
>>>> a
>>>> huge amount of requests).
>>>>
>>>> Many thanks for any help.
>>>>
>>>> Regards.
>>>> Jessica
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>>> For additional commands, e-mail: dev-help@velocity.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Template-load-parse-error---empty-node-returned-tp22393174p22416457.html
>> Sent from the Velocity - Dev mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: dev-help@velocity.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Template-load-parse-error---empty-node-returned-tp22393174p22424918.html
Sent from the Velocity - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
Re: Template load/parse error - empty node returned
Posted by Nathan Bubna <nb...@gmail.com>.
Would you open a new JIRA issue for this?
https://issues.apache.org/jira/browse/VELOCITY
On Mon, Mar 9, 2009 at 12:10 PM, Jessica Mong <je...@gmail.com> wrote:
>
> Hello,
>
> I synchronized the Velocity engine and still the same problem, also
> upgraging to Velocity 1.6.1 doesn't help.
>
> Bye,
> Jessisa
>
>
> Nathan Bubna wrote:
>>
>> Hmm. There were a number of concurrency bugs cleaned up between 1.4
>> and 1.6.x. (like VELOCITY-383, VELOCITY-610, VELOCITY-24 and a few
>> others). If you are able to move to 1.6, you may well find this has
>> already been fixed.
>>
>> On Sat, Mar 7, 2009 at 4:38 PM, Jessica Mong
>> <je...@googlemail.com> wrote:
>>> Hello
>>>
>>> Velocity: 1.4
>>> Velocity-tools:1.4
>>>
>>> What:
>>> The node object inside template has no children after reload, despite of
>>> the template file on disk is not empty. No exceptions are thrown.
>>>
>>> When happens:
>>> While template file on disk is updating (overwrite with a copy
>>> operation),
>>> template is reloaded by ResourceManagerImpl (Velocity engine is serving a
>>> huge amount of requests).
>>>
>>> Many thanks for any help.
>>>
>>> Regards.
>>> Jessica
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: dev-help@velocity.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Template-load-parse-error---empty-node-returned-tp22393174p22416457.html
> Sent from the Velocity - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
Re: Template load/parse error - empty node returned
Posted by Jessica Mong <je...@gmail.com>.
Hello,
I synchronized the Velocity engine and still the same problem, also
upgraging to Velocity 1.6.1 doesn't help.
Bye,
Jessisa
Nathan Bubna wrote:
>
> Hmm. There were a number of concurrency bugs cleaned up between 1.4
> and 1.6.x. (like VELOCITY-383, VELOCITY-610, VELOCITY-24 and a few
> others). If you are able to move to 1.6, you may well find this has
> already been fixed.
>
> On Sat, Mar 7, 2009 at 4:38 PM, Jessica Mong
> <je...@googlemail.com> wrote:
>> Hello
>>
>> Velocity: 1.4
>> Velocity-tools:1.4
>>
>> What:
>> The node object inside template has no children after reload, despite of
>> the template file on disk is not empty. No exceptions are thrown.
>>
>> When happens:
>> While template file on disk is updating (overwrite with a copy
>> operation),
>> template is reloaded by ResourceManagerImpl (Velocity engine is serving a
>> huge amount of requests).
>>
>> Many thanks for any help.
>>
>> Regards.
>> Jessica
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
> For additional commands, e-mail: dev-help@velocity.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Template-load-parse-error---empty-node-returned-tp22393174p22416457.html
Sent from the Velocity - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org
Re: Template load/parse error - empty node returned
Posted by Nathan Bubna <nb...@gmail.com>.
Hmm. There were a number of concurrency bugs cleaned up between 1.4
and 1.6.x. (like VELOCITY-383, VELOCITY-610, VELOCITY-24 and a few
others). If you are able to move to 1.6, you may well find this has
already been fixed.
On Sat, Mar 7, 2009 at 4:38 PM, Jessica Mong
<je...@googlemail.com> wrote:
> Hello
>
> Velocity: 1.4
> Velocity-tools:1.4
>
> What:
> The node object inside template has no children after reload, despite of
> the template file on disk is not empty. No exceptions are thrown.
>
> When happens:
> While template file on disk is updating (overwrite with a copy operation),
> template is reloaded by ResourceManagerImpl (Velocity engine is serving a
> huge amount of requests).
>
> Many thanks for any help.
>
> Regards.
> Jessica
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org