TypeContributor has a bug that causes it to execute repeatedly

2026-01-10T15:03:39.274+08:00  INFO 14412 --- [           main] org.hibernate.spatial                    : HHH80000003: hibernate-spatial adding type contributions from : org.hibernate.spatial.dialect.postgis.PostgisDialectContributor
2026-01-10T15:03:39.402+08:00  INFO 14412 --- [           main] o.s.o.j.p.SpringPersistenceUnitInfo      : No LoadTimeWeaver setup: ignoring JPA class transformer
2026-01-10T15:03:39.417+08:00  INFO 14412 --- [           main] org.hibernate.spatial                    : HHH80000003: hibernate-spatial adding type contributions from : org.hibernate.spatial.dialect.postgis.PostgisDialectContributor
2026-01-10T15:03:39.702+08:00  INFO 14412 --- [           main] org.hibernate.spatial                    : HHH80000004: hibernate-spatial adding function contributions from : org.hibernate.spatial.dialect.postgis.PostgisDialectContributor
2026-01-10T15:03:40.271+08:00  INFO 14412 --- [           main] o.h.e.t.j.p.i.JtaPlatformInitiator       : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)

Custom TypeContributors will also have this problem.

Both Hibernate ORM core version 6.6.39.Final and Hibernate ORM core version 7.2.0.Final have this problem

The cause was found through debugging,The contribute function was executed in both places

and org.hibernate.boot.model.process.spi.MetadataBuildingProcess line 646

I can’t create an issue here; clicking the button has no response Jira

I have created a minimal reproducible example on GitHub, which uses hibernate-orm 7.2, but it can also be reproduced in 6.x

Thanks for the reproducer @xiaochenxt, have you logged into Hibernate’s Jira? Did you have a pre-existing Atlassian account or did you create a new one? Sorry for the trouble, we got similar reports recently and we’re trying to figure out why this happens. We can check your account’s details from the admin interface, but you’ll have to share your personal details (account name and email), feel free to DM me if you want.

In the meantime, I’ve created: Jira