You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Arun Patidar (Jira)" <ji...@apache.org> on 2026/10/07 13:53:00 UTC

[jira] [Commented] (OFBIZ-6694) Service reencryptFields doesn't work as expected

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

Arun Patidar commented on OFBIZ-6694:
-------------------------------------

Part of this is already fixed by commit cae2bb65c1 (OFBIZ-13599, #2055). I checked {{EntityDataServices.reencryptFields}} on current trunk:
 # *{{GenericEntityNotFoundException}} from {{{}store(){}}}:* this is fixed. The query now selects the entity's primary key fields together with the encrypted field, so {{store()}} can find the row again.
 # *View entities:* these are now skipped. An encrypted field on a view is just an alias of a real entity's field, and that entity is already processed directly. Storing through a view also fails unless the view is uniquely updatable.

Not addressed: the suggestion to use {{{}EntityListIterator{}}}. The service still loads all rows with {{{}queryList(){}}}. This is only a memory and performance concern when re-encrypting very large tables, and it isn't a functional bug.



Since the reported failure is fixed on trunk, I suggest we resolve this issue as Fixed, with the fix version set to the upcoming release, and track the {{EntityListIterator}} change separately if needed.

[~mridulpathak] 
----
 

> Service reencryptFields doesn't work as expected
> ------------------------------------------------
>
>                 Key: OFBIZ-6694
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6694
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Trunk, Upcoming Branch
>            Reporter: Vyom Jain
>            Priority: Major
>
> This service reencryptFields was introduced in OFBIZ-6494. There's an exception when running the service reencryptFields from Webtools.
> {code}org.ofbiz.entity.GenericEntityNotFoundException: Tried to update an entity that does not exist, entity: [GenericEntity:PaymentGatewayPayflowPro][lastUpdatedStamp,2015-10-22 12:02:55.812(java.sql.Timestamp)][lastUpdatedTxStamp,2015-10-22 12:02:55.805(java.sql.Timestamp)][proxyPassword,null()] (Tried to update an entity that does not exist, entity: [GenericEntity:PaymentGatewayPayflowPro][lastUpdatedStamp,2015-10-22 12:02:55.812(java.sql.Timestamp)][lastUpdatedTxStamp,2015-10-22 12:02:55.805(java.sql.Timestamp)]{code}
> This happens because only encrypted field is being selected in the EntityQuery.
> An improvement would be to change the code to use EntityListIterator, which will be particularly helpful for re-encrypting large data set.



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