Commit Graph
811 Commits
Author SHA1 Message Date
Adrian Crum d66f311eb7 Updated all Mini-language xml files to use the new schema.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328827 13f79535-47bb-0310-9956-ffa450edef68
2012-04-22 09:18:24 +00:00
Adam Heath 731a0d461f FEATURE/FIX: <entity-condition> on views are now done correctly. When a
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
2012-04-18 23:48:40 +00:00
Adam Heath c029432953 FEATURE: Remove synchronization on UtilCache access in
ModelFieldTypeReader.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327734 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 23:48:33 +00:00
Adam Heath 96b4df930a FIX/FEATURE: When connecting views to their real entities, do a dependency sort, so
that a view that references another view is configured after it's
dependencies.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327733 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 23:48:26 +00:00
Adam Heath e5c44753c3 FEATURE: Remove synchronization on entity caching; this requires the
non-blocking features I added to UtilCache; without them, you'll get
internal map corruption.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327732 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 23:48:20 +00:00
Jacques Le Roux 8f45278325 Reverting to 2 changes which slipped in at r1324989 (WIP...)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324995 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 20:48:56 +00:00
Jacques Le Roux c79283dbfc A patch from Francis ANDRE "unify admin port and key setting: single point of definition in start.properties" https://issues.apache.org/jira/browse/OFBIZ-4793
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
2012-04-11 20:32:35 +00:00
Jacopo Cappellato 9f817fcd64 Upgrade DBCP from snapshot version of 1.3 to the new release 1.4
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1324685 13f79535-47bb-0310-9956-ffa450edef68
2012-04-11 10:24:18 +00:00
Jacques Le Roux 8baaab2b1a A patch from Francis ANDRE "Add missing ConverterLoader to framework/entity/src/META-INF/services/org.ofbiz.base.conversion.ConverterLoader for running FOBiz in debug under Eclipse https://issues.apache.org/jira/browse/OFBIZ-4777
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
2012-04-01 11:39:34 +00:00
Jacques Le Roux 024a070743 A change from Alexander Reelsen "Xml Deserializer does not support BigDecimal" https://issues.apache.org/jira/browse/OFBIZ-4733
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
2012-03-19 08:48:03 +00:00
Hans Bakker 12326f72c1 OFBIZ-4729: defaultValue in EntityUtilProperties.getPropertyValue(String resource, String name, String defaultValue, Delegator delegator) method is forgotten. contributed by Leon
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300815 13f79535-47bb-0310-9956-ffa450edef68
2012-03-15 06:15:22 +00:00
David E. Jones d9ff4288bf Fixed bug when there is a view-entity having-condition and no having condition passed to the find method
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300747 13f79535-47bb-0310-9956-ffa450edef68
2012-03-14 21:58:37 +00:00
Hans Bakker 859f1c91df OFBIZ-4698: the price service check the currency.uom.id.default property from a system propery. Thanks Chattree for the contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1245324 13f79535-47bb-0310-9956-ffa450edef68
2012-02-17 06:13:28 +00:00
Jacques Le Roux bb56ad6049 OFBiz SOAP implementation was not handling
* 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
2012-02-11 10:50:56 +00:00
Hans Bakker 9de0762a42 make it possible that the applicable system settings in general properties can be overridded by settings in the database.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1240016 13f79535-47bb-0310-9956-ffa450edef68
2012-02-03 07:17:00 +00:00
Hans Bakker 57d7af2a63 update of system properties via entity:
- 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
2012-02-02 03:02:55 +00:00
Hans Bakker c690a5aba5 some missing files in -r1238993
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1238998 13f79535-47bb-0310-9956-ffa450edef68
2012-02-01 08:24:36 +00:00
Hans Bakker cc8c924b89 make <property-to-field/> in minilanguage first look in the newly created SystemProperty entity to be able to override the system properties defined in the properties files
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1238993 13f79535-47bb-0310-9956-ffa450edef68
2012-02-01 08:14:53 +00:00
Hans Bakker f484f7b9d0 revert r1238954 some local changes were added
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1238991 13f79535-47bb-0310-9956-ffa450edef68
2012-02-01 08:13:21 +00:00
Hans Bakker 204b9eb01a Wrong commit reverted in r1238991
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1238954 13f79535-47bb-0310-9956-ffa450edef68
2012-02-01 07:22:12 +00:00
Jacques Le Roux a79e90da46 Closes OFBIZ-4663 ERROR in log file when starting OFBiz, debug-xa-resources is commented in entityengine.xml
Oops... forgot the other files in previous commit

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1234015 13f79535-47bb-0310-9956-ffa450edef68
2012-01-20 17:21:41 +00:00
Jacques Le Roux 9d2a060d23 Closes OFBIZ-4663 ERROR in log file when starting OFBiz, debug-xa-resources is commented in entityengine.xml
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
2012-01-20 17:19:47 +00:00
Adrian Crum 13c5b28a17 Fixed a bug in GenericEntity.java where warnings were logged when the value came from a view entity and it tried to generate a property key for localization.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1231584 13f79535-47bb-0310-9956-ffa450edef68
2012-01-14 20:57:25 +00:00
Jacques Le Roux f02692f632 A patch from Philippe Mouawad "Set TransactionUtil#debugResources default value to false and make it configurable" https://issues.apache.org/jira/browse/OFBIZ-4293
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
2012-01-01 11:27:10 +00:00
Jacques Le Roux e5566e66cd A patch from Philippe Mouawad "Remove Synchronized in internalBegin" https://issues.apache.org/jira/browse/OFBIZ-4292
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
2012-01-01 10:50:27 +00:00
Jacques Le Roux 7f9eaa2793 This completes "Null values are not synchronized in http mode" https://issues.apache.org/jira/browse/OFBIZ-4602
And I better understand Patrick's answer to the issue now...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1226065 13f79535-47bb-0310-9956-ffa450edef68
2011-12-31 11:37:23 +00:00
Jacques Le Roux 7ee4d9c8ec Should close "Null values are not synchronized in http mode" https://issues.apache.org/jira/browse/OFBIZ-4602
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
2011-12-31 10:13:34 +00:00
Jacques Le Roux 96bf9e337e This reverts r1222241 and should fix "Can not create drop shipment order" https://issues.apache.org/jira/browse/OFBIZ-4637 reported by Sergei Biletnikov and confirmed by mz4wheeler
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1225506 13f79535-47bb-0310-9956-ffa450edef68
2011-12-29 12:28:54 +00:00
Jacques Le Roux 456eb16137 A modified patch from Patrick Antivackis "Null values are not synchronized in http mode" https://issues.apache.org/jira/browse/OFBIZ-4602
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
2011-12-22 14:14:57 +00:00
Jacques Le Roux 046deacbe0 A patch from Wai https://issues.apache.org/jira/browse/OFBIZ-4620 "fail uploading audio/video files to database"
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
2011-12-14 09:18:04 +00:00
Erwan de Ferrieres 4162e44a47 A patch from Youssef Khaye - OFBIZ-4573 - complex-alias does not allow to do (discountPercent * 100) as stated in xsd
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1205156 13f79535-47bb-0310-9956-ffa450edef68
2011-11-22 20:41:14 +00:00
Adrian Crum 0e9a239c4f View entity bug fix provided by Anne Jessel - https://issues.apache.org/jira/browse/OFBIZ-4393.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1201232 13f79535-47bb-0310-9956-ffa450edef68
2011-11-12 09:41:56 +00:00
Erwan de Ferrieres 06e76fec52 Upgrading to latest derby version, release note here: http://db.apache.org/derby/releases/release-10.8.2.2.cgi
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1195187 13f79535-47bb-0310-9956-ffa450edef68
2011-10-30 16:10:37 +00:00
Jacques Le Roux c5b1d6ab09 A patch from Leon "trivial update to ModelViewEntity.java" https://issues.apache.org/jira/browse/OFBIZ-4523
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
2011-10-29 21:18:58 +00:00
Hans Bakker d3b0d26077 change info message to verbose
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1185031 13f79535-47bb-0310-9956-ffa450edef68
2011-10-17 07:37:21 +00:00
Sascha Rodekamp 5e41d63234 FIX: A patch from Leon which fixes the dependent State dropdown https://issues.apache.org/jira/browse/OFBIZ-4349
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1179943 13f79535-47bb-0310-9956-ffa450edef68
2011-10-07 06:25:06 +00:00
Jacques Le Roux 69d65781ea A patch from Dimitri Unruh "With no DistributionCacheClear JMS is not working anymore." https://issues.apache.org/jira/browse/OFBIZ-4296
Tested in both case (with and w/out dcc), works fine AFAICT

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1174964 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 19:22:40 +00:00
Erwan de Ferrieres ca8143f679 Resolving OFBIZ-4349 - commit r1077940 breaks the function to retrieve i18n translation from real entity underlying a view
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1174308 13f79535-47bb-0310-9956-ffa450edef68
2011-09-22 18:36:25 +00:00
Hans Bakker cea83127a0 correcting the ordering of loading the data for tenants
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1173994 13f79535-47bb-0310-9956-ffa450edef68
2011-09-22 08:28:59 +00:00
Hans Bakker b64da95ceb add 2 new tenant ant commands to load seed/demo data for a specific tenant only: './ant run-install-tenant -DtenantId' and './ant run-install-tenant-all' for all tenants in the tenant enttity
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1172989 13f79535-47bb-0310-9956-ffa450edef68
2011-09-20 06:23:02 +00:00
Sascha Rodekamp 46b29a9911 IMPROVEMENT: Replace String concatenation in a loop (https://issues.apache.org/jira/browse/OFBIZ-4418) A patch from Dimitri Unruh.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170961 13f79535-47bb-0310-9956-ffa450edef68
2011-09-15 06:04:29 +00:00
Sascha Rodekamp 16607bb1ac UPDATE: Some improvements with Map iterations (https://issues.apache.org/jira/browse/OFBIZ-4415) A patch from Dimitri Unruh which improves some Map Iterations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170525 13f79535-47bb-0310-9956-ffa450edef68
2011-09-14 10:52:01 +00:00
Jacques Le Roux e497883d62 VCard.java: replaec an UtilValidate.isNotEmpty() by a simple isEmpty()
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
2011-09-12 14:13:17 +00:00
Jacques Le Roux 2b712efb98 No functional changes, simple code refactoring around UtilValidate.is(Not)Empty()
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
2011-09-11 17:06:11 +00:00
Jacques Le Roux 43aa95aaa3 Closes "SequenceUtil may generate duplicate IDs in Load Balancing mode" https://issues.apache.org/jira/browse/OFBIZ-2353
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
2011-07-08 22:58:35 +00:00
Adam Heath 7109b6c2f0 FEATURE: Do GenericHelper initialization in parallel.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1141314 13f79535-47bb-0310-9956-ffa450edef68
2011-06-29 23:09:39 +00:00
Adam Heath bce471c3a1 FEATURE: Add some doFooTransaction variants, that allow for the
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
2011-06-29 22:12:02 +00:00
Adam Heath 4bfcf340d2 FEATURE: Reworked Callable helper methods to support wrapping/proxying, so
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
2011-06-29 22:11:54 +00:00
Adam Heath 8c90616645 OPTIMIZE: Move the group helper initialization code out of the loop and
into a separate method.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1141277 13f79535-47bb-0310-9956-ffa450edef68
2011-06-29 22:11:25 +00:00
Adam Heath 6676048162 WHITESPACE: Do a bunch of whitespace transformative operations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1141276 13f79535-47bb-0310-9956-ffa450edef68
2011-06-29 22:11:20 +00:00