[ 
https://issues.apache.org/jira/browse/RANGER-4885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17983456#comment-17983456
 ] 

Kishor Gollapalliwar commented on RANGER-4885:
----------------------------------------------

[~madhan] please confirm if we need this change in master branch as well.

CC [~pradeep]/ [~rakeshgupta264]

> upgrade from 2.4.0 to 2.5.0 fails due to missing column
> -------------------------------------------------------
>
>                 Key: RANGER-4885
>                 URL: https://issues.apache.org/jira/browse/RANGER-4885
>             Project: Ranger
>          Issue Type: Bug
>          Components: Ranger
>    Affects Versions: 2.5.0
>            Reporter: Madhan Neethiraj
>            Assignee: Madhan Neethiraj
>            Priority: Blocker
>             Fix For: 2.5.0
>
>         Attachments: RANGER-4885.patch
>
>
> Apache Ranger 2.5.0 upgraded from 2.4.0 fails during startup with the 
> following error:
> {noformat}
> 2024-08-01 18:24:05,193  [I] java patch 
> PatchForOzoneServiceDefConfigUpdate_J10051 is being applied..
> log4j:WARN No appenders could be found for logger 
> (org.apache.ranger.patch.PatchForOzoneServiceDefConfigUpdate_J10051).
> log4j:WARN Please initialize the log4j system properly.
> log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more 
> info.
> [EL Warning]: metadata: 2024-08-01 
> 18:24:06.907--ServerSession(1578026015)--You have specified multiple ids for 
> the entity class [org.apache.ranger.entity.view.VXXPrincipal] without 
> specifying an @IdClass. By doing this you may lose the ability to find by 
> identity, distributed cache support etc. Note: You may however use 
> EntityManager find operations by passing a list of primary key fields. Else, 
> you will have to use JPQL queries to read your entities. For other id options 
> see @PrimaryKey.
> [EL Warning]: 2024-08-01 18:24:07.888--UnitOfWork(712753515)--Exception 
> [EclipseLink-4002] (Eclipse Persistence Services - 
> 2.7.12.v20230209-e5c4074ef3): 
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: column 
> "category" does not exist
>   Position: 25
> Error Code: 0
> Call: SELECT id, ADDED_BY_ID, category, CREATE_TIME, datamask_options, 
> def_id, item_id, label, name, sort_order, rb_key_label, rowfilter_options, 
> UPDATE_TIME, UPD_BY_ID FROM x_access_type_def WHERE (def_id = ?) ORDER BY 
> sort_order
>       bind => [1 parameter bound]
> Query: ReadAllQuery(name="XXAccessTypeDef.findByServiceDefId" 
> referenceClass=XXAccessTypeDef sql="SELECT id, ADDED_BY_ID, category, 
> CREATE_TIME, datamask_options, def_id, item_id, label, name, sort_order, 
> rb_key_label, rowfilter_options, UPDATE_TIME, UPD_BY_ID FROM 
> x_access_type_def WHERE (def_id = ?) ORDER BY sort_order")
> [EL Warning]: 2024-08-01 18:24:07.893--UnitOfWork(712753515)--Exception 
> [EclipseLink-4002] (Eclipse Persistence Services - 
> 2.7.12.v20230209-e5c4074ef3): 
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: current 
> transaction is aborted, commands ignored until end of transaction block
> Error Code: 0
> ...
> ...
> [EL Warning]: 2024-08-01 18:24:08.194--UnitOfWork(1608894091)--Exception 
> [EclipseLink-4002] (Eclipse Persistence Services - 
> 2.7.12.v20230209-e5c4074ef3): 
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: column 
> "category" does not exist
>   Position: 25
> Error Code: 0
> Call: SELECT id, ADDED_BY_ID, category, CREATE_TIME, datamask_options, 
> def_id, item_id, label, name, sort_order, rb_key_label, rowfilter_options, 
> UPDATE_TIME, UPD_BY_ID FROM x_access_type_def WHERE (def_id = ?) ORDER BY 
> sort_order
>       bind => [1 parameter bound]
> Query: ReadAllQuery(name="XXAccessTypeDef.findByServiceDefId" 
> referenceClass=XXAccessTypeDef sql="SELECT id, ADDED_BY_ID, category, 
> CREATE_TIME, datamask_options, def_id, item_id, label, name, sort_order, 
> rb_key_label, rowfilter_options, UPDATE_TIME, UPD_BY_ID FROM 
> x_access_type_def WHERE (def_id = ?) ORDER BY sort_order")
> 2024-08-01 18:24:08,227  [JISQL] /usr/lib/jvm/java-8-openjdk-arm64/bin/java  
> -cp /usr/share/java/postgresql.jar:/opt/ranger/ranger-2.5.0-admin/jisql/lib/* 
> org.apache.util.sql.Jisql -driver postgresql -cstring 
> jdbc:postgresql://ranger-db/ranger -u rangeradmin -p '********' -noheader 
> -trim -c \;  -query "delete from x_db_version_h where version = 'J10051' and 
> active = 'N' and updated_by='ranger.example.com';"
> 2024-08-01 18:24:08,308  [E] applying java patch 
> PatchForOzoneServiceDefConfigUpdate_J10051 failed
>  {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to