This is not a complete solution and induces more problem than it solves (notably in RuntimeData for jobs), to be continued...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1331996 13f79535-47bb-0310-9956-ffa450edef68
view was previously joined to another view, the conditions on the inner
view were added to the outer-most WHERE clause. This caused multiple
problems. One, if the join was optional, the generated sql actually made
it required(because it was in the WHERE, and not in the ON clause).
Second, the outer WHERE may reference a field that was not available *at
all* in the generated nested select(view table).
The fix is to *not* recurse thru all view member entities when finding
conditions, and instead attach them to a new WHERE clause on the
generated inner SELECT(view table).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327735 13f79535-47bb-0310-9956-ffa450edef68
If someone wants to change the admin password or port, he would have to change currently many files (-- build.xml, various .bat and .sh --). In order to avoid this error-prone pratice, I suggest to centralize the definition of the admin kay and port at 2 single points: the framework/start/src/org/ofbiz/base/start/start.properties and the
framework/start/src/org/ofbiz/base/start/jetty.properties
jleroux: in config.java I also changed
String adminPortStr = getProp(props, "ofbiz.admin.port", "0");
adminKey = getProp(props, "ofbiz.admin.key", "NA");
to
String adminPortStr = getProp(props, "ofbiz.admin.port", "10523");
adminKey = getProp(props, "ofbiz.admin.key", "so3du5kasd5dn");
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324989 13f79535-47bb-0310-9956-ffa450edef68
In order to run OFBiz in debug mode under Eclipse with hot class reloading, one needs to add the following Converters to the services framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader because they are added at build time by the build.xml of the framework. Thus, they are missing when running OFBiz as an full Eclipse debug launcher.
org.ofbiz.base.conversion.BooleanConverters
org.ofbiz.base.conversion.CollectionConverters
org.ofbiz.base.conversion.DateTimeConverters
org.ofbiz.base.conversion.JSONConverters
org.ofbiz.base.conversion.MiscConverters
org.ofbiz.base.conversion.NetConverters
org.ofbiz.base.conversion.NumberConverters
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308085 13f79535-47bb-0310-9956-ffa450edef68
In the last weeks the XML Serializer in trunk was extended to support BigDecimal. Unfortunately deserializing is not supported, which leads to services being broken when running via async as their are persisted in runtime_data... like sending mails, when a bigdecimal is involved
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1302324 13f79535-47bb-0310-9956-ffa450edef68
* null values in Map
* BigDecimal
* correctly TimeStamp format (we use xsd:dateTime in ModelService.getTypes())
So CXF was not able to unmarshall a List of Maps with those types in them.
It does not introduce any regressions:
* A new specific SOAP null type is introduced using ("nillable","true") and ("xsi:nil","true) attributes. I had also to set the http://www.w3.org/2001/XMLSchema-instance schema on the null node. Because it was impossible to add it in the envelope header, not a big deal anyway.
* I introduced a 'T' in the TimeStamp format. It's is OK, the deserialisation handles it well (we use xsd:dateTime, see http://www.w3.org/TR/xmlschema-2/#dateTime)/. We don't handle TimeZone...
* BigDecimal was missing and is now correctly handled. I used 10 decimals and half up rounding (ROUND_HALF_UP)
Also improves the SOAPEventHandler.sendError() method by passing the serviceName in the message
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1243026 13f79535-47bb-0310-9956-ffa450edef68
- by default leave the values in the entity null
- use findOne method to get SystemProperty by primary key
- add check whether system property's value empty before using properties file
This change to make sure current users of a non tenant installation are not affected.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1239451 13f79535-47bb-0310-9956-ffa450edef68
About the issue I got. I simply forgot to update my XML catalogs after having changed the OFBiz working copy reference name.
Thanks to Paul Piper for his help about this last point, by pointing about XSD reference.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1234014 13f79535-47bb-0310-9956-ffa450edef68
debugResources is true which creates a DebugXAResource (that creates an Exception) , it should be false and made an option for debuging
jleroux: see comments in Jira 4282 for more
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1226234 13f79535-47bb-0310-9956-ffa450edef68
InternalBegin is uselessly synchronized , since it is a static method it is a very big useless Contention Point since not unthread safe instance variable is used
jleroux: see comments in Jira 4282 for more
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1226231 13f79535-47bb-0310-9956-ffa450edef68
I followed Adrian's advice. I tried to create an order with a dropship1 item (like in Jira 4637) and it worked perfectly. I guess, as we were suspecting, using
set(name, "");
instead of
element.setAttribute(name, "null");
had side effects.
Anyway, as Adrian pointed out, the right returned string should be "[null-field]" and it's now correct/consistent. On the other side (entity sync clients), of course, now "[null-field]" should be handled instead of "" or "null"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1226055 13f79535-47bb-0310-9956-ffa450edef68
In order to send over http the values to create, store and remove, Ofbiz is Xml serializing the values. GenericValue xml serialization is managed in GenericEntity.makeXmlElement, unfortunately this method just don't serialized null valued fields.
To solve this issue, I managed null value the same way GenericEntity.setString (which is used for the Xml deserializing). I only managed until case 10, because i'm not sure the setString for the cases 11 to 15 are well managed (not taking care of null value)
jleroux: After looking at GenericEntity.setString and initial commit (http://svn.ofbiz.org/viewcvs?rev=7779&view=rev) I see no reasons to not handling cases under 10 the same way. So I added these cases as well using fall through.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1222241 13f79535-47bb-0310-9956-ffa450edef68
When uploading binary files (eg. image/audio/video) to the database, ofbiz throws a type casting exception because it is trying to type cast HeapByteBuffer to byte[].
I think the problem stems from configuring ofbiz to use java.nio.ByteBuffer and its subclass java.nio.HeapByteBuffer to contain uploaded binary data but no accommodation is made in the code to work with this type of object.
To test this, you need to set content.properties/content.upload.always.local.file=false
an use partymgr/control/viewprofile?partyId=admin and upload an image file.
java.nio.HeapByteBuffer comes from java's rt.jar (make sure your classpath includes this)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1214124 13f79535-47bb-0310-9956-ffa450edef68
Since the relFieldName of ViewConditionExpr object can never be null, so correct comparison "this.relFieldName == null" to "UtilValidate.isEmpty(this.relFieldName)".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1195042 13f79535-47bb-0310-9956-ffa450edef68
ShoppingCart.java: a tabs has been automatically replaced by 8 spaces, fixes it
UtilValidate.java: removes useless parentheses
GeneriDao.java: fixes a wrong UtilValidate.isNotEmpty
ModelFormField.java: revert all UtilValidate.is(Not)Empty() changes though I ddid not find an error there, it must be one because https://localhost:8443/humanres/control/EditResponsibilityTypes is not rendered correctly. I will check again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169754 13f79535-47bb-0310-9956-ffa450edef68
Changes implementation of UtilValidate.isEmpty() for Collection and Map by using isEmpty() instead of c.size() == 0). It's more clear and as efficient. Removes also useless parentheses there.
Makes use of UtilValidate.is(Not)Empty() everywhere it makes senses. This for 2 reasons:
* Make the code more readable by replacing the (!)null/isEmpty pattern.
* Avoid possible NPEs when only isEmpty() was used (after Entity.find... for instance). I found a lot of cases (242 today) where isEmpty() could perhaps be replaced in Framework. But I guess no NPE checks were missing there and anyway it was too much for me to check them all... So I only did the relevant changes in Applications...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1169478 13f79535-47bb-0310-9956-ffa450edef68
Pb: If OFBiz is deployed on 2 servers in Load Balancing Mode, SequenceUtil will generate duplicate IDs because synchronization is done at JVM level instead of doing it in DB.
The OFBIZ-2353 SELECT FOR UPDATE solution.patch provides a simple mean to quickly resolve this issue. I did not remove the bank loop (useless since there is a DB contention).
I created a cluster general property. But since, most of the time, when you use a cluster you use also a sole database with a delegator having distributed-cache-clear-enabled set to true, I retrieve this information to automatically use SELECT FOR UPDATE in this case
This has been tested on a cluster with JMeter. BTW I found that UserLoginHistory can throw errors because it does not use a SeqId in PK but only login+fromDate. I guess there are other cases like that but in reality it's unlikely that someone log on 2 diff machines with the same login at the same time (ms), just a JMeter side effect...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1144537 13f79535-47bb-0310-9956-ffa450edef68
transaction timeout to be specified, and deprecate the old ones.
Additionally, the Callable now comes first, as that is groovy
compatible.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1141283 13f79535-47bb-0310-9956-ffa450edef68
that calling code can pass the reconstructed objects directly to
Executor instances.
As a nice side effect, these classes show up in exceptions, so you can
know a bit more about the transaction nature of the call stack.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1141282 13f79535-47bb-0310-9956-ffa450edef68