数据库移植问题

2010-04-29
2013-03-07
  • sunny sunny
    sunny sunny
    2010-04-29

    大家好,有个问题请教大家。

    我新安装了Adempiere(version release 354a).安装后启动服务发现问题:

    ERROR [] StandardWrapper.Throwable
    java.lang.IllegalArgumentException: Table Name Not Found - AD_Role_Included
            at org.compiere.model.Query.<init>(Query.java:123)
            at org.compiere.model.MRole.loadChildRoles(MRole.java:2620)

    然后登录的时候也出现这个问题。查看数据库发现表 “ AD_Role_Included” 不存在

    相同的问题:

    https://sourceforge.net/projects/adempiere/forums/forum/610548/topic/3674436
    >It looks like you forgot to apply latest migration scripts.

    需要执行移植脚本吗?需要怎么做?例如我现在Adempiere版本已经是354a了,我需要怎样使数据库版本和它一致,在安装时(RUN_ImportAdempiere.sh)数据库版本又是什么呢?

    希望得到大家的帮助,谢谢!

     
  • albert
    albert
    2010-04-29

    你做了哪些動作!!

    資料庫安裝正常結束嗎??

    Skype: Adempiere/Compiere

     
  • sunny sunny
    sunny sunny
    2010-04-30

    安装运行RUN_setup.sh,之后导入数据库运行RUN_ImportAdempiere.sh,然后就是启动jboss "RUN_Server2.sh"

    导入数据库日志:

    Setting myEnvironment ….
    Import Adempiere - /mnt/sda4/Adempiere_Trunk/release/adempiere/Adempiere (adempiere_release)
    Re-Create Adempiere User and import /mnt/sda4/Adempiere_Trunk/release/adempiere/Adempiere/data/Adempiere_pg.dmp - (adempiere_release)
    == The import will show warnings. This is OK ==
    21620 -rw-r-r- 1 root root 22106770 2009-09-15 18:26 /mnt/sda4/Adempiere_Trunk/release/adempiere/Adempiere/data/Adempiere_pg.dmp
    Press enter to continue …
    Adempiere Database Import : 1.10 $
    Importing Adempiere DB from /mnt/sda4/Adempiere_Trunk/release/adempiere/Adempiere/data/Adempiere_pg.dmp


    Recreate user and database

    CREATE ROLE

    Import Adempiere_pg.dmp

    ALTER ROLE
    DROP SCHEMA
    SET
    SET
    SET
    SET
    SET
    CREATE SCHEMA
    ALTER SCHEMA
    CREATE LANGUAGE

    ALTER TABLE
    REVOKE
    REVOKE
    GRANT
    GRANT
    Install Adempiere Server
    Setting myEnvironment ….
    ===================================
    Sign Database Build
    ===================================
    CLogFile
    *** 2010-04-29 18:34:38.525 Adempiere Log (CLogConsole) ***
    18:34:38.524 Adempiere.startup: ADempiere(r) Release 3.5.4a_2009-09-15 -Smart Suite ERP,CRM and SCM- (C) 1999-2009 ADempiere(r); Implementation: ${ADEMPIERE_VERSION} 20100429-1819 - ${ADEMPIERE_VENDOR}
    18:34:38.528 Ini.loadProperties: /mnt/sda4/Adempiere_Trunk/release/adempiere/Adempiere/Adempiere.properties #29
    18:34:46.219   CLogMgt.setLevel: FINE
    18:34:46.219 SignDatabaseBuild.main: Sign Database Build
    18:34:46.220 SignDatabaseBuild.main: -------------
    18:34:46.225 SignDatabaseBuild.main: UPDATE AD_System SET LastBuildInfo = ?
    UPDATE AD_System SET LastBuildInfo = ?

    *** 2010-04-29 18:34:46.26 Adempiere Log (CLogConsole) ***

    没什么异常.然后检查数据库就是不存在表"AD_Role_Included".原因是导入数据实际是导入 "adempiere/Adempiere/data/Adempiere_pg.dmp",而检查"Adempiere_pg.dmp" 确实是没有表"AD_Role_Included" 的信息.

     
  • sunny sunny
    sunny sunny
    2010-04-30

    之后登录(登录的是webui)就出现 "Table Name Not Found - AD_Role_Included"错误导致不能登录,我该怎么做???????

     
  • sunny sunny
    sunny sunny
    2010-04-30

    问题解决了,执行了adempiere/migration/353a-354a/postgresql 和 /354a-trunk/postgesql 下的 移植脚本

    表 "AD_Role_Included" 的信息 可以在 migration/354a-trunk/postgresql/705_AD_Role_Included.sql找到

    Quote:
    "CREATE TABLE AD_Role_Included (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_Role_ID NUMERIC(10) NOT NULL, Created TIMESTAMP NOT NULL, CreatedBy NUMERIC(10) NOT NULL, Included_Role_ID NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, SeqNo NUMERIC(10) NOT NULL, Updated TIMESTAMP NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT AD_Role_Included_Key PRIMARY KEY (AD_Role_ID, Included_Role_ID));
    …"