Improper mapping

org.hibernate.HibernateException
Javadoc
The base exception type for Hibernate exceptions.

Note that all {@link java.sql.SQLException SQLExceptions} will be wrapped in some form of {@link JDBCException}. @author Gavin King
at org.hibernate.mapping.Table.validateColumns
(source)

Typical Exception Messages

  1. <No message>
  2. [PersistenceUnit: reportServerPU] Unable to build EntityManagerFactory
  3. PicoLifecycleException: method 'public void org.sonar.core.database.JndiDatabaseConnector.start()', instance 'org.sonar.core.database.JndiDatabaseConnector@343bb6, org.hibernate.HibernateException: Wrong column type in sonar.properties for column prop_key. Found: text, expected: varchar(255)
  4. Error creating bean with name 'entityManagerFactory' defined in class path resource [META-INF/spring/batchContext.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: persistenceUnit] Unable to build EntityManagerFactory
  5. Wrong column type: opener, expected: bit
  6. Wrong column type in sonar.active_rule_param_changes for column new_value. Found: text, expected: mediumtext
  7. Wrong column type in [schme_name].[table_name] for column [column_name]. Found: _int8, expected: int8
  8. Wrong column type in public.postal_code for column country. Found: bpchar, expected: bytea
  9. Missing column: id in test_dev.division
  10. Wrong column type in SYSTEM.COURSE for column COURSE_NAME. Found: number, expected: varchar2(255 char)

Specific cases

Solution

Mohd Salauddin, 3 months ago

This blog post covers the most frequest cases.

External results for this pattern (44)

  1. Mr.Radarvia Stack Overflow4 months ago
    Wrong column type in XXXX.MYTABLE for column BESCHREIBUNG. Found: clob, expected: varchar2(4000 char)
    Show stack trace
  2. masalinasvia GitHub5 months ago
    Error creating bean with name 'defaultPluginDescriptorParser': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.qcadoo.plugin.internal.api.ModuleFactoryAccessor com.qcadoo.plugin.internal.descriptorparser.DefaultPluginDescriptorParser.moduleFactoryAccessor; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.qcadoo.plugin.internal.module.DefaultModuleFactoryAccessor#0' defined in URL [jar:file:/opt/mes-application-1.9.0/webapps/ROOT/WEB-INF/lib/qcadoo-plugin-1.5-20180224.203757-165.jar!/qcadoo-plugin-context.xml]: Cannot create inner bean 'com.qcadoo.model.internal.module.HibernateModuleFactory#307d277c' of type [com.qcadoo.model.internal.module.HibernateModuleFactory] while setting bean property 'moduleFactories' with key [3]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.qcadoo.model.internal.module.HibernateModuleFactory#307d277c': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.qcadoo.model.internal.api.ModelXmlToDefinitionConverter com.qcadoo.model.internal.module.HibernateModuleFactory.modelXmlToDefinitionConverter; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'modelXmlToDefinitionConverterImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.qcadoo.model.internal.api.DataAccessService com.qcadoo.model.internal.definitionconverter.ModelXmlToDefinitionConverterImpl.dataAccessService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataAccessServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.qcadoo.model.internal.api.EntityService com.qcadoo.model.internal.DataAccessServiceImpl.entityService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.qcadoo.model.internal.api.HibernateService com.qcadoo.model.internal.EntityServiceImpl.hibernateService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.hibernate.SessionFactory com.qcadoo.model.internal.HibernateServiceImpl.sessionFactory; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginSessionFactory' defined in URL [jar:file:/opt/mes-application-1.9.0/webapps/ROOT/WEB-INF/lib/qcadoo-plugin-1.5-20180224.203757-165.jar!/qcadoo-plugin-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: groupName in public.qcadooplugin_plugin
    Show stack trace
  3. [PersistenceUnit: ASD] Unable to build EntityManagerFactory
    Show stack trace
  4. Unknown authorvia hannonhill.com5 months ago
    Error creating bean with name 'newMenuCache' defined in URL [file:/global/data/local/cascade-7/tomcat/webapps/ROOT/WEB-INF/classes/com/hannonhill/cascade/config/spring/applicationContextCache.xml]: Cannot resolve reference to bean 'serviceProvider' while setting bean property 'serviceProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serviceProvider' defined in URL [file:/global/data/local/cascade-7/tomcat/webapps/ROOT/WEB-INF/classes/com/hannonhill/cascade/config/spring/applicationContextServices.xml]: Cannot resolve reference to bean 'assetFactoryContainerService' while setting bean property 'assetFactoryContainerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'assetFactoryContainerService' defined in URL [file:/global/data/local/cascade-7/tomcat/webapps/ROOT/WEB-INF/classes/com/hannonhill/cascade/config/spring/applicationContextServices.xml]: Cannot resolve reference to bean 'daoProvider' while setting bean property 'daoProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'daoProvider' defined in URL [file:/global/data/local/cascade-7/tomcat/webapps/ROOT/WEB-INF/classes/com/hannonhill/cascade/config/spring/applicationContextDAO.xml]: Cannot resolve reference to bean 'userDAO' while setting bean property 'userDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDAO' defined in URL [file:/global/data/local/cascade-7/tomcat/webapps/ROOT/WEB-INF/classes/com/hannonhill/cascade/config/spring/applicationContextDAO.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:/global/data/local/cascade-7/tomcat/webapps/ROOT/WEB-INF/classes/com/hannonhill/cascade/config/spring/applicationContextInit.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Wrong column type in CASCADE_DEFAULT.CXML_FOLDERCONTENT for column symlinkLink. Found: clob, expected: varchar2(255 char)
    Show stack trace
  5. Kyle Camposvia Kuali JIRA5 months ago
    Error creating bean with name 'rice' defined in class path resource [ksb/ks-standalone-context.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'courseListContext' defined in class path resource [statement-context.xml]: Cannot resolve reference to bean 'luServiceImpl' while setting bean property 'luService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luServiceImpl' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luDao' while setting bean property 'luDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luDao' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luEntityManager' while setting bean property 'em'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luEntityManager' defined in class path resource [ksb/ks-lu-context.xml]: Cannot resolve reference to bean 'luEntityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luEntityManagerFactory' defined in class path resource [ksb/ks-lu-context.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: Lu] Unable to build EntityManagerFactory
    Show stack trace
  6. Arnaud Thimelvia Hibernate JIRA5 months ago
    Wrong column type in DB-1427720664171.PUBLIC.SOME_ENTITY for column name. Found: varchar, expected: longvarchar
    Show stack trace
  7. Unknown authorvia reportserver.net5 months ago
    [PersistenceUnit: reportServerPU] Unable to build EntityManagerFactory
    Show stack trace
  8. Unknown authorvia reportserver.net5 months ago
    [PersistenceUnit: reportServerPU] Unable to build EntityManagerFactory
    Show stack trace
  9. Debopamvia Stack Overflow5 months ago
    Wrong column type in employees.employees for column gender. Found: enum, expected: integer
    Show stack trace
  10. JavierFuentesvia GitHub5 months ago
    Error creating bean with name 'org.springframework.cache.annotation.ProxyCachingConfiguration': Initialization of bean failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' is defined) 2016-02-07 13:59:21.299 ERROR 746 --- [ main] o.s.test.context.TestContextManager : Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@77998ea7] to prepare test instance [asv.exercise.service.UserServiceIntTest@252d8df6] java.lang.IllegalStateException: Failed to load ApplicationContext
    Show stack trace