[jira] [Created] (OFBIZ-4602) Null values are not synchronized in http mode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
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 10.04, Release 09.04.01, Release 09.04, Release 4.0, SVN trunk
         Environment: Using entity synchronization trough HTTP
            Reporter: Patrick Antivackis


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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Antivackis updated OFBIZ-4602:
--------------------------------------

    Environment: Using entity synchronization over HTTP (not RMI)  (was: Using entity synchronization trough HTTP)
   

> 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
>
> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Antivackis updated OFBIZ-4602:
--------------------------------------

    Attachment: patch-OFBIZ-4602.txt

To solve this issue, I managed null value the same way GenericEntity.setString (which is used for the Xml deserializing). I only managed until case 10, because i'm not sure the setString for the cases 11 to 15 are well managed (not taking care of null value)
               

> 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
>         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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Assigned] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-4602:
--------------------------------------

    Assignee: Jacques Le Roux
   

> 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
>         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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-4602.
----------------------------------

       Resolution: Fixed
    Fix Version/s: SVN trunk
                   Release Branch 11.04
                   Release Branch 10.04
                   Release Branch 09.04
                   Release Branch 4.0

Thanks Patrick,

Your modified patch is in
trunk r1222241
R11.04 r1222244
R10.04 r1222243
R09.04 r1222242
R4.0 r1222244

After looking at GenericEntity.setString and initial commit (http://svn.ofbiz.org/viewcvs?rev=7779&view=rev) I see no reasons to not handling cases under 10 the same way. So I added these cases as well using fall through.


               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Reopened] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reopened OFBIZ-4602:
------------------------------------


Reverted because of OFBIZ-4637

I will see later what the problem was and will try to redo Patrick's work, it's maybe just because
set(name, "");
was used, instead
element.setAttribute(name, "null");
               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Adrian Crum commented on OFBIZ-4602:
------------------------------------

As I mentioned on the dev mailing list, this patch and this "solution" does not make sense. It would be best to understand the problem thoroughly so that a proper solution can be designed.

If I understand correctly, the problem that needs to be solved is this: OFBiz does not serialize field values that are null. That causes a problem with entity sync, because a field's value might have changed from non-null to null. Since null field values are not serialized, the change is not propagated to the entity sync clients.

So, we need a way to serialize null field values. The patch does this by serializing a null value as the String "null". But the patch only does that for field data types that are not String.  Why are String fields excluded?

From my perspective, null field values should be tokenized and the token should be serialized - in ALL fields, not just non-String fields. A good candidate for the token would be GenericEntity.NULL_FIELD.

So, the change to GenericEntity.java line 1079 could look something like this:
{code}

} else {
  element.setAttribute(name, GenericEntity.NULL_FIELD.toString());
}
{code}

Now null field values are serialized in a predictable manner. But that change could adversely impact other modes of entity serialization. Also, entity sync clients will need to be updated to unmarshall the null value tokens.


               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4602:
----------------------------------------

Hi Adrian,

Yes I think you are quite right, indeed GenericEntity.NULL_FIELD.toString() sounds like the best answer. I will try to see if it does not disrupt the same than OFBIZ-4637 and will have a look also at the entity sync clients side. Of course your help, Patrick, would be greatly appreciated...
               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4602:
----------------------------------------

Also Patrick,

Could you confirm that the fix you proposed solved the issue you crossed? Did you do any changes on entity sync clients side?
               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4602:
----------------------------------------

Ankit just told me that, as I supposed, he crossed many more issues with this patch... So yes, it's not a solution at all...
               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Closed] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4602?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-4602.
----------------------------------

    Resolution: Fixed

Finally this should be fixed in
trunk r1226055  
R11.04 r1226056  
R10.04 r1226058  
R09.04 r1226057  
R4.0 r1226059  

I followed Adrian's advice. I tried to create an order with a dropship1 item (like in Jira 4637) and it worked perfectly. I guess, as we were suspecting, using
  set(name, "");
instead of
  element.setAttribute(name, "null");
had side effects.

Anyway, as Adrian pointed out, the right returned string should be "[null-field]" and it's now correct/consistent. On the other side (entity sync clients), of course, now "[null-field]" should be handled instead of "" or "null"
               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4602:
----------------------------------------

Last sentence above is for you Patrick, as I guess anybody else ever used such thing so far... Thanks for the try ;), and thanks to Adrian for support :)
               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4602:
----------------------------------------

After some other issues, I completed in
trunk r1226065  
R11.04 r1226067
R10.04 r1226068  
R09.04 r1226066  
R4.0 r12260670

I better understand Patrick's answer to the issue now...

               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Reopened] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

     [ 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=rev
introduced 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4602:
----------------------------------------

Note that stopped in a non normal way, is not quite clear to me. I observed issues in at least 2 cases: many machines on the same jobs thread-pool, sole machine on Windows where you stop either by ctrl+C or directly by UI (X button).
               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4602:
----------------------------------------

I finally did not create an issue for JobManager.reloadCrashedJobs() where I wanted to continue in the loop when a job has maxRetry set to 0.

I believe this case appears (mostly?) when you have multiples instances running on the same DB. So I think it's better to handle this case using unique.instanceId in general.properties.

The reason I made this choice is because I'm afraid that else we could prevent to reload running (ie crashed) jobs and hence miss them completly.

Though I still wonder why I got those issues locally with demo instances running on their own DBs...
               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

Re: [jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Paul Foxworthy
Hi all,

There is a canonical way from the XML standards to express that an XML element is null. Rather than reserving a special value for the data within the element, there's a special *attribute* xsi:nil. Schemas can define a corresponding nillable attribute to say it is possible for an element to use the xsi:nil attribute.

Given the problems we've been having with this Jira issue, would using xsi:nil be a good idea? The only disadvantage I can see is that this solution only works when we are serializing and deserializing to and from XML. We would need to solve the problem all over again for other serialization formats.

See http://www.w3.org/TR/xmlschema-0/#Nils and http://docstore.mik.ua/orelly/xml/schema/ch11_03.htm .

Cheers

Paul Foxworthy
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Jacques Le Roux commented on OFBIZ-4602:
----------------------------------------

Paul Foxworthy on dev ML
{quote}
There is a canonical way from the XML standards to express that an XML
element is null. Rather than reserving a special value for the data within
the element, there's a special *attribute* xsi:nil. Schemas can define a
corresponding nillable attribute to say it is possible for an element to use
the xsi:nil attribute.

Given the problems we've been having with this Jira issue, would using
xsi:nil be a good idea? The only disadvantage I can see is that this
solution only works when we are serializing and deserializing to and from
XML. We would need to solve the problem all over again for other
serialization formats.

See http://www.w3.org/TR/xmlschema-0/#Nils and
http://docstore.mik.ua/orelly/xml/schema/ch11_03.htm .
{quote}





               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

Re: [jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Jacques Le Roux
Administrator
In reply to this post by Paul Foxworthy
Thanks Paul,

But once again, please put directly your comments in the Jiras issues.
It's  much easier to follow the convo later than to have this, either in OFBiz dev ML, or as it seems you did in the nabble forum,
which is actually nothing else than an "easier to use" duplicate of the OFBiz dev ML (I put quote because most of us actually prefer
to use an email client which has much features, like folders filters, etc.

I put myself your comment in the Jira for this time (did already for another one) and will continue the convo there.

HTH

Jacques

From: "Paul Foxworthy" <[hidden email]>

> Hi all,
>
> There is a canonical way from the XML standards to express that an XML
> element is null. Rather than reserving a special value for the data within
> the element, there's a special *attribute* xsi:nil. Schemas can define a
> corresponding nillable attribute to say it is possible for an element to use
> the xsi:nil attribute.
>
> Given the problems we've been having with this Jira issue, would using
> xsi:nil be a good idea? The only disadvantage I can see is that this
> solution only works when we are serializing and deserializing to and from
> XML. We would need to solve the problem all over again for other
> serialization formats.
>
> See http://www.w3.org/TR/xmlschema-0/#Nils and
> http://docstore.mik.ua/orelly/xml/schema/ch11_03.htm .
>
> Cheers
>
> Paul Foxworthy
>
> --
> View this message in context:
> http://ofbiz.135035.n4.nabble.com/jira-Created-OFBIZ-4602-Null-values-are-not-synchronized-in-http-mode-tp4145573p4356519.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-4602) Null values are not synchronized in http mode

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)

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

Divesh Dutta commented on OFBIZ-4602:
-------------------------------------

Hello Jacques,

I was testing credit card transactions and found that in some specific cases, paymentgateway responses are not getting saved. This is due to commits: trunk r1226055  
R11.04 r1226056

To explain issue in more detail. When we place an Order, and then edit order, and add additional adjustment in Order (say additional shipping and handling.)

Now order is authorized with original amount . And we set flag ProductStore.shipIfCaptureFails to "Y". Now when we fulfill Order, original  amount is captured but additional amount is not yet captured. So ProductStore.shipIfCaptureFails works in PaymentGatewayServices and return error as total amount is not captured yet.

Now when this error is returned, Original amount is captured by Credit Card but it is not logged in OFBiz.

Reason behind above bug:

In savePgr method of PaymentGatewayServices,

{code}
dispatcher.addRollbackService("savePaymentGatewayResponse", context, true);
{code}

is written. So this gets triggered when captureOrderPayments return error due to flag ProductStore.shipIfCaptureFails. But above code does not work successfully. Because it schedules a job. And RuntimeData is prepared for this job and "runTimeInfo" is created where xml value of PaymentGatewayResponse is prepared and saved. But when this job gets executed, it fails because it tries to save "null-field" String for fields which are actually null.

Now because of this we are facing trouble in our current Production systems as we are using 11.04 . It will be great if you look into this and fix this.
               

> 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.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
12