| The WEB-INF/hibernate.cfg.xml file shipped in the XWiki WAR still contains a Derby block and an H2 block. These blocks are incomplete: they do not contain the mailsender.hbm.xml mapping that all the other blocks (MySQL, PostgreSQL, Oracle, etc.) have. Because of this, the mailsender_events table used by org.xwiki.mail.MailStatus has no Hibernate mapping on Derby and H2. Steps to reproduce
- Download or build any XWiki distribution from 15.10 onwards.
- Open WEB-INF/hibernate.cfg.xml in the WAR.
- Compare the <mapping> lines of the Derby or H2 block with the MySQL block.
Expected: the blocks contain the same mappings, including mailsender.hbm.xml. Actual: mailsender.hbm.xml is missing from the Derby and H2 blocks. Cause: XWIKI-21551 intentionally removed the metadata of unsupported databases (Derby and H2) from the poms. This included xwiki.db.derby.extraMappings and xwiki.db.h2.extraMappings in xwiki-platform-distribution/pom.xml, which contained mailsender.hbm.xml. The removal was not finished. Two things were left behind:
- The pom still references the removed properties:
<xwikiDbHbmDerbyExtraMappings>${xwiki.db.derby.extraMappings}</xwikiDbHbmDerbyExtraMappings>
<xwikiDbHbmH2ExtraMappings>${xwiki.db.h2.extraMappings}</xwikiDbHbmH2ExtraMappings>
- The template xwiki-platform-tool-configuration-resources/src/main/resources/hibernate.cfg.xml.vm still generates the Derby and H2 blocks.
|