org.hibernate.cfg.JDBCBinderException: The type java.lang.Object spans multiple columns. Only single column types allowed for single columns.

Hibernate JIRA | Calin Medianu | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    The exception below is thrown when reverse engineering certain tables. Please display a more detailed error message so the user understands what is wrong whith what column and suggest a way to fix the problem and complete generation. Please review the code to make sure that it is correct, since there was nothing special about any of the tables I was reverse engineering. Thanks. org.hibernate.cfg.JDBCBinderException: The type java.lang.Object spans multiple columns. Only single column types allowed for single columns. at org.hibernate.cfg.JDBCBinder.guessAndAlignType(JDBCBinder.java:453) at org.hibernate.cfg.JDBCBinder.bindColumnToSimpleValue(JDBCBinder.java:403) at org.hibernate.cfg.JDBCBinder.bindBasicProperty(JDBCBinder.java:395) at org.hibernate.cfg.JDBCBinder.bindColumnsToProperties(JDBCBinder.java:380) at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:163) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:249) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:71) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:246) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:165) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:133) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:99) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)

    Hibernate JIRA | 1 decade ago | Calin Medianu
    org.hibernate.cfg.JDBCBinderException: The type java.lang.Object spans multiple columns. Only single column types allowed for single columns.
  2. 0

    The exception below is thrown when reverse engineering certain tables. Please display a more detailed error message so the user understands what is wrong whith what column and suggest a way to fix the problem and complete generation. Please review the code to make sure that it is correct, since there was nothing special about any of the tables I was reverse engineering. Thanks. org.hibernate.cfg.JDBCBinderException: The type java.lang.Object spans multiple columns. Only single column types allowed for single columns. at org.hibernate.cfg.JDBCBinder.guessAndAlignType(JDBCBinder.java:453) at org.hibernate.cfg.JDBCBinder.bindColumnToSimpleValue(JDBCBinder.java:403) at org.hibernate.cfg.JDBCBinder.bindBasicProperty(JDBCBinder.java:395) at org.hibernate.cfg.JDBCBinder.bindColumnsToProperties(JDBCBinder.java:380) at org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:163) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:249) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:71) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:246) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:165) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:133) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:99) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)

    Hibernate JIRA | 1 decade ago | Calin Medianu
    org.hibernate.cfg.JDBCBinderException: The type java.lang.Object spans multiple columns. Only single column types allowed for single columns.
  3. 0

    Trying to reverse engineer a Sybase Adaptive Server Anywhere 9 database I get a problem with a table that has a composite primary key. The table only has two columns, both are foreign keys and together they are the primary key. I get this (below) error message, and nothing is generated. I temporarily redefined the pk, and then the reverse engineering worked. The problem is (my guess) the two foreign keys both reference the same table. I have a composite primary key made up of two fareign keys that bort reference the same table. Error 2005-07-01 13:56:55.902 Duplicate names found for primarykey. Existing name: definition_item_id JDBC name: member_item_id on table org.hibernate.mapping.Table(GenOLFData.DBA.GTItemDefinition) org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. Existing name: definition_item_id JDBC name: member_item_id on table org.hibernate.mapping.Table(GenOLFData.DBA.GTItemDefinition) at org.hibernate.cfg.JDBCBinder.processPrimaryKey(JDBCBinder.java:964) at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:124) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) create table GTItemDefinition ( definition_item_id GDID not null, member_item_id GDID not null, constraint PK_GTITEMDEFINITION primary key (definition_item_id, member_item_id) ); alter table GTItemDefinition add constraint FK_GTITEMDE_ITEMDEFIN_GTITEM foreign key (member_item_id) references GTItem (item_id) on update restrict on delete restrict; alter table GTItemDefinition add constraint FK_GTITEMDE_ITEMDEFIN_GTITEM2 foreign key (definition_item_id) references GTItem (item_id) on update restrict on delete restrict; create table GTItem ( item_id GDID not null, item_type GDType not null constraint CKC_ITEM_TYPE_GTITEM check (item_type in ('B','D','S')), item_code GDCode not null, item_name GDName not null, item_portrayal GDText, brand_id GDID, category_id GDID, price GDMeasuredQuantity, constraint PK_GTITEM primary key (item_id) );

    Hibernate JIRA | 1 decade ago | Anders Peterson
    org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. Existing name: definition_item_id JDBC name: member_item_id on table org.hibernate.mapping.Table(GenOLFData.DBA.GTItemDefinition)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Trying to reverse engineer a Sybase Adaptive Server Anywhere 9 database I get a problem with a table that has a composite primary key. The table only has two columns, both are foreign keys and together they are the primary key. I get this (below) error message, and nothing is generated. I temporarily redefined the pk, and then the reverse engineering worked. The problem is (my guess) the two foreign keys both reference the same table. I have a composite primary key made up of two fareign keys that bort reference the same table. Error 2005-07-01 13:56:55.902 Duplicate names found for primarykey. Existing name: definition_item_id JDBC name: member_item_id on table org.hibernate.mapping.Table(GenOLFData.DBA.GTItemDefinition) org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. Existing name: definition_item_id JDBC name: member_item_id on table org.hibernate.mapping.Table(GenOLFData.DBA.GTItemDefinition) at org.hibernate.cfg.JDBCBinder.processPrimaryKey(JDBCBinder.java:964) at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:124) at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132) at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) create table GTItemDefinition ( definition_item_id GDID not null, member_item_id GDID not null, constraint PK_GTITEMDEFINITION primary key (definition_item_id, member_item_id) ); alter table GTItemDefinition add constraint FK_GTITEMDE_ITEMDEFIN_GTITEM foreign key (member_item_id) references GTItem (item_id) on update restrict on delete restrict; alter table GTItemDefinition add constraint FK_GTITEMDE_ITEMDEFIN_GTITEM2 foreign key (definition_item_id) references GTItem (item_id) on update restrict on delete restrict; create table GTItem ( item_id GDID not null, item_type GDType not null constraint CKC_ITEM_TYPE_GTITEM check (item_type in ('B','D','S')), item_code GDCode not null, item_name GDName not null, item_portrayal GDText, brand_id GDID, category_id GDID, price GDMeasuredQuantity, constraint PK_GTITEM primary key (item_id) );

    Hibernate JIRA | 1 decade ago | Anders Peterson
    org.hibernate.cfg.JDBCBinderException: Duplicate names found for primarykey. Existing name: definition_item_id JDBC name: member_item_id on table org.hibernate.mapping.Table(GenOLFData.DBA.GTItemDefinition)
  6. 0

    Hibernate Community • View topic - JDBCBinderException (I *swear* this one's different!)

    hibernate.org | 10 months ago
    org.hibernate.cfg.JDBCBinderException: Duplicate class name 'com.gs.fw.legal.big.data.RiskTopic' generated for 'org.hibernate.mapping.Table(BIG.RISK_TOPIC)'. Same name where generated for 'org.hibernate.mapping.Table(BIG.RISK_TOPIC)'

    Root Cause Analysis

    1. org.hibernate.cfg.JDBCBinderException

      The type java.lang.Object spans multiple columns. Only single column types allowed for single columns.

      at org.hibernate.cfg.JDBCBinder.guessAndAlignType()
    2. Hibernate
      JDBCMetaDataConfiguration.readFromJDBC
      1. org.hibernate.cfg.JDBCBinder.guessAndAlignType(JDBCBinder.java:453)
      2. org.hibernate.cfg.JDBCBinder.bindColumnToSimpleValue(JDBCBinder.java:403)
      3. org.hibernate.cfg.JDBCBinder.bindBasicProperty(JDBCBinder.java:395)
      4. org.hibernate.cfg.JDBCBinder.bindColumnsToProperties(JDBCBinder.java:380)
      5. org.hibernate.cfg.JDBCBinder.createPersistentClasses(JDBCBinder.java:163)
      6. org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
      7. org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
      7 frames
    3. org.hibernate.eclipse
      ArtifactGeneratorWizard$3.execute
      1. org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:249)
      1 frame
    4. org.hibernate.console
      ConsoleConfiguration.execute
      1. org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
      2. org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:71)
      2 frames
    5. org.hibernate.eclipse
      ArtifactGeneratorWizard$1.run
      1. org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:246)
      2. org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:165)
      3. org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:133)
      4. org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:99)
      4 frames
    6. JFace
      ModalContext$ModalContextThread.run
      1. org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
      1 frame