You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Vince Clark (JIRA)" <ji...@apache.org> on 2007/10/16 16:43:50 UTC

[jira] Updated: (OFBIZ-1314) BigDecimal error in POS when trying to do a Void Sale

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

Vince Clark updated OFBIZ-1314:
-------------------------------


I'm still getting this error. I updated my working copy yesterday, revision 584831 from trunk. Here is some detail on the configuration:
POS client running locally on a Windows XP laptop.
Entity engine configured to point directly to a Postgres database on the server (not running a local database)
No entity sync setup right now.

When voiding a sale that has already been processed (not an existing sale that hasn't completed yet) I get the trace below.

2007-10-16 08:27:51,171 (Thread-117) [                Log.java:94 :INFO ] OrderT
otal [49.98] - ReturnTotal [0.00] = available Return Total [49.98]
2007-10-16 08:27:51,171 (Thread-117) [                Log.java:94 :WARN ] Creati
ng a balance adjustment of [49.98] for return [10040]
2007-10-16 08:27:51,187 (Thread-117) [       ModelService.java:486:ERROR] [Model
Service.validate] : {createReturnAdjustment} : (IN) Required test error: org.ofb
iz.service.ServiceValidationException: Type check failed for field [createReturn
Adjustment.amount]; expected type is [Double]; actual type is [java.math.BigDeci
mal]
2007-10-16 08:27:51,187 (Thread-117) [  ServiceDispatcher.java:355:ERROR]
---- exception report ----------------------------------------------------------

Incoming context (in runSync : createReturnAdjustment) does not match expected r
equirements
Exception: org.ofbiz.service.ServiceValidationException
Message: Type check failed for field [createReturnAdjustment.amount]; expected t
ype is [Double]; actual type is [java.math.BigDecimal]
---- stack trace ---------------------------------------------------------------

org.ofbiz.service.ServiceValidationException: Type check failed for field [creat
eReturnAdjustment.amount]; expected type is [Double]; actual type is [java.math.
BigDecimal]
org.ofbiz.service.ModelService.validate(ModelService.java:608)
org.ofbiz.service.ModelService.validate(ModelService.java:484)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:353)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:206)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:150)
org.ofbiz.minilang.method.callops.CallService.exec(CallService.java:239)
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:931)
org.ofbiz.minilang.method.ifops.IfCompare.exec(IfCompare.java:118)
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:931)
org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:568)
org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:105)
org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:87)
org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:7
6)
org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:371)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:206)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
org.ofbiz.pos.event.ManagerEvents.voidOrder(ManagerEvents.java:317)
org.ofbiz.pos.event.MenuEvents.triggerEnter(MenuEvents.java:95)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:205)
org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:
105)
org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120)
net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------------------------


2007-10-16 08:27:51,203 (Thread-117) [  ServiceDispatcher.java:488:ERROR]
---- exception report ----------------------------------------------------------

Service [createReturnAdjustment] threw an unexpected exception/error
Exception: org.ofbiz.service.ServiceValidationException
Message: Type check failed for field [createReturnAdjustment.amount]; expected t
ype is [Double]; actual type is [java.math.BigDecimal]
---- stack trace ---------------------------------------------------------------

org.ofbiz.service.ServiceValidationException: Type check failed for field [creat
eReturnAdjustment.amount]; expected type is [Double]; actual type is [java.math.
BigDecimal]
org.ofbiz.service.ModelService.validate(ModelService.java:608)
org.ofbiz.service.ModelService.validate(ModelService.java:484)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:353)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:206)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:150)
org.ofbiz.minilang.method.callops.CallService.exec(CallService.java:239)
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:931)
org.ofbiz.minilang.method.ifops.IfCompare.exec(IfCompare.java:118)
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:931)
org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:568)
org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:105)
org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:87)
org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:7
6)
org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:371)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:206)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
org.ofbiz.pos.event.ManagerEvents.voidOrder(ManagerEvents.java:317)
org.ofbiz.pos.event.MenuEvents.triggerEnter(MenuEvents.java:95)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:205)
org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:
105)
org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120)
net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------------------------


2007-10-16 08:27:51,203 (Thread-117) [    TransactionUtil.java:295:WARN ]
---- exception report ----------------------------------------------------------

[TransactionUtil.setRollbackOnly] Calling transaction setRollbackOnly; this stac
k trace shows where this is happening:
Exception: java.lang.Exception
Message: Service [createReturnAdjustment] threw an unexpected exception/error
---- stack trace ---------------------------------------------------------------

java.lang.Exception: Service [createReturnAdjustment] threw an unexpected except
ion/error
org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.jav
a:295)
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:242)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:491)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:206)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:150)
org.ofbiz.minilang.method.callops.CallService.exec(CallService.java:239)
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:931)
org.ofbiz.minilang.method.ifops.IfCompare.exec(IfCompare.java:118)
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:931)
org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:568)
org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:105)
org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:87)
org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:7
6)
org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:371)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:206)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
org.ofbiz.pos.event.ManagerEvents.voidOrder(ManagerEvents.java:317)
org.ofbiz.pos.event.MenuEvents.triggerEnter(MenuEvents.java:95)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:205)
org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:
105)
org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120)
net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------------------------


2007-10-16 08:27:51,203 (Thread-117) [        CallService.java:242:ERROR]
---- exception report ----------------------------------------------------------

Exception: org.ofbiz.service.ServiceValidationException
Message: Type check failed for field [createReturnAdjustment.amount]; expected t
ype is [Double]; actual type is [java.math.BigDecimal]
---- stack trace ---------------------------------------------------------------

org.ofbiz.service.ServiceValidationException: Type check failed for field [creat
eReturnAdjustment.amount]; expected type is [Double]; actual type is [java.math.
BigDecimal]
org.ofbiz.service.ModelService.validate(ModelService.java:608)
org.ofbiz.service.ModelService.validate(ModelService.java:484)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:353)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:206)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:150)
org.ofbiz.minilang.method.callops.CallService.exec(CallService.java:239)
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:931)
org.ofbiz.minilang.method.ifops.IfCompare.exec(IfCompare.java:118)
org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:931)
org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:568)
org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:105)
org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:87)
org.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:7
6)
org.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:51)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:371)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:206)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
org.ofbiz.pos.event.ManagerEvents.voidOrder(ManagerEvents.java:317)
org.ofbiz.pos.event.MenuEvents.triggerEnter(MenuEvents.java:95)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:205)
org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:
105)
org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120)
net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------------------------


2007-10-16 08:27:51,203 (Thread-117) [    TransactionUtil.java:299:INFO ] [Trans
actionUtil.setRollbackOnly] transaction rollback only not set, rollback only is
already set.
2007-10-16 08:27:51,203 (Thread-117) [  ServiceDispatcher.java:510:ERROR] Error
in Service [quickReturnOrder]: ERROR: Could not complete the Create Quick Return
 From Order [file:/C:/Documents%20and%20Settings/Owner/My%20Documents/ofbiz/appl
ications/order/script/org/ofbiz/order/order/OrderReturnServices.xml#quickReturnF
romOrder] process [problem invoking the [createReturnAdjustment] service with th
e map named [balanceItemCtx] containing [[description=Balance Adjustment, return
AdjustmentTypeId=RET_MAN_ADJ, returnId=10040, returnItemSeqId=_NA_, amount=49.98
, userLogin=[GenericEntity:UserLogin][createdStamp,2007-09-20 21:04:26.721(java.
sql.Timestamp)][createdTxStamp,2007-09-20 21:04:26.718(java.sql.Timestamp)][curr
entPassword,f3cd237d0679b5f7a4646495b90dd66345513964(java.lang.String)][disabled
DateTime,null()][enabled,Y(java.lang.String)][hasLoggedOut,N(java.lang.String)][
isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,null()]
[lastUpdatedStamp,2007-09-21 16:40:55.031(java.sql.Timestamp)][lastUpdatedTxStam
p,2007-09-21 16:40:55.015(java.sql.Timestamp)][partyId,10008(java.lang.String)][
passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,null()
][userLoginId,12345(java.lang.String)], locale=en_US]]: Type check failed for fi
eld [createReturnAdjustment.amount]; expected type is [Double]; actual type is [
java.math.BigDecimal]]
2007-10-16 08:27:51,203 (Thread-117) [    TransactionUtil.java:259:ERROR]
---- exception report ----------------------------------------------------------

[TransactionUtil.rollback]
Exception: java.lang.Exception
Message: Stack Trace
---- stack trace ---------------------------------------------------------------

java.lang.Exception: Stack Trace
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:258)
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:240)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:514)
org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:206)
org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:136)
org.ofbiz.pos.event.ManagerEvents.voidOrder(ManagerEvents.java:317)
org.ofbiz.pos.event.MenuEvents.triggerEnter(MenuEvents.java:95)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.ofbiz.pos.config.ButtonEventConfig.invoke(ButtonEventConfig.java:205)
org.ofbiz.pos.config.ButtonEventConfig.invokeButtonEvent(ButtonEventConfig.java:
105)
org.ofbiz.pos.component.PosButton$1.construct(PosButton.java:120)
net.xoetrope.xui.helper.SwingWorker$2.run(Unknown Source)
java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------------------------


2007-10-16 08:27:51,218 (Thread-117) [    TransactionUtil.java:269:INFO ] [Trans
actionUtil.rollback] transaction rolled back



> BigDecimal error in POS when trying to do a Void Sale
> -----------------------------------------------------
>
>                 Key: OFBIZ-1314
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1314
>             Project: OFBiz
>          Issue Type: Bug
>          Components: pos
>    Affects Versions: SVN trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>
> Try voiding a sale that has already been completed. You will be prompted for an order number. Enter an existing order number. Then you will get the error.
> Exception: org.ofbiz.service.ServiceValidationException
> Message: Type check failed for field [createReturnAdjustment.amount]; expected t
> ype is [Double]; actual type is [java.math.BigDecimal]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.