You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Mridul Pathak (Jira)" <ji...@apache.org> on 2026/10/30 09:37:00 UTC
[jira] [Created] (OFBIZ-13775) Copying a deserialized GenericValue fails with "observable cannot be null"
Mridul Pathak created OFBIZ-13775:
-------------------------------------
Summary: Copying a deserialized GenericValue fails with "observable cannot be null"
Key: OFBIZ-13775
URL: https://issues.apache.org/jira/browse/OFBIZ-13775
Project: OFBiz
Issue Type: Bug
Components: framework/entity
Affects Versions: Upcoming Branch, 24.09.08
Reporter: Mridul Pathak
Assignee: Mridul Pathak
GenericEntity keeps its Observable in a transient field, so it is null once the entity has been deserialized. GenericEntity.init(GenericEntity), used by GenericValue.create(GenericValue) and the copy constructors, and refreshFromValue both build the new Observable from that field directly, so copying or refreshing from a deserialized GenericValue throws an IllegalArgumentException ("observable cannot be null"). This breaks, for example, copying a shopping cart line restored from a persisted session.
h3. Proposed fix
Use the existing lazy getObservable() instead of reading the transient field in both places.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)