You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by og...@yahoo.com on 2004/12/07 19:12:04 UTC

NPE: map.LRUMap.reuseMapping(LRUMap.java:272)

Hello,

I'm using Collections 3.1 and just found this NPE in my logs:

java.lang.NullPointerException
        at
org.apache.commons.collections.map.LRUMap.reuseMapping(LRUMap.java:272)
        at
org.apache.commons.collections.map.LRUMap.addMapping(LRUMap.java:243)
        at
org.apache.commons.collections.map.AbstractHashedMap.put(AbstractHashedMap.java:282)


This looks like a bug.  Is this a known issue?
I instantiated LRUMap like this:

  LRUMap map = new LRUMap(31);

And from there on, I use it like I'd use any Map, putting things into
it, and so on.  Maybe I'm not using LRUMap correctly?  My _guess_ is
that this occurs when the Map is full, but I am not certain.

I am wrapping the LRUMap in my own Maps as follows, but I think they're
not the culprit:

  LRUMap map = new LRUMap(31);
    _userSessions = new ExpiringMap(map,
       new TimerTTLReferenceHolder(1800000), // ttl=30min
       300000);                              // purge frequency=5min


I checked Bugzilla and I checked the CVS log for LRUMap, but I don't
see any mentions of relevant bug fixes.  The only similar thing I found
is:
http://issues.apache.org/bugzilla/show_bug.cgi?id=28887

And it looks like that was fixed before 3.1 release.

I'm seeing this error in production ( http://www.simpy.com ), so any
help would be mucho appreciated.

Thanks,
Otis
P.S.
If it helps, I can put this in Bugzilla.


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


Re: NPE: map.LRUMap.reuseMapping(LRUMap.java:272)

Posted by og...@yahoo.com.
Hello Stephen,

Thanks for such a quick reply.  I added the problem to Buzgilla:

  http://issues.apache.org/bugzilla/show_bug.cgi?id=32573

Thanks,
Otis


--- Stephen Colebourne <sc...@btopenworld.com> wrote:

> This looks like a bug. Could you please add it to
> bugzilla. It would help greatly, and speed a fix, if
> you can identify a small test case that causes the
> problem.
> Thanks
> Stephen
> 
> 
>  --- ogjunk-commons@yahoo.com wrote: 
> > Hello,
> > 
> > I'm using Collections 3.1 and just found this NPE in
> > my logs:
> > 
> > java.lang.NullPointerException
> >         at
> >
>
org.apache.commons.collections.map.LRUMap.reuseMapping(LRUMap.java:272)
> >         at
> >
> org.apache.commons.collections.map.LRUMap.addMapping(LRUMap.java:243)
> >         at
> >
>
org.apache.commons.collections.map.AbstractHashedMap.put(AbstractHashedMap.java:282)
> > 
> > 
> > This looks like a bug.  Is this a known issue?
> > I instantiated LRUMap like this:
> > 
> >   LRUMap map = new LRUMap(31);
> > 
> > And from there on, I use it like I'd use any Map,
> > putting things into
> > it, and so on.  Maybe I'm not using LRUMap
> > correctly?  My _guess_ is
> > that this occurs when the Map is full, but I am not
> > certain.
> > 
> > I am wrapping the LRUMap in my own Maps as follows,
> > but I think they're
> > not the culprit:
> > 
> >   LRUMap map = new LRUMap(31);
> >     _userSessions = new ExpiringMap(map,
> >        new TimerTTLReferenceHolder(1800000), //
> > ttl=30min
> >        300000);                              //
> > purge frequency=5min
> > 
> > 
> > I checked Bugzilla and I checked the CVS log for
> > LRUMap, but I don't
> > see any mentions of relevant bug fixes.  The only
> > similar thing I found
> > is:
> >
> http://issues.apache.org/bugzilla/show_bug.cgi?id=28887
> > 
> > And it looks like that was fixed before 3.1 release.
> > 
> > I'm seeing this error in production (
> > http://www.simpy.com ), so any
> > help would be mucho appreciated.
> > 
> > Thanks,
> > Otis
> > P.S.
> > If it helps, I can put this in Bugzilla.
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > commons-user-help@jakarta.apache.org
> > 
> >  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


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


Re: NPE: map.LRUMap.reuseMapping(LRUMap.java:272)

Posted by Stephen Colebourne <sc...@btopenworld.com>.
This looks like a bug. Could you please add it to
bugzilla. It would help greatly, and speed a fix, if
you can identify a small test case that causes the
problem.
Thanks
Stephen


 --- ogjunk-commons@yahoo.com wrote: 
> Hello,
> 
> I'm using Collections 3.1 and just found this NPE in
> my logs:
> 
> java.lang.NullPointerException
>         at
>
org.apache.commons.collections.map.LRUMap.reuseMapping(LRUMap.java:272)
>         at
>
org.apache.commons.collections.map.LRUMap.addMapping(LRUMap.java:243)
>         at
>
org.apache.commons.collections.map.AbstractHashedMap.put(AbstractHashedMap.java:282)
> 
> 
> This looks like a bug.  Is this a known issue?
> I instantiated LRUMap like this:
> 
>   LRUMap map = new LRUMap(31);
> 
> And from there on, I use it like I'd use any Map,
> putting things into
> it, and so on.  Maybe I'm not using LRUMap
> correctly?  My _guess_ is
> that this occurs when the Map is full, but I am not
> certain.
> 
> I am wrapping the LRUMap in my own Maps as follows,
> but I think they're
> not the culprit:
> 
>   LRUMap map = new LRUMap(31);
>     _userSessions = new ExpiringMap(map,
>        new TimerTTLReferenceHolder(1800000), //
> ttl=30min
>        300000);                              //
> purge frequency=5min
> 
> 
> I checked Bugzilla and I checked the CVS log for
> LRUMap, but I don't
> see any mentions of relevant bug fixes.  The only
> similar thing I found
> is:
>
http://issues.apache.org/bugzilla/show_bug.cgi?id=28887
> 
> And it looks like that was fixed before 3.1 release.
> 
> I'm seeing this error in production (
> http://www.simpy.com ), so any
> help would be mucho appreciated.
> 
> Thanks,
> Otis
> P.S.
> If it helps, I can put this in Bugzilla.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> commons-user-help@jakarta.apache.org
> 
>  

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