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

SchemaManagementException found [text (Types#LONGVARCHAR)], but expecting [varchar(255) (Types#VARCHAR)] #7484

alex-135 opened this issue Nov 25, 2016 · 1 comment


Copy link

commented Nov 25, 2016

spring boot pom.xml


public class Application {
public static void main(String[] args) {
new SpringApplicationBuilder(Application.class).web(true).run(args);

@EnableJpaRepositories(entityManagerFactoryRef = "entityManagerFactoryPrimary", transactionManagerRef = "transactionManagerPrimary", basePackages = {
"com.respority" })
public class PrimaryConfig {
private JpaProperties jpaProperties;

private DataSource primaryDataSource;

@Bean(name = "entityManagerPrimary")
public EntityManager entityManager(EntityManagerFactoryBuilder builder) {
	return entityManagerFactoryPrimary(builder).getObject().createEntityManager();

@Bean(name = "entityManagerFactoryPrimary")
public LocalContainerEntityManagerFactoryBean entityManagerFactoryPrimary(EntityManagerFactoryBuilder builder) {
	return builder.dataSource(primaryDataSource).properties(getVendorProperties(primaryDataSource))

private Map<String, String> getVendorProperties(DataSource dataSource) {
	return jpaProperties.getHibernateProperties(dataSource);

@Bean(name = "transactionManagerPrimary")
PlatformTransactionManager transactionManagerPrimary(EntityManagerFactoryBuilder builder) {
	return new JpaTransactionManager(entityManagerFactoryPrimary(builder).getObject());


@column(name = "description", nullable = false, length = 65535, columnDefinition="TEXT")
private String description;// mysql 5.6

Caused by: org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [description] in table [table]; found [text (Types#LONGVARCHAR)], but expecting [varchar(255) (Types#VARCHAR)]


This comment has been minimized.

Copy link

commented Nov 25, 2016

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.