Viendo 3 entradas - de la 1 a la 3 (de un total de 3)
  • Autor
    Entradas
  • #46347
    Fabrizio Ravagli
    Participante

    Buenos dias,
    estoy tratando de actualizar el LIBERTYA desde la versión 14.02 a la 15.03.
    He instalado los binarios (Servidor_OXP) y con el Cliente estoy tratando de actualizar la Base de Datos.
    Procesando el org.libertya.core.upgrade_14.02_15.03.jar me sale un error.
    A continuación va el log:

    10:34:43.257 MComponentVersion.set_Value: La tableName es = AD_ComponentVersion [54]
    10:34:43.257 MComponentVersion.set_Value: Y tiene = 16 columnas [54]
    10:34:43.257 MComponentVersion.set_Value: Y las columnas son= [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_Client_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_ComponentObjectUID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_ComponentVersion_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_Component_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_Org_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = ChangeLog [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Created [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = CreatedBy [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = CurrentDevelopment [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Dependencies [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = IsActive [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Name [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = StartDevelopment [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Updated [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = UpdatedBy [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Version [54]
    10:34:43.257 MComponentVersion.set_Value: En po.else [54]
    10:34:43.257 MComponentVersion.set_Value: En po.else con value.getClass() =class java.lang.String [54]
    10:34:43.257 MComponentVersion.set_Value: En po.else con p_info.getColumnClass(index) =class java.lang.String [54]
    10:34:43.257 MComponentVersion.set_Value: En el primer if con value= CORE-AD_ComponentVersion-1010060 [54]
    10:34:43.257 MComponentVersion.set_Value: Iniciando Set_Value con index = 3 [54]
    10:34:43.257 MComponentVersion.set_Value: Iniciando Set_Value con index = 3 [54]
    10:34:43.257 MComponentVersion.set_Value: La tableName es = AD_ComponentVersion [54]
    10:34:43.257 MComponentVersion.set_Value: Y tiene = 16 columnas [54]
    10:34:43.257 MComponentVersion.set_Value: Y las columnas son= [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_Client_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_ComponentObjectUID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_ComponentVersion_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_Component_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_Org_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = ChangeLog [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Created [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = CreatedBy [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = CurrentDevelopment [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Dependencies [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = IsActive [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Name [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = StartDevelopment [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Updated [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = UpdatedBy [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Version [54]
    10:34:43.257 MComponentVersion.set_Value: En po.else [54]
    10:34:43.257 MComponentVersion.set_Value: En po.else con value.getClass() =class java.lang.Integer [54]
    10:34:43.257 MComponentVersion.set_Value: En po.else con p_info.getColumnClass(index) =class java.lang.Integer [54]
    10:34:43.257 MComponentVersion.set_Value: En el primer if con value= 1010001 [54]
    10:34:43.257 M_Table.getPOclass: en getPoClass con className= org.libertya.locale.ar.model.MComponentVersion [54]
    10:34:43.257 M_Table.getPOclass: en getPoClass con className= openXpertya.model.X_AD_ComponentVersion [54]
    10:34:43.257 M_Table.getPOclass: en getPoClass con className= org.openXpertya.model.X_AD_ComponentVersion [54]
    10:34:43.257 M_Table.getPOclass: Found:–> org.openXpertya.model.X_AD_ComponentVersion [54]
    10:34:43.257 DB_PostgreSQL.convertStatement: En DBposgresSQL.java/convertStatement -sql:= SELECT AD_Client_ID,AD_ComponentObjectUID,AD_Component_ID,AD_Org_ID,Author,CoreLevel,Created,CreatedBy,IsActive,PackageName,Prefix,PublicName,Updated,UpdatedBy FROM AD_Component WHERE AD_Component_ID=? [54]
    10:34:43.257 CPreparedStatement.<init>: estamos en trx!=null [54]
    10:34:43.257 CPreparedStatement.executeQuery: estamos p_stmt= SELECT AD_Client_ID,AD_ComponentObjectUID,AD_Component_ID,AD_Org_ID,Author,CoreLevel,Created,CreatedBy,IsActive,PackageName,Prefix,PublicName,Updated,UpdatedBy FROM AD_Component WHERE AD_Component_ID=’1010001′ [54]
    10:34:43.257 MComponentVersion.set_Value: Iniciando Set_Value con index = 11 [54]
    10:34:43.257 MComponentVersion.set_Value: Iniciando Set_Value con index = 11 [54]
    10:34:43.257 MComponentVersion.set_Value: La tableName es = AD_ComponentVersion [54]
    10:34:43.257 MComponentVersion.set_Value: Y tiene = 16 columnas [54]
    10:34:43.257 MComponentVersion.set_Value: Y las columnas son= [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_Client_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_ComponentObjectUID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_ComponentVersion_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_Component_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = AD_Org_ID [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = ChangeLog [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Created [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = CreatedBy [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = CurrentDevelopment [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Dependencies [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = IsActive [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Name [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = StartDevelopment [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Updated [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = UpdatedBy [54]
    10:34:43.257 MComponentVersion.set_Value: El campo es = Version [54]
    10:34:43.257 MComponentVersion.set_Value: En po.else [54]
    10:34:43.257 MComponentVersion.set_Value: En po.else con value.getClass() =class java.lang.String [54]
    10:34:43.257 MComponentVersion.set_Value: En po.else con p_info.getColumnClass(index) =class java.lang.String [54]
    10:34:43.257 MComponentVersion.set_Value: En el primer if con value= System Core 15.03 [54]
    10:34:43.257 DB_PostgreSQL.convertStatement: En DBposgresSQL.java/convertStatement -sql:= select count(1) from pg_class where relkind = ‘S’ and relname = ‘seq_ad_componentversion’ [54]
    10:34:43.257 CPreparedStatement.<init>: estamos en trx!=null [54]
    10:34:43.257 CPreparedStatement.executeQuery: estamos p_stmt= select count(1) from pg_class where relkind = ‘S’ and relname = ‘seq_ad_componentversion’ [54]
    10:34:43.257 DB_PostgreSQL.convertStatement: En DBposgresSQL.java/convertStatement -sql:= SELECT CurrentNext, CurrentNextSys, IncrementNo, AD_Sequence_ID , OID FROM AD_Sequence WHERE Name=? AND IsActive=’Y’ AND IsTableID=’Y’ AND IsAutoSequence=’Y’ [54]
    10:34:43.257 CPreparedStatement.<init>: estamos en trx!=null [54]
    10:34:43.257 CPreparedStatement.executeQuery: estamos p_stmt= SELECT CurrentNext, CurrentNextSys, IncrementNo, AD_Sequence_ID , OID FROM AD_Sequence WHERE Name=’AD_ComponentVersion’ AND IsActive=’Y’ AND IsTableID=’Y’ AND IsAutoSequence=’Y’ [54]
    10:34:43.257 DB_PostgreSQL.convertStatement: En DBposgresSQL.java/convertStatement -sql:= create sequence seq_ad_componentversion INCREMENT BY 1 START WITH 1010063 [54]
    10:34:43.257 CPreparedStatement.<init>: estamos en trx!=null [54]
    org.postgresql.util.PSQLException: ERROR: relation “seq_ad_componentversion” already exists
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381)
    at org.openXpertya.util.CPreparedStatement.execute(CPreparedStatement.java:317)
    at org.openXpertya.model.MSequence.getNextID(MSequence.java:1586)
    at org.openXpertya.util.DB.getNextID(DB.java:1829)
    at org.openXpertya.model.PO.saveNew(PO.java:2384)
    at org.openXpertya.model.PO.save(PO.java:1848)
    at org.openXpertya.apps.form.VPluginInstallerUtils.createComponentAndVersion(VPluginInstallerUtils.java:237)
    at org.openXpertya.apps.form.VPluginInstallerUtils.performInstall(VPluginInstallerUtils.java:77)
    at org.openXpertya.apps.form.VPluginInstaller$3.construct(VPluginInstaller.java:188)
    at org.openXpertya.apps.SwingWorker$2.run(SwingWorker.java:47)
    at java.lang.Thread.run(Thread.java:662)
    10:34:43.257 MComponentVersion.saveNew: [Trx_1479224778362] – AD_ComponentVersion – AD_ComponentVersion_ID=1010062 [54]
    10:34:43.257 DB_PostgreSQL.convertStatement: En DBposgresSQL.java/convertStatement -sql:= INSERT INTO AD_ComponentVersion (AD_Client_ID,AD_ComponentObjectUID,AD_ComponentVersion_ID,AD_Component_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Version) VALUES (?,?,?,?,?,?,?,?,?,?,?,?) [54]
    10:34:43.257 CPreparedStatement.<init>: estamos en trx!=null [54]
    ===========> MComponentVersion.saveNew: [Trx_1479224778362] – POInfo[AD_ComponentVersion-POInfo.Column[AD_ComponentVersion_ID,ID=1013778,DisplayType=13,ColumnClass=class
    java.lang.Integer]] – Value=15.03(java.lang.String) [54]
    org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block; State=25P02; ErrorCode=0
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:254)
    at org.postgresql.jdbc2.AbstractJdbc2DatabaseMetaData.getColumns(AbstractJdbc2DatabaseMetaData.java:2354)
    at org.postgresql.jdbc4.AbstractJdbc4DatabaseMetaData.getColumns(AbstractJdbc4DatabaseMetaData.java:90)
    at org.openXpertya.model.CacheMetadata.getFromDBForColumn(CacheMetadata.java:81)
    at org.openXpertya.model.CacheMetadata.getForColumn(CacheMetadata.java:52)
    at org.openXpertya.model.PO.setColToStatement(PO.java:2316)
    at org.openXpertya.model.PO.setColToStatement(PO.java:2219)
    at org.openXpertya.model.PO.saveNew(PO.java:2562)
    at org.openXpertya.model.PO.save(PO.java:1848)
    at org.openXpertya.apps.form.VPluginInstallerUtils.createComponentAndVersion(VPluginInstallerUtils.java:237)
    at org.openXpertya.apps.form.VPluginInstallerUtils.performInstall(VPluginInstallerUtils.java:77)
    at org.openXpertya.apps.form.VPluginInstaller$3.construct(VPluginInstaller.java:188)
    at org.openXpertya.apps.SwingWorker$2.run(SwingWorker.java:47)

    10:34:43.257 Trx.rollback: **** Trx_1479224778362 [11]
    10:34:43.257 Trx.close: Trx_1479224778362 [11]
    10:34:43.257 DB_PostgreSQL.convertStatement: En DBposgresSQL.java/convertStatement -sql:= UPDATE AD_Preference SET Value = ‘Y’ WHERE Attribute = ‘ReplicationEventsActive’ [11]
    Error al realizar la instalaci+¦n: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
    10:34:43.257 ADialog.error: Error al realizar la instalaci+¦n: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block – null [11]
    10:34:43.257 Msg.getMsg: En getMsg:—> Ad_languaje=es_AR Y AD_Message= Error al realizar la instalaci+¦n: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block [11]
    ———–> Msg.getMsg: NOT found: Error al realizar la instalaci+¦n: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block [11]
    10:34:43.257 Msg.getMsg: En getMsg:—> Ad_languaje=es_AR Y AD_Message= File [11]
    10:34:43.257 Msg.getMsg: En getMsg:—> Ad_languaje=es_AR Y AD_Message= Cancel [11]
    10:34:43.257 Msg.getMsg: En getMsg:—> Ad_languaje=es_AR Y AD_Message= OK [11]
    10:34:43.257 Msg.getMsg: En getMsg:—> Ad_languaje=es_AR Y AD_Message= EMailSupport [11]
    10:34:43.257 Msg.getMsg: En getMsg:—> Ad_languaje=es_AR Y AD_Message= PrintScreen [11]
    10:34:43.257 Msg.getMsg: En getMsg:—> Ad_languaje=es_AR Y AD_Message= ScreenShot [11]
    10:34:43.257 Msg.getMsg: En getMsg:—> Ad_languaje=es_AR Y AD_Message= Preference [11]
    10:34:43.257 Msg.getMsg: En getMsg:—> Ad_languaje=es_AR Y AD_Message= End [11]

    Preguntas:

    a) Porque trata de crear la seq_ad_componentversion si ya la tiene creada ?
    Probe a modificar el valor de AD_Sequence.CurrentNext y no pasa nada. Siempre trata de crear la secuencia.
    b) Tengo como AD_COMPONENTVERSION.ad_componentversion_id = 1001060 la Localización Argentina (Locale AR 1.4). Vi que en el install.xml la nueva versión tiene como ID el valor 1010060. Pero estoy seguro que es capaz de modificar el ID en función de primer libre. Es cierto ?
    c) Alguna sugerencia ?

    Desde ya Gracias y Saludos.

    Fabrizio

    #46348
    Fabrizio Ravagli
    Participante

    Estimados,
    encontré la falla.

    En mi PostgreSQL tenia 1 Database (libertya) con 2 Schemas (libertya y libertya_old). De esta manera es fácil ver que cambio, que falta etc.
    El problema se origina en el código de MSequence.java en donde se ejecuta la siguiente sentencia SQL:

    if (sequences_cache.contains(secuencia))
    existeSeq = true;
    else if (1 == DB.getSQLValue(trxName, “select count(1) from pg_class where relkind = ‘S’ and relname = ‘” + secuencia + “‘”))
    {
    existeSeq = true;
    sequences_cache.add(secuencia);
    }

    Al tener 2 schemas el count devuelve 2 y como el control es por “== 1” y no por “>= 1” el código interpreta que No existe la secuencia, procede en crearla y falla por tenerla ya creada.

    Sugiero modificar la sentencia SQL con la siguiente:

    SELECT count(1) FROM information_schema.sequences WHERE sequence_schema =’libertya’ and sequence_name = ‘seq_ad_componentversion’;

    en donde se tiene en cuenta del schema. Esta probada en PostgreSQL 8.3 y funciona.

    Saludos.

    #46359
    Federico Cristina
    Superadministrador

    Buenas! Ante todo gracias por la sugerencia.

    Si bien el escenario descripto plantea una situación no tradicional (como son los dos schemas) es una mejora a considerar. A fin de poder canalizar la gestión de la corrección bajo el circuito de QA correspondiente, deberías cargar el correspondiente ticket en SourceForge:

    https://sourceforge.net/p/libertya/tickets/

    Saludos!
    Federico

Viendo 3 entradas - de la 1 a la 3 (de un total de 3)
  • Debes estar registrado para responder a este debate.