Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Error initializing jpaserver-starter test cases with current HAPI master #6637

Open
dotasek opened this issue Jan 20, 2025 · 1 comment

Comments

@dotasek
Copy link
Contributor

dotasek commented Jan 20, 2025

NOTE: Before filing a ticket, please see the following URL:
https://github.com/hapifhir/hapi-fhir/wiki/Getting-Help

Describe the bug

The downstream hapi-fhir-jpaserver-starter project can no longer initialize tests after changes to HAPI-FHIR

To Reproduce

  1. Build the latest master version of HAPI-FHIR (7.7.17-SNAPSHOT at present time)
  2. Clone the following release tracking branch of hapi-fhir-jpaserver-starter
  3. In the hapi-fhir-jpaserver-starter POM, change the parent version to 7.7.17-SNAPSHOT
  4. Build and test hapi-fhir-jpaserver-starter by running mvn clean install

This will result in errors when attempting to run the integration tests. The console error logs will contain numerous exceptions, similar to the following:

Caused by: org.hibernate.MappingException: Foreign key (FK_TRMCODESYSTEM_CURVER:trm_codesystem [current_version_pid,current_version_partition_id])) must have same number of columns as the referenced primary key (trm_codesystem_ver [pid])
        at org.hibernate.mapping.ForeignKey.alignColumns(ForeignKey.java:136)
        at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.secondPassCompileForeignKeys(InFlightMetadataCollectorImpl.java:1986)
        at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.secondPassCompileForeignKeys(InFlightMetadataCollectorImpl.java:1959)
        at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.processSecondPasses(InFlightMetadataCollectorImpl.java:1806)
        at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.buildMetadataInstance(InFlightMetadataCollectorImpl.java:2084)
...

Expected behavior
hapi-fhir-jpaserver-starter should build, and pass all tests.

Environment (please complete the following information):

  • HAPI FHIR (master branch)
  • MacOS 15.2

Additional context
In attempting to debug, the following change appears to have impacted the tables/keys mentioned in the exception above (See FK_TRMCODESYSTEM_CURVER in TermCodeSystem):

5c4aae0

@dotasek
Copy link
Contributor Author

dotasek commented Jan 20, 2025

Replicable in Ubuntu as well: hapifhir/hapi-fhir-jpaserver-starter#772

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant