You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2011/07/14 15:35:00 UTC

[jira] [Created] (FELIX-3041) maven-scr-plugin generates StackOverflowError with custom annotation tag provider

maven-scr-plugin generates StackOverflowError with custom annotation tag provider
---------------------------------------------------------------------------------

                 Key: FELIX-3041
                 URL: https://issues.apache.org/jira/browse/FELIX-3041
             Project: Felix
          Issue Type: Bug
          Components: Maven SCR Plugin
    Affects Versions: maven-scr-plugin-1.7.2
            Reporter: Stefan Seifert


the latest maven scr plugin 1.7.2 (currently in staging phase) produces a StackOverflowError when generating SCR metadata for a project with custom annotation tag provider.
the problem has its source in the fix for FELIX-2980 - if the commit rev. 1132617 is reverted it works as expected.

i'll attach a test project to reproduce the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (FELIX-3041) maven-scr-plugin generates StackOverflowError with custom annotation tag provider

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

Carsten Ziegeler reassigned FELIX-3041:
---------------------------------------

    Assignee: Carsten Ziegeler

> maven-scr-plugin generates StackOverflowError with custom annotation tag provider
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-3041
>                 URL: https://issues.apache.org/jira/browse/FELIX-3041
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.7.2
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>         Attachments: scrplugin-testproject.zip
>
>
> the latest maven scr plugin 1.7.2 (currently in staging phase) produces a StackOverflowError when generating SCR metadata for a project with custom annotation tag provider.
> the problem has its source in the fix for FELIX-2980 - if the commit rev. 1132617 is reverted it works as expected.
> i'll attach a test project to reproduce the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FELIX-3041) maven-scr-plugin generates StackOverflowError with custom annotation tag provider

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

Stefan Seifert updated FELIX-3041:
----------------------------------

    Attachment: scrplugin-testproject.zip

> maven-scr-plugin generates StackOverflowError with custom annotation tag provider
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-3041
>                 URL: https://issues.apache.org/jira/browse/FELIX-3041
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.7.2
>            Reporter: Stefan Seifert
>         Attachments: scrplugin-testproject.zip
>
>
> the latest maven scr plugin 1.7.2 (currently in staging phase) produces a StackOverflowError when generating SCR metadata for a project with custom annotation tag provider.
> the problem has its source in the fix for FELIX-2980 - if the commit rev. 1132617 is reverted it works as expected.
> i'll attach a test project to reproduce the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (FELIX-3041) maven-scr-plugin generates StackOverflowError with custom annotation tag provider

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

Carsten Ziegeler resolved FELIX-3041.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: maven-scr-plugin-1.7.2

Thanks Stefan

> maven-scr-plugin generates StackOverflowError with custom annotation tag provider
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-3041
>                 URL: https://issues.apache.org/jira/browse/FELIX-3041
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.7.2
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>             Fix For: maven-scr-plugin-1.7.2
>
>         Attachments: scrplugin-testproject.zip
>
>
> the latest maven scr plugin 1.7.2 (currently in staging phase) produces a StackOverflowError when generating SCR metadata for a project with custom annotation tag provider.
> the problem has its source in the fix for FELIX-2980 - if the commit rev. 1132617 is reverted it works as expected.
> i'll attach a test project to reproduce the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3041) maven-scr-plugin generates StackOverflowError with custom annotation tag provider

Posted by "Stefan Seifert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065371#comment-13065371 ] 

Stefan Seifert commented on FELIX-3041:
---------------------------------------

the workaround looks good for me - the plugin generates all expected SCR metadata without complaints.

> maven-scr-plugin generates StackOverflowError with custom annotation tag provider
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-3041
>                 URL: https://issues.apache.org/jira/browse/FELIX-3041
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.7.2
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>         Attachments: scrplugin-testproject.zip
>
>
> the latest maven scr plugin 1.7.2 (currently in staging phase) produces a StackOverflowError when generating SCR metadata for a project with custom annotation tag provider.
> the problem has its source in the fix for FELIX-2980 - if the commit rev. 1132617 is reverted it works as expected.
> i'll attach a test project to reproduce the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3041) maven-scr-plugin generates StackOverflowError with custom annotation tag provider

Posted by "Stefan Seifert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065261#comment-13065261 ] 

Stefan Seifert commented on FELIX-3041:
---------------------------------------

(excpert of the) stacktrace of the problem:

Exception in thread "main" java.lang.StackOverflowError
        at java.util.Hashtable.get(Hashtable.java:334)
        at com.thoughtworks.qdox.DefaultJavaClassCache.getClassByName(DefaultJavaClassCache.java:14)
        at com.thoughtworks.qdox.JavaClassContext.getClassByName(JavaClassContext.java:54)
        at com.thoughtworks.qdox.model.Type.getJavaClass(Type.java:290)
        at org.apache.felix.scrplugin.tags.annotation.defaulttag.DefaultAnnotationTagProvider.getTags(DefaultAnnotationTagProvider.java:45)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:159)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:141)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.hasScrPluginAnnotation(AnnotationTagProviderManager.java:176)
        at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassDescription(JavaClassDescriptorManager.java:396)
        at org.apache.felix.scrplugin.tags.qdox.QDoxJavaClassDescription.getExternalFieldByName(QDoxJavaClassDescription.java:174)
        at org.apache.felix.scrplugin.tags.annotation.Util$1.visitAnnotationFieldRef(Util.java:412)
        at com.thoughtworks.qdox.model.annotation.AnnotationFieldRef.accept(AnnotationFieldRef.java:60)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.visitAnnotationAdd(EvaluatingVisitor.java:143)
        at com.thoughtworks.qdox.model.annotation.AnnotationAdd.accept(AnnotationAdd.java:14)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.visitAnnotationValueList(EvaluatingVisitor.java:330)
        at com.thoughtworks.qdox.model.annotation.AnnotationValueList.accept(AnnotationValueList.java:41)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.getValue(EvaluatingVisitor.java:28)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.getListValue(EvaluatingVisitor.java:35)
        at org.apache.felix.scrplugin.tags.annotation.Util.getAnnotationValues(Util.java:441)
        at org.apache.felix.scrplugin.tags.annotation.Util.getStringValues(Util.java:87)
        at org.apache.felix.scrplugin.tags.annotation.sling.SlingAnnotationTagProvider.getTags(SlingAnnotationTagProvider.java:78)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:159)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:141)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.hasScrPluginAnnotation(AnnotationTagProviderManager.java:176)
        at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassDescription(JavaClassDescriptorManager.java:396)
        at org.apache.felix.scrplugin.tags.qdox.QDoxJavaClassDescription.getExternalFieldByName(QDoxJavaClassDescription.java:174)
        at org.apache.felix.scrplugin.tags.annotation.Util$1.visitAnnotationFieldRef(Util.java:412)
        at com.thoughtworks.qdox.model.annotation.AnnotationFieldRef.accept(AnnotationFieldRef.java:60)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.visitAnnotationAdd(EvaluatingVisitor.java:143)
        at com.thoughtworks.qdox.model.annotation.AnnotationAdd.accept(AnnotationAdd.java:14)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.visitAnnotationValueList(EvaluatingVisitor.java:330)
        at com.thoughtworks.qdox.model.annotation.AnnotationValueList.accept(AnnotationValueList.java:41)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.getValue(EvaluatingVisitor.java:28)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.getListValue(EvaluatingVisitor.java:35)
        at org.apache.felix.scrplugin.tags.annotation.Util.getAnnotationValues(Util.java:441)
        at org.apache.felix.scrplugin.tags.annotation.Util.getStringValues(Util.java:87)
        at org.apache.felix.scrplugin.tags.annotation.sling.SlingAnnotationTagProvider.getTags(SlingAnnotationTagProvider.java:78)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:159)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:141)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.hasScrPluginAnnotation(AnnotationTagProviderManager.java:176)
        at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassDescription(JavaClassDescriptorManager.java:396)
        at org.apache.felix.scrplugin.tags.qdox.QDoxJavaClassDescription.getExternalFieldByName(QDoxJavaClassDescription.java:174)
        at org.apache.felix.scrplugin.tags.annotation.Util$1.visitAnnotationFieldRef(Util.java:412)
        at com.thoughtworks.qdox.model.annotation.AnnotationFieldRef.accept(AnnotationFieldRef.java:60)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.visitAnnotationAdd(EvaluatingVisitor.java:143)
        at com.thoughtworks.qdox.model.annotation.AnnotationAdd.accept(AnnotationAdd.java:14)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.visitAnnotationValueList(EvaluatingVisitor.java:330)
        at com.thoughtworks.qdox.model.annotation.AnnotationValueList.accept(AnnotationValueList.java:41)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.getValue(EvaluatingVisitor.java:28)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.getListValue(EvaluatingVisitor.java:35)
        at org.apache.felix.scrplugin.tags.annotation.Util.getAnnotationValues(Util.java:441)
        at org.apache.felix.scrplugin.tags.annotation.Util.getStringValues(Util.java:87)
        at org.apache.felix.scrplugin.tags.annotation.sling.SlingAnnotationTagProvider.getTags(SlingAnnotationTagProvider.java:78)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:159)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.getTags(AnnotationTagProviderManager.java:141)
        at org.apache.felix.scrplugin.tags.annotation.AnnotationTagProviderManager.hasScrPluginAnnotation(AnnotationTagProviderManager.java:176)
        at org.apache.felix.scrplugin.JavaClassDescriptorManager.getJavaClassDescription(JavaClassDescriptorManager.java:396)
        at org.apache.felix.scrplugin.tags.qdox.QDoxJavaClassDescription.getExternalFieldByName(QDoxJavaClassDescription.java:174)
        at org.apache.felix.scrplugin.tags.annotation.Util$1.visitAnnotationFieldRef(Util.java:412)
        at com.thoughtworks.qdox.model.annotation.AnnotationFieldRef.accept(AnnotationFieldRef.java:60)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.visitAnnotationAdd(EvaluatingVisitor.java:143)
        at com.thoughtworks.qdox.model.annotation.AnnotationAdd.accept(AnnotationAdd.java:14)
        at com.thoughtworks.qdox.model.annotation.EvaluatingVisitor.visitAnnotationValueList(EvaluatingVisitor.java:330)
        at com.thoughtworks.qdox.model.annotation.AnnotationValueList.accept(AnnotationValueList.java:41)
...


> maven-scr-plugin generates StackOverflowError with custom annotation tag provider
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-3041
>                 URL: https://issues.apache.org/jira/browse/FELIX-3041
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.7.2
>            Reporter: Stefan Seifert
>         Attachments: scrplugin-testproject.zip
>
>
> the latest maven scr plugin 1.7.2 (currently in staging phase) produces a StackOverflowError when generating SCR metadata for a project with custom annotation tag provider.
> the problem has its source in the fix for FELIX-2980 - if the commit rev. 1132617 is reverted it works as expected.
> i'll attach a test project to reproduce the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (FELIX-3041) maven-scr-plugin generates StackOverflowError with custom annotation tag provider

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

Carsten Ziegeler closed FELIX-3041.
-----------------------------------


> maven-scr-plugin generates StackOverflowError with custom annotation tag provider
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-3041
>                 URL: https://issues.apache.org/jira/browse/FELIX-3041
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.7.2
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>             Fix For: maven-scr-plugin-1.7.2
>
>         Attachments: scrplugin-testproject.zip
>
>
> the latest maven scr plugin 1.7.2 (currently in staging phase) produces a StackOverflowError when generating SCR metadata for a project with custom annotation tag provider.
> the problem has its source in the fix for FELIX-2980 - if the commit rev. 1132617 is reverted it works as expected.
> i'll attach a test project to reproduce the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FELIX-3041) maven-scr-plugin generates StackOverflowError with custom annotation tag provider

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065322#comment-13065322 ] 

Carsten Ziegeler commented on FELIX-3041:
-----------------------------------------

Hi Stefan

many thanks for reporting and providing a test project!

I committed a potential fix in revision 1146749 - it seems that your project runs now.

The fix is just checking for recursion during the check - the better solution would be to change the AnnotationTagProvider interface and add a hasTags() or similar to it

> maven-scr-plugin generates StackOverflowError with custom annotation tag provider
> ---------------------------------------------------------------------------------
>
>                 Key: FELIX-3041
>                 URL: https://issues.apache.org/jira/browse/FELIX-3041
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven SCR Plugin
>    Affects Versions: maven-scr-plugin-1.7.2
>            Reporter: Stefan Seifert
>            Assignee: Carsten Ziegeler
>         Attachments: scrplugin-testproject.zip
>
>
> the latest maven scr plugin 1.7.2 (currently in staging phase) produces a StackOverflowError when generating SCR metadata for a project with custom annotation tag provider.
> the problem has its source in the fix for FELIX-2980 - if the commit rev. 1132617 is reverted it works as expected.
> i'll attach a test project to reproduce the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira