DMN problem with RDBMS exporter though no secondary RDBMS configured

I am running a local Docker-Compose setup with Camunda 8.9.1. I use Elasticsearch as my secondary DB. Yet I am facing a problem that appears to stem from the RDBMS exporter (you will see when you check the Java stack).

This is the error message (I inserted some line breaks into the error message to improve readability):

### Error flushing statements.  Cause: org.apache.ibatis.executor.BatchExecutorException: 
	io.camunda.db.rdbms.sql.DecisionInstanceMapper.insert (batch index #3) failed. 2 prior sub executor(s) completed successfully, but will be rolled back. 
	Cause: org.h2.jdbc.JdbcBatchUpdateException: Value too long for column "RESULT CHARACTER VARYING(256)": 
	"'[{""name"":null,""vollstaendig"":true,""hinweis"":null,""anmerkung"":null,""nachgeforder... (481)"; SQL statement:
INSERT INTO DECISION_INSTANCE (DECISION_INSTANCE_ID,
                                            DECISION_INSTANCE_KEY,
                                            PROCESS_INSTANCE_KEY,
                                            ROOT_PROCESS_INSTANCE_KEY,
                                            PROCESS_DEFINITION_KEY,
                                            PROCESS_DEFINITION_ID,
                                            DECISION_DEFINITION_KEY,
                                            DECISION_DEFINITION_ID,
                                            DECISION_REQUIREMENTS_KEY,
                                            DECISION_REQUIREMENTS_ID,
                                            FLOW_NODE_INSTANCE_KEY,
                                            FLOW_NODE_ID,
                                            ROOT_DECISION_DEFINITION_KEY,
                                            TYPE,
                                            STATE,
                                            EVALUATION_DATE,
                                            RESULT,
                                            EVALUATION_FAILURE,
                                            EVALUATION_FAILURE_MESSAGE,
                                            TENANT_ID,
                                            PARTITION_ID,
                                            HISTORY_CLEANUP_DATE)
    VALUES (?, ?, ?,
            ?,
            ?, ?,
            ?, ?,
            ?, ?,
            ?, ?,
            ?,
            ?, ?,
            ?, ?, ?,
            ?,
            ?, ?,
            ?) [22001-240]

And here is the stack trace:

	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:254)
	at io.camunda.db.rdbms.write.queue.DefaultExecutionQueue.doFLush(DefaultExecutionQueue.java:245)
	at io.camunda.db.rdbms.write.queue.DefaultExecutionQueue.flush(DefaultExecutionQueue.java:132)
	at io.camunda.db.rdbms.write.RdbmsWriters.flush(RdbmsWriters.java:337)
	at io.camunda.exporter.rdbms.RdbmsExporter.flushExecutionQueue(RdbmsExporter.java:448)
	at io.camunda.exporter.rdbms.RdbmsExporter.flushAndReschedule(RdbmsExporter.java:360)
	at io.camunda.zeebe.scheduler.ActorJob.invoke(ActorJob.java:86)
	at io.camunda.zeebe.scheduler.ActorJob.execute(ActorJob.java:43)
	at io.camunda.zeebe.scheduler.ActorTask.execute(ActorTask.java:125)
	at io.camunda.zeebe.scheduler.ActorThread.executeCurrentTask(ActorThread.java:127)
	at io.camunda.zeebe.scheduler.ActorThread.doWork(ActorThread.java:104)
	at io.camunda.zeebe.scheduler.ActorThread.run(ActorThread.java:224)

Obviously the column RESULT has a length of 255 characters which is too short to hold my result of a 481 characters long JSON string. Yes, I use a DMN decision to prepare quite a big result set. I am surprised that the result is expected to not be longer than 255 characters. How can I get around this problem?

The RDBMS exporter has a 256-character limit for string fields including DMN decision results, which is not configurable and tied to the database schema. I found the following relevant resources:

Does this help? If not, can anyone from the community jump in? :waving_hand:


:light_bulb: Hints: Use the Ask AI feature in Camunda’s documentation to chat with AI and get fast help. Report bugs and features in Camuda’s GitHub issue tracker. Trust the process. :robot:

Hello @JensBrauckhoff ,
this is indeed a strange issue. Elasticsearch should be the default secondary storage type, I don’t see how RDBMS got configured. Can you please share the docker-compose file (without the secrets) ?

Best regards,

Thanks @JensBrauckhoff for sharing your configuration
I see that you mount the application.yaml as volume , can you please share the content of your ./.orchestration/application.yaml

I also see this in your .env ORCHESTRATION_CONFIG_FILE=application-h2.yaml , but I am not sure if it is used anywhere, it could be the one overriding the database type with RDBMS

Best regards,

Ooops, I sent a reply with the .orchestration/application.yaml and the configuration/application-h2.yaml files. I just got a reply from the spam filter, which said that this post got classified as spam. @houssain-barouni : can you please check with one of the moderators, to get the contents of my post?

Hi @JensBrauckhoff I was able to receieve your files
In .orchestration/application.yaml , I can see the following

camunda:
  database:
    type: rdbms
  ...
  data:
    secondary-storage:
      type: rdbms
      rdbms:
        url: jdbc:h2:file:./camunda-data/h2db
        username: sa
        password:
        flushInterval: PT0.5S
        queueSize: 1000

and this explains why you got RDBMS configured to your application

In case you need to use Elasticsearch, please remove these lines

  database:
    type: rdbms
  ...
  data:
    secondary-storage:
      type: rdbms
      rdbms:
        url: jdbc:h2:file:./camunda-data/h2db
        username: sa
        password:
        flushInterval: PT0.5S
        queueSize: 1000

Elasticsearch is used by default, with url=http://localhost:9200
in case you need a different url you can set

camunda:
  data:
    secondary-storage:
      type: elasticsearch
      elasticsearch:
        url: <you-es-url>

Hello Houssain,

that resolved my problem.

Yet I had to adopt a abunch of locations with the rdbms setting in .orchestration/application.yaml. Next problem was that the elastic-url was “localhost:9200” instead of “elasticsearch:9200”. Then I had to drop the camunda-data-init container as well as it’s volume. But then I got it to work.

Thank you very much for your assistance.

One note: I would regard the RDBMS secondary storage cannot hold DMN results longer than 255 characters to be a show stopper for production use. But I assume you already considered increasing this value with 8.10.

Regards,

Jens

Happy to hear that your problem is solved.

One note: I would regard the RDBMS secondary storage cannot hold DMN results longer than 255 characters to be a show stopper for production use. But I assume you already considered increasing this value with 8.10.

This was solved in 8.9.9 with Decision result column for rdbms exporter too small · Issue #55114 · camunda/camunda · GitHub

Best regards,

Perfect and thanks for the information. So I simply was too early :wink: