Thanks Martin & Dimitri for your effort.
Orig. Msg.:
The Perl5Matcher Perl5Compiler are not thread safe, as mentioned in their documentation: http://jakarta.apache.org/oro/api/org/apache/oro/text/regex/Perl5Compiler.html
A separate instance should be used per thread.
The concrete issue occurred in our system in the createCommContentDataResource service. The service tries to save emails to the database after they have been sent. It failed because of the described issue. This caused the whole email service (sendMailFromScreen) to be rescheduled. So customers got emails twice.
The Perl5Matcher and Perl5Compiler instances are assigned to static fields in the org.ofbiz.minilang.method.ifops.IfRegexp class. So every thread will use the same instance. No synchronization is done currently. Changing the fields to be non-static will not work either, as SimpleMethods are cached. So all calls to the same simple method use the same IfRegexp instance.
We fixed the problem by moving the instantiation of the Perl5Matcher and Perl5Compiler to the exec() method in IfRegexp.
Other classes are most likely affected, too: org.ofbiz.entity.condition.EntityComparisonOperator, org.ofbiz.minilang.method.conditional.RegexpCondition, org.ofbiz.minilang.operation.Regexp, org.ofbiz.widget.menu.ModelMenuCondition$IfRegexp, org.ofbiz.widget.screen.ModelScreenCondition$IfRegexp, org.ofbiz.widget.tree.ModelTreeCondition$IfRegexp
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1075322 13f79535-47bb-0310-9956-ffa450edef68
Orig. Msg.:
Improvement of UtilProperties.java with a new method which returns the Number as an Object of the specified property name from the specified resource/properties file.
If the specified property name or properties file is not found, the defaultObject is returned.
i did update my method "getPropertyNumber" a bit and
as requested i added "getPropertyAsInteger / asLong / AsFloat / AsDouble / AsBigInteger / AsBigDecimal".
In addition i added a "getPropertyAsBoolean".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1073113 13f79535-47bb-0310-9956-ffa450edef68
* Adds a bunch of external SOAP services, none of them work so far, not sure why, a good exercise for the future...
I have tried to backport to R9.04 the testRemoteSoap change but it does not work there:
2011-02-19 17:26:02,500 (http-0.0.0.0-8443-1) [ Call.java:2469:ERROR] Exception:
org.xml.sax.SAXException: Deserializing parameter 'map-Map': could not find deserializer for type {http://www.w3.org/2001/XMLSchema}anyType
at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
at org.apache.axis.client.Call.invoke(Call.java:2467)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.ofbiz.service.engine.SOAPClientEngine.serviceInvoker(SOAPClientEngine.java:137)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1072378 13f79535-47bb-0310-9956-ffa450edef68
UtilValidate.isYear returns true for a blank year which the calling function UtilValidate.isDate(String, String, String) tries to parse. This causes an exception to be thrown
ValidateMethod.java:96 :ERROR] [ValidateMethod.exec] Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null
I found this error when trying to add a new credit card in the eCommerce checkout flow.
1. Add a product to the cart
2. login as any user I used "admin"
3. Checkout Step "Shipping Address" (Step 1: Where shall we ship it?)
* Click Next
4. Checkout Step "Shipping Options" (Step 2: How shall we ship it?)
* Choose "UPS Air"
* Click Next
5. Checkout Step "Payment Options" (Step 3: How shall you pay?)
6. Create "Credit Card"
* Fill Name
* Card Type "Visa"
* Card Number "4111111111111111"
* Expiration Date Month drop-down 01
* Expiration Date Year drop-down leave blank
* Choose billing address
* Click "Save" button
Should see "Error in validation method isDateAfterToday of class org.ofbiz.base.util.UtilValidate: null"
My fix is to change isYear, isMonth, and isDay to return false when a blank value is entered.
After I make my change the message is "The expiration date is before today"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1070230 13f79535-47bb-0310-9956-ffa450edef68
A Groovysh container to connect to. Just do a 'telnet localhost 9991' and you have a fully fledged groovysh.
This is a Groovy equivalent to the already existing BeanShell container.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1062476 13f79535-47bb-0310-9956-ffa450edef68
<field name="someTimeStamp">
<display description="${date:localizedDateTimeStr(someTimeStamp, timeZone, locale)}"/>
</field>
will display the date/time according to the user's locale, instead of yyyy-mm-dd hh:mm:ss.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1054211 13f79535-47bb-0310-9956-ffa450edef68
A jquery.ui.datepicker i18n file is missing for the language.country couple you want. Simply add it there: [" + baseLocation + "]. Else anyway the 'en' default will be used", module)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1052494 13f79535-47bb-0310-9956-ffa450edef68
We don't care for missing jquery.ui.datepicker i18n files, since "en" as default is handled internally. If people want a missing translation they have to add the file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1052492 13f79535-47bb-0310-9956-ffa450edef68