CMDBuild Forum

Initial configuration error (cmdbuild-2.1.3.1)

After deployment of cmdbuild-2.1.3.1 webapp to tomcat6 initial application configuration fails.

 

cmdbuild.log lines:

INFO  2013-07-26 14:37:22 [jsonrpc ] Calling url /utils/gettranslationobject
INFO  2013-07-26 14:37:23 [jsonrpc ] Calling url /utils/listavailabletranslations
INFO  2013-07-26 14:37:50 [jsonrpc ] Calling url /configure/testconnection
INFO  2013-07-26 14:38:23 [jsonrpc ] Calling url /configure/apply
INFO  2013-07-26 14:38:23 [cmdbuild] Creating database cmdbuild21
INFO  2013-07-26 14:38:23 [cmdbuild] Creating role cmdbuild21
INFO  2013-07-26 14:38:23 [cmdbuild] Changing database ownership
INFO  2013-07-26 14:38:23 [cmdbuild] Creating PL/SQL language
INFO  2013-07-26 14:38:23 [cmdbuild] Creating CMDBuild structure
INFO  2013-07-26 14:38:23 [cmdbuild] applying '/usr/share/tomcat6/webapps/cmdbuild21/WEB-INF/sql/base_schema/01_system_functions_base.sql'
ERROR 2013-07-26 14:38:23 [jsonrpc ] A org.cmdbuild.exception.ORMException occurred calling method class org.cmdbuild.servlets.json.Configure.apply: ORM_GENERIC_ERROR

 

pg_log lines:

ERROR:  language "plpgsql" already exists
STATEMENT:  CREATE LANGUAGE plpgsql
ERROR:  language "plpgsql" does not exist
HINT:  Use CREATE LANGUAGE to load the language into the database.
STATEMENT: 
    CREATE OR REPLACE FUNCTION _cm_domain_direction(DomainId oid) RETURNS boolean AS $$
    DECLARE
        Cardinality text := _cm_domain_cardinality(DomainId);
    BEGIN
        IF Cardinality = 'N:1' THEN
            RETURN TRUE;
        ELSIF Cardinality = '1:N' THEN
            RETURN FALSE;
        ELSE
            RETURN NULL;
        END IF;
    END
    $$ LANGUAGE PLPGSQL STABLE RETURNS NULL ON NULL INPUT

 

Which Postgres version are you using?
CMDBuild Team

I'm using postgresql-8.4.13-1.el6_3.x86_64 that ships with CentOS.

Thanks for your reporting.
The problem is
present with Postgres 8.4 and it
does not occur with Postgres 9.
Unfortunately we do not think to have enough time to solve it with the release 2.1.4, which will be ready within ten days.
We will include the fix in the next intermediate release 2.1.5, probably in September.
In the meantime,
a workaround is to perform a manual installation of CMDBuild (see Technical Manual) or to migrate to Postgres 9.
CMDBuild Team

Thanks for the tip! I reinstalled postgresql version 9.2 from yum.postgresql.org and everything works fine now.