apache/beam · error
Timing number 0b" + timingNumber.toString(2) + " has more th
Error message
Timing number 0b" + timingNumber.toString(2) + " has more than two bits of info
What it means
JavaClassNameLookup.__init__ raises ValueError when both expansion_service and classpath are given. These are mutually exclusive ways to control how the expansion service is launched: either a fully specified service address/spec, or just a classpath for the default service. Providing both is treated as a conflicting configuration.
Source
Thrown at sdks/typescript/src/apache_beam/coders/required_coders.ts:525
export class PaneInfoCoder implements Coder<PaneInfo> {
static INSTANCE = new PaneInfoCoder();
static ONE_AND_ONLY_FIRING = PaneInfoCoder.INSTANCE.decode(
new Reader(new Uint8Array([0x09])),
null!,
);
private static decodeTiming(timingNumber): Timing {
switch (timingNumber) {
case 0b00:
return Timing.EARLY;
case 0b01:
return Timing.ON_TIME;
case 0b10:
return Timing.LATE;
case 0b11:
return Timing.UNKNOWN;
default:
throw new Error(
"Timing number 0b" +
timingNumber.toString(2) +
" has more than two bits of info",
);
}
}
private static encodeTiming(timing: Timing): number {
switch (timing) {
case Timing.EARLY:
return 0b00;
case Timing.ON_TIME:
return 0b01;
case Timing.LATE:
return 0b10;
case Timing.UNKNOWN:
return 0b11;
default:View on GitHub (pinned to 12126d8942)
Solutions
- Remove the classpath argument if you want to use a specific expansion_service.
- Remove the expansion_service argument and pass classpath to let Beam start a default service with extra jars.
Example fix
// before
JavaClassNameLookup('com.example.T', expansion_service='localhost:1234', classpath=['a.jar'])
// after
JavaClassNameLookup('com.example.T', classpath=['a.jar']) Defensive patterns
Strategy: validation
Validate before calling
assert not (expansion_service and classpath), 'pass either expansion_service or classpath, not both'
Type guard
def service_config_ok(expansion_service, classpath) -> bool:
return not (expansion_service and classpath) Try / catch
try:
lookup = JavaClassNameLookup(cls, expansion_service=svc, classpath=cp)
except ValueError as e:
logger.error('Conflicting service config: %s', e) Prevention
- Centralize expansion service configuration in one place
- When switching from classpath to a fixed service, delete the other argument
- Document which of the two options each pipeline uses
When it happens
Trigger: JavaClassNameLookup(class_name, expansion_service='localhost:1234', classpath=['/path/x.jar']) — both parameters non-None/non-empty in the same constructor call.
Common situations: Copy-pasting example code that sets classpath into code that already passes expansion_service; layering configuration from two sources without clearing one.
Related errors
- Unknown PaneInfo encoding: " + encodingNibble
- No proto encoding for PaneInfoCoder, always part of Windowed
- Could not find coder for URN " + urn
- Timeout waiting for Python service startup after ${elapsed}
- Cannot set both startVersion and startTimestamp.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/e4d8f339e7e6fe39.
Report an issue: GitHub.