org.hibernate.tool.schema.spi.SchemaManagementException: Could not locate column information using identifier [SYS_NC00137$]

Hibernate JIRA | Ramon Casha | 1 year ago
  1. 0

    Postgresql + Hibernate 5 column not found but coluimn exists

    Stack Overflow | 4 months ago | jvos
    java.lang.IllegalStateException: Failed to load ApplicationContext
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    @MapKeyClass missing column [hash] in table

    Stack Overflow | 3 months ago | svenhornberg
    javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory
  4. 0

    Switching to hibernate 5.0.3 from 4.3.11 I started getting an error during schema validation when my service starts up: {code:java} org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [ProcessingSolution_processing_solution_id] in table [processing_solutions_processing_datasets] at org.hibernate.tool.schema.internal.SchemaValidatorImpl.validateTable(SchemaValidatorImpl.java:85) at org.hibernate.tool.schema.internal.SchemaValidatorImpl.doValidation(SchemaValidatorImpl.java:50) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:91) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:484) at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:444) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:708) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:724) at com.cerner.wolfe.service.util.HibernateUtil.buildSessionFactory(HibernateUtil.java:25) {code} I did not get this error with 4.3.11. It looks like hibernate is now looking for a column named "ProcessingSolution_processing_solution_id" where previously it was looking for "processing_solutions_processing_solution_id". This column is on a join table created with: {code:java} create table processing_solutions_processing_datasets ( processing_solutions_processing_solution_id varchar(100) not null, datasets_processing_dataset_id varchar(100) not null, primary key (processing_solutions_processing_solution_id, datasets_processing_dataset_id) ); {code} The joined entities are (fields removed): {code:java} @Entity @Table(name = "processing_solutions") public class ProcessingSolution { @Id @Column(name = "processing_solution_id", nullable = false, unique = true, columnDefinition = "varchar(100)") private String identifier; @OneToMany @Cascade(CascadeType.ALL) private Set<ProcessingDataset> datasets = new HashSet<>(0); {code} and {code:java} @Entity @Table(name = "processing_datasets") public class ProcessingDataset { @Id @Column(name = "processing_dataset_id", nullable = false, columnDefinition = "varchar(100)") private String identifier; @ElementCollection @CollectionTable(name = "processing_dataset_sources", joinColumns = @JoinColumn(name = "processing_dataset_id")) @Column(name = "source", nullable = false, columnDefinition = "varchar(100)") private Set<String> sources = new HashSet<>(0); @ElementCollection @CollectionTable(name = "processing_dataset_entitytypes", joinColumns = @JoinColumn(name = "processing_dataset_id")) @Column(name = "entity_type", nullable = false, columnDefinition = "varchar(190)") private Set<String> entityTypes = new HashSet<String>(0); {code} If I'm doing something wrong, please advise. As mentioned above, this was working under 4.3.11 but does not work under 5.0.0 nor 5.0.3.

    Hibernate JIRA | 1 year ago | Brian Tieman
    org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing column [ProcessingSolution_processing_solution_id] in table [processing_solutions_processing_datasets]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.tool.schema.spi.SchemaManagementException

      Could not locate column information using identifier [SYS_NC00137$]

      at org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes()
    2. org.hibernate.tool
      InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes
      1. org.hibernate.tool.schema.extract.internal.InformationExtractorJdbcDatabaseMetaDataImpl.getIndexes(InformationExtractorJdbcDatabaseMetaDataImpl.java:550)
      1 frame