Continuum
  1. Continuum
  2. CONTINUUM-1590

updateBuildDefinitionForProjectGroup leads to a StackOverflowError

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.2
    • Component/s: XMLRPC Interface
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      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)

        Issue Links

          Activity

          Hide
          Laurent Foret added a comment -

          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().

          Show
          Laurent Foret added a comment - 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().
          Hide
          Olivier Lamy added a comment -

          fix in rev 608626.

          Show
          Olivier Lamy added a comment - fix in rev 608626.
          Hide
          Raffaele Verre added a comment -

          Hi
          I have a problem that look like your
          My code is:

          ContinuumXmlRpcClient client = new ContinuumXmlRpcClient( url, Continuum_User, Continuum_Password );
          AddingResult ar=client.addMavenTwoProject(pomUrl,1);

          executing, I have this error:

          org.apache.xmlrpc.XmlRpcException: Failed to invoke method addMavenTwoProject in class org.apache.maven.continuum.xmlrpc.server.ContinuumServiceImpl: null
          at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:186)
          at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)
          at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)
          at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:44)
          at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)
          at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)
          at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)
          at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)
          at org.apache.xmlrpc.client.util.ClientFactory$1.invoke(ClientFactory.java:132)
          at $Proxy0.addMavenTwoProject(Unknown Source)
          at org.apache.maven.continuum.xmlrpc.client.ContinuumXmlRpcClient.addMavenTwoProject(ContinuumXmlRpcClient.java:373)
          ......

          I think is the same problem but I cannot found the correct jar to test.
          Can you help me?
          svn site seem to be broke and I cannot access....

          tnx
          Raffaele

          Show
          Raffaele Verre added a comment - Hi I have a problem that look like your My code is: ContinuumXmlRpcClient client = new ContinuumXmlRpcClient( url, Continuum_User, Continuum_Password ); AddingResult ar=client.addMavenTwoProject(pomUrl,1); executing, I have this error: org.apache.xmlrpc.XmlRpcException: Failed to invoke method addMavenTwoProject in class org.apache.maven.continuum.xmlrpc.server.ContinuumServiceImpl: null at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:186) at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145) at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94) at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:44) at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136) at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125) at org.apache.xmlrpc.client.util.ClientFactory$1.invoke(ClientFactory.java:132) at $Proxy0.addMavenTwoProject(Unknown Source) at org.apache.maven.continuum.xmlrpc.client.ContinuumXmlRpcClient.addMavenTwoProject(ContinuumXmlRpcClient.java:373) ...... I think is the same problem but I cannot found the correct jar to test. Can you help me? svn site seem to be broke and I cannot access.... tnx Raffaele

            People

            • Assignee:
              Olivier Lamy
              Reporter:
              ol
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: