You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Joe Bergmark (JIRA)" <ji...@apache.org> on 2010/10/11 22:19:32 UTC

[jira] Created: (OWB-471) Possible StackOverflowException from defineProducerMethods in WebBeansAnnotatedTypeUtil

Possible StackOverflowException from defineProducerMethods in WebBeansAnnotatedTypeUtil
---------------------------------------------------------------------------------------

                 Key: OWB-471
                 URL: https://issues.apache.org/jira/browse/OWB-471
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Core
    Affects Versions: 1.0.0-alpha-2
            Reporter: Joe Bergmark
            Assignee: Joe Bergmark
            Priority: Minor
             Fix For: 1.0.1


As part of calling DefinitionUtl.defineScope, WebBeansAnnotatedTypeUtil's defineProducerMethod creates an error message using the AnnotatedMethodImpl's toString method.

This toString method in turn calls it super in AbstractAnnotatedCallable, which in turn calls toString on all of its AnnotatedParameterImpls.  Unfortunately then AnnotatedParameterImpl calls toString on its declaringCallable, which can create an infinite loop if that turns out to be the original AbstractAnnotatedCallable again.

This doesn't happen all of the time, so its probably an application issue, but it would be better if we identified it as such rather than blowing up with a stack overflow exception.  I'll paste a snippet of the stacktrace below:

	at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
	at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
	at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)
	at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
	at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
	at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OWB-471) Possible StackOverflowException from defineProducerMethods in WebBeansAnnotatedTypeUtil

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bergmark resolved OWB-471.
------------------------------

    Resolution: Fixed

> Possible StackOverflowException from defineProducerMethods in WebBeansAnnotatedTypeUtil
> ---------------------------------------------------------------------------------------
>
>                 Key: OWB-471
>                 URL: https://issues.apache.org/jira/browse/OWB-471
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-alpha-2
>            Reporter: Joe Bergmark
>            Assignee: Joe Bergmark
>            Priority: Minor
>             Fix For: 1.1.0, 1.0.1
>
>
> As part of calling DefinitionUtl.defineScope, WebBeansAnnotatedTypeUtil's defineProducerMethod creates an error message using the AnnotatedMethodImpl's toString method.
> This toString method in turn calls it super in AbstractAnnotatedCallable, which in turn calls toString on all of its AnnotatedParameterImpls.  Unfortunately then AnnotatedParameterImpl calls toString on its declaringCallable, which can create an infinite loop if that turns out to be the original AbstractAnnotatedCallable again.
> This doesn't happen all of the time, so its probably an application issue, but it would be better if we identified it as such rather than blowing up with a stack overflow exception.  I'll paste a snippet of the stacktrace below:
> 	at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
> 	at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
> 	at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)
> 	at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
> 	at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
> 	at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OWB-471) Possible StackOverflowException from defineProducerMethods in WebBeansAnnotatedTypeUtil

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12919974#action_12919974 ] 

Joe Bergmark commented on OWB-471:
----------------------------------

My initial assumption that this was an application problem was incorrect.

This appear to occur for any producer method with a parameter.  I'll also add a unit test to cover this case.

> Possible StackOverflowException from defineProducerMethods in WebBeansAnnotatedTypeUtil
> ---------------------------------------------------------------------------------------
>
>                 Key: OWB-471
>                 URL: https://issues.apache.org/jira/browse/OWB-471
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-alpha-2
>            Reporter: Joe Bergmark
>            Assignee: Joe Bergmark
>            Priority: Minor
>             Fix For: 1.0.1
>
>
> As part of calling DefinitionUtl.defineScope, WebBeansAnnotatedTypeUtil's defineProducerMethod creates an error message using the AnnotatedMethodImpl's toString method.
> This toString method in turn calls it super in AbstractAnnotatedCallable, which in turn calls toString on all of its AnnotatedParameterImpls.  Unfortunately then AnnotatedParameterImpl calls toString on its declaringCallable, which can create an infinite loop if that turns out to be the original AbstractAnnotatedCallable again.
> This doesn't happen all of the time, so its probably an application issue, but it would be better if we identified it as such rather than blowing up with a stack overflow exception.  I'll paste a snippet of the stacktrace below:
> 	at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
> 	at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
> 	at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)
> 	at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
> 	at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
> 	at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OWB-471) Possible StackOverflowException from defineProducerMethods in WebBeansAnnotatedTypeUtil

Posted by "Joe Bergmark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Bergmark updated OWB-471:
-----------------------------

    Fix Version/s: 1.1.0

> Possible StackOverflowException from defineProducerMethods in WebBeansAnnotatedTypeUtil
> ---------------------------------------------------------------------------------------
>
>                 Key: OWB-471
>                 URL: https://issues.apache.org/jira/browse/OWB-471
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0.0-alpha-2
>            Reporter: Joe Bergmark
>            Assignee: Joe Bergmark
>            Priority: Minor
>             Fix For: 1.1.0, 1.0.1
>
>
> As part of calling DefinitionUtl.defineScope, WebBeansAnnotatedTypeUtil's defineProducerMethod creates an error message using the AnnotatedMethodImpl's toString method.
> This toString method in turn calls it super in AbstractAnnotatedCallable, which in turn calls toString on all of its AnnotatedParameterImpls.  Unfortunately then AnnotatedParameterImpl calls toString on its declaringCallable, which can create an infinite loop if that turns out to be the original AbstractAnnotatedCallable again.
> This doesn't happen all of the time, so its probably an application issue, but it would be better if we identified it as such rather than blowing up with a stack overflow exception.  I'll paste a snippet of the stacktrace below:
> 	at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
> 	at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
> 	at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)
> 	at org.apache.webbeans.portable.AbstractAnnotatedCallable.toString(AbstractAnnotatedCallable.java:100)
> 	at org.apache.webbeans.portable.AnnotatedMethodImpl.toString(AnnotatedMethodImpl.java:74)
> 	at org.apache.webbeans.portable.AnnotatedParameterImpl.toString(AnnotatedParameterImpl.java:72)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.