quarkusio/quarkus · critical · ConfigurationException
The Narayana JTA extension does not have a datasource config
Error message
The Narayana JTA extension does not have a datasource configured as the JDBC object store, so it defaults to the default datasource, but that datasource is not configured. To solve this, either configure the default datasource, referring to https://quarkus.io/guides/datasource for guidance, or configure the datasource to use in the Narayana JTA extension
What it means
At startup, when the transaction object store type is JDBC and no object-store datasource is named, Narayana falls back to the default datasource. If no default datasource is configured either, the recorder throws this ConfigurationException during startRecoveryService. Startup aborts; the app cannot begin transaction recovery.
Source
Thrown at extensions/narayana-jta/runtime/src/main/java/io/quarkus/narayana/jta/runtime/NarayanaJtaRecorder.java:158
}
private void setJDBCObjectStore(String name, TransactionManagerConfiguration config) {
final ObjectStoreEnvironmentBean instance = BeanPopulator.getNamedInstance(ObjectStoreEnvironmentBean.class, name);
instance.setObjectStoreType(JDBCStore.class.getName());
instance.setJdbcDataSource(new QuarkusDataSource(config.objectStore().datasource()));
instance.setCreateTable(config.objectStore().createTable());
instance.setDropTable(config.objectStore().dropTable());
instance.setTablePrefix(config.objectStore().tablePrefix());
}
public void startRecoveryService(Map<String, String> configuredDataSourcesConfigKeys,
Set<String> dataSourcesWithTransactionIntegration, boolean xaResourcesPresent, ShutdownContext context) {
if (transactions.getValue().objectStore().type().equals(ObjectStoreType.JDBC)) {
final String objectStoreDataSourceName;
if (transactions.getValue().objectStore().datasource().isEmpty()) {
if (!DataSourceUtil.hasDefault(configuredDataSourcesConfigKeys.keySet())) {
throw new ConfigurationException(
"The Narayana JTA extension does not have a datasource configured as the JDBC object store,"
+ " so it defaults to the default datasource,"
+ " but that datasource is not configured."
+ " To solve this, either configure the default datasource,"
+ " referring to https://quarkus.io/guides/datasource for guidance,"
+ " or configure the datasource to use in the Narayana JTA extension "
+ " by setting property 'quarkus.transaction-manager.object-store.datasource' to the name of a configured datasource.");
}
objectStoreDataSourceName = DataSourceUtil.DEFAULT_DATASOURCE_NAME;
} else {
objectStoreDataSourceName = transactions.getValue().objectStore().datasource().get();
if (!configuredDataSourcesConfigKeys.keySet().contains(objectStoreDataSourceName)) {
throw new ConfigurationException(
"The Narayana JTA extension is configured to use the datasource '"
+ objectStoreDataSourceName
+ "' but that datasource is not configured."
+ " To solve this, either configure datasource " + objectStoreDataSourceNameView on GitHub (pinned to e1c734241f)
Solutions
- Configure the default datasource (quarkus.datasource.db-kind, url, username, password)
- Or explicitly set quarkus.transaction-manager.object-store.datasource=<name-of-a-configured-datasource>
- Or change quarkus.transaction-manager.object-store.type away from jdbc (e.g. file-system) if a DB store is not required
Example fix
# before quarkus.transaction-manager.object-store.type=jdbc # after quarkus.datasource.db-kind=postgresql quarkus.datasource.username=quarkus quarkus.datasource.password=quarkus quarkus.datasource.jdbc.url=jdbc:postgresql://localhost:5432/quarkus quarkus.transaction-manager.object-store.type=jdbc
Defensive patterns
Strategy: validation
Validate before calling
boolean ok = ConfigProvider.getConfig().getOptionalValue("quarkus.transaction-manager.object-store.datasource", String.class).isPresent() || ConfigProvider.getConfig().getOptionalValue("quarkus.datasource.db-kind", String.class).isPresent(); if (!ok) throw new IllegalStateException("JDBC object store needs a default or named datasource"); Try / catch
try { app.start(); } catch (ConfigurationException e) { if (e.getMessage().contains("Narayana JTA extension does not have a datasource")) { /* configure default datasource */ } throw e; } Prevention
- When using object-store.type=jdbc, always configure a datasource in the same profile
- Prefer an explicit named object-store datasource over relying on the default
- Smoke-test startup per profile (dev/test/prod configs differ)
When it happens
Trigger: application.properties has quarkus.transaction-manager.object-store.type=jdbc, no quarkus.transaction-manager.object-store.datasource set, and no quarkus.datasource.* default datasource is configured (e.g. only named datasources exist, or no datasource at all).
Common situations: Enabling the JDBC object store in an app that uses only named datasources; forgetting quarkus.datasource.db-kind/credentials; enabling jdbc object store in tests without a test datasource; following old docs that assumed a default datasource always exists.
Related errors
- The Narayana JTA extension is configured to use the datasour
- The Narayana JTA extension is configured to use the '%s' JDB
- JDBC Store configured but the '%s' datasource is not configu
- Unable to find top command. Ensure you have a @CommandDefini
- No datasource named '<dataSourceName>' exists
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/f08a6df96400f22a.
Report an issue: GitHub.