Today I got a weird error today in the production server of a
customer: the <create-value> operation in createInventoryItemDetail was throwing a ClassCastException. I fixed it by clearing the cache, however I think it is useful to share some information about it; see the log, where the first line is a debug message I created just before calling the offending operation (with the content of newEntity map) Jacopo 2009-07-27 19:46:44,765 (http-0.0.0.0-8443-14) [ Log.java:111:INFO ] [InventoryServices.xml#createInventoryItemDetail] BEFORE CALLING <create-value value-field="newEntity"/> at line 307; here is the content of "newEntity": [GenericEntity:InventoryItemDetail] [availableToPromiseDiff,-30000.00(java.math.BigDecimal)][effectiveDate, 2009-07-27 19:46:44.765(java.sql.Timestamp)][inventoryItemDetailSeqId, 40885(java.lang.String)][inventoryItemId,15604(java.lang.String)] [quantityOnHandDiff,-30000.00(java.math.BigDecimal)][workEffortId, 16004(java.lang.String)] 2009-07-27 19:46:44,812 (http-0.0.0.0-8443-14) [ SimpleMethod.java:888:ERROR] ---- runtime exception report -------------------------------------------------- Error in simple-method operation [<create-value/>]: java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigDecimal Exception: java.lang.ClassCastException Message: java.lang.Double cannot be cast to java.math.BigDecimal ---- stack trace --------------------------------------------------------------- java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigDecimal java.math.BigDecimal.compareTo(Unknown Source) org .ofbiz .entity .condition .EntityComparisonOperator .compareLessThan(EntityComparisonOperator.java:231) org.ofbiz.entity.condition.EntityOperator $3.compare(EntityOperator.java:112) org .ofbiz .entity .condition .EntityComparisonOperator.mapMatches(EntityComparisonOperator.java:161) org.ofbiz.entity.condition.EntityExpr.mapMatches(EntityExpr.java:183) org .ofbiz .entity .condition.EntityJoinOperator.mapMatches(EntityJoinOperator.java:147) org .ofbiz .entity .condition .EntityConditionListBase.mapMatches(EntityConditionListBase.java:103) org .ofbiz .entity .cache .AbstractEntityConditionCache .storeHook(AbstractEntityConditionCache.java:200) org .ofbiz .entity .cache .AbstractEntityConditionCache .storeHook(AbstractEntityConditionCache.java:166) org .ofbiz .entity .cache .AbstractEntityConditionCache .storeHook(AbstractEntityConditionCache.java:141) org.ofbiz.entity.cache.Cache.remove(Cache.java:115) org.ofbiz.entity.GenericDelegator.clearCacheLine(GenericDelegator.java: 2978) org.ofbiz.entity.GenericDelegator.clearCacheLine(GenericDelegator.java: 2963) org.ofbiz.entity.GenericDelegator.create(GenericDelegator.java:833) org.ofbiz.minilang.method.entityops.CreateValue.exec(CreateValue.java: 79) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:883) org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:702) org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:160) org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:142) org .ofbiz .minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java: 78) org .ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:53) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:392) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:221) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:173) org.ofbiz.minilang.method.callops.CallService.exec(CallService.java:245) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:883) org.ofbiz.minilang.method.ifops.IfCompare.exec(IfCompare.java:132) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:883) org.ofbiz.minilang.method.ifops.IfNotEmpty.exec(IfNotEmpty.java:101) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:883) org.ofbiz.minilang.method.conditional.MasterIf.exec(MasterIf.java:86) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:883) org.ofbiz.minilang.method.ifops.IfCompare.exec(IfCompare.java:132) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:883) org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:702) org .ofbiz .minilang.method.callops.CallSimpleMethod.exec(CallSimpleMethod.java:85) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:883) org.ofbiz.minilang.method.envops.Iterate.exec(Iterate.java:120) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:883) org.ofbiz.minilang.method.ifops.IfNotEmpty.exec(IfNotEmpty.java:101) org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:883) org.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:702) org.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:160) org.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:142) org .ofbiz .minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java: 78) org .ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:53) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:392) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:221) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159) org .ofbiz .manufacturing .jobshopmgt .ProductionRunServices .updateProductionRunTask(ProductionRunServices.java:2012) 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 .service .engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:98) org .ofbiz .service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:56) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:392) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:221) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159) org .ofbiz .manufacturing .jobshopmgt .ProductionRunServices .productionRunDeclareAndProduce(ProductionRunServices.java:1693) 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 .service .engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:98) org .ofbiz .service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:56) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:392) org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:221) org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:159) org .ofbiz .manufacturing .jobshopmgt .ProductionRunEvents .productionRunDeclareAndProduce(ProductionRunEvents.java:93) 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.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:92) org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:78) org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java: 596) org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java: 361) org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:214) org.ofbiz.webapp.control.ControlServlet.doPost(ControlServlet.java:80) javax.servlet.http.HttpServlet.service(HttpServlet.java:710) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 290) org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:264) org .apache .catalina .core .ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 235) org .apache .catalina .core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) org .apache .catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 233) org .apache .catalina.core.StandardContextValve.invoke(StandardContextValve.java: 175) org .apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 128) org .apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 102) org .apache .catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java: 568) org .ofbiz .catalina .container .CrossSubdomainSessionValve.invoke(CrossSubdomainSessionValve.java:44) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 286) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 844) org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:583) org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) java.lang.Thread.run(Unknown Source) -------------------------------------------------------------------------------- |
Free forum by Nabble | Edit this page |