continuum-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laurent Foret (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (CONTINUUM-1590) updateBuildDefinitionForProjectGroup leads to a StackOverflowError
Date Mon, 31 Dec 2007 13:51:57 GMT

    [ http://jira.codehaus.org/browse/CONTINUUM-1590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_118269
] 

Laurent Foret commented on CONTINUUM-1590:
------------------------------------------

I had a similar problem with this simple client code :

            ContinuumXmlRpcClient client = new ContinuumXmlRpcClient(new URL(" http://localhost:8080/continuum/xmlrpc"),
"admin", "manager1");
            List<ProjectGroup> projectGroups = client.getAllProjectGroupsWithAllDetails
();
            for (ProjectGroup pg : projectGroups) {
                System.out.println("PGID : "+pg.getId());
                client.getProjects(pg.getId());
            }

My StackOverflowError happens at the line 224.

jvm 1    | Caused by:
jvm 1    | java.lang.StackOverflowError
jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumServiceImpl.getPGSummary(ContinuumServiceImpl.java:
231)
jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumServiceImpl.getProjectGroupName(ContinuumServiceImp
l.java:224)
jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumServiceImpl.getPGSummary
(ContinuumServiceImpl.java:
231)
jvm 1    |      at org.apache.maven.continuum.xmlrpc.server.ContinuumServiceImpl.getProjectGroupName(ContinuumServiceImp
l.java:224)


Maybe, it is not usefull at line 231 in the private method  to call checkViewProjectGroupAuthorization().






> updateBuildDefinitionForProjectGroup leads to a StackOverflowError
> ------------------------------------------------------------------
>
>                 Key: CONTINUUM-1590
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-1590
>             Project: Continuum
>          Issue Type: Bug
>          Components: XMLRPC Interface
>    Affects Versions: 1.1
>            Reporter: ol
>            Priority: Blocker
>
> This problem is due to a recursive call when testing the authorizations :
> At line 221 of ContinuumServiceImpl.java
>     protected String getProjectGroupName( int projectGroupId )
>         throws ContinuumException
>     {
>         ProjectGroupSummary pgs = getPGSummary( projectGroupId );
>         return pgs.getName();
>     }
>     private ProjectGroupSummary getPGSummary( int projectGroupId )
>         throws ContinuumException
>     {
>         checkViewProjectGroupAuthorization( getProjectGroupName( projectGroupId ) );
>         org.apache.maven.continuum.model.project.ProjectGroup projectGroup =
>             continuum.getProjectGroup( projectGroupId );
>         return populateProjectGroupSummary( projectGroup );
>     }
> getProjectGroupName makes a call to getPGSummary that makes a call to getProjectGroupName
that makes a call to getPGSummary  ......
> I think the getPGSummary should be implemented like this :
>     private ProjectGroupSummary getPGSummary( int projectGroupId )
>         throws ContinuumException
>     {
>         org.apache.maven.continuum.model.project.ProjectGroup projectGroup =
>             continuum.getProjectGroup( projectGroupId );
>         
>         checkViewProjectGroupAuthorization( projectGroup.getName() );
>         return populateProjectGroupSummary( projectGroup );
>     }
> This problem also occurs in all these methods:
> - getProjectGroupSummary (line 242)
> - getProjectGroupWithProjects (line 253)
> - removeProjectGroup (line 264)
> - getProjects (line 91)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message