[OFBiz] Users - MaxDB problems cancelling an order item
Jacopo Cappellato
tiz at sastau.it
Tue Aug 10 02:17:39 EDT 2004
Eric,
thanks for the valuable information... I'm happy to see that I'm not the
only one with this problem!
Could you please try to apply the attached patch?
With this patch I can cancel order items... however this is not a good
solution because (probably) the REAL problem is that our db cannot get a new
transaction...
Let me know!
Thanks,
Jacopo
----- Original Message -----
From: "Eric Carmichael" <ecarmichael at dock3.com>
To: <users at ofbiz.dev.java.net>
Sent: Tuesday, August 10, 2004 5:50 AM
Subject: Re: [OFBiz] Users - MaxDB problems cancelling an order item
> I have a similar problem with 3.0.0 and 3.1.0 running on PostgreSQL,
> except it seems to hang indefinitely, rather than dumping after a few
> minutes.
>
> What I know is that resetGrandTotal() hangs in
> PreparedStatement.executeUpdate() while executing the query
>
> UPDATE public.ORDER_HEADER SET ORDER_TYPE_ID=?, ORDER_DATE=?,
> ENTRY_DATE=?, VISIT_ID=?, STATUS_ID=?, CREATED_BY=?,
> FIRST_ATTEMPT_ORDER_ID=?, CURRENCY_UOM=?, SYNC_STATUS_ID=?,
> BILLING_ACCOUNT_ID=?, ORIGIN_FACILITY_ID=?, WEB_SITE_ID=?,
> PRODUCT_STORE_ID=?, GRAND_TOTAL=?, LAST_UPDATED_STAMP=?,
> LAST_UPDATED_TX_STAMP=?, CREATED_STAMP=?, CREATED_TX_STAMP=?
> WHERE ORDER_ID=?
>
> Also, before I click the Cancel link, I can lock the order_header table
> in row exclusive mode and share mode. After I click the Cancel link, I
> can still lock the order_header table in row exclusive mode via psql,
> but if I try to lock it in share mode, psql just hangs. So I would
> guess that something's acquiring a lock that keeps resetGrandTotal()
> from doing its job, but I don't know what that something would be. And
> it could still be that executeUpdate() hangs for other reasons, after
> acquiring its own lock, and its lock is the thing that's blocking my
> attempt to lock via psql.
>
> Eric
>
>
> On Mon, 2004-08-09 at 09:59, Jacopo Cappellato wrote:
> > Hi all,
> >
> > I'm running OFBiz over MaxDB and I have problems cancelling an order
item
> > (from the Order Manager --> order view page).
> > Probably it's a problem related to the maximum number of transactions
> > allowed: I've tried to change some of the MaxDB parameters without
success.
> > Any hints?
> >
> > This is the error log (after the 6th line, "Running ECA Service:
> > resetGrandTotal, triggered by rule on Service: changeOrderItemStatus",
the
> > system hangs for some minutes before dumping the error messages).
> >
> > 7153455[ RequestHandler.java:200:INFO ] [Processing Request]:
> > cancelOrderItem
> > 7153735[ ServiceEcaRule.java:116:INFO ] Running ECA Service:
> > cancelOrderInventoryReservation, triggered by rule on Service:
> > changeOrderItemStatus
> > 7154306[ ServiceEcaRule.java:116:INFO ] Running ECA Service:
> > recalcShippingTotal, triggered by rule on Service: changeOrderItemStatus
> > 7154477[ ServiceEcaRule.java:116:INFO ] Running ECA Service:
> > recalcTaxTotal, triggered by rule on Service: changeOrderItemStatus
> > 7154567[ OrderServices.java:717:INFO ] Removed : 2 SALES_TAX
> > adjustments for order [WS10040]
> > 7154627[ ServiceEcaRule.java:116:INFO ] Running ECA Service:
> > resetGrandTotal, triggered by rule on Service: changeOrderItemStatus
> > 7214473[ TransactionImpl.java:691:INFO ] set rollback only
> > (tx=bb14111130336639313064356462633938655f305f
> > 03033663931
> > 3064356462633938655f305f 0)
> > 7215474[ TransactionImpl.java:691:INFO ] set rollback only
> > (tx=bb14111130336639313064356564373939355f305f
> > 03033663931
> > 3064356564373939355f305f 0)
> > 8054911[ SQLProcessor.java:184:WARN ] [SQLProcessor.rollback]: SQL
> > Exception while rolling back insert. Error was:java.sql.SQLException:
Cannot
> > rollback a transactional connection: See JDBC 2.0 Optional Package
> > Specification section 7.1 (p25)
> > 8054921[ SQLProcessor.java:185:WARN ]
> > ---- exception
> > report ----------------------------------------------------------
> > Exception: java.sql.SQLException
> > Message: Cannot rollback a transactional connection: See JDBC 2.0
Optional
> > Package Specification section 7.1 (p25)
> > ---- stack
> > trace ---------------------------------------------------------------
> > java.sql.SQLException: Cannot rollback a transactional connection: See
JDBC
> > 2.0 Optional Package Specification section 7.1 (p25)
> >
org.ofbiz.minerva.pool.jdbc.xa.wrapper.XAClientConnection.rollback(XAClientC
> > onnection.java:262)
> > org.ofbiz.entity.jdbc.SQLProcessor.rollback(SQLProcessor.java:172)
> > org.ofbiz.entity.jdbc.SQLProcessor.commit(SQLProcessor.java:154)
> > org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:197)
> >
org.ofbiz.entity.util.EntityListIterator.close(EntityListIterator.java:136)
> > org.ofbiz.entity.datasource.GenericDAO.selectByAnd(GenericDAO.java:637)
> >
org.ofbiz.entity.datasource.GenericHelperDAO.findByAnd(GenericHelperDAO.java
> > :147)
> > org.ofbiz.entity.GenericDelegator.findByAnd(GenericDelegator.java:866)
> > org.ofbiz.entity.GenericDelegator.findByAnd(GenericDelegator.java:851)
> > org.ofbiz.entity.GenericDelegator.getRelated(GenericDelegator.java:1386)
> > org.ofbiz.entity.GenericDelegator.getRelated(GenericDelegator.java:1332)
> > org.ofbiz.entity.GenericValue.getRelated(GenericValue.java:134)
> >
org.ofbiz.order.order.OrderReadHelper.getAdjustments(OrderReadHelper.java:12
> > 7)
> >
org.ofbiz.order.order.OrderReadHelper.getOrderGrandTotal(OrderReadHelper.jav
> > a:674)
> >
org.ofbiz.order.order.OrderServices.resetGrandTotal(OrderServices.java:625)
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > )
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > java.lang.reflect.Method.invoke(Method.java:324)
> >
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngin
> > e.java:101)
> >
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:
> > 63)
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:313)
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:194)
> > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:110)
> >
org.ofbiz.service.eca.ServiceEcaAction.runAction(ServiceEcaAction.java:94)
> > org.ofbiz.service.eca.ServiceEcaRule.eval(ServiceEcaRule.java:117)
> > org.ofbiz.service.eca.ServiceEcaUtil.evalRules(ServiceEcaUtil.java:165)
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:337)
> >
org.ofbiz.service.ServiceDispatcher.runSyncIgnore(ServiceDispatcher.java:207
> > )
> >
org.ofbiz.service.GenericDispatcher.runSyncIgnore(GenericDispatcher.java:130
> > )
> >
org.ofbiz.order.order.OrderServices.cancelOrderItem(OrderServices.java:1067)
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > )
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > java.lang.reflect.Method.invoke(Method.java:324)
> >
org.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngin
> > e.java:101)
> >
org.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:
> > 63)
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:313)
> > org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:194)
> > org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:110)
> >
org.ofbiz.order.shoppingcart.CheckOutEvents.cancelOrderItem(CheckOutEvents.j
> > ava:100)
> > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > )
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> > java.lang.reflect.Method.invoke(Method.java:324)
> >
org.ofbiz.content.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java
> > :93)
> >
org.ofbiz.content.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java
> > :79)
> >
org.ofbiz.content.webapp.control.RequestHandler.runEvent(RequestHandler.java
> > :365)
> >
org.ofbiz.content.webapp.control.RequestHandler.doRequest(RequestHandler.jav
> > a:238)
> >
org.ofbiz.content.webapp.control.ControlServlet.doGet(ControlServlet.java:19
> > 0)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > FilterChain.java:237)
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > ain.java:157)
> >
org.ofbiz.content.webapp.control.ContextFilter.doFilter(ContextFilter.java:2
> > 38)
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > FilterChain.java:186)
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > ain.java:157)
> >
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > va:214)
> >
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:104)
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
> > Valve.java:198)
> >
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > va:152)
> >
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:104)
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
> > )
> >
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:104)
> >
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
> > )
> >
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:102)
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> > :109)
> >
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:104)
> >
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535)
> >
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:102)
> >
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> >
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> > ction(Http11Protocol.java:705)
> >
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> > a:683)
> > java.lang.Thread.run(Thread.java:534)
>
> --------------------------------------------------------------------------
--
> > ----
> > ...
> > etc. etc....
> >
> > Thanks,
> >
> > Jacopo
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe at ofbiz.dev.java.net
> > For additional commands, e-mail: users-help at ofbiz.dev.java.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe at ofbiz.dev.java.net
> For additional commands, e-mail: users-help at ofbiz.dev.java.net
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: order-services.xml.patch
Type: application/octet-stream
Size: 847 bytes
Desc: not available
Url : http://lists.ofbiz.org/pipermail/users/attachments/20040810/e34be98a/order-services.xml.obj
-------------- next part --------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at ofbiz.dev.java.net
For additional commands, e-mail: users-help at ofbiz.dev.java.net
More information about the Users
mailing list