{"record":{"id":"60eb567d539bf2e0","repo":"apache/beam","slug":"no-available-provider-for-type-r-at-s-s","errorCode":null,"errorMessage":"'No available provider for type %r at %s%s'","messagePattern":"'No available provider for type %r at (.+?)(.+?)'","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"sdks/python/apache_beam/yaml/yaml_transform.py","lineNumber":270,"sourceCode":"      spec = self._transforms_by_uuid[self.get_transform_id(t)]\n    possible_providers = []\n    unavailable_provider_messages = []\n    for p in self.providers[spec['type']]:\n      is_available = p.available()\n      if is_available:\n        possible_providers.append(p)\n      else:\n        reason = getattr(is_available, 'reason', 'no reason given')\n        unavailable_provider_messages.append(\n            f'{p.__class__.__name__} ({reason})')\n    if not possible_providers:\n      if unavailable_provider_messages:\n        unavailable_provider_message = (\n            '\\nThe following providers were found but not available: ' +\n            '\\n'.join(unavailable_provider_messages))\n      else:\n        unavailable_provider_message = ''\n      raise ValueError(\n          'No available provider for type %r at %s%s' %\n          (spec['type'], identify_object(spec), unavailable_provider_message))\n    # From here on, we have the invariant that possible_providers is not empty.\n\n    # Only one possible provider, no need to rank further.\n    if len(possible_providers) == 1:\n      return possible_providers[0]\n\n    def best_matches(\n        possible_providers: Iterable[yaml_provider.Provider],\n        adjacent_provider_options: Iterable[Iterable[yaml_provider.Provider]]\n    ) -> list[yaml_provider.Provider]:\n      \"\"\"Given a set of possible providers, and a set of providers for each\n      adjacent transform, returns the top possible providers as ranked by\n      affinity to the adjacent transforms' providers.\n      \"\"\"\n      providers_by_score = collections.defaultdict(list)\n      for p in possible_providers:","sourceCodeStart":252,"sourceCodeEnd":288,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/python/apache_beam/yaml/yaml_transform.py#L252-L288","documentation":"Scope.best_provider selects which provider (built-in Python, Java, expansion service, etc.) executes a transform type. If providers for the type exist in the registry but none are currently `available()` (and no single usable candidate can be chosen), Beam raises this ValueError, appending a list of which providers were found but unavailable and why.","triggerScenarios":"Using a transform type whose only providers report `available() == False` — e.g. Java-provider-only transforms without a Java environment, external transforms requiring an unreachable expansion service, or providers needing missing dependencies/extra dependencies.","commonSituations":"Running a Java cross-language transform (Kafka/JDBC) in an environment without Java; expansion service endpoint down; missing jars/Docker; restricted runtime without optional dependencies.","solutions":["Read the appended 'providers were found but not available' messages and fix the stated cause (install Java, start the expansion service, install jars).","Install the required extra dependencies or configure the provider's environment (Java SDK, expansion service address).","Use an alternative transform type with an available built-in provider.","Register a custom provider in the pipeline spec pointing at a reachable expansion service."],"exampleFix":"# before (yaml, no java environment)\n- type: JdbcWrite\n  ...\n# after: make a provider available, then keep the spec\n# start: java -jar beam-sdks-java-io-expansion-service.jar 44441\n- type: JdbcWrite\n  ...\n# with a java provider configured/reachable","handlingStrategy":"try-catch","validationCode":"providers = scope.providers.get(spec_type, [])\nif not any(p.available() for p in providers):\n    raise EnvironmentError(f'No available provider for {spec_type}; check Java/expansion service')","typeGuard":null,"tryCatchPattern":"try:\n    result = run_pipeline(yaml_spec)\nexcept ValueError as e:\n    if 'No available provider' in str(e):\n        print(e)  # message lists which providers were unavailable and why\n        raise RuntimeError('Install Java SDK / start expansion service') from e","preventionTips":["Install the Java SDK when using cross-language transforms","Keep the expansion service reachable and configured","Prefer built-in Python-provider transforms in restricted environments"],"tags":["yaml","beam-yaml","provider","environment","cross-language"],"backgroundTag":"missing-dependency","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}