Duplicate orders being sent out of ofbiz

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

Duplicate orders being sent out of ofbiz

Stephens, Drew
We are using the ecommerce module of ofbiz and experiencing an
intermittent problem.
 
We have written some custom code to transfer the order data
(ORDER_HEADER, ORDER_ITEM, etc.) into a backend ERP housed on an iSeries
(as400).  Every now and then (once every month or two) the orders are
duplicated when transmitted to the iSeries.  The orders are fine within
ofbiz, its as two threads are being initiated (in parallel) each sending
the data.
 
There is nothing explicit in the custom code to explain this.  In fact,
we have some validations in place to ensure only one transmission is
sent.
 
Does anyone have any ideas/suggestions?  Any and all help will be
appreciated.
 

Drew Stephens
Rippe & Kingston Systems, Inc.
[hidden email]
Phone: (513) 977-4573

Visit us at: www.rippe.com

1077 Celestial Street, Cincinnati, Ohio 45202-1696

========================================================================
=======

 
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate orders being sent out of ofbiz

BJ Freeman
which version of ofbiz are you using?
how are you activating your code?

Stephens, Drew sent the following on 7/6/2006 11:42 AM:

> We are using the ecommerce module of ofbiz and experiencing an
> intermittent problem.
>  
> We have written some custom code to transfer the order data
> (ORDER_HEADER, ORDER_ITEM, etc.) into a backend ERP housed on an iSeries
> (as400).  Every now and then (once every month or two) the orders are
> duplicated when transmitted to the iSeries.  The orders are fine within
> ofbiz, its as two threads are being initiated (in parallel) each sending
> the data.
>  
> There is nothing explicit in the custom code to explain this.  In fact,
> we have some validations in place to ensure only one transmission is
> sent.
>  
> Does anyone have any ideas/suggestions?  Any and all help will be
> appreciated.
>  
>
> Drew Stephens
> Rippe & Kingston Systems, Inc.
> [hidden email]
> Phone: (513) 977-4573
>
> Visit us at: www.rippe.com
>
> 1077 Celestial Street, Cincinnati, Ohio 45202-1696
>
> ========================================================================
> =======
>
>  
>
Reply | Threaded
Open this post in threaded view
|

RE: Duplicate orders being sent out of ofbiz

Stephens, Drew
In reply to this post by Stephens, Drew
I am not a JAVA programmer, so my answer will not be technical.

We created a customer service class (RemoteOrderServices) which executes
the various tasks.  This service is executed from the clearCartForOrder
method in the ShoppingCartEvents Class.  

As for the version, where do I find it?  The documentation version I
have is Revision 20050223.

I realize my answers probably don't help much, but this project is so
extensive I tend to get lost in it.

Drew Stephens
Rippe & Kingston Systems, Inc.
[hidden email]
Phone: (513) 977-4573

Visit us at: www.rippe.com

1077 Celestial Street, Cincinnati, Ohio 45202-1696

========================================================================
=======



-----Original Message-----
From: BJ Freeman [mailto:[hidden email]]
Sent: Thursday, July 06, 2006 2:48 PM
To: [hidden email]
Subject: Re: Duplicate orders being sent out of ofbiz


which version of ofbiz are you using?
how are you activating your code?

Stephens, Drew sent the following on 7/6/2006 11:42 AM:
> We are using the ecommerce module of ofbiz and experiencing an
> intermittent problem.
>  
> We have written some custom code to transfer the order data
> (ORDER_HEADER, ORDER_ITEM, etc.) into a backend ERP housed on an
> iSeries (as400).  Every now and then (once every month or two) the
> orders are duplicated when transmitted to the iSeries.  The orders are

> fine within ofbiz, its as two threads are being initiated (in
> parallel) each sending the data.
>  
> There is nothing explicit in the custom code to explain this.  In
> fact, we have some validations in place to ensure only one
> transmission is sent.
>  
> Does anyone have any ideas/suggestions?  Any and all help will be
> appreciated.
>  
>
> Drew Stephens
> Rippe & Kingston Systems, Inc.
> [hidden email]
> Phone: (513) 977-4573
>
> Visit us at: www.rippe.com
>
> 1077 Celestial Street, Cincinnati, Ohio 45202-1696
>
> ======================================================================
> ==
> =======
>
>  
>
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate orders being sent out of ofbiz

BJ Freeman
you answered my questions.
clearCartForOrder is what activated you code.

and your are not using one of the current versions of ofbiz.
The recent versions had a file structure
Applications
base
Framework
Hot-spot

older versions
had
components for both the applications and framework.

this is going to be kind of hard to trouble shoot, since the code your
using, I don't have a copy of.

hopefully someone running code close to yours can help.


Stephens, Drew sent the following on 7/6/2006 12:53 PM:

> I am not a JAVA programmer, so my answer will not be technical.
>
> We created a customer service class (RemoteOrderServices) which executes
> the various tasks.  This service is executed from the clearCartForOrder
> method in the ShoppingCartEvents Class.  
>
> As for the version, where do I find it?  The documentation version I
> have is Revision 20050223.
>
> I realize my answers probably don't help much, but this project is so
> extensive I tend to get lost in it.
>
> Drew Stephens
> Rippe & Kingston Systems, Inc.
> [hidden email]
> Phone: (513) 977-4573
>
> Visit us at: www.rippe.com
>
> 1077 Celestial Street, Cincinnati, Ohio 45202-1696
>
> ========================================================================
> =======
>
>
>
> -----Original Message-----
> From: BJ Freeman [mailto:[hidden email]]
> Sent: Thursday, July 06, 2006 2:48 PM
> To: [hidden email]
> Subject: Re: Duplicate orders being sent out of ofbiz
>
>
> which version of ofbiz are you using?
> how are you activating your code?
>
> Stephens, Drew sent the following on 7/6/2006 11:42 AM:
>> We are using the ecommerce module of ofbiz and experiencing an
>> intermittent problem.
>>  
>> We have written some custom code to transfer the order data
>> (ORDER_HEADER, ORDER_ITEM, etc.) into a backend ERP housed on an
>> iSeries (as400).  Every now and then (once every month or two) the
>> orders are duplicated when transmitted to the iSeries.  The orders are
>
>> fine within ofbiz, its as two threads are being initiated (in
>> parallel) each sending the data.
>>  
>> There is nothing explicit in the custom code to explain this.  In
>> fact, we have some validations in place to ensure only one
>> transmission is sent.
>>  
>> Does anyone have any ideas/suggestions?  Any and all help will be
>> appreciated.
>>  
>>
>> Drew Stephens
>> Rippe & Kingston Systems, Inc.
>> [hidden email]
>> Phone: (513) 977-4573
>>
>> Visit us at: www.rippe.com
>>
>> 1077 Celestial Street, Cincinnati, Ohio 45202-1696
>>
>> ======================================================================
>> ==
>> =======
>>
>>  
>>
>
Reply | Threaded
Open this post in threaded view
|

RE: Duplicate orders being sent out of ofbiz

Stephens, Drew
In reply to this post by Stephens, Drew
This problem has happened twice in the last 2-3 months, each time 5 or 6
order were duplicated, no errors in the log, no indication of problems.

Like I wrote before.  It's almost like the communication between our
server the as400 repeats itself.  I realize this isn't an answer, but I
don't know how else to describe it.

Drew Stephens
Rippe & Kingston Systems, Inc.
[hidden email]
Phone: (513) 977-4573

Visit us at: www.rippe.com

1077 Celestial Street, Cincinnati, Ohio 45202-1696

========================================================================
=======



-----Original Message-----
From: BJ Freeman [mailto:[hidden email]]
Sent: Thursday, July 06, 2006 4:26 PM
To: [hidden email]
Subject: Re: Duplicate orders being sent out of ofbiz


you answered my questions.
clearCartForOrder is what activated you code.

and your are not using one of the current versions of ofbiz. The recent
versions had a file structure Applications base Framework Hot-spot

older versions
had
components for both the applications and framework.

this is going to be kind of hard to trouble shoot, since the code your
using, I don't have a copy of.

hopefully someone running code close to yours can help.


Stephens, Drew sent the following on 7/6/2006 12:53 PM:

> I am not a JAVA programmer, so my answer will not be technical.
>
> We created a customer service class (RemoteOrderServices) which
> executes the various tasks.  This service is executed from the
> clearCartForOrder method in the ShoppingCartEvents Class.
>
> As for the version, where do I find it?  The documentation version I
> have is Revision 20050223.
>
> I realize my answers probably don't help much, but this project is so
> extensive I tend to get lost in it.
>
> Drew Stephens
> Rippe & Kingston Systems, Inc.
> [hidden email]
> Phone: (513) 977-4573
>
> Visit us at: www.rippe.com
>
> 1077 Celestial Street, Cincinnati, Ohio 45202-1696
>
> ======================================================================
> ==
> =======
>
>
>
> -----Original Message-----
> From: BJ Freeman [mailto:[hidden email]]
> Sent: Thursday, July 06, 2006 2:48 PM
> To: [hidden email]
> Subject: Re: Duplicate orders being sent out of ofbiz
>
>
> which version of ofbiz are you using?
> how are you activating your code?
>
> Stephens, Drew sent the following on 7/6/2006 11:42 AM:
>> We are using the ecommerce module of ofbiz and experiencing an
>> intermittent problem.
>>  
>> We have written some custom code to transfer the order data
>> (ORDER_HEADER, ORDER_ITEM, etc.) into a backend ERP housed on an
>> iSeries (as400).  Every now and then (once every month or two) the
>> orders are duplicated when transmitted to the iSeries.  The orders
are

>
>> fine within ofbiz, its as two threads are being initiated (in
>> parallel) each sending the data.
>>  
>> There is nothing explicit in the custom code to explain this.  In
>> fact, we have some validations in place to ensure only one
>> transmission is sent.
>>  
>> Does anyone have any ideas/suggestions?  Any and all help will be
>> appreciated.
>>  
>>
>> Drew Stephens
>> Rippe & Kingston Systems, Inc.
>> [hidden email]
>> Phone: (513) 977-4573
>>
>> Visit us at: www.rippe.com
>>
>> 1077 Celestial Street, Cincinnati, Ohio 45202-1696
>>
>> =====================================================================
>> =
>> ==
>> =======
>>
>>  
>>
>
Reply | Threaded
Open this post in threaded view
|

RE: Duplicate orders being sent out of ofbiz

Dimitri Unruh-2
Hi

we also have the same (or nearly the same) problem.

We have one service, which is running through the OrderHeader-Entity and
does some operations with the resultSet.
I don't know what's going on there, but it seems, that this piece of code
makes the hole trouble:


Object feldname = "syncStatusId";
Object feldwert = null;

Map whereFelder = new HashMap();
whereFelder.put(feldname, feldwert);
whereFelder.put("orderTypeId", "SALES_ORDER");

List ordersList = delegator.findByAnd("OrderHeader", whereFelder);

if (ordersList.size() > 0) {

   .... do some operations ..
}


We run this service every 10 minutes and in about 99% everything is going
fine.
But sometimes I get this mysterios situation:
the size of the "ordersList" is for example 5, but the are only 3 related
databaserows.
So I got 2 duplicate orders in the list "ordersList".

How could this happen? I have no ideas anymore...



Best Regards

Dimitri Unruh

Lynx Consulting Group
Johanniskirchplatz 6
D-33615 Bielefeld
T: +49 (0) 521 / 52 47 - 408
[hidden email]
http://www.lynx.de
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate orders being sent out of ofbiz

David E Jones-2
In reply to this post by Stephens, Drew

Drew,

It looks like this thread has gone astray somewhat...

If it is custom code you are using for the integration that is most likely the place to look for the problem. All I can say from past experience with this sort of code and this sort of problem is to take a close look at whatever is being used to determine orders that still need to be snych'ed or sent out. There may be an issue with the query, or how the update of the field is being done. For example, if 2 threads are running at the same time and the first is updating the synch field as it goes and doesn't finish before the next one starts then they could both have some of the same orders on their lists. There are various ways to detect and avoid that situation.

-David


Stephens, Drew wrote:

> This problem has happened twice in the last 2-3 months, each time 5 or 6
> order were duplicated, no errors in the log, no indication of problems.
>
> Like I wrote before.  It's almost like the communication between our
> server the as400 repeats itself.  I realize this isn't an answer, but I
> don't know how else to describe it.
>
> Drew Stephens
> Rippe & Kingston Systems, Inc.
> [hidden email]
> Phone: (513) 977-4573
>
> Visit us at: www.rippe.com
>
> 1077 Celestial Street, Cincinnati, Ohio 45202-1696
>
> ========================================================================
> =======
>
>
>
> -----Original Message-----
> From: BJ Freeman [mailto:[hidden email]]
> Sent: Thursday, July 06, 2006 4:26 PM
> To: [hidden email]
> Subject: Re: Duplicate orders being sent out of ofbiz
>
>
> you answered my questions.
> clearCartForOrder is what activated you code.
>
> and your are not using one of the current versions of ofbiz. The recent
> versions had a file structure Applications base Framework Hot-spot
>
> older versions
> had
> components for both the applications and framework.
>
> this is going to be kind of hard to trouble shoot, since the code your
> using, I don't have a copy of.
>
> hopefully someone running code close to yours can help.
>
>
> Stephens, Drew sent the following on 7/6/2006 12:53 PM:
>> I am not a JAVA programmer, so my answer will not be technical.
>>
>> We created a customer service class (RemoteOrderServices) which
>> executes the various tasks.  This service is executed from the
>> clearCartForOrder method in the ShoppingCartEvents Class.
>>
>> As for the version, where do I find it?  The documentation version I
>> have is Revision 20050223.
>>
>> I realize my answers probably don't help much, but this project is so
>> extensive I tend to get lost in it.
>>
>> Drew Stephens
>> Rippe & Kingston Systems, Inc.
>> [hidden email]
>> Phone: (513) 977-4573
>>
>> Visit us at: www.rippe.com
>>
>> 1077 Celestial Street, Cincinnati, Ohio 45202-1696
>>
>> ======================================================================
>> ==
>> =======
>>
>>
>>
>> -----Original Message-----
>> From: BJ Freeman [mailto:[hidden email]]
>> Sent: Thursday, July 06, 2006 2:48 PM
>> To: [hidden email]
>> Subject: Re: Duplicate orders being sent out of ofbiz
>>
>>
>> which version of ofbiz are you using?
>> how are you activating your code?
>>
>> Stephens, Drew sent the following on 7/6/2006 11:42 AM:
>>> We are using the ecommerce module of ofbiz and experiencing an
>>> intermittent problem.
>>>  
>>> We have written some custom code to transfer the order data
>>> (ORDER_HEADER, ORDER_ITEM, etc.) into a backend ERP housed on an
>>> iSeries (as400).  Every now and then (once every month or two) the
>>> orders are duplicated when transmitted to the iSeries.  The orders
> are
>>> fine within ofbiz, its as two threads are being initiated (in
>>> parallel) each sending the data.
>>>  
>>> There is nothing explicit in the custom code to explain this.  In
>>> fact, we have some validations in place to ensure only one
>>> transmission is sent.
>>>  
>>> Does anyone have any ideas/suggestions?  Any and all help will be
>>> appreciated.
>>>  
>>>
>>> Drew Stephens
>>> Rippe & Kingston Systems, Inc.
>>> [hidden email]
>>> Phone: (513) 977-4573
>>>
>>> Visit us at: www.rippe.com
>>>
>>> 1077 Celestial Street, Cincinnati, Ohio 45202-1696
>>>
>>> =====================================================================
>>> =
>>> ==
>>> =======
>>>
>>>  
>>>

smime.p7s (4K) Download Attachment