parameter 'value' of BuildStartContextImpl.addSharedParameter must not be null

I have a blocker-problem I need help with. When I launch a run of the plugin I'm developing I get the following error, which stops further processing

[2013-11-30 23:06:41,401]   WARN -   jetbrains.buildServer.SERVER - jetbrains.buildServer.serverSide.ExecutionException: Argument for @NotNull parameter 'value' of jetbrains/buildServer/serverSide/impl/build/steps/BuildStartContextImpl.addSharedParameter must not be null

My BuildStartContextProcessor gets invoked during server startup (init), but not right before the error (updateParameters), which is the only place where I can spot usage of BuildStartContext. I'm not aware of any parameter named 'value'.

public class FooPreparator implements BuildStartContextProcessor {

    private final Debug debug = new Debug(FooPreparator.class);

    @NotNull private final ServerSettings  settings;

    @NotNull private final ExtensionHolder extensionHolder;


    public FooPreparator(@NotNull ServerSettings settings, @NotNull ExtensionHolder extensionHolder) {

        this.settings = settings;

        this.extensionHolder = extensionHolder;

        debug.print("init: settings=%s", settings.toString());

        extensionHolder.registerExtension(BuildStartContextProcessor.class, this.getClass().getName(), this);

    }

    public void updateParameters(@NotNull BuildStartContext ctx) {

        debug.print("(1) updateParameters: sharedParams=%s", ctx.getSharedParameters());

        if (settings.getApiToken() == null) throw new RuntimeException("Missing API Token");

        ctx.addSharedParameter(Constants.API_TOKEN_KEY, settings.getApiToken());

        debug.print("(2) updateParameters: sharedParams=%s", ctx.getSharedParameters());

    }    

}

The TC version is 8.0.5 @ Java7 @ Win7.

Here is the complete console printout (masked)
dec 01, 2013 7:55:09 FM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1839 ms
TeamCity version: 8.0.5 (build 27692), data format version 628
OS: Windows 7, JRE: 1.7.0_21-b11
2013-12-01 07:55:43 [ServerSettings] init
2013-12-01 07:55:43 [FooSettingsFactory] init
2013-12-01 07:55:43 [FooDescriptor] init
2013-12-01 07:55:43 [FooPreparator] init: settings=FooServerSettings{apiToken=null}
2013-12-01 07:55:44 [ServerSettings] readFrom: root=server
=======================================================================
TeamCity initialized, server UUID: d1fa765b-479d-4228-95c0-4db9deae17b9
TeamCity is running in professional mode
[TeamCity] Super user authentication token: "11111". To login as Super user use an empty username and this token as a password on the login page.
2013-12-01 08:06:01 [FooDescriptor] process: {apiToken=123, teamcity.step.mode=default, testConfigurationId=222}
2013-12-01 08:06:01 [FooDescriptor] process: {apiToken=123, teamcity.step.mode=default, testConfigurationId=222}
[2013-12-01 08:06:01,751]   WARN -   jetbrains.buildServer.SERVER - jetbrains.buildServer.serverSide.ExecutionException: Argument for @NotNull parameter 'value' of jetbrains/buildServer/serverSide/impl/build/steps/BuildStartContextImpl.addSharedParameter must not be null


So, how do I proceed to figure out what is causing this blocker?

1 comment
Comment actions Permalink

Sorry for delay with replying. Please try enabling debug-general preset on Administration -> Diagnostics page. After that we should see the whole stacktrace in teamcity-server.log and hopefully it will be clear what happens.

0

Please sign in to leave a comment.