ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Dixit <deepak.di...@hotwaxsystems.com>
Subject Re: 答复: Manufacturing Component - MRP FindInventoryEventPlan Error
Date Thu, 03 May 2018 18:32:09 GMT
Thanks Schumann Ye for reporting the issue and providing the solution,
Your solution is correct, This has been fixed at r#1830854

You can use svn diff command to create patch,
http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.diff.html

Thanks & Regards
--
Deepak Dixit
www.hotwax.co

On Thu, May 3, 2018 at 8:45 PM, Schumann Ye <Schumannyeah@hotmail.com>
wrote:

> Dear Gurus,
>
> I just had another test and I think I'd found the solution to the bug.
> The issue is the type conversion in the file FindInventoryEventPlan.groovy.
>
> The original code below
> // set the page parameters
> viewIndex = Integer.valueOf(parameters.VIEW_INDEX  ?: 0)
> viewSize = parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyAsInteger("widget",
> "widget.form.defaultViewSize", 20)
> listSize = 0
> if (inventoryList)
>     listSize = inventoryList.size()
>
> lowIndex = viewIndex * viewSize
> highIndex = (viewIndex + 1) * viewSize
>
> Shall be changed to
> // set the page parameters
> viewIndex = Integer.valueOf(parameters.VIEW_INDEX  ?: 0)
> viewSize = Integer.valueOf(parameters.VIEW_SIZE ?: EntityUtilProperties.getPropertyAsInteger("widget",
> "widget.form.defaultViewSize", 20))
> listSize = 0
> if (inventoryList)
>     listSize = inventoryList.size()
>
> lowIndex = viewIndex * viewSize
> highIndex = (viewIndex + 1) * viewSize
>
> Then the issue would be solved.
>
> After testing it, it works like charms.
> I think it shall be updated in next release.
> HIH.
>
> B.R.
> Schumann
>
> -----邮件原件-----
> 发件人: Schumann Ye <Schumannyeah@hotmail.com>
> 发送时间: 2018年5月3日 22:31
> 收件人: user@ofbiz.apache.org
> 主题: 答复: Manufacturing Component - MRP FindInventoryEventPlan Error
>
> Dear Gurus,
>
> Here below are the full text of the error description.
> It looks like that there is a type error existing for
> java.lang.Integer.multiply() function when the returning results are more
> than 20 (default value defined in widget.properties).
>
> 2018-05-03 22:23:57,096 |http-nio-443-exec-4  |ScriptUtil
>   |W| Error running script at location [component://manufacturing/
> groovyScripts/mrp/FindInventoryEventPlan.groovy]: gro
> ng.MissingMethodException: No signature of method:
> java.lang.Integer.multiply() is applicable for argument types:
> (java.lang.String) values: [20] Possible solutions:
> multiply(java.lang.Number), multiply(java.lang.Character)
> groovy.lang.MissingMethodException: No signature of method:
> java.lang.Integer.multiply() is applicable for argument types:
> (java.lang.String) values: [20] Possible solutions:
> multiply(java.lang.Number), multiply(java.lang.Character)
>         at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
> ~[groovy-all-2.4.5.jar:2.4.5]
>         at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.
> call(PojoMetaClassSite.java:49) ~[groovy-all-2.4.5.jar:2.4.5]
>         at org.codehaus.groovy.runtime.callsite.CallSiteArray.
> defaultCall(CallSiteArray.java:48) ~[groovy-all-2.4.5.jar:2.4.5]
>         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.
> call(AbstractCallSite.java:113) ~[groovy-all-2.4.5.jar:2.4.5]
>         at org.codehaus.groovy.runtime.callsite.AbstractCallSite.
> call(AbstractCallSite.java:125) ~[groovy-all-2.4.5.jar:2.4.5]
>         at FindInventoryEventPlan.run(FindInventoryEventPlan.groovy:77)
> ~[?:?]
>         at org.apache.ofbiz.base.util.GroovyUtil.runScriptAtLocation(GroovyUtil.java:204)
> ~[ofbiz.jar:?]
>         at org.apache.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:342)
> [ofbiz.jar:?]
>         at org.apache.ofbiz.base.util.ScriptUtil.executeScript(ScriptUtil.java:324)
> [ofbiz.jar:?]
>         at org.apache.ofbiz.widget.model.AbstractModelAction$Script.
> runAction(AbstractModelAction.java:633) [ofbiz.jar:?]
>         at org.apache.ofbiz.widget.model.AbstractModelAction.
> runSubActions(AbstractModelAction.java:142) [ofbiz.jar:?]
>         at org.apache.ofbiz.widget.model.ModelScreenWidget$Section.
> renderWidgetString(ModelScreenWidget.java:273) [ofbiz.jar:?]
>         at org.apache.ofbiz.widget.model.ModelScreen.renderScreenString(ModelScreen.java:164)
> [ofbiz.jar:?]
>         at org.apache.ofbiz.widget.renderer.ScreenRenderer.
> render(ScreenRenderer.java:136) [ofbiz.jar:?]
>         at org.apache.ofbiz.widget.renderer.ScreenRenderer.render(ScreenRenderer.java:98)
> [ofbiz.jar:?]
>         at org.apache.ofbiz.widget.renderer.macro.
> MacroScreenViewHandler.render(MacroScreenViewHandler.java:157)
> [ofbiz.jar:?]
>         at org.apache.ofbiz.webapp.control.RequestHandler.
> renderView(RequestHandler.java:984) [ofbiz.jar:?]
>         at org.apache.ofbiz.webapp.control.RequestHandler.
> doRequest(RequestHandler.java:648) [ofbiz.jar:?]
>         at org.apache.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:210)
> [ofbiz.jar:?]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
> [javax.servlet-api-3.1.0.jar:3.1.0]
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> [javax.servlet-api-3.1.0.jar:3.1.0]
>         at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:292)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> [tomcat-embed-websocket-8.0.39.jar:8.0.39]
>         at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:240)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.ofbiz.webapp.control.ContextFilter.
> doFilter(ContextFilter.java:196) [ofbiz.jar:?]
>         at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:240)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.ofbiz.webapp.control.ControlFilter.
> doFilter(ControlFilter.java:156) [ofbiz.jar:?]
>         at org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:240)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:207) [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:94)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.valves.AbstractAccessLogValve.invoke(
> AbstractAccessLogValve.java:620) [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:502)
> [tomcat-catalina-8.0.42.jar:8.0.42]
>         at org.apache.coyote.http11.AbstractHttp11Processor.process(
> AbstractHttp11Processor.java:1104) [tomcat-coyote-8.0.42.jar:8.0.42]
>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.
> process(AbstractProtocol.java:684) [tomcat-coyote-8.0.42.jar:8.0.42]
>         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1519)
> [tomcat-coyote-8.0.42.jar:8.0.42]
>         at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1475)
> [tomcat-coyote-8.0.42.jar:8.0.42]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> [?:1.8.0_131]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> [?:1.8.0_131]
>         at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> [tomcat-util-8.0.42.jar:8.0.42]
>         at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
>
> B.R.
> Schumann
>
> -----邮件原件-----
> 发件人: Schumann Ye <Schumannyeah@hotmail.com>
> 发送时间: 2018年5月3日 21:38
> 收件人: user@ofbiz.apache.org
> 主题: Manufacturing Component - MRP FindInventoryEventPlan Error
>
> Dear Guru,
>
> I had encountered another issue in Manufacturing component, for which I
> had created a JIRA note OFBIZ-10392.
> Brief info as follows:
>
> After MRP run, in the screen of "Find Inventory Event Planned", the proper
> results show up after clicking the "Find" button with a certain "From Date"
> and leaving the "Product ID" empty.
>
> Because there are more than 20 records (which exceeds the default viewSize
> 20, as defined in the widget.properties), so there are more than 1 page.
> When I hit "Next", it shows me the following error:
> Because I am new to groovy, can anyone pls help me out?
> Thanks
>
>
>
> :ERROR MESSAGE:
>
> org.apache.ofbiz.widget.renderer.ScreenRenderException: Error rendering
> screen component://manufacturing/widget/manufacturing/MrpScreens.xml#
> FindMrpPlannedEvents<https://issues.apache.org/jira/browse/
> OFBIZ-10392?filter=-2>: java.lang.IllegalArgumentException: Error running
> script at location [component://manufacturing/groovyScripts/mrp/
> FindInventoryEventPlan.groovy]: groovy.lang.MissingMethodException: No
> signature of method: java.lang.Integer.multiply() is applicable for
> argument types: (java.lang.String) values: [20] Possible solutions:
> multiply(java.lang.Number), multiply(java.lang.Character) (Error running
> script at location [component://manufacturing/groovyScripts/mrp/
> FindInventoryEventPlan.groovy]: groovy.lang.MissingMethodException: No
> signature of method: java.lang.Integer.multiply() is applicable for
> argument types: (java.lang.String) values: [20] Possible solutions:
> multiply(java.lang.Number), multiply(java.lang.Character))
>
> Thanks
> Best Regards
>
> Schumann
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message