Re: HELP needed with latest Cocoon 2.2 (JNET / SSF)

2010-02-04 Thread Reinhard Pötz
Reinhard Pötz wrote:
> Gabriel Gruber wrote:
>> Hi Joe,
>>
>> well, I don't have a replayable scenario yet (f.i. testcase), but it
>> seems that the exception comes after heavy use of cocoon pages within
>> our application.  
>> I suspect that cocoon:/ protocol usage AND/OR  inheritence of sitemap
>> calling (we "extend" cocoon-forms block to override specific resources)
>> might be the root of problem. But that is only a guess...
>>
>> We are using latest trunk versions of servlet-service-framework and jnet
>> subprojects.  I know that Grek made some changes in cocoon servlet
>> service framework in summer 2009, which went into the 1.2 release, which
>> we are using (since then no changes have been comitted).
>>
>> The problems reported here (exact same problem we have)
>>
>> http://jira.dspace.org/jira/browse/DS-253?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel
> 
> I had a look at the JNet code and haven't found a cause for your
> problems. The list of URLStreamHandlerFactory objects is stored in a
> thread local.
> 
> I propose that you add extensive logging to
> org.apache.cocoon.jnet.URLHandlerFactoryCollector,
> org.apache.cocoon.jnet.DynamicURLStreamHandlerFactory and
> org.apache.cocoon.jnet.URLStreamHandlerFactoryInstaller
> 
> Then create a special logging target for all org.apache.cocoon.jnet
> messages and make sure that you also log the tread ids.
> 
> Then try to reproduce your problems and you should get a hint from the
> logs what could be the cause of empty lists.
> 
> Maybe you can also provide a patch with the logging statements.

It might also be interesting to see, whether the exceptions changes (or
disappears) if you change line 42 of
o.a.c.jnet.DynamicURLStreamHandlerFactory to

list = Collections.synchronizedList(new
LinkedList());


Steven and I experimented with linked lists today and didn't find a way
to produce a NPE as long as only a single thread accesses it. Those
exceptions only occur in the case of multiple threads modifying it
without synchronization.
So I expect that this change will just lead to an
IndexOutOfBoundException ...

-- 
Reinhard Pötz   Managing Director, {Indoqa} GmbH
 http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member  reinh...@apache.org


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: HELP needed with latest Cocoon 2.2 (JNET / SSF)

2010-02-04 Thread Reinhard Pötz
Gabriel Gruber wrote:
> 
> Hi Joe,
> 
> well, I don't have a replayable scenario yet (f.i. testcase), but it
> seems that the exception comes after heavy use of cocoon pages within
> our application.  
> I suspect that cocoon:/ protocol usage AND/OR  inheritence of sitemap
> calling (we "extend" cocoon-forms block to override specific resources)
> might be the root of problem. But that is only a guess...
> 
> We are using latest trunk versions of servlet-service-framework and jnet
> subprojects.  I know that Grek made some changes in cocoon servlet
> service framework in summer 2009, which went into the 1.2 release, which
> we are using (since then no changes have been comitted).
> 
> The problems reported here (exact same problem we have)
> 
> http://jira.dspace.org/jira/browse/DS-253?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel

I had a look at the JNet code and haven't found a cause for your
problems. The list of URLStreamHandlerFactory objects is stored in a
thread local.

I propose that you add extensive logging to
org.apache.cocoon.jnet.URLHandlerFactoryCollector,
org.apache.cocoon.jnet.DynamicURLStreamHandlerFactory and
org.apache.cocoon.jnet.URLStreamHandlerFactoryInstaller

Then create a special logging target for all org.apache.cocoon.jnet
messages and make sure that you also log the tread ids.

Then try to reproduce your problems and you should get a hint from the
logs what could be the cause of empty lists.

Maybe you can also provide a patch with the logging statements.

-- 
Reinhard Pötz   Managing Director, {Indoqa} GmbH
 http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member  reinh...@apache.org


-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



Re: HELP needed with latest Cocoon 2.2 (JNET / SSF)

2010-02-02 Thread Gabriel Gruber
Hi Joe,

well, I don't have a replayable scenario yet (f.i. testcase), but it seems 
that the exception comes after heavy use of cocoon pages within our 
application. 
I suspect that cocoon:/ protocol usage AND/OR  inheritence of sitemap 
calling (we "extend" cocoon-forms block to override specific resources) 
might be the root of problem. But that is only a guess...

We are using latest trunk versions of servlet-service-framework and jnet 
subprojects.  I know that Grek made some changes in cocoon servlet service 
framework in summer 2009, which went into the 1.2 release, which we are 
using (since then no changes have been comitted).

The problems reported here (exact same problem we have) 

http://jira.dspace.org/jira/browse/DS-253?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel
suspects that some classes within SSF are not threadsafe?


best regards,
Gabriel


Jos Snellings  wrote on 03.02.2010 06:59:27:

> Hi Gabriel,
> 
> Very strange to have that exception there!
> When does it happen? Is it predictable?
> 
> Kind regards,
> Jos
> 
> On Tue, 2010-02-02 at 19:44 +0100, Gabriel Gruber wrote:
> > 
> > Hello comunity, 
> > 
> > I found a serious bug in JNET / servlet service framework in our
> > cocoon 2.2 based application. After some time the following Exception
> > pops up and the only way to resolve is to restart the web
> > application... 
> > 
> > 
> > java.lang.NullPointerException
> > java.util.LinkedList.remove(LinkedList.java:646)
> > java.util.LinkedList.remove(LinkedList.java:360)
> > 
> > org.apache.cocoon.jnet.DynamicURLStreamHandlerFactory.
> pop(DynamicURLStreamHandlerFactory.java:30)
> > 
> > org.apache.cocoon.jnet.URLHandlerFactoryCollector.
> popUrlHandlerFactories(URLHandlerFactoryCollector.java:57)
> > 
> > org.apache.cocoon.jnet.URLHandlerFactoryCollector.
> installURLHandlers(URLHandlerFactoryCollector.java:39)
> > sun.reflect.GeneratedMethodAccessor516.invoke(Unknown
> > Source)
> > 
> > sun.reflect.DelegatingMethodAccessorImpl.
> invoke(DelegatingMethodAccessorImpl.java:25)
> > java.lang.reflect.Method.invoke(Method.java:585)
> > 
> > org.springframework.aop.aspectj.AbstractAspectJAdvice.
> invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
> > 
> > org.springframework.aop.aspectj.AbstractAspectJAdvice.
> invokeAdviceMethod(AbstractAspectJAdvice.java:616)
> > 
> > org.springframework.aop.aspectj.AspectJAroundAdvice.
> invoke(AspectJAroundAdvice.java:64)
> > 
> > org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:171)
> > 
> > org.springframework.aop.interceptor.ExposeInvocationInterceptor.
> invoke(ExposeInvocationInterceptor.java:89)
> > 
> > org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:171)
> > 
> > org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:204)
> > $Proxy34.service(Unknown Source)
> > org.apache.cocoon.servletservice.ServletServiceContext
> > $PathDispatcher.forward(ServletServiceContext.java:481)
> > org.apache.cocoon.servletservice.ServletServiceContext
> > $PathDispatcher.forward(ServletServiceContext.java:455)
> > 
> > org.apache.cocoon.servletservice.spring.ServletFactoryBean
> > $ServiceInterceptor.invoke(ServletFactoryBean.java:245)
> > 
> > org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:171)
> > 
> > org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:204)
> > $Proxy94.service(Unknown Source)
> > 
> > org.apache.cocoon.servletservice.DispatcherServlet.
> service(DispatcherServlet.java:106)
> > 
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > 
> > org.apache.cocoon.servlet.multipart.MultipartFilter.
> doFilter(MultipartFilter.java:131)
> > 
> > Any Ideas? 
> > 
> > I found a Jira Thread of another project using cocoon and having
> > similar problems... 
> > http://jira.dspace.org/jira/browse/DS-253?page=com.atlassian.jira.
> plugin.system.issuetabpanels%3Acomment-tabpanel 
> > 
> > cheers, 
> > 
> > Gabriel
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
> For additional commands, e-mail: users-h...@cocoon.apache.org
> 


Re: HELP needed with latest Cocoon 2.2 (JNET / SSF)

2010-02-02 Thread Jos Snellings
Hi Gabriel,

Very strange to have that exception there!
When does it happen? Is it predictable?

Kind regards,
Jos

On Tue, 2010-02-02 at 19:44 +0100, Gabriel Gruber wrote:
> 
> Hello comunity, 
> 
> I found a serious bug in JNET / servlet service framework in our
> cocoon 2.2 based application. After some time the following Exception
> pops up and the only way to resolve is to restart the web
> application... 
> 
> 
> java.lang.NullPointerException
> java.util.LinkedList.remove(LinkedList.java:646)
> java.util.LinkedList.remove(LinkedList.java:360)
> 
> org.apache.cocoon.jnet.DynamicURLStreamHandlerFactory.pop(DynamicURLStreamHandlerFactory.java:30)
> 
> org.apache.cocoon.jnet.URLHandlerFactoryCollector.popUrlHandlerFactories(URLHandlerFactoryCollector.java:57)
> 
> org.apache.cocoon.jnet.URLHandlerFactoryCollector.installURLHandlers(URLHandlerFactoryCollector.java:39)
> sun.reflect.GeneratedMethodAccessor516.invoke(Unknown
> Source)
> 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> java.lang.reflect.Method.invoke(Method.java:585)
> 
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
> 
> org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
> 
> org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
> 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> 
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
> 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> $Proxy34.service(Unknown Source)
> org.apache.cocoon.servletservice.ServletServiceContext
> $PathDispatcher.forward(ServletServiceContext.java:481)
> org.apache.cocoon.servletservice.ServletServiceContext
> $PathDispatcher.forward(ServletServiceContext.java:455)
> 
> org.apache.cocoon.servletservice.spring.ServletFactoryBean
> $ServiceInterceptor.invoke(ServletFactoryBean.java:245)
> 
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> 
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> $Proxy94.service(Unknown Source)
> 
> org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106)
> 
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131)
> 
> Any Ideas? 
> 
> I found a Jira Thread of another project using cocoon and having
> similar problems... 
> http://jira.dspace.org/jira/browse/DS-253?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel
>  
> 
> cheers, 
> 
> Gabriel



-
To unsubscribe, e-mail: users-unsubscr...@cocoon.apache.org
For additional commands, e-mail: users-h...@cocoon.apache.org



HELP needed with latest Cocoon 2.2 (JNET / SSF)

2010-02-02 Thread Gabriel Gruber
Hello comunity,

I found a serious bug in JNET / servlet service framework in our cocoon 
2.2 based application. After some time the following Exception pops up and 
the only way to resolve is to restart the web application...


java.lang.NullPointerException
 java.util.LinkedList.remove(LinkedList.java:646)
 java.util.LinkedList.remove(LinkedList.java:360)
 
org.apache.cocoon.jnet.DynamicURLStreamHandlerFactory.pop(DynamicURLStreamHandlerFactory.java:30)
 
org.apache.cocoon.jnet.URLHandlerFactoryCollector.popUrlHandlerFactories(URLHandlerFactoryCollector.java:57)
 
org.apache.cocoon.jnet.URLHandlerFactoryCollector.installURLHandlers(URLHandlerFactoryCollector.java:39)
 sun.reflect.GeneratedMethodAccessor516.invoke(Unknown 
Source)
 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:585)
 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:627)
 
org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:616)
 
org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:64)
 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 $Proxy34.service(Unknown Source)
 
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:481)
 
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:455)
 
org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:245)
 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 $Proxy94.service(Unknown Source)
 
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 
org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131)

Any Ideas?

I found a Jira Thread of another project using cocoon and having similar 
problems...
http://jira.dspace.org/jira/browse/DS-253?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel

cheers,

Gabriel