ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Le Roux (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-10211) Crash while confirming a demand
Date Fri, 09 Feb 2018 11:16:00 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-10211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16358272#comment-16358272
] 

Jacques Le Roux commented on OFBIZ-10211:
-----------------------------------------

Thanks Siegfried for report,

You did not need to provide the PDF, it was easy to reproduce w/o it, w/ only the URL, but
thanks.

I thought that by adding
{code}
Index: applications/order/groovyScripts/requirement/SelectCreatedProposed.groovy
===================================================================
--- applications/order/groovyScripts/requirement/SelectCreatedProposed.groovy	(révision 1823622)
+++ applications/order/groovyScripts/requirement/SelectCreatedProposed.groovy	(copie de travail)
@@ -19,8 +19,17 @@
 
 import org.apache.ofbiz.entity.condition.EntityCondition
 import org.apache.ofbiz.entity.condition.EntityOperator
+import org.apache.ofbiz.base.util.Debug
 
-prepare = runService('prepareFind', [inputFields : parameters, entityName : "Requirement"])
+try {
+    prepare = runService('prepareFind', [inputFields : parameters, entityName : "Requirement"])
+} catch (Exception e) {
+    errMsg = "Caught an exception, please check the data entered : " + e.toString()
+    request.setAttribute("_ERROR_MESSAGE", errMsg)
+    return
+}
+
+
 statusCondition = EntityCondition.makeCondition([
                                               EntityCondition.makeCondition("statusId", EntityOperator.EQUALS,
"REQ_CREATED"),
                                               EntityCondition.makeCondition("statusId", EntityOperator.EQUALS,
"REQ_PROPOSED")],
{code}
It would be OK but I got this and don't want to pass too much time on that

{code}
2018-02-09 12:04:40,607 |jsse-nio-8443-exec-2 |ScreenFactory                 |I| Got 13 screens
in 0.02s from: file:/C:/projectsASF/ofbiz/applications/order/widget/ordermgr/RequirementScreens.xml
2018-02-09 12:04:40,733 |jsse-nio-8443-exec-2 |ObjectType                    |W| Exception
thrown while converting type:
org.apache.ofbiz.base.conversion.ConversionException: java.text.ParseException: Unparseable
date: "50 00:00:00.000"
    at org.apache.ofbiz.base.conversion.DateTimeConverters$StringToTimestamp.convert(DateTimeConverters.java:671)
~[ofbiz.jar:?]
   at org.apache.ofbiz.base.conversion.DateTimeConverters$StringToTimestamp.convert(DateTimeConverters.java:618)
~[ofbiz.jar:?]
   at org.apache.ofbiz.base.util.ObjectType.simpleTypeConvert(ObjectType.java:557) [ofbiz.jar:?]
  at org.apache.ofbiz.entity.model.ModelEntity.convertFieldValue(ModelEntity.java:1406) [ofbiz.jar:?]
    at org.apache.ofbiz.entity.model.ModelEntity.convertFieldValue(ModelEntity.java:1393)
[ofbiz.jar:?]
    at org.apache.ofbiz.common.FindServices.createSingleCondition(FindServices.java:344) [ofbiz.jar:?]
     at org.apache.ofbiz.common.FindServices.createConditionList(FindServices.java:275) [ofbiz.jar:?]
       at org.apache.ofbiz.common.FindServices.prepareFind(FindServices.java:579) [ofbiz.jar:?]
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_112]
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_112]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[?:1.8.0_112]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_112]
     at org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:100)
[ofbiz.jar:?]
        at org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
[ofbiz.jar:?]
        at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:400)
[ofbiz.jar:?]
        at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:228)
[ofbiz.jar:?]
        at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
[ofbiz.jar:?]
 at org.apache.ofbiz.service.LocalDispatcher$runSync$0.call(Unknown Source) [ofbiz.jar:?]
       at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
[groovy-all-2.4.13.jar:2.4.13]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
[groovy-all-2.4.13.jar:2.4.13]
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
[groovy-all-2.4.13.jar:2.4.13]
        at org.apache.ofbiz.service.engine.GroovyBaseScript.runService(GroovyBaseScript.groovy:48)
[script:?]
  at org.apache.ofbiz.service.engine.GroovyBaseScript$runService.callCurrent(Unknown Source)
[script:?]
  at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
[groovy-all-2.4.13.jar:2.4.13]
 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
[groovy-all-2.4.13.jar:2.4.13]
 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174)
[groovy-all-2.4.13.jar:2.4.13]
 at SelectCreatedProposed.run(SelectCreatedProposed.groovy:25) [script:?]
{code}

{color:red}Technical note: this pattern also exits in ApprovedProductRequirements.groovy and
FindLookUp.groovy (later should not be concerned){color}

> Crash while confirming a demand 
> --------------------------------
>
>                 Key: OFBIZ-10211
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10211
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ALL APPLICATIONS
>    Affects Versions: 16.11.04
>            Reporter: Siegfried Theobald
>            Assignee: Jacques Le Roux
>            Priority: Major
>         Attachments: order_management.pdf
>
>
> After entering the wrong data format, the programm crashed.
> See attached screenshots



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message