Common questions about using the MaxCompute Java Database Connectivity (JDBC) driver.
Can I disable auto-commit mode?
No. MaxCompute does not support transactions — each query runs immediately on the server. Auto-commit is always enabled and cannot be disabled.
Does the JDBC driver require a connection pool?
No, but it supports one if your application already uses one.
MaxCompute exposes a REST (Representational State Transfer) interface rather than maintaining long-lived connections like traditional databases. Creating a connection is lightweight, so a connection pool is not required.
How do I view JDBC driver logs?
The driver supports two logging modes:
SLF4J integrated logging
If your application uses SLF4J (Simple Logging Facade for Java — an abstraction layer that works with Logback, Log4j, and other backends), the JDBC driver automatically inherits your application's logging configuration. No extra setup is needed — log output follows your existing log path and level settings.
ODPS Logger (standalone logging)
You can enable the driver's built-in logger by adding enableOdpsLogger=true to the JDBC URL:
jdbc:odps:<endpoint>?enableOdpsLogger=trueLogs are written to a file named jdbc.log in the same directory as the JDBC driver JAR file. If you packaged the driver into a fat JAR, the log file is in the same directory as the fat JAR.
How do I get the LogView URL for a task?
LogView is MaxCompute's task monitoring tool. It shows execution status, resource consumption, data transfer details, and other diagnostic information in real time. Each LogView link is valid for 7 days.
From code (JDBC API)
Call getLogViewUrl() on the statement object after submitting the SQL statement. You do not need to wait for the task to finish.
// Create a statement and execute a query (DDL and DML are both supported).
Statement statement = connection.createStatement();
statement.executeQuery("SELECT * FROM table_name");
// Cast to OdpsStatement to access the LogView URL.
String logviewUrl = ((OdpsStatement) statement).getLogViewUrl();
System.out.println("LogView URL: " + logviewUrl);Note: getLogViewUrl() is available only after the SQL statement is successfully submitted.From a JAR package invocation
When calling the JDBC JAR directly from the command line or a script, make sure log output is enabled, then search for the keyword LogView in the log file.
What do I do if the JDBC driver reads more than 10,000 rows?
Data reads over JDBC use Tunnel by default, which limits downloads to 10,000 rows for data security. To remove the limit, set enableLimit=false in the JDBC URL:
jdbc:odps:<endpoint>?enableLimit=falseWith this setting, the server performs download authentication on every table in the query. If download permissions are not granted, the query throws an exception. For permission setup, see Download control.
What do I do if I get "ODPS-0410042:Invalid signature value"?
This error means the AccessKey ID or AccessKey secret in the connection string does not match the credentials of the authorized account. Check both values and make sure they belong to the same account.
What do I do if I get "Failed to create download session with tunnel endpoint"?
Full error: create download session failed: instance id=xxx, Error:ErrorCode=Local Error, ErrorMessage=Failed to create download session with tunnel endpoint
This error occurs when the JDBC driver cannot establish a Tunnel download session to retrieve query results. For troubleshooting steps, see ErrorCode=Local Error, Failed to create download session with tunnel endpoint.