velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nbu...@gmail.com>
Subject Re: Null pointer with parser pool in 1.6.3
Date Mon, 21 Jun 2010 14:04:45 GMT
Hmm.  All you did was add an additional check of a particular
subsystem using double-checked locking, and try/catch logging errors.
Not an ideal fix.  I would love to know a little more about what
exactly you are doing when you get the NPE.  Can i see the relevant
portions of the stack trace?

Also, barring a fix on our end, my recommended fix would be to just
manually call init().  The auto-init feature was only meant as a
convenience feature and was never really recommended for advanced
users, particularly in single-threaded situations.  For multi-threaded
things like webapps, i would always recommend you do your init at app
startup (servlet/filter init), and not let it wait until runtime.

PS diffs are easier to read when there aren't dozens of useless style
tweaks included

On Mon, Jun 21, 2010 at 6:50 AM, Jason Tesser <jasontesser@gmail.com> wrote:
> Here is the DIFF
>
> http://pastebin.com/jh13sXgt
>
> Java 1.5 and 1.6 experienced on Linux server and Local OSX
>
> It automatically inits I believe.
>
> Thanks,
> Jason Tesser
> dotCMS Lead Development Manager
> 1-305-858-1422
>
>
> On Mon, Jun 21, 2010 at 9:46 AM, Nathan Bubna <nbubna@gmail.com> wrote:
>
>> I think the mailing list stripped the diff off.   So, what Java
>> version are you using?  Are you manually calling init() or letting
>> your Engine instance automatically call it when needed?
>>
>> On Mon, Jun 21, 2010 at 6:43 AM, Jason Tesser <jasontesser@gmail.com>
>> wrote:
>> > OK I know 1.6.4 was released but I didn't see anything in it that would
>> fix
>> > this.
>> >
>> > We were getting initialized = true in the runtimeservices but the
>> parserpool
>> > would be null
>> >
>> > Attached is the diff we used to prevent the issue.  What do you guys
>> think?
>> >
>> > The whole thing seems weird to me as the init is synced.
>> >
>> > Thanks,
>> > Jason Tesser
>> > dotCMS Lead Development Manager
>> > 1-305-858-1422
>> >
>> >
>> > ---------------------------------------------------------------------
>> > 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