Hello all,

we have multithreaded Content Aggregator which is based on the CIncludeTransformer and it also implements CacheableProcessingComponent for caching .. it used to work fine for cocoon 2.1.x but with cocoon 2.2 it gives strange error .. it is actually a generator and it gives error in the generate method ..

the code where it gives error

// generate...
           for (Part part : this.parts) {
               if (this.manager.hasService(IncludeCacheManager.ROLE)) {
part.uri = this.cacheManager.load(part.uri, this.cachingSession);
               } else {
                   this.getLogger().error(
"The ContentAggregator: aggregator cannot find the IncludeCacheManager");
               }
           }

           // aggregate...
           StreamPipe streamPipe = new StreamPipe(this.contentHandler);
           for (Part part : this.parts) {
streamPipe.firstElement(part.element, this.rootElement, part.stripRootElement);
               try {
System.out.println("ParallelContentAgg.part.uri:" + part.uri); this.cacheManager.stream(part.uri, this.cachingSession, streamPipe);
               } finally {
                   streamPipe.lastElement(part.element);
               }
           }

it gives the following error

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.org.apache.cocoon.el.objectmodel.ObjectModel': Scope 'request' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request? If you are actually operating within a web request and still receive this message,your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request. at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:293) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:33) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:184)
       at $Proxy2.cleanupLocalContext(Unknown Source)
at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:382) at org.apache.cocoon.components.source.util.SourceUtil.toSAX(SourceUtil.java:111) at org.apache.cocoon.components.source.util.SourceUtil.toSAX(SourceUtil.java:170) at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:63) at org.apache.cocoon.transformation.helpers.DefaultIncludeCacheManager$LoaderThread.run(DefaultIncludeCacheManager.java:415) at org.apache.cocoon.environment.CocoonRunnable.doRun(CocoonRunnable.java:64) at org.apache.cocoon.environment.internal.EnvironmentHelper$AbstractCocoonRunnable.run(EnvironmentHelper.java:453) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
       ... 1 more


am new to spring so its difficult to figure out where the problem is .. any help would be appreciated ...

Regards

Imran



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to