org.hibernate.cfg.JDBCBinderException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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) );
    via by Anders Peterson,
  • 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) );
    via by Anders Peterson,
  • 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)
    via by Calin Medianu,
  • 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)
    via by Calin Medianu,
    • 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)
    No Bugmate found.