Posted by
Nicolas Malin (Jira) on
Jan 23, 2012; 8:07am
URL: http://ofbiz.116.s1.nabble.com/jira-Created-OFBIZ-4602-Null-values-are-not-synchronized-in-http-mode-tp4145573p4320089.html
[
https://issues.apache.org/jira/browse/OFBIZ-4602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacques Le Roux reopened OFBIZ-4602:
------------------------------------
Seems that
http://svn.apache.org/viewvc?rev=1226065&view=revintroduced an issue. It seems to be a general issue, I found with automatically reloaded jobs
{code}
2012-01-23 08:58:36,968 (default-invoker-Thread-16) [ GenericDelegator.java:887:ERROR] Failure in create operation for entity [PaymentGatewayResponse]: org.ofbiz.entity.GenericEntityException: Error while i
nserting: [GenericEntity:PaymentGatewayResponse][altReference,1326713374500(java.lang.String)][amount,50.85(java.math.BigDecimal)][createdStamp,2012-01-23 08:58:36.953(java.sql.Timestamp)][createdTxStamp,2012
-01-23 08:58:36.953(java.sql.Timestamp)][currencyUomId,USD(java.lang.String)][gatewayAvsResult,[null-field](java.lang.String)][gatewayCode,[null-field](java.lang.String)][gatewayCvResult,[null-field](java.lan
g.String)][gatewayFlag,C(java.lang.String)][gatewayMessage,This is a test capture; no money was transferred(java.lang.String)][gatewayScoreResult,[null-field](java.lang.String)][lastUpdatedStamp,2012-01-23 08
:58:36.953(java.sql.Timestamp)][lastUpdatedTxStamp,2012-01-23 08:58:36.953(java.sql.Timestamp)][orderPaymentPreferenceId,9000(java.lang.String)][paymentGatewayResponseId,10031(java.lang.String)][paymentMethod
Id,9015(java.lang.String)][paymentMethodTypeId,CREDIT_CARD(java.lang.String)][paymentServiceTypeEnumId,PRDS_PAY_CAPTURE(java.lang.String)][referenceNum,1326713374500(java.lang.String)][resultBadCardNumber,[nu
ll-field](java.lang.String)][resultBadExpire,[null-field](java.lang.String)][resultDeclined,[null-field](java.lang.String)][resultNsf,[null-field](java.lang.String)][subReference,[null-field](java.lang.String
)][transCodeEnumId,PGT_CAPTURE(java.lang.String)][transactionDate,2012-01-16 12:29:34.515(java.sql.Timestamp)] (SQL Exception while executing the following:INSERT INTO OFBIZ.PAYMENT_GATEWAY_RESPONSE (PAYMENT_
GATEWAY_RESPONSE_ID, PAYMENT_SERVICE_TYPE_ENUM_ID, ORDER_PAYMENT_PREFERENCE_ID, PAYMENT_METHOD_TYPE_ID, PAYMENT_METHOD_ID, TRANS_CODE_ENUM_ID, AMOUNT, CURRENCY_UOM_ID, REFERENCE_NUM, ALT_REFERENCE, SUB_REFERE
NCE, GATEWAY_CODE, GATEWAY_FLAG, GATEWAY_AVS_RESULT, GATEWAY_CV_RESULT, GATEWAY_SCORE_RESULT, GATEWAY_MESSAGE, TRANSACTION_DATE, RESULT_DECLINED, RESULT_NSF, RESULT_BAD_EXPIRE, RESULT_BAD_CARD_NUMBER, LAST_UP
DATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (A truncation error was encountered trying to shrink
CHAR '[null-field]' to length 1.)). Rolling back transaction.
{code}
Also there is a problem when reloading jobs, notably those stopped in a non normal way, they are reloaded more than once. Also maxRetry is not taken into account when reloading jobs, . I will create 2 new issues for those cases
> Null values are not synchronized in http mode
> ---------------------------------------------
>
> Key: OFBIZ-4602
> URL:
https://issues.apache.org/jira/browse/OFBIZ-4602> Project: OFBiz
> Issue Type: Bug
> Components: framework
> Affects Versions: Release 4.0, Release 09.04, Release 09.04.01, Release 10.04, SVN trunk
> Environment: Using entity synchronization over HTTP (not RMI)
> Reporter: Patrick Antivackis
> Assignee: Jacques Le Roux
> Fix For: Release Branch 4.0, Release Branch 09.04, Release Branch 10.04, Release Branch 11.04, SVN trunk
>
> Attachments: patch-OFBIZ-4602.txt
>
>
> In order to send over http the values to create, store and remove, Ofbiz is Xml serializing the values. GenericValue xml serialization is managed in GenericEntity.makeXmlElement, unfortunately this method just don't serialized null valued fields.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspaFor more information on JIRA, see:
http://www.atlassian.com/software/jira