Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0017975
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2011-07-13 12:422011-09-07 13:45
ReporteremartinezView Statuspublic 
Assigned Tomtaal 
PriorityhighResolutionout of dateFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSLinux 64 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionProfessional ApplianceDatabase version8.3.9Ant version1.7.1
Product Version2.50MP28SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0017975: Orders Synchronization between POS and ERP fails when there are two (or more) shops invoking the web service

DescriptionIf we synchronize simultaneously orders of two shops, that is invoking the webservice for every POS order of every shop, we get an error and synchronization fails. This is the error log:

21:19:04 [http-8080-Processor16] INFO org.openbravo.pos.sync.rest.POSWebService - POS Import process found: Attribute
21:19:04 [http-8080-Processor10] ERROR org.openbravo.base.secureApp.SeguridadData - Exception in query: SELECT AD_USER_ID FROM AD_USER WHERE ISACTIVE = 'Y' AND USERNAME = ? AND PASSWORD = ?Exception:java.lang.IllegalStateException: org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
21:19:04 [http-8080-Processor10] ERROR org.openbravo.base.exception.OBException - @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
at org.openbravo.base.secureApp.SeguridadData.valido(SeguridadData.java:163)
at org.openbravo.base.secureApp.LoginUtils.getValidUserId(LoginUtils.java:53)
at org.openbravo.service.web.BaseWebServiceServlet.isLoggedIn(BaseWebServiceServlet.java:117)
at org.openbravo.service.web.BaseWebServiceServlet.service(BaseWebServiceServlet.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:79)
at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
21:19:04 [http-8080-Processor10] ERROR org.openbravo.dal.core.ThreadHandler - javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
org.openbravo.base.exception.OBException: javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
at org.openbravo.base.secureApp.LoginUtils.getValidUserId(LoginUtils.java:59)
at org.openbravo.service.web.BaseWebServiceServlet.isLoggedIn(BaseWebServiceServlet.java:117)
at org.openbravo.service.web.BaseWebServiceServlet.service(BaseWebServiceServlet.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:79)
at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
at org.openbravo.base.secureApp.SeguridadData.valido(SeguridadData.java:163)
at org.openbravo.base.secureApp.LoginUtils.getValidUserId(LoginUtils.java:53)
... 28 more
21:19:04 [http-8080-Processor10] ERROR org.openbravo.base.exception.OBException - Exception thrown javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
org.openbravo.base.exception.OBException: javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
at org.openbravo.base.secureApp.LoginUtils.getValidUserId(LoginUtils.java:59)
at org.openbravo.service.web.BaseWebServiceServlet.isLoggedIn(BaseWebServiceServlet.java:117)
at org.openbravo.service.web.BaseWebServiceServlet.service(BaseWebServiceServlet.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:79)
at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
at org.openbravo.base.secureApp.SeguridadData.valido(SeguridadData.java:163)
at org.openbravo.base.secureApp.LoginUtils.getValidUserId(LoginUtils.java:53)
... 28 more
21:19:04 [http-8080-Processor10] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/OB250].[M8B7776CB913C4AA691B099647862D191] - Servlet.service() para servlet M8B7776CB913C4AA691B099647862D191 lanzó excepción
org.openbravo.base.exception.OBException: Exception thrown javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:63)
at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.openbravo.base.exception.OBException: javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
at org.openbravo.base.secureApp.LoginUtils.getValidUserId(LoginUtils.java:59)
at org.openbravo.service.web.BaseWebServiceServlet.isLoggedIn(BaseWebServiceServlet.java:117)
at org.openbravo.service.web.BaseWebServiceServlet.service(BaseWebServiceServlet.java:65)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:79)
at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
... 15 more
Caused by: javax.servlet.ServletException: @CODE=@org.postgresql.util.PSQLException: ERROR: tuple concurrently updated
at org.openbravo.base.secureApp.SeguridadData.valido(SeguridadData.java:163)
at org.openbravo.base.secureApp.LoginUtils.getValidUserId(LoginUtils.java:53)
... 28 more
Steps To ReproduceInstall the module for ERP-POS synchronization. Set up two poses and two kettles to invoke Orders.ktr at the same time. Once it is invoked, you get the error.
TagsNo tags attached.
Attached Files? file icon test_orders.ktr [^] (16,799 bytes) 2011-07-18 13:17
? file icon test_orders_2.50.ktr [^] (16,538 bytes) 2011-07-18 14:37

- Relationships Relation Graph ] Dependency Graph ]
related to backport 00180992.50MP33 closedadrianromero Sometimes a deadlock appear when syncrhonizing a and processing orders at the same time 
has duplicate defect 0016987 closeddalsasua Synch ERP - POS 

-  Notes
(0039143)
mtaal (developer)
2011-07-18 10:16

Hi,
The strange thing is that the sql only does a select and afaik the user table is not updated. So possibly the connection fails on another table. Is this something which you can find it in a database log or by debugging the webservice and the exception?

As a solution, can you try this change:
change the service method in the BaseWebServiceServlet to synchronized:
  protected synchronized void service(HttpServletRequest request, HttpServletResponse response)

gr. Martin
(0039158)
adrianromero (manager)
2011-07-18 13:16

Hello

I have been trying to reproduce this error in my development environment and it has not been possible. I executed a test that simulates the simultaneous execution of three processes, each one importing 100 order lines. A total of 300 order lines. All executions of this test succeed, so problably there is another factor, apart from the simultaneous execution of the import orders web service, needed to reproduce the error.

This is the test done: Using an installation with the latest sources from the repository of Openbravo ERP with the modules org.openbravo.importdata and org.openbravo.pos.sync I executed the atached pentaho transformation that simulates three simultaenous processes with one hunderd lines order.

Adrián
(0039159)
adrianromero (manager)
2011-07-18 13:26

Vamos a probar en 2.50MP28
(0039161)
adrianromero (manager)
2011-07-18 14:37

Hello

In 2.50MP28 the same results. It has not been possible to reproduce the error. Find attached the pentaho transformation modified with parameters of the 2.50 sample data.

Adrián.
(0040061)
dmitry_mezentsev (developer)
2011-08-10 11:12

Hello Elena,

This ticket is expiring in 2 weeks. At the same time it is in the Feedback status for quite a while. Could you please give an update from your side?

Thanks.
(0040255)
dmitry_mezentsev (developer)
2011-08-17 12:27

Decreased issue priority because there is no feedback for quite a long time so seems like it is not that important.
(0040800)
mtaal (developer)
2011-09-07 13:45

Too long without feedback, closing issue, please re-open when feedback arrives

- Issue History
Date Modified Username Field Change
2011-07-13 12:42 emartinez New Issue
2011-07-13 12:42 emartinez Assigned To => alostale
2011-07-13 12:42 emartinez Modules => Core
2011-07-13 12:43 emartinez Issue Monitored: emartinez
2011-07-13 13:15 adrianromero Relationship added has duplicate 0016987
2011-07-13 15:31 alostale Assigned To alostale => adrianromero
2011-07-13 15:52 adrianromero Assigned To adrianromero => mtaal
2011-07-18 10:16 mtaal Note Added: 0039143
2011-07-18 10:16 mtaal Status new => feedback
2011-07-18 13:16 adrianromero Note Added: 0039158
2011-07-18 13:17 adrianromero File Added: test_orders.ktr
2011-07-18 13:26 adrianromero Note Added: 0039159
2011-07-18 14:37 adrianromero Note Added: 0039161
2011-07-18 14:37 adrianromero File Added: test_orders_2.50.ktr
2011-07-28 11:05 adrianromero Relationship added related to 0018099
2011-08-10 11:12 dmitry_mezentsev Note Added: 0040061
2011-08-17 12:27 dmitry_mezentsev Note Added: 0040255
2011-08-17 12:27 dmitry_mezentsev Severity major => minor
2011-09-07 13:45 mtaal Note Added: 0040800
2011-09-07 13:45 mtaal Status feedback => closed
2011-09-07 13:45 mtaal Resolution open => out of date


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker