Environment
- OpenAS2 v4.8.2 (built from source — no binary published in this release)
- Java 21 (OpenJDK)
- H2 embedded (file mode),
tcp_server_start="false"
- Debian 13
Issue
config/db_ddl.sql (used to bootstrap the H2 tracking schema) does not include the
SENT_FILE_NAME column that is present in the authoritative DDL Utils schema at
resources/db/openas2-schema.xml.
When DbTrackingModule tries to insert a tracking record after a successful outbound,
it fails because the column is missing in the actual table.
Reproduction
- Configure DbTrackingModule with
tcp_server_start="false" and embedded H2.
- Initialize the schema using
db_ddl.sql via org.h2.tools.RunScript
(since create_db_table.sh requires ant + TCP 9092, both unavailable in a
typical hardened deployment).
- Send any outbound message.
- DbTrackingModule logs an error trying to write
sent_file_name.
Workaround
Add the missing column manually to db_ddl.sql before running it:
ALTER TABLE msg_metadata ADD COLUMN sent_file_name VARCHAR(255);
(or include it in the original CREATE TABLE statement, aligning with
resources/db/openas2-schema.xml).
Suggested fix
Regenerate config/db_ddl.sql from resources/db/openas2-schema.xml so the two
stay in sync; or remove db_ddl.sql from the distro and document the schema
bootstrap to use openas2-schema.xml directly through DDL Utils.
Side note
openas2-schema.xml cannot be used directly with org.h2.tools.RunScript
because it's DDL Utils XML, not plain SQL — users without ant end up using
db_ddl.sql, which is why the missing column matters.
Environment
tcp_server_start="false"Issue
config/db_ddl.sql(used to bootstrap the H2 tracking schema) does not include theSENT_FILE_NAMEcolumn that is present in the authoritative DDL Utils schema atresources/db/openas2-schema.xml.When DbTrackingModule tries to insert a tracking record after a successful outbound,
it fails because the column is missing in the actual table.
Reproduction
tcp_server_start="false"and embedded H2.db_ddl.sqlviaorg.h2.tools.RunScript(since
create_db_table.shrequiresant+ TCP 9092, both unavailable in atypical hardened deployment).
sent_file_name.Workaround
Add the missing column manually to
db_ddl.sqlbefore running it:ALTER TABLE msg_metadata ADD COLUMN sent_file_name VARCHAR(255);
(or include it in the original CREATE TABLE statement, aligning with
resources/db/openas2-schema.xml).Suggested fix
Regenerate
config/db_ddl.sqlfromresources/db/openas2-schema.xmlso the twostay in sync; or remove
db_ddl.sqlfrom the distro and document the schemabootstrap to use
openas2-schema.xmldirectly through DDL Utils.Side note
openas2-schema.xmlcannot be used directly withorg.h2.tools.RunScriptbecause it's DDL Utils XML, not plain SQL — users without
antend up usingdb_ddl.sql, which is why the missing column matters.