Giacomo Pati pisze: > > > Giacomo Pati wrote: > > <snip-all> > > I've isolated the culprit commit that caused our application to stop working. > Our application works > fine up to and excluding commit r567329 which was > http://article.gmane.org/gmane.text.xml.cocoon.cvs/24998/match=r567329: > > cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-impl/src/main/java/org/apache/cocoon/components/treeprocessor/InvokeContext.java > Sat Aug 18 14:12:45 2007 >> @@ -231,6 +231,8 @@ >> final String sitemapObjectModelPathPrefix = "sitemap"; >> final String sitemapObjectModelNamedPathPrefix = >> sitemapObjectModelPathPrefix + "/$named$"; > >> + newObjectModel.markLocalContext(); >> + >> this.mapStack.add(map); > >> if (getLogger().isDebugEnabled()) { >> @@ -292,6 +294,7 @@ >> Object name = this.mapToName.get(map); >> this.mapToName.remove(map); >> this.nameToMap.remove(name); >> + this.newObjectModel.cleanupLocalContext(); >> } > > > Looking at the commit above and the stack trace we have got > > Caused by: java.lang.UnsupportedOperationException > at > org.apache.commons.collections.map.UnmodifiableMap.remove(UnmodifiableMap.java:115) > at > org.apache.commons.collections.map.AbstractMapDecorator.remove(AbstractMapDecorator.java:114) > at > org.apache.cocoon.objectmodel.ObjectModelImpl.removeAt(ObjectModelImpl.java:167) > at > org.apache.cocoon.objectmodel.ObjectModelImpl.cleanupLocalContext(ObjectModelImpl.java:177) > > it seams that the cleanupLocalContext() method will modify a UnmodifiableMap > which of cource will > produce this exception. > > Now, before I'll dig into it, I'll ask here whether this is something obvious > to someone? > > Ciao and thanks
Giacomo, I'm lost with your issues. What about NPE you had, what about my sample? Does this work for you, now? When looking at this issue and the stacktrace you have given above I'm feeling like having Déjà vu. I have experienced problem with UnmodifiableMap at the time I made the commit you mentioned and I thought that I had fixed it immediately. It turns out that I must have forgot to do it and lost my fix while upgrading my hardware... I'm going to find a proper fix now. Thanks for reporting. -- Grzegorz Kossakowski Committer and PMC Member of Apache Cocoon http://reflectingonthevicissitudes.wordpress.com/
