org.jboss.tools.hibernate.spi.HibernateException: Duplicate names found for primarykey. Existing name: SYS_C00123041 JDBC name: SYS_C00123039 on table org.hibernate.mapping.Table(TP_SUB_TYP)

Hibernate JIRA | Tomasz | 2 years ago
  1. 0

    In oracle 10g (or 11g - tried both) i have two tables: CREATE TABLE TP_SUB_TYP ( ID NUMBER(11,0) DEFAULT 1 NOT NULL ENABLE, NAME VARCHAR2(512 BYTE), PRIMARY KEY (ID) ); CREATE TABLE TP_SUBSTYP ( ID NUMBER(11,0) DEFAULT 1 NOT NULL ENABLE, NAME VARCHAR2(512 BYTE), PRIMARY KEY (ID) ); And when I try to view these tables in eclipse i get: org.jboss.tools.hibernate.spi.HibernateException: Duplicate names found for primarykey. Existing name: SYS_C00123041 JDBC name: SYS_C00123039 on table org.hibernate.mapping.Table(TP_SUB_TYP) at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute(LazyDatabaseSchemaWorkbenchAdapter.java:138) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:108) at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:125) at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:65) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:104) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:238) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) This problem will not happen if the names of two tables will be like TP_SUB_TYP_1 and TP_SUB_TYP_2 - but i cannot rename tables.

    Hibernate JIRA | 2 years ago | Tomasz
    org.jboss.tools.hibernate.spi.HibernateException: Duplicate names found for primarykey. Existing name: SYS_C00123041 JDBC name: SYS_C00123039 on table org.hibernate.mapping.Table(TP_SUB_TYP)
  2. 0

    In oracle 10g (or 11g - tried both) i have two tables: CREATE TABLE TP_SUB_TYP ( ID NUMBER(11,0) DEFAULT 1 NOT NULL ENABLE, NAME VARCHAR2(512 BYTE), PRIMARY KEY (ID) ); CREATE TABLE TP_SUBSTYP ( ID NUMBER(11,0) DEFAULT 1 NOT NULL ENABLE, NAME VARCHAR2(512 BYTE), PRIMARY KEY (ID) ); And when I try to view these tables in eclipse i get: org.jboss.tools.hibernate.spi.HibernateException: Duplicate names found for primarykey. Existing name: SYS_C00123041 JDBC name: SYS_C00123039 on table org.hibernate.mapping.Table(TP_SUB_TYP) at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute(LazyDatabaseSchemaWorkbenchAdapter.java:138) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:108) at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:125) at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:65) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:104) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:238) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) This problem will not happen if the names of two tables will be like TP_SUB_TYP_1 and TP_SUB_TYP_2 - but i cannot rename tables.

    Hibernate JIRA | 2 years ago | Tomasz
    org.jboss.tools.hibernate.spi.HibernateException: Duplicate names found for primarykey. Existing name: SYS_C00123041 JDBC name: SYS_C00123039 on table org.hibernate.mapping.Table(TP_SUB_TYP)
  3. 0

    Hibernate Tools: Exception when Foreign Key is mapped to two different tables

    Stack Overflow | 2 years ago | jmarks
    org.jboss.tools.hibernate.spi.HibernateException: Foreign key name (EXECUTION_FK) mapped to different tables! previous: org.hibernate.mapping.Table(PURGE_EXECUTION_TRACKING) current:org.hibernate.mapping.Table(PURGE_SCENARIO_TRACKING)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.jboss.tools.hibernate.spi.HibernateException

      Duplicate names found for primarykey. Existing name: SYS_C00123041 JDBC name: SYS_C00123039 on table org.hibernate.mapping.Table(TP_SUB_TYP)

      at org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute()
    2. org.hibernate.eclipse
      LazyDatabaseSchemaWorkbenchAdapter$2.execute
      1. org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter$2.execute(LazyDatabaseSchemaWorkbenchAdapter.java:138)
      1 frame
    3. org.hibernate.console
      ConsoleConfiguration.execute
      1. org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63)
      2. org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:108)
      2 frames
    4. org.hibernate.eclipse
      BasicWorkbenchAdapter.fetchDeferredChildren
      1. org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.readDatabaseSchema(LazyDatabaseSchemaWorkbenchAdapter.java:125)
      2. org.hibernate.eclipse.console.workbench.LazyDatabaseSchemaWorkbenchAdapter.getChildren(LazyDatabaseSchemaWorkbenchAdapter.java:65)
      3. org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:104)
      3 frames
    5. Workbench
      DeferredTreeContentManager$1.run
      1. org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:238)
      1 frame
    6. Eclipse Jobs
      Worker.run
      1. org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      1 frame