Menu

Duplicate Name

Help
edejongh
2007-04-08
2013-04-15
  • edejongh

    edejongh - 2007-04-08

    Hi,
    I am trying to import tables from a DB2 database. This is done via ODBC.
    I am getting a duplicate name no matter which table i try to import. See error below.
    I created a test table with only two fields, both very unique names, but still get the error.
    Anybody have any ideas?
    Thanx.
    Evert

    Got exception "activegrid.data.dataservice.DataServiceExistenceException" during import:
    Cannot create complex type for table "PALLETS".
      Caused by activegrid.model.schema.DuplicateNameException: Duplicate Name.  Cannot use the name "description2" for a element in table definition for Pallets.  Another column has the same name.
      File "C:\Program Files\ActiveGrid Studio\prod\python\activegrid\tool\DataModelEditor.py", line 4358, in RunWizard
        return self.RunImportWizard(dontDestroy)

      File "C:\Program Files\ActiveGrid Studio\prod\python\activegrid\tool\DataModelEditor.py", line 4460, in RunImportWizard
        currentModel = self._db.getSchema(addTableNames, schemaOptions=self._schemaOptions, targetNamespace=tns)

      File "C:\Program Files\ActiveGrid Studio\prod\python\activegrid\data\dataservice.py", line 2758, in getSchema
        raise DataServiceExistenceException("Cannot create complex type for table \"%s\"." % tableName, e)

     
    • Geremy Cohen

      Geremy Cohen - 2007-04-08

      Hi edejongh-

      Can you post the SQL to recreate your DB locally, as well as the version/platform of DB2 to load it against?

      thanks,
      geremy

       
    • edejongh

      edejongh - 2007-04-10

      DB2 Version Info :
      ------------------
      - Windows 2003
      - DB2 v8.1.12.99 FixPak 12

      Table SQL:
      ----------
      Create table DCJDE.Table1 (
          FieldOne                       CHARACTER(10)       NOT NULL    ,
          FieldTwo                       CHARACTER(10)       NOT NULL    )
      in USERSPACE1
      alter table DCJDE.Table1
          add constraint FieldOneKey
          Primary Key (FieldOne)

      Import Error Info :
      -------------------
      Got exception "activegrid.data.dataservice.DataServiceExistenceException" during import:
      Cannot create complex type for table "TABLE1".
        Caused by activegrid.model.schema.DuplicateNameException: Duplicate Name.  Cannot use the name "FIELDTWO" for a element in table definition for TABLE1.  Another column has the same name.
        File "C:\Program Files\ActiveGrid Studio\prod\python\activegrid\tool\DataModelEditor.py", line 4358, in RunWizard
          return self.RunImportWizard(dontDestroy)

        File "C:\Program Files\ActiveGrid Studio\prod\python\activegrid\tool\DataModelEditor.py", line 4460, in RunImportWizard
          currentModel = self._db.getSchema(addTableNames, schemaOptions=self._schemaOptions, targetNamespace=tns)

        File "C:\Program Files\ActiveGrid Studio\prod\python\activegrid\data\dataservice.py", line 2758, in getSchema
          raise DataServiceExistenceException("Cannot create complex type for table \"%s\"." % tableName, e)

       
      • Geremy Cohen

        Geremy Cohen - 2007-04-22

        I've posted a response at:

        http://dev.activegrid.com/community/?q=node/121

        Please post your response to my response, and all further questions there on our new site.

        thanks,
        geremy

         
    • Geremy Cohen

      Geremy Cohen - 2007-04-16

      Ok, I've imported in a table like the one you suggest on 2.3, and I'm not getting any problems. 

      Can you describe how to reproduce this issue step-by-step, as well as try it again on 2.3?

      Also, when you say ODBC, do you mean JDBC?  Are you running this in LAMP (Default) or Java mode?

      thanks,
      geremy

       
      • edejongh

        edejongh - 2007-04-16

        Created the table in DB2 via the DB2 Control Centre program.
        Uninstalled 2.2 and installed 2.3. Did not change any default settings.
        Began by creating a Blank Application.
        Took all the default settings and then clicked on Import Database under Tools.
        The Data Source is the name of an ODBC connection i uses for my other connections to the database.
        I would think it is LAMP as i installed with default settings.
        Selected the table i created and tried to import it.
        This is the error i got :
        >> Got exception "activegrid.data.dataservice.DataServiceExistenceException" during import:
        >> Cannot create complex type for table "TABLE1".
        >>   Caused by activegrid.model.schema.DuplicateNameException: Duplicate Name.  Cannot use the name "FIELDONEKEY" for a key in table definition for TABLE1. 
        >> Another column has the same name.
        >>   File "C:\Program Files\ActiveGrid Studio\prod\python\activegrid\tool\DataModelEditor.py", line 4419, in RunWizard
        >>     return self.RunImportWizard(dontDestroy)
        >>   File "C:\Program Files\ActiveGrid Studio\prod\python\activegrid\tool\DataModelEditor.py", line 4523, in RunImportWizard
        >>     currentModel = self._db.getSchema(addTableNames, schemaOptions=self._schemaOptions, targetNamespace=tns)
        >>   File "C:\Program Files\ActiveGrid Studio\prod\python\activegrid\data\dataservice.py", line 3063, in getSchema
        >>     raise DataServiceExistenceException("Cannot create complex type for table \"%s\"." % tableName, e)

         

Log in to post a comment.

MongoDB Logo MongoDB