Menu

#6 Problems using Hibernate Hbm2DDLExporter

v1.0
open
nobody
None
4
2014-09-19
2014-09-17
GreatSUN
No

Hi all,

When trying to install hyperic server which supports PostgreSQL 9.1.x I get an error message stating that the database might not be supported.
Do you have an idea how to fix this possibly?

Errormsg: hyperic-hqee-installer-5.8.2/installer/data/setup-db-hibernate.xml:102: org.hibernate.tool.hbm2x.ExporterException: Errors while performing Hbm2DDLExporter

Thanks in advance for your help!

Related

Support Requests: #6

Discussion

  • Koichi Suzuki

    Koichi Suzuki - 2014-09-18

    Did you use binary distribution of hyperic server and do you know if
    it comes with PG functions? If so, there are some binary level
    incompatibilities of internal API.

    If hyperic server does not come with such internal server functions,
    then it may be because XC does not provide full foreign key among
    distributed tables.

    I hope both hyperic server and XC server has some log indicating what
    is going on.

    Regards;

    Koichi Suzuki

    2014-09-17 22:32 GMT+09:00 GreatSUN greatsun2009@users.sf.net:


    [support-requests:#6] Problems using Hibernate Hbm2DDLExporter

    Status: open
    Group: v1.0
    Created: Wed Sep 17, 2014 01:32 PM UTC by GreatSUN
    Last Updated: Wed Sep 17, 2014 01:32 PM UTC
    Owner: nobody

    Hi all,

    When trying to install hyperic server which supports PostgreSQL 9.1.x I get
    an error message stating that the database might not be supported.
    Do you have an idea how to fix this possibly?

    Errormsg:
    hyperic-hqee-installer-5.8.2/installer/data/setup-db-hibernate.xml:102:
    org.hibernate.tool.hbm2x.ExporterException: Errors while performing
    Hbm2DDLExporter

    Thanks in advance for your help!


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/postgres-xc/support-requests/6/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

     

    Related

    Support Requests: #6

  • GreatSUN

    GreatSUN - 2014-09-18

    I am using the binary enterprise version of it. Problem occurs when creating tables:

    hq=> create table EAM_AGENT (
    hq(> ID int4 not null,
    hq(> VERSION_COL int8 default 0 not null,
    hq(> ADDRESS varchar(255) not null,
    hq(> PORT int4 not null,
    hq(> AUTHTOKEN varchar(100) not null,
    hq(> AGENTTOKEN varchar(100) not null unique,
    hq(> VERSION varchar(50),
    hq(> CTIME int8,
    hq(> MTIME int8,
    hq(> UNIDIRECTIONAL bool not null,
    hq(> PLUGIN_INVENTORY_CHECKSUM varchar(128),
    hq(> LAST_PLUGIN_INVENTORY_CHECKIN int8 default 0 not null,
    hq(> AGENT_TYPE_ID int4,
    hq(> primary key (ID)
    hq(> );

    ERROR: Unique index of partitioned table must contain the hash/modulo distribution column.

    which can be fixed by adding DISTRIBUTE BY REPLICATION to the end of the query.

    The problem I have is that I am not able to add it, cause I don't know how I could do that (hence this stuff is done by hypernate).

    Can you help me there?

     
    • Koichi Suzuki

      Koichi Suzuki - 2014-09-18

      Year, unique constraint on AGENTTOKEN is not supported yet.

      Table EAM_AGENT is distributed by ID column value using hash. XC
      does not support cross-node unique constraint and this is why you got
      the error.

      This is very similar to unique constraint among partitions in
      PostgreSQL. If you partition EAM_AGENT using ID column value, you
      cannot enforce AGENTTOKEN uniqueness among partitions.

      Regards;

      Koichi Suzuki

      2014-09-18 15:13 GMT+09:00 GreatSUN greatsun2009@users.sf.net:

      I am using the binary enterprise version of it. Problem occurs when creating
      tables:

      hq=> create table EAM_AGENT (
      hq(> ID int4 not null,
      hq(> VERSION_COL int8 default 0 not null,
      hq(> ADDRESS varchar(255) not null,
      hq(> PORT int4 not null,
      hq(> AUTHTOKEN varchar(100) not null,
      hq(> AGENTTOKEN varchar(100) not null unique,
      hq(> VERSION varchar(50),
      hq(> CTIME int8,
      hq(> MTIME int8,
      hq(> UNIDIRECTIONAL bool not null,
      hq(> PLUGIN_INVENTORY_CHECKSUM varchar(128),
      hq(> LAST_PLUGIN_INVENTORY_CHECKIN int8 default 0 not null,
      hq(> AGENT_TYPE_ID int4,
      hq(> primary key (ID)
      hq(> );

      ERROR: Unique index of partitioned table must contain the hash/modulo
      distribution column.

      which can be fixed by adding DISTRIBUTE BY REPLICATION to the end of the
      query.

      The problem I have is that I am not able to add it, cause I don't know how I
      could do that (hence this stuff is done by hypernate).

      Can you help me there?


      [support-requests:#6] Problems using Hibernate Hbm2DDLExporter

      Status: open
      Group: v1.0
      Created: Wed Sep 17, 2014 01:32 PM UTC by GreatSUN
      Last Updated: Wed Sep 17, 2014 01:32 PM UTC
      Owner: nobody

      Hi all,

      When trying to install hyperic server which supports PostgreSQL 9.1.x I get
      an error message stating that the database might not be supported.
      Do you have an idea how to fix this possibly?

      Errormsg:
      hyperic-hqee-installer-5.8.2/installer/data/setup-db-hibernate.xml:102:
      org.hibernate.tool.hbm2x.ExporterException: Errors while performing
      Hbm2DDLExporter

      Thanks in advance for your help!


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/postgres-xc/support-requests/6/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #6

  • GreatSUN

    GreatSUN - 2014-09-18

    Still one problem left now...

    Table is created via:

    CREATE TABLE qrtz_triggers (
    trigger_name character varying(200) NOT NULL,
    trigger_group character varying(200) NOT NULL,
    job_name character varying(200) NOT NULL,
    job_group character varying(200) NOT NULL,
    is_volatile boolean NOT NULL,
    description character varying(250),
    next_fire_time bigint,
    prev_fire_time bigint,
    trigger_state character varying(16) NOT NULL,
    trigger_type character varying(8) NOT NULL,
    start_time bigint NOT NULL,
    end_time bigint,
    calendar_name character varying(200),
    misfire_instr integer,
    job_data bytea,
    priority integer
    )
    DISTRIBUTE BY REPLICATION;
    ALTER TABLE ONLY qrtz_triggers
    ADD CONSTRAINT qrtz_triggers_pkey PRIMARY KEY (trigger_name, trigger_group);

    Command that fails:
    ALTER TABLE ONLY qrtz_triggers
    ADD CONSTRAINT eam_fk_qt_qjd FOREIGN KEY (job_name, job_group) REFERENCES qrtz_job_details(job_name, job_group) ON DELETE CASCADE;

    Errormessage:
    ERROR: Cannot create foreign key whose evaluation cannot be enforced to remote nodes

    Can you tell me how I can fix this perhaps?

     
    • Koichi Suzuki

      Koichi Suzuki - 2014-09-18

      PRIMARY KEY error is the same cause as unique constraint. In PG
      (and in XC as well), PRIMARY KEY is equivalent to NOT NULL UNIQUE.
      At present XC does not allow composit key for distribution key.

      Second error, foreign key, is caused because the referred table is
      distributed using different key. You can set up this foreign key in
      one of the folling cases:

      1) qrtz_job_details is replicated, or
      2) qrtz_triggers is distributed by the job_name and qrtz_job_details
      is distributed by job_name, or
      3 qrtz_triggers is distributed by the job_group and qrtz_job_details
      is distributed by job_group

      I've not tested 2) and 3), the composit key case. There could be
      some bug in these cases.

      Regards;

      Koichi Suzuki

      2014-09-18 18:08 GMT+09:00 GreatSUN greatsun2009@users.sf.net:

      Still one problem left now...

      Table is created via:

      CREATE TABLE qrtz_triggers (
      trigger_name character varying(200) NOT NULL,
      trigger_group character varying(200) NOT NULL,
      job_name character varying(200) NOT NULL,
      job_group character varying(200) NOT NULL,
      is_volatile boolean NOT NULL,
      description character varying(250),
      next_fire_time bigint,
      prev_fire_time bigint,
      trigger_state character varying(16) NOT NULL,
      trigger_type character varying(8) NOT NULL,
      start_time bigint NOT NULL,
      end_time bigint,
      calendar_name character varying(200),
      misfire_instr integer,
      job_data bytea,
      priority integer
      )
      DISTRIBUTE BY REPLICATION;
      ALTER TABLE ONLY qrtz_triggers
      ADD CONSTRAINT qrtz_triggers_pkey PRIMARY KEY (trigger_name, trigger_group);

      Command that fails:
      ALTER TABLE ONLY qrtz_triggers
      ADD CONSTRAINT eam_fk_qt_qjd FOREIGN KEY (job_name, job_group) REFERENCES
      qrtz_job_details(job_name, job_group) ON DELETE CASCADE;

      Errormessage:
      ERROR: Cannot create foreign key whose evaluation cannot be enforced to
      remote nodes

      Can you tell me how I can fix this perhaps?


      [support-requests:#6] Problems using Hibernate Hbm2DDLExporter

      Status: open
      Group: v1.0
      Created: Wed Sep 17, 2014 01:32 PM UTC by GreatSUN
      Last Updated: Thu Sep 18, 2014 06:13 AM UTC
      Owner: nobody

      Hi all,

      When trying to install hyperic server which supports PostgreSQL 9.1.x I get
      an error message stating that the database might not be supported.
      Do you have an idea how to fix this possibly?

      Errormsg:
      hyperic-hqee-installer-5.8.2/installer/data/setup-db-hibernate.xml:102:
      org.hibernate.tool.hbm2x.ExporterException: Errors while performing
      Hbm2DDLExporter

      Thanks in advance for your help!


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/postgres-xc/support-requests/6/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #6

  • GreatSUN

    GreatSUN - 2014-09-19

    Thanks for your support. Everything seems to be working properly now.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.