velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nbu...@gmail.com>
Subject Re: How to resolve error : Left side ($menuCurrentPage) of '==' operation has null value. If a reference, it may not be in the context. Operation not possible.
Date Fri, 01 May 2009 14:41:33 GMT
On Thu, Apr 30, 2009 at 11:32 PM, RUPALI <r.gupta1@mpstechnologies.com> wrote:
> Thanks,
> I noticed that we are using velocity-1.5 but velocity-tools-1.4
> Can this make a difference too?
>
> Shall I change both the jars to the same version?

no.  the versions are not synchronized.  i recommend Velocity 1.6.2
with either VelocityTools 1.4 or 2.0-beta3.

> -Rupali
>
>
>
> -----Original Message-----
> From: Nathan Bubna [mailto:nbubna@gmail.com]
> Sent: Thursday, April 30, 2009 7:19 PM
> To: Velocity Users List
> Subject: Re: How to resolve error : Left side ($menuCurrentPage) of '=='
> operation has null value. If a reference, it may not be in the context.
> Operation not possible.
>
> On Wed, Apr 29, 2009 at 10:21 PM, RUPALI <r.gupta1@mpstechnologies.com>
> wrote:
>> I am using:
>> Velocity: 1.5
>
> I very much recommend upgrading to Velocity 1.6.2, as there were
> mountains of bugs fixed (including some race conditions) and major
> performance improvements.  I would like to be sure that none of the
> fixed bugs are behind this.  And what VelocityTools version are you
> using?
>
>> Jetty: 6.1
>> JDK: 1.6
>> DB: SQL Server 2000
>> Struts 1.2.9
>>
>> I get following kind of errors in log file:
>>
>> 2009-02-05 00:13:12,602 ERROR [btpool0-2] log.SimpleLog4JLogSystem
>> (SimpleLog4JLogSystem.java:154) - Left side
> ($request.getParameter("test"))
>> of '==' operation has null value. If a reference, it may not be in the
>> context. Operation not possible. /common/includes/ads/doubleclick.fhtml
>> [line 86, column 38]
>> 2009-02-05 00:13:36,100 ERROR [btpool0-2] log.SimpleLog4JLogSystem
>> (SimpleLog4JLogSystem.java:154) - Left side
> ($request.getParameter("test"))
>> of '==' operation has null value. If a reference, it may not be in the
>> context. Operation not possible. /common/includes/ads/doubleclick.fhtml
>> [line 86, column 38]
>> 2009-02-05 00:13:42,259 ERROR [btpool0-5] log.SimpleLog4JLogSystem
>> (SimpleLog4JLogSystem.java:154) - ResourceManager : unable to find
> resource
>> '/super/includes/super.before-doctype.fhtml' in any resource loader.
>> 2009-02-05 00:13:42,260 ERROR [btpool0-5] log.SimpleLog4JLogSystem
>> (SimpleLog4JLogSystem.java:154) - #parse(): cannot find template
>> '/super/includes/super.before-doctype.fhtml', called from template
>> /index.html at (2, 26)
>>
>>
>> I've attached one of the files where the error occurs.. you can also
> review
>> that.
>> Thanks so much!
>> Rupali
>>
>>
>> -----Original Message-----
>> From: Nathan Bubna [mailto:nbubna@gmail.com]
>> Sent: Wednesday, April 29, 2009 7:29 PM
>> To: Velocity Users List
>> Subject: Re: How to resolve error : Left side ($menuCurrentPage) of '=='
>> operation has null value. If a reference, it may not be in the context.
>> Operation not possible.
>>
>> Ok, it helps to know that you are using Struts 1 and VelocityTools.
>> This means it is likely that you are not creating/managing your own
>> Context object.  Right?   So how *are* you making data available to
>> your templates?  Where is the "$currentMenuPage" reference supposed to
>> come from?  Is it from a custom tool?  If so, what scope is that tool?
>>  Are you putting values into the request attributes?  Into the session
>> attributes?  Into the servlet context attributes?  Or are you somehow
>> grabbing the context and putting them in there.
>>
>> Your templates should all be thread safe insofar as they don't go
>> around doing things like $application.setAttribute('foo','bar') (or
>> similar things with $session or tools put in either of those scopes).
>>
>> Also, what version of Velocity are you using?
>>
>> On Wed, Apr 29, 2009 at 12:22 AM, RUPALI <r.gupta1@mpstechnologies.com>
>> wrote:
>>> Yes I am using Struts framework. (Struts 1.2.9) I am using velocity tools
>>> also.
>>>
>>> About thread safety, I am not sure how can I check this. But as this is
> an
>>> existing and big application, it must be working in thread safe manner..
>>> Could you suggest me how to look for the thread safety for velocity
> files?
>>>
>>> -----Original Message-----
>>> From: Nathan Bubna [mailto:nbubna@gmail.com]
>>> Sent: Tuesday, April 28, 2009 7:21 PM
>>> To: Velocity Users List
>>> Subject: Re: How to resolve error : Left side ($menuCurrentPage) of '=='
>>> operation has null value. If a reference, it may not be in the context.
>>> Operation not possible.
>>>
>>> Without knowing a lot more about how you populate and use your
>>> context, i'm really not sure.  Are you using a framework? If so, which
>>> one?  Are you using VelocityTools at all?  Are you sure your context
>>> is being handled in a threadsafe manner?  Velocity looks for
>>> references in the context it is given.  It's mostly up to you to make
>>> sure that context is properly filled and used.
>>>
>>> On Mon, Apr 27, 2009 at 8:35 PM, RUPALI <r.gupta1@mpstechnologies.com>
>>> wrote:
>>>> Thanks Nathan,
>>>> But how is this possible that the error goes on page refresh? And its
> not
>>>> just for variable $menuCurrentPage, randomly the message generates for
>> any
>>>> variable and resolves on page refresh..??
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Nathan Bubna [mailto:nbubna@gmail.com]
>>>> Sent: Monday, April 27, 2009 7:17 PM
>>>> To: Velocity Users List
>>>> Subject: Re: How to resolve error : Left side ($menuCurrentPage) of '=='
>>>> operation has null value. If a reference, it may not be in the context.
>>>> Operation not possible.
>>>>
>>>> Yes, it is a Velocity message.  it means that in the template being
>>>> processed at that time, there is no value for th $menuCurrentPage
>>>> variable when it is being used in an #if( $menuCurrentPage ==
>>>> 'something' ) comparison (or an #elseif).
>>>>
>>>> On Sun, Apr 26, 2009 at 11:33 PM, RUPALI <r.gupta1@mpstechnologies.com>
>>>> wrote:
>>>>> Hi,
>>>>>
>>>>>
>>>>>
>>>>> The problem I am facing is that occasionally Resourcenotfound/unable
to
>>>>> parse file  error comes on the velocity pages which go on page refresh.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> The following error is shown in the server logs before the logging of
>>>>> resourcenotfound exception:
>>>>>
>>>>> Left side ($menuCurrentPage) of '==' operation has null value. If a
>>>>> reference, it may not be in the context. Operation not possible.
>>>>>
>>>>>
>>>>>
>>>>> Is something related to the velocity engine here?
>>>>>
>>>>> The problem is occurring right now only on staging site of my website,
>>> and
>>>>> thankfully is not on Live. But it is happening a lot of times on
> staging
>>>> and
>>>>> is becoming troublesome
>>>>>
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Rupali
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
>>>> For additional commands, e-mail: user-help@velocity.apache.org
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
>>>> For additional commands, e-mail: user-help@velocity.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
>>> For additional commands, e-mail: user-help@velocity.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
>>> For additional commands, e-mail: user-help@velocity.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: user-help@velocity.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: user-help@velocity.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message