Axon Framework 3.3 issue with MariaDB


I am trying to use AxonFramework 3.3 with MariaDB. But, I am getting the error “the database product name ‘MariaDB’ is unknown. No SQLCode configuration is known for that database”.

Can you help me resolve this issue ? It doesn’t look like MariaDB is officially supported by the AxonFramework 3.3.

Hi Prasanna,

From Axon Framework’s perspective, it does no really care what type of RDBMS you use, as long as it can either be plugged in to the JDBCEventStorageEngine or the JPAEventStorageEngine implementation.
I am aware of framework users which have used MariaDb as there Event Store basis.
Whether they used JPA or JDBC is unclear to me though.

Concluding though, I am sure that it should be doable to correctly configure MariaDb.
With the information you’ve shared right now though, I can’t completely deduce what you should and shouldn’t do.

Lastly, I want to point out that Axon Framework is already on release 4.1.1.
If you are in the beginning phase of a project, which it sounds like if you’re looking into configuring MariaDb, I’d highly recommend to use the latest version of the framework.
Additionally, Axon Server provides a dedicated Event Store for you, and routes commands, events and queries for you between your (micro)services, out of the box.
That would omit the necessity to configure MariaDb as an Event Store entirely.

Note that Axon Server has a free, open source solution, and a payed plan.
The latter gives all kinds of added features which can be of interest to your project.
Getting started is however completely free.

Hope this sheds some light on the situation Prasanna!


Hi Steven,

Thanks for the response.

The error I am getting is coming from the class - SQLErrorCodesResolver. If you see the API doc ( for this class, you can see that there is no SQL code configuration available for MariaDB. That seems to be the root cause of the issue. A similar error was reported earlier for DB2 (!topic/axonframework/L7wOjSqMxSI) by another user and the I can see that you have added SQL code configuration for DB2 after that. I have tried the hack posted in that DB2 related thread, but it still didnt work. I hope now you have sufficient information to address this issue. I would look forward to hear back from you.

Coming to the other part, upgrading axon from 3.4 to 4.1. Though I am keen to upgrade Axon to the latest version, few limitations are stopping me from going ahead. I am using Axon framework 3.4 with Kafka and I would prefer to continue using Kafka. It doesn’t look like you have a GA release of Axon Kafka with support for 4.1. I dont want to take any risk by using the latest milestone version i.e., Axon-Kafka 4.0.M2 as it is not meant for production.

I am aware that we dont need Kafka if I start using Axon server, but I am not planning to use Axon server for time being. Please do suggest me what is the best way to use Axon 4.1 with Kafka for production.


Hi Prasanna,

Thanks for the added background there.
The two sentence request you dropped was insufficient for me to deduce your situation or suggestion.

When it comes to the SQLErrorCodesResolver your statement seems fair.
Added though, adjusting and configuring a different/updated SQLErrorCodesResolver should be doable through the PersistenceExceptionResolver.
If you see personal value in introducing this, you are more then free to contribute to Axon Framework; that would be beneficial for you, us and the entire community and as such would be very much appreciated.
Just pointing it out will however not get it resolved right away, so in the end we might just need some help from contributors on this part.
To file a feature request, you browse to the framework’s GitHub page.

Then to your second point, Kafka.
It makes total sense you are not proceeding towards Axon 4 yet given your usages of the Kafka Extension.
I do want to point out that the state of the Kafka Extension is similar to it’s state in Axon 3.x.
We’ve just made it more explicit that it’s a work in progress by having it not yet fully released.
We have plans to proceed working on it by the way, I can however not give you a time frame at the moment.

Another approach to dispatching events between microservices, as pointed out earlier, is Axon Server which mind you, is free to use taken the SE option.
Other than that, you can leverage the AMQP extension, or go very basic and share the Event Store datasource between your services.

Hope this clarifies your situation Prasanna.