Skip to content

[critical] Java SDK: ApiClient NPE crashes all examples for OSS users — no auth keys needed for OSS #51

@nthmost-orkes

Description

@nthmost-orkes

Problem

Any first-time Java SDK user connecting to a plain OSS Conductor server hits an immediate NullPointerException before executing a single line of example code.

This was discovered during a live zero-to-one run of the Java SDK examples against a local OSS Conductor server (started with conductor server start).

Reproduction

export CONDUCTOR_SERVER_URL=http://localhost:8080/api
# no auth keys — correct for OSS
./gradlew :examples:compileJava
java -cp <examples-classpath> com.netflix.conductor.sdk.examples.helloworld.Main

Error:

Caused by: java.lang.NullPointerException: Cannot invoke "String.trim()"
because the return value of "java.lang.System.getenv(String)" is null
    at io.orkes.conductor.client.ApiClient$ApiClientBuilder.applyEnvVariables(ApiClient.java:186)

Root cause: ApiClient.applyEnvVariables() calls .trim() on the result of System.getenv("CONDUCTOR_SERVER_AUTH_KEY") without null-checking it first. Since OSS users don't set auth keys, both the primary and legacy env vars are null — crash.

Technical issue filed: conductor-oss/java-sdk#94

Additional Zero-to-One Issues Found (same session)

Two more high-priority issues found during the same live run:

What Works

The com.netflix.conductor.gettingstarted examples (CreateWorkflow, StartWorkflow, HelloWorker) do work correctly against an OSS server when invoked manually with a classpath. Workflows were confirmed to complete successfully.

User Impact

A developer following any Java SDK documentation hits a crash before getting any output. This blocks zero-to-one onboarding entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: sdkAny language SDKbugSomething isn't workingcriticalSeriously impacts zero-to-one onboardingfix: codeFix requires a code change in a reposdk: java

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions