hibernate/hibernate-orm · error · MappingException

Could not determine JavaType nor JdbcType to use for <resolv

Error message

Could not determine JavaType nor JdbcType to use for <resolvedJavaType>; table = <tableName>; column = <columnName>

What it means

Error "Could not determine JavaType nor JdbcType to use for <resolvedJavaType>; table = <tableName>; column = <columnName>" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/boot/model/process/internal/InferredBasicValueResolver.java:210

						stdIndicators,
						basicTypeRegistry.resolve( recommendedJtd, explicitJdbcType ),
						recommendedJtd
				);
			}
			else {
				// we have neither a JTD nor STD
				throw new MappingException(
						"Could not determine JavaType nor JdbcType to use" +
								" for BasicValue: owner = " + ownerName +
								"; property = " + propertyName +
								"; table = " + table.getName() +
								"; column = " + selectable.getText()
				);
			}
		}

		if ( jdbcMapping == null ) {
			throw new MappingException(
					"Could not determine JavaType nor JdbcType to use" +
							" for " + ( (BasicValue) stdIndicators ).getResolvedJavaType() +
							"; table = " + table.getName() +
							"; column = " + selectable.getText()
			);
		}

		final var javaTypeDescriptor = jdbcMapping.getJavaTypeDescriptor();
		return new InferredBasicValueResolution<>(
				jdbcMapping,
				javaTypeDescriptor,
				javaTypeDescriptor,
				jdbcMapping.getJdbcType(),
				jdbcMapping,
				determineMutabilityPlan( explicitMutabilityPlanAccess, javaTypeDescriptor, typeConfiguration )
		);
	}

View on GitHub (pinned to fad1729dce)

Solutions

  1. Annotate the property with an explicit type (@JavaType/@JdbcType, @Type, or a JPA @Convert) so Hibernate knows how to map it.
  2. Check that the Java type is registered in the type registry; custom types must be contributed via a TypeContributor or @TypeDef.

Example fix

Annotate the property with an explicit type (@JavaType/@JdbcType, @Type, or a JPA @Convert) so Hibernate knows how to map it.

When it happens

Trigger: An entity mapping annotation or bootstrap configuration violates a Hibernate mapping rule.

Common situations: Annotation mapping mistakes: inverse-side @Id associations, @Column on @OneToOne, unmapped association targets, mismatched @EnumeratedValue/@Temporal usage, duplicate sequence generators.


AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22). Data as JSON: /api/errors/cf3b5562dfc057f4. Report an issue: GitHub.