You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adam Heath <do...@brainfood.com> on 2010/06/25 22:20:06 UTC

FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

BJ Freeman wrote:
> as i said don't believe it is you.
> however from my email on the user ML
> LimitedSubContentCacheTransform.java has not been touched since the 4th.
> here is the log from the site
> --------------------------------------------------------------
> java.lang.UnsupportedOperationException
> javolution.util.FastCollection.add(FastCollection.java:169)
> org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.prepCtx(LimitedSubContentCacheTransform.java:264)
> org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.getNextMatchingEntity(LimitedSubContentCacheTransform.java:319)
> org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.afterBody(LimitedSubContentCacheTransform.java:203)

As always, report the full exception, and steps to reproduce.

At a guess, this is due to a FastMap having keySet() or values() be
called, and upper-level code then trying to do an add() on the
resulting collection.

This is not a bug in javolution, or in the internal code in ofbiz that
returns a keySet() or values() directly.  The bug is that the
low-level code is attempting to modify the collection; it shouldn't be
doing that.

Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by BJ Freeman <bj...@free-man.net>.
http://demo-trunk.ofbiz.apache.org/ecommerce/
       :ERROR MESSAGE:
       org.ofbiz.widget.screen.ScreenRenderException: Error rendering 
screen [component://ecommerce/widget/ContentScreens.xml#factoids]: 
java.lang.UnsupportedOperationException (null)

as reported on the user ML

=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin 
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


Adam Heath sent the following on 6/25/2010 1:20 PM:
> BJ Freeman wrote:
>> as i said don't believe it is you.
>> however from my email on the user ML
>> LimitedSubContentCacheTransform.java has not been touched since the 4th.
>> here is the log from the site
>> --------------------------------------------------------------
>> java.lang.UnsupportedOperationException
>> javolution.util.FastCollection.add(FastCollection.java:169)
>> org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.prepCtx(LimitedSubContentCacheTransform.java:264)
>> org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.getNextMatchingEntity(LimitedSubContentCacheTransform.java:319)
>> org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.afterBody(LimitedSubContentCacheTransform.java:203)
>
> As always, report the full exception, and steps to reproduce.
>
> At a guess, this is due to a FastMap having keySet() or values() be
> called, and upper-level code then trying to do an add() on the
> resulting collection.
>
> This is not a bug in javolution, or in the internal code in ofbiz that
> returns a keySet() or values() directly.  The bug is that the
> low-level code is attempting to modify the collection; it shouldn't be
> doing that.
>


Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by Adam Heath <do...@brainfood.com>.
Adam Heath wrote:
> Adam Heath wrote:
>> Adam Heath wrote:
>>> BJ Freeman wrote:
>>>> I check the ofbiz code files for any changes since last week and now. I
>>>> did not see any.
>>>> I have a trunk version that does not have this error from last week.
>>> I've got it isolated, but not fixed.  FastList is not functioning the
>>> same as ArrayList, and it's got me purplexed.  Still investigating.
>> Wow, what a bug.
>>
>> ArrayList.subList().add(Object) works.
>>
>> FastList.subList().add(Object) throws UnsupportedOperationException.
> 
> I'll file a javolution bug about this.

https://javolution.dev.java.net/issues/show_bug.cgi?id=72


Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by BJ Freeman <bj...@free-man.net>.
highest priority is ofbiz is stable.
second priority is consistency in code.

=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin 
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


Adam Heath sent the following on 6/25/2010 4:27 PM:
> BJ Freeman wrote:
>> thanks have updated the thread on user ML
>
> I'm debating whether to roll back my change; granted, that is what
> caused this ofbiz bug.  However, there's nothing that says we couldn't
> have the same problem occur with other uses of FastList.subList.add().
>
>


Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by Adam Heath <do...@brainfood.com>.
BJ Freeman wrote:
> thanks have updated the thread on user ML

I'm debating whether to roll back my change; granted, that is what
caused this ofbiz bug.  However, there's nothing that says we couldn't
have the same problem occur with other uses of FastList.subList.add().


Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by BJ Freeman <bj...@free-man.net>.
thanks have updated the thread on user ML

=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin 
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


Adam Heath sent the following on 6/25/2010 4:18 PM:
> I'll file a javolution bug about this.


Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by Adam Heath <do...@brainfood.com>.
Adam Heath wrote:
> Adam Heath wrote:
>> BJ Freeman wrote:
>>> I check the ofbiz code files for any changes since last week and now. I
>>> did not see any.
>>> I have a trunk version that does not have this error from last week.
>> I've got it isolated, but not fixed.  FastList is not functioning the
>> same as ArrayList, and it's got me purplexed.  Still investigating.
> 
> Wow, what a bug.
> 
> ArrayList.subList().add(Object) works.
> 
> FastList.subList().add(Object) throws UnsupportedOperationException.

I'll file a javolution bug about this.

Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by Adam Heath <do...@brainfood.com>.
BJ Freeman wrote:
> that is about what I expected
> thanks for finding it.
> what caused it though.

956470, which is something I did.  But I wouldn't expect that FastList
would not obey the List.subList contract, specifically that the
returned list supports the same set of optional methods as the original.

Since the original supports add(Object), the subList should as well.

Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by BJ Freeman <bj...@free-man.net>.
that is about what I expected
thanks for finding it.
what caused it though.

=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin 
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


Adam Heath sent the following on 6/25/2010 4:11 PM:
> Adam Heath wrote:
>> BJ Freeman wrote:
>>> I check the ofbiz code files for any changes since last week and now. I
>>> did not see any.
>>> I have a trunk version that does not have this error from last week.
>>
>> I've got it isolated, but not fixed.  FastList is not functioning the
>> same as ArrayList, and it's got me purplexed.  Still investigating.
>
> Wow, what a bug.
>
> ArrayList.subList().add(Object) works.
>
> FastList.subList().add(Object) throws UnsupportedOperationException.
>


Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by Adam Heath <do...@brainfood.com>.
Adam Heath wrote:
> BJ Freeman wrote:
>> I check the ofbiz code files for any changes since last week and now. I
>> did not see any.
>> I have a trunk version that does not have this error from last week.
> 
> I've got it isolated, but not fixed.  FastList is not functioning the
> same as ArrayList, and it's got me purplexed.  Still investigating.

Wow, what a bug.

ArrayList.subList().add(Object) works.

FastList.subList().add(Object) throws UnsupportedOperationException.

Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by Adam Heath <do...@brainfood.com>.
BJ Freeman wrote:
> I check the ofbiz code files for any changes since last week and now. I
> did not see any.
> I have a trunk version that does not have this error from last week.

I've got it isolated, but not fixed.  FastList is not functioning the
same as ArrayList, and it's got me purplexed.  Still investigating.

Re: FastCollection.add -> UnsupportedOperationException Re: concurrent, parallel loading stuff

Posted by BJ Freeman <bj...@free-man.net>.
I check the ofbiz code files for any changes since last week and now. I 
did not see any.
I have a trunk version that does not have this error from last week.


=========================
BJ Freeman
http://bjfreeman.elance.com
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>

Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man
Linkedin 
<http://www.linkedin.com/profile?viewProfile=&key=1237480&locale=en_US&trk=tab_pro>


Adam Heath sent the following on 6/25/2010 1:20 PM:
> BJ Freeman wrote:
>> as i said don't believe it is you.
>> however from my email on the user ML
>> LimitedSubContentCacheTransform.java has not been touched since the 4th.
>> here is the log from the site
>> --------------------------------------------------------------
>> java.lang.UnsupportedOperationException
>> javolution.util.FastCollection.add(FastCollection.java:169)
>> org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.prepCtx(LimitedSubContentCacheTransform.java:264)
>> org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.getNextMatchingEntity(LimitedSubContentCacheTransform.java:319)
>> org.ofbiz.content.webapp.ftl.LimitedSubContentCacheTransform$1.afterBody(LimitedSubContentCacheTransform.java:203)
>
> As always, report the full exception, and steps to reproduce.
>
> At a guess, this is due to a FastMap having keySet() or values() be
> called, and upper-level code then trying to do an add() on the
> resulting collection.
>
> This is not a bug in javolution, or in the internal code in ofbiz that
> returns a keySet() or values() directly.  The bug is that the
> low-level code is attempting to modify the collection; it shouldn't be
> doing that.
>