Continuum
  1. Continuum
  2. CONTINUUM-2454

Failed to build a shell project when 'distributed builds' is enabled

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.5 (Beta)
    • Fix Version/s: 1.4.1
    • Labels:
      None
    • Environment:
      Java version: 1.6.0_15
      Default locale: en_PH, platform encoding: UTF-8
      OS name: "linux" version: "2.6.31-17-generic" arch: "i386" Family: "unix"
    • Complexity:
      Intermediate
    • Number of attachments :
      5

      Description

      Steps:

      Actual Result:
      The project did not build successfully.

      The following error was returned:

      java.lang.Exception: Failed to build projects.
      at org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportClient.buildProjects(SlaveBuildAgentTransportClient.java:100)
      at org.apache.continuum.builder.distributed.executor.DistributedBuildProjectTaskExecutor.executeTask(DistributedBuildProjectTaskExecutor.java:130)
      at org.apache.continuum.builder.distributed.executor.ThreadedDistributedBuildTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedDistributedBuildTaskQueueExecutor.java:134)
      at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
      at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
      at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
      at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.RuntimeException: Could not execute RPC method buildProjects
      at com.atlassian.xmlrpc.RPCCallMethodInterceptor.invoke(RPCCallMethodInterceptor.java:67)
      at $Proxy17.buildProjects(Unknown Source)
      at org.apache.continuum.distributed.transport.slave.SlaveBuildAgentTransportClient.buildProjects(SlaveBuildAgentTransportClient.java:94)
      ... 7 more
      Caused by: org.apache.xmlrpc.common.XmlRpcExtensionException: Null values aren't supported, if isEnabledForExtensions() == false
      at org.apache.xmlrpc.common.TypeFactoryImpl.getSerializer(TypeFactoryImpl.java:115)
      at com.atlassian.xmlrpc.BinderTypeFactory.getSerializer(BinderTypeFactory.java:64)
      at org.apache.xmlrpc.serializer.MapSerializer.writeValue(MapSerializer.java:70)
      at org.apache.xmlrpc.serializer.MapSerializer.writeEntry(MapSerializer.java:64)
      at org.apache.xmlrpc.serializer.MapSerializer.writeData(MapSerializer.java:81)
      at org.apache.xmlrpc.serializer.MapSerializer.write(MapSerializer.java:88)
      at org.apache.xmlrpc.serializer.ObjectArraySerializer.writeObject(ObjectArraySerializer.java:50)
      at org.apache.xmlrpc.serializer.ObjectArraySerializer.writeData(ObjectArraySerializer.java:55)
      at org.apache.xmlrpc.serializer.ObjectArraySerializer.write(ObjectArraySerializer.java:62)
      at org.apache.xmlrpc.serializer.XmlRpcWriter.writeValue(XmlRpcWriter.java:172)
      at org.apache.xmlrpc.serializer.XmlRpcWriter.write(XmlRpcWriter.java:77)
      at org.apache.xmlrpc.client.XmlRpcStreamTransport$ReqWriterImpl.write(XmlRpcStreamTransport.java:67)
      at org.apache.xmlrpc.client.XmlRpcHttpTransport$ByteArrayReqWriter.<init>(XmlRpcHttpTransport.java:23)
      at org.apache.xmlrpc.client.XmlRpcHttpTransport.newReqWriter(XmlRpcHttpTransport.java:106)
      at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:139)
      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:157)
      at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:146)
      at com.atlassian.xmlrpc.RPCCallMethodInterceptor.invoke(RPCCallMethodInterceptor.java:62)
      ... 9 more

      1. CONTINUUM-2454.patch
        3 kB
        Gwen Harold Autencio
      2. CONTINUUM-2454-webapp-test.patch
        9 kB
        Gwen Harold Autencio
      3. latest-CONTINUUM-2454.patch
        7 kB
        Gwen Harold Autencio
      4. updated-CONTINUUM-2454.patch
        3 kB
        Gwen Harold Autencio
      1. Screenshot.png
        188 kB

        Activity

        Hide
        Gwen Harold Autencio added a comment -

        The error occurs when there's a null value being passed through xmlrpc.
        Attaching a patch for this issue.
        No tests yet included in this patch.

        Thanks.

        Show
        Gwen Harold Autencio added a comment - The error occurs when there's a null value being passed through xmlrpc. Attaching a patch for this issue. No tests yet included in this patch. Thanks.
        Hide
        Maria Catherine Tan added a comment -

        Gwen, about your patch, I don't think this line is correct:

        + if( context.getExecutorId().equals( ContinuumBuildExecutorConstants.SHELL_BUILD_EXECUTOR ) || context.getExecutorId().equals( ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR) )
        +

        { + map.put( ContinuumBuildAgentUtil.KEY_MAVEN_PROJECT, getMavenProject( context ) ); + }

        I think it should check if the executorId is a maven two build executor?

        Also I don't think this line should be added:

        + catch ( NullPointerException e )
        +

        { + log.error( "Error getting maven project", e ); + }
        Show
        Maria Catherine Tan added a comment - Gwen, about your patch, I don't think this line is correct: + if( context.getExecutorId().equals( ContinuumBuildExecutorConstants.SHELL_BUILD_EXECUTOR ) || context.getExecutorId().equals( ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR) ) + { + map.put( ContinuumBuildAgentUtil.KEY_MAVEN_PROJECT, getMavenProject( context ) ); + } I think it should check if the executorId is a maven two build executor? Also I don't think this line should be added: + catch ( NullPointerException e ) + { + log.error( "Error getting maven project", e ); + }
        Hide
        Gwen Harold Autencio added a comment -

        Sorry, attaching updated patch. Removed the catch statement and changed condition to check maven two executor id.

        Show
        Gwen Harold Autencio added a comment - Sorry, attaching updated patch. Removed the catch statement and changed condition to check maven two executor id.
        Hide
        Maria Catherine Tan added a comment -

        Thanks gwen!

        Can you also provide a test for this.

        Show
        Maria Catherine Tan added a comment - Thanks gwen! Can you also provide a test for this.
        Hide
        Gwen Harold Autencio added a comment -

        Hi attaching webapp test for CONTINUUM-2454.

        Show
        Gwen Harold Autencio added a comment - Hi attaching webapp test for CONTINUUM-2454 .
        Hide
        Maria Catherine Tan added a comment -

        Hi Gwen,

        Sorry for the late reply.

        I have some few comments on the selenium tests:

        1. You need to disable the build agent after enabling it because succeeding tests may fail because of it. I added a try-finally statement on the other tests to make sure that the disableBuildAgent() will be called to prevent that.
        2. I think there's a better way of checking if the build succeeded in the buildProjectGroup() than this: assertTextPresent( "Success : 1" );

        • maybe instead of assertTextPresent( "BUILD SUCCESSFUL" ); you could try checking for the successful state image?
        Show
        Maria Catherine Tan added a comment - Hi Gwen, Sorry for the late reply. I have some few comments on the selenium tests: 1. You need to disable the build agent after enabling it because succeeding tests may fail because of it. I added a try-finally statement on the other tests to make sure that the disableBuildAgent() will be called to prevent that. 2. I think there's a better way of checking if the build succeeded in the buildProjectGroup() than this: assertTextPresent( "Success : 1" ); maybe instead of assertTextPresent( "BUILD SUCCESSFUL" ); you could try checking for the successful state image?
        Hide
        Gwen Harold Autencio added a comment -

        Hi Marica,

        Sorry for the late reply. Attached updated patch based on your previous comments. Thanks!

        Show
        Gwen Harold Autencio added a comment - Hi Marica, Sorry for the late reply. Attached updated patch based on your previous comments. Thanks!
        Hide
        Maria Catherine Tan added a comment -

        Thanks Gwen!

        I applied the patch in r957111 with some minor modifications:

        • changed scm url used for testing
        • added assertion for checking the build result page when building the project group in the selenium test
        Show
        Maria Catherine Tan added a comment - Thanks Gwen! I applied the patch in r957111 with some minor modifications: changed scm url used for testing added assertion for checking the build result page when building the project group in the selenium test

          People

          • Assignee:
            Maria Catherine Tan
            Reporter:
            Bernard Lago
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: