Skip to content

[Bug]: xlang JDBC (versions 2.65.0, 2.66.65)- No logical type registered for URN 'beam:logical_type:javasdk:v1' #35738

@mataralhawiti

Description

@mataralhawiti

What happened?

our pipeline uses JDBC Xlang to reads from data from MSSQL Server.
The pipeline runs without any issues on version 2.64.0, however, it fails when we upgrade to 2.65.0 or 2.66.0

Table/data

-- create table
CREATE TABLE Transactions (
    TRX_ID INT PRIMARY KEY,
    Sale_Date DATE
);

-- insert sample data
INSERT INTO Transactions (TRX_ID, Sale_Date) VALUES (1, '2025-07-01');
INSERT INTO Transactions (TRX_ID, Sale_Date) VALUES (2, '2025-07-15');

Xlan

from apache_beam.coders.row_coder import LogicalType
from apache_beam.typehints.schemas import MillisInstant
LogicalType.register_logical_type(MillisInstant)
    
# Start the pipeline
with beam.Pipeline(options=pipeline_options) as p:
p
| f"Read-jdbc" >> ReadFromJdbc(
    query="SELECT TRX_ID, Sale_Date FROM Transactions",
    table_name="Transactions",
    driver_class_name="com.microsoft.sqlserver.jdbc.SQLServerDriver",
    jdbc_url="jdbc:sqlserver://{0};databaseName={1}".format(
        credentials["server"],
        credentials["database"]
    ),
    username=credentials["username"],
    password=credentials["password"],
    classpath=[
        "gs://xxxxxxx/mssql-jdbc-12.6.2.jre11.jar"
    ],
)

our pipeline logs

Error processing instruction process_bundle-2230229969916398560-22. Original traceback is
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/apache_beam/typehints/schemas.py", line 560, in named_tuple_from_schema
field_py_type = self.typing_from_runner_api(field.type)
File "/usr/local/lib/python3.10/site-packages/apache_beam/typehints/schemas.py", line 541, in typing_from_runner_api
return LogicalType.from_runner_api(
File "/usr/local/lib/python3.10/site-packages/apache_beam/typehints/schemas.py", line 793, in from_runner_api
raise ValueError(
ValueError: No logical type registered for URN 'beam:logical_type:javasdk:v1'

File "/usr/local/lib/python3.10/site-packages/apache_beam/typehints/schemas.py", line 564, in named_tuple_from_schema
raise ValueError(
ValueError: Failed to decode schema due to an issue with Field proto:

name: "Sale_Date"
type {
logical_type {
urn: "beam:logical_type:javasdk:v1"
representation {
logical_type {
urn: "beam:logical_type:millis_instant:v1"
representation {
atomic_type: INT64
}
}
}
argument_type {
atomic_type: STRING
}
argument {
atomic_value {
string: ""
}
}
}
}

some issues might be related to this:
#35426
#35736
#35488

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions