Commit Graph
8446 Commits
Author SHA1 Message Date
Jacques Le Roux e90be02370 Fixes "ExampleCompoundWidgets throws errors" - https://issues.apache.org/jira/browse/OFBIZ-7023
Actually this is due to both compound-widgets.xsd and ExampleCompoundWidgets.xml errors. Both have not visible effects but in logs

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1741022 13f79535-47bb-0310-9956-ffa450edef68
2016-04-26 13:35:07 +00:00
Jacques Le Roux 3168a01d10 A patch from Swapnil M Mane for "Calling Groovy as Event generates error when delegator.find used" reported by Wai at https://issues.apache.org/jira/browse/OFBIZ-6808
We are using Groovy as event in the controller request, everything works fine for us but as we used delegator.find()
it generates the following error


ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
     [java] java.lang.Exception: Stack Trace
     [java] 	at org.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1757) [ofbiz-entity.jar:?]
     [java] 	at org.ofbiz.entity.Delegator$find.call(Unknown Source) [ofbiz-entity.jar:?]
     [java] 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [groovy-all-2.2.1.jar:2.2.1]
     [java] 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [groovy-all-2.2.1.jar:2.2.1]
     [java] 	at ProductInventory$_run_closure1.doCall(ProductInventory.groovy:18) [script:?]

Reason: 

Since we are using find method of GenericDelegator.java
As per the code implementation it required the transaction should exist 
   if (!TransactionUtil.isTransactionInPlace()) {
if not, it generate error
    ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.

-----------------------------------------------------------------------------------------------------------------------------------------------------------

Solution: initialize the transaction when the groovy is called as event and commit the transaction after the completion.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1740629 13f79535-47bb-0310-9956-ffa450edef68
2016-04-23 03:51:13 +00:00
Deepak Dixit 209b95cbbf (OFBIZ-6823) relocate .ftl files in the framework/common component
Thanks Pierre for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1740497 13f79535-47bb-0310-9956-ffa450edef68
2016-04-22 12:28:46 +00:00
Deepak Dixit cee0263cef (OFBIZ-6815) relocate .ftl files in the content component
Thanks Pierre for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1740446 13f79535-47bb-0310-9956-ffa450edef68
2016-04-22 06:12:08 +00:00
Gil Portenseigne 76dd74850f OFBIZ-5703 :
Fix a regression on <auto-parameters-entity/> and <auto-parameters-service/> in which default-entity-name and default-service-name weren't taken in consideration anymore.

Thanks Dhiraj Gupta for reporting the issue, Thanks Jacques and Divesh for the analysis

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1740415 13f79535-47bb-0310-9956-ffa450edef68
2016-04-21 21:56:52 +00:00
Jacques Le Roux a26666f7bc Updates ICU4J from version 52 to 57, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1740229 13f79535-47bb-0310-9956-ffa450edef68
2016-04-21 05:18:07 +00:00
Jacques Le Roux 6455c9382c A sightly modified patch from Wai for "ofbizsetup create product store cause exception, remove use of temp file to load entity data" - https://issues.apache.org/jira/browse/OFBIZ-5949
The exception is caused by foreign key constraint violation between ShipmentCostEstimate and  CarrierShipmentMethod entities.
Currently, when creating a new product store using ofbizsetup component default data associated with the product store is loaded into the database using the following steps.
1. read default data from entity xml file and replace specific items in the read data and write to temp file.
2. use service=parseEntityXmlFile to load the processed file into database.
The issue with this method is that the temp file can present a problem when ofbiz is operating in multitenant mode.
The solution is to modify the relevant services so that no temp file needs generated.

jleroux: I simply used an UtilValidate.isNotEmpty() method in  EntitySaxReader class

I was initially reluctant to these changes because you can no longer load the content of the GlAccountData.xml and ProductStoreData.xml files, or the files themselves, using the import XML feature of webtools. But those files are specific to the setup component, so they should not be missed, they are supposed to be used in this context only.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1740008 13f79535-47bb-0310-9956-ffa450edef68
2016-04-19 21:09:14 +00:00
Jacques Le Roux 7316ee4818 A patch from Pierre Smits for "Remove limitation regarding menu-name in ofbiz-component.xsd" https://issues.apache.org/jira/browse/OFBIZ-6667
Currently the following is in the ofbiz-component.xsd:
        <xs:attribute name="menu-name" default="main">
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="main"/>
                    <xs:enumeration value="secondary"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>

However, this is limiting the options that can be applied generates unnecessary errors when developers opt for another methodology.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1739968 13f79535-47bb-0310-9956-ffa450edef68
2016-04-19 17:56:07 +00:00
Nicolas Malin a6284ff24a Correct the fop macro library to pass test testFopMacroLibrary(). This has been possible with the issue OFBIZ-7015 Ugrade Apache Tika library, to use tika for analyse the pdf as string
related issue OFBIZ-6497

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1739553 13f79535-47bb-0310-9956-ffa450edef68
2016-04-17 08:41:03 +00:00
Nicolas Malin ab000418de Uprade the Apache Tika Library :
tika-parsers-1.7.jar -> tika-parsers-1.12.jar
    tika-core-1.7.jar -> tika-core-1.12.jar

This update induce updating of :

    pdfbox-1.8.5.jar -> pdfbox-1.8.11.jar
    jempbox-1.8.5.jar -> jempbox-1.8.11.jar
    fontbox-1.8.5.jar -> fontbox-1.8.11.jar
    commons-compress-1.9.jar -> commons-compress-1.11.jar

And pdfbox-1.8.11.jar need the introduction of :

    jce-jdk13-154.jar under MIT licence (www.bouncycastle.org)

Apache Tika is needed to test the screenfop on issue OFBIZ-6497. So I move all library from applications/content/lib/ to framework/base/lib/ to didn't create a dependency between widget and content 
Related issue OFBIZ-7015

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1739551 13f79535-47bb-0310-9956-ffa450edef68
2016-04-17 08:26:45 +00:00
Ashish Vijaywargiya e439033d32 Applied patch from jira issue - OFBIZ-7006. Cache Maintenance action links UI improvement. This is UI improvement but I think we can also consider it as UI bug because link in present scenario creates issues at user end and in case of quick operations they may click on the wrong links. Thanks Rahul Bhooteshwar for creating the issue and providing the patch for the same.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1739446 13f79535-47bb-0310-9956-ffa450edef68
2016-04-16 12:20:58 +00:00
Jacques Le Roux 7b82a482e2 A combined patch from Adrian's, James Yong's and my work for "Add Support For Compound Screen Widget XML Files" - https://issues.apache.org/jira/browse/OFBIZ-4090 and "Add Example for Compound Screen Widget" - https://issues.apache.org/jira/browse/OFBIZ-6990
Adrian: This adds the ability to include screen widgets, form widgets, menu widgets, and simple methods in a single XML file. This approach could be used in situations where the widgets share a logical grouping - so they can be kept in one place.

James: An example to test out Compound Screen Widget

jlerouxc: here are the changes and tests globally
# As James mentionned we no longer need *-v2.xsd files, I removed them from Adrian's patch
# I created a compound-widgets.xsd based on Adrian's and James Yong's previous work. From Paul Foxworthy's comment in OFBIZ-4090, I decided to name the root compound-widgets (hence the file name). I arranged its elements in another way, see below with ExampleCompoundWidgets.xml
# I slightly modified James Yong's ExampleCompoundScreenWidget.xml file and renamed it ExampleCompoundWidgets.xml. I added an "s" because there are several OFBiz widgets gathered in one place. For the modifications: I simply changed the names and arranged the elements in another way which I find better suited. I'm used to 1st create the query, then the menus, the screens and their forms. We rarely use widget-trees but it's there also. Finally the simple-method at end if any. The order is not enforced though, so everybody can use her/his own :)
# I added a French label
# I completed the widget-catalog.xml with this new entry and tested locally in Eclipse by reloading the XML catalog entries.

I hope I did not miss nor mixed things, the local instance I used is a bit overcrowded with pending changes...




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738958 13f79535-47bb-0310-9956-ffa450edef68
2016-04-13 15:38:16 +00:00
Jacques Le Roux c64517519b A slightly modified patch from Chatree Srichart for "Upgrade Tomcat to 8.0.32" https://issues.apache.org/jira/browse/OFBIZ-6915
jleroux: I simply changed the doc link in catalina ofbiz-component.xml


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738902 13f79535-47bb-0310-9956-ffa450edef68
2016-04-13 07:40:25 +00:00
Jacques Le Roux 92e56e4078 A patch from Gareth Carter for "some files set viewIndex to 1 by default rather than 0" https://issues.apache.org/jira/browse/OFBIZ-6705
Implements a PagedList object (stores list of data items, resultset size, viewSize, viewIndex, lowIndex (called startIndex) and highIndex (called endIndex), also a utils class that returns the PagedList object based on a EntityListIterator, viewSize and viewIndex. 
And implements a queryPagedList method in EntityQuery, used as an example in findOrders service Java implementation

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738900 13f79535-47bb-0310-9956-ffa450edef68
2016-04-13 07:29:11 +00:00
Jacques Le Roux 5d65e6e84b A modified patch from James Young based on a an original patch from Christoph Neuroth for "Improved CMS tree: more functionality and faster for large trees" - https://issues.apache.org/jira/browse/OFBIZ-4502
We here at [Lusini|http://www.lusini.de/] did several improvements to the CMS backend to make it more usable for large CMS installations. 

* Improved performance of CMS tree
** loading nodes dynamically using AJAX
*** Created ContentJsonEvents to handle the JSON calls
** use OFBiz entity caches
** removed duplicate execution of WebSitePublishPoint.groovy
*** removed reference from controller.xml as it is not used anywhere

* Moving nodes in CMS tree possible now using drag'n'drop
** ContentJsonEvents returns updated node attributes
** Adjusted WebSiteCMSNav.ftl to update the moved node with the data from the ajax request
** Needed to replace the jstree jQuery plugin by the current version available on the jstree website

* Made nodes deleteable
** added remove to context menu
** We did not want to delete the WebSitePathAlias entities right away, so we added a fromDate and thruDate to it. 
*** extended WebSitePathAlias entity definition: added fromDate and thruDate
*** now checking for date range everywhere when accessing path aliases
*** This also allows users to publish or unpublish contents under a certain URL automatically at some time in the future. 
** created event to "delete" a node
*** thruDate of all assocs pointing to this node are set to current timestamp
*** thruDate of WebSitePathAliases pointing to this content or any contents below are set to current timestamp
*** this way nothing is actually removed from the DB and a "undo" would be possible if necessary
** extracted context menu to variable so it can be reused for all trees

* fixed missing references to uiLabels in CMS menu bar

* Activated cookie plugin so the selected node is remembered



jleroux: I made few changes
* Use of UtilGenerics.cast() in new ContentJsonEvents.java rather than @SuppressWarnings("unchecked")
* Removal of the commented out block "Lusini: disable RTE". I see no reasons why we would not use elRTE. Notably in relation with adding errors where it's currently used in trunk demo
* I changed the line 
    var unmovableSubtrees = [false, "categoryChildren_LusiniBrowseRoot", "homeContentsRoot", "merchantContentsRoot"];
    We have no such subtrees OOTB but it's good to keep the idea, I just renamed categoryChildren_LusiniBrowseRoot to categoryChildren and put an explaining comment
* I have roughly added the labels ContentWebSiteErrors, ContentWebSiteAddNewErrors and ContentWebSiteAddError, though I have a doubt about how this works. At least it's different than on trunk demo where it seems to works better (despite having uncommented out elRTE in this commit). ALso I don't remember how to add a menu worked (if it worked).
* I checked the version of jstree we use is the same than in the original patch from Christoph Neuroth. BTW at r1559769 I tried to update jstree  to jstree 3 but gave up.
* I removed the jquery.cookie.js implemnentation and replaced link in WebSiteCMSNav.ftl. I already updted to jquery.cookie-1.4.0 at r1559769

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738588 13f79535-47bb-0310-9956-ffa450edef68
2016-04-11 14:17:30 +00:00
Deepak Dixit 5063287ddf (OFBIZ-6824) Apply slightly modified patch from jira issue, updated path for ping.ftl and showDateTime.ftl in controller.xml
============================================================
relocate .ftl files in the framework/webtools component
============================================================
Thanks  Pierre Smits for your contribution. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738581 13f79535-47bb-0310-9956-ffa450edef68
2016-04-11 12:57:45 +00:00
Nicolas Malin f81916c504 correct error when sort a localized field with the order way is present like '-field', '+field', 'field ASC', 'field DESC'
This error raise by james yong on the issue OFBIZ-6987. Thanks to him for the issue and Deepak Dixit to spot the source

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738258 13f79535-47bb-0310-9956-ffa450edef68
2016-04-08 15:16:22 +00:00
Jacques Le Roux 53ab8eebd9 A patch from Kongrath Suankaewmanee for "Error in entity reference chart for static in webtools" https://issues.apache.org/jira/browse/OFBIZ-6995
I found the error when I try to use entity reference chart for static in webtools,
https://localhost:8443/webtools/control/entityref?forstatic=true
and choose one from the list of left side and the error appear on right hand side.
It's work without error for "Enitity Packages" list but doesn't for "Entities - Alphabetical" list.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738235 13f79535-47bb-0310-9956-ffa450edef68
2016-04-08 11:54:01 +00:00
Jacques Le Roux e6193df72d Partial improvement for "Remove from trunk the deprecated code if deprecated before December 2014" https://issues.apache.org/jira/browse/OFBIZ-6273
Deletes FoScreenRenderer.java no longer used/needed

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737807 13f79535-47bb-0310-9956-ffa450edef68
2016-04-05 09:31:43 +00:00
Jacques Le Roux 6ed0d2e22b Partial improvement for "Remove from trunk the deprecated code if deprecated before December 2014" https://issues.apache.org/jira/browse/OFBIZ-6273
Replaces the deprecated FoScreenRenderer.getFoStyle() by new MacroScreenRenderer.getFoStyle() in Fo form and screen renderers

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737806 13f79535-47bb-0310-9956-ffa450edef68
2016-04-05 09:13:20 +00:00
Jacques Le Roux 01ab6dd9b7 Partial improvement for "Remove from trunk the deprecated code if deprecated before December 2014" https://issues.apache.org/jira/browse/OFBIZ-6273
Replaces the deprecated new HtmlScreenRenderer() in HtmlTreeRenderer.java.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737803 13f79535-47bb-0310-9956-ffa450edef68
2016-04-05 08:57:35 +00:00
Jacques Le Roux 4ecbb21ee0 Partial improvement for "Remove from trunk the deprecated code if deprecated before December 2014" https://issues.apache.org/jira/browse/OFBIZ-6273
Replaces the deprecated StAXSOAPModelBuilder(XMLStreamReader) and StAXOMBuilder(reader) in SOAPEventHandler.java. I did not find how to test though...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737789 13f79535-47bb-0310-9956-ffa450edef68
2016-04-05 06:57:54 +00:00
Nicolas Malin 882b2ca482 no functionnal change, remove unnecessary space and unnecessary return
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737734 13f79535-47bb-0310-9956-ffa450edef68
2016-04-04 19:02:01 +00:00
Jacques Le Roux 2001f1091a For "Replace OFBiz HttpClient by org.apache.commons.httpclient.HttpClient" - https://issues.apache.org/jira/browse/OFBIZ-4430
Since commons.httpclient.HttpClient is now deprecated/not-maintained an vulnerable I prefer to simply put a warning at the top of the class. So people can pick what they prefer and is handy for their problem at than

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737695 13f79535-47bb-0310-9956-ffa450edef68
2016-04-04 14:49:44 +00:00
Michael Brohl 302195327b Applied patch for OFBIZ-6971: Remove dead imports.
Remove all unnecessary import statements in all java files. Taken from the Refactor ToDo list at https://cwiki.apache.org/confluence/display/OFBIZ/Re-Factor+To-Do+List .

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737636 13f79535-47bb-0310-9956-ffa450edef68
2016-04-04 08:31:08 +00:00
Michael Brohl eaafbb0779 Applied patch for OFBIZ-6972: Fix resource leaks in CommonServices.java.
File1 and file2 should be fixed by closing them in byteBufferTest. Taken from refactor todo list at https://cwiki.apache.org/confluence/display/OFBIZ/Re-Factor+To-Do+List .

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737631 13f79535-47bb-0310-9956-ffa450edef68
2016-04-04 08:16:59 +00:00
Jacques Le Roux 1e7d539a7a Removes old simple-methods.xsd from the trunk as it's useless now (was replaced by simple-methods-v2.xsd)
Also renames simple-methods-v2.xsd in simple-methods.xsd and replaces simple-methods-v2.xsd references by simple-methods.xsd references everywhere it's needed



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737087 13f79535-47bb-0310-9956-ffa450edef68
2016-03-30 09:13:03 +00:00
Jacques Le Roux a2ec1cbb64 Removes simple-methods.xsd from the catalog, it's no longer used
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737078 13f79535-47bb-0310-9956-ffa450edef68
2016-03-30 06:00:25 +00:00
Jacques Le Roux eff5999d61 A patch from James Yong for <<Unable to change language in ecommerce>> https://issues.apache.org/jira/browse/OFBIZ-6966
Problem
=======
Go to http://localhost:8080/ecommerce/
Change the language dropdown from English to another language will revert back to English. I am using SVN revision 1735923

jleroux: This was due to  OFBIZ-6879 ("Remove forceHttpSession feature"). Now as soon as you start with HTTPS instead of HTTP it works. I mean other links don't get back on HTTP, see OFBIZ-6966 for details... More to come with OFBIZ-6849, hopefully soon...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737046 13f79535-47bb-0310-9956-ffa450edef68
2016-03-29 20:44:30 +00:00
Scott Gray 393de88042 Ensure a ModelField is set for rhs EntityConditionValues that don't already have it, such as the EntityFunction classes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1736922 13f79535-47bb-0310-9956-ffa450edef68
2016-03-28 20:13:54 +00:00
Jacques Le Roux d71ba4d6cc Fixes an issue with css images path in ecommain.css reported by James Yong at https://issues.apache.org/jira/browse/OFBIZ-6961
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1736854 13f79535-47bb-0310-9956-ffa450edef68
2016-03-28 10:10:03 +00:00
Jacques Le Roux 2f43c5a993 Patches from Pierre Smits for <<Enhancing *Attribute entities with a description field>> https://issues.apache.org/jira/browse/OFBIZ-6962
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1736846 13f79535-47bb-0310-9956-ffa450edef68
2016-03-28 09:31:53 +00:00
Jacques Le Roux a725bd4db7 Fixes "Update XStream lib to prevent XML External Entity (XXE) Processing" - https://issues.apache.org/jira/browse/OFBIZ-6959
The XStream team has released the 1.4.9 stable version in March 15, 2016
This version fixes the XML External Entity (XXE) Processing security issue https://www.owasp.org/index.php/XML_External_Entity_%28XXE%29_Processing
Since OFBiz uses the DomDriver, with Java 6 at least in supported releases, OFBiz seems not really vulnerable https://x-stream.github.io/faq.html#Security_XXEVulnerability, but better to be safe than sorry, notably for not OOTB uses...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1736434 13f79535-47bb-0310-9956-ffa450edef68
2016-03-24 12:12:11 +00:00
Deepak Dixit 64ef408374 Removed extra unused sign from start.properties file, I think its mistakenly committed at r#1736083.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1736272 13f79535-47bb-0310-9956-ffa450edef68
2016-03-23 05:23:41 +00:00
Nicolas Malin d40919bdb9 correct typo on javadoc
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1736222 13f79535-47bb-0310-9956-ffa450edef68
2016-03-22 18:08:26 +00:00
Jacques Le Roux e38ec39dfe This partially reverts r1735569 to simplify and have less commented out parts.
Fixes "Comment out RMI related code because of the Java deserialization issue" - https://issues.apache.org/jira/browse/OFBIZ-6942

We decided to comment out as less as possible because once, in the start and both properties; the rmi part is off and the related test services are off there is no RMI related danger left (test services are not a danger but would fail during tests run). 
It's then easier for users who need RMI in their projects to have only to uncomment those and not digg everywhere.

[CVE-2016-2170] The infamous Java serialization vulnerability

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1736083 13f79535-47bb-0310-9956-ffa450edef68
2016-03-21 20:17:59 +00:00
Nicolas Malin 2aa9aaf3f4 For screen engine drop-down, sort with the locale the entity-list if the related entity have a default resource defined.
This work also with view entity. Relate issue OFBIZ-3311

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735741 13f79535-47bb-0310-9956-ffa450edef68
2016-03-19 09:01:40 +00:00
Gil Portenseigne d58d3a2fbf OFBIZ-6927
Add width and height attributes retrieval in renderLink method in MacroMenuRenderer. Thanks Pierre for the report.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735738 13f79535-47bb-0310-9956-ffa450edef68
2016-03-19 08:08:50 +00:00
Nicolas Malin f27504a3a0 Related to the thread http://ofbiz.135035.n4.nabble.com/entity-auto-and-cancel-operation-td4676929.html on the dev mailing list and the issue OFBIZ-6892, this commit manage the action expire on entity-auto engine.
When you call expire on a entity :
 * if a date field is present on service attribute, OFBiz try to expire it with the given value or with now date
 * else try to expire thruDate field
 * else try to expire *ThruDate or thru*Date field
With the new action I refactoring the code to separate each action on dedicate function.
the unit test associate to expire action was updated.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735737 13f79535-47bb-0310-9956-ffa450edef68
2016-03-19 08:04:16 +00:00
Jacques Le Roux b021268fa7 Fixes "Comment out RMI related code because of the Java deserialization issue" - https://issues.apache.org/jira/browse/OFBIZ-6942
I decided to comment out as less as possible because once the RMI loaders, the RMI dispatcher and the related test services are off there is no RMI related danger left (test services are not a danger but would fail during tests run). It's then easier for users who need RMI in their projects to have only to uncomment those and not digg everywhere. Because the naming (JNDI) server relies on the rmi loader it will also be commented out.

[CVE-2016-2170] The infamous Java serialization vulnerability

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735569 13f79535-47bb-0310-9956-ffa450edef68
2016-03-18 10:38:04 +00:00
Jacopo Cappellato 1247c39d15 Improved the documentation about the purpose and behavior of the "auth" and "in-validate" secas events.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735441 13f79535-47bb-0310-9956-ffa450edef68
2016-03-17 15:00:47 +00:00
Christian Geisert 7156d8fbe2 OFBIZ-6936 Fix broken 'run-test-list' target
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735244 13f79535-47bb-0310-9956-ffa450edef68
2016-03-16 15:38:04 +00:00
Shi Jinghai 6910aacd54 OFBIZ-6755 Update the passport component to use httpclient/core-4.4.1 instead of commons-httpclient-3.1
1. Remove commons-httpclient-3.1.jar from passport component.
2. Use httpclient 4.4.1 in base/lib instead.
3. Remove randomString methods, use RandomStringUtils.randomAlphanumeric instead.
4. Move getAllowAllHttpClient to UtilHttp.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735021 13f79535-47bb-0310-9956-ffa450edef68
2016-03-15 06:06:33 +00:00
Jacques Le Roux f108def5a8 Fixes "Update Tomcat to 7.0.68" - https://issues.apache.org/jira/browse/OFBIZ-6913
The 22/Feb/16 the Apache Tomcat Security Team revealed some security issues, we need to update Tomcat to 6.0.68 version
https://tomcat.apache.org/security-7.html

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1734912 13f79535-47bb-0310-9956-ffa450edef68
2016-03-14 10:58:39 +00:00
Hans Bakker 10c844b687 improve uom convert error message
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1734875 13f79535-47bb-0310-9956-ffa450edef68
2016-03-14 02:37:12 +00:00
Jacques Le Roux 1c0466616e A patch from Forrest Rae for "GroovyEngine.serviceInvoker masks Groovy script exceptions in some cases" https://issues.apache.org/jira/browse/OFBIZ-6888
If GroovyEngine.serviceInvoker catches an exception in a Groovy script, it would mask the exception in some cases.  An exception's detailMessage can be null.  If it is null, the exception won't be properly returned and logged, and that will make spotting problems very difficult.  This was the case for me while trying to track down a problem with a java.util.ConcurrentModificationException error in a Groovy script.  I suspect that this choice to mask exceptions and only return the message has cause bugs to not be spotted.

Disabling this for now in favor of returning a proper exception.  GroovyEngine.serviceInvoker() should throw GenericServiceException if error, rather than returning ServiceUtil.returnError(e.getMessage())



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1734269 13f79535-47bb-0310-9956-ffa450edef68
2016-03-09 15:36:56 +00:00
Jacques Le Roux 3458a46b24 A patch from Oleg Andreyev for "Incorrect content length in response from HTTP service engine" https://issues.apache.org/jira/browse/OFBIZ-6925
Obvious error that cause deserialization errors on receiving side under some conditions because data extracted from response shorter than it really was sent. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1734246 13f79535-47bb-0310-9956-ffa450edef68
2016-03-09 14:40:33 +00:00
Jacques Le Roux 05667aa340 Adds a comments to the testRemoteSoap service to clarify when to use it how it works.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1734241 13f79535-47bb-0310-9956-ffa450edef68
2016-03-09 13:57:39 +00:00
Jacques Le Roux e576d72fc8 "Upgrade Axis2 to 1.7.0" - https://issues.apache.org/jira/browse/OFBIZ-6916 - Actually this upgrades Axis2 to 1.7.1
Replacing Axis2 1.6.3 by 1.7.1 version is easy as long as you don't try to replace the commons-httpclient-3.1 lib. The only noticeable change is this warning shown in log
    |http-bio-8443-exec-1 |AxisConfigBuilder             |W| Unable to instantiate deployer org.apache.axis2.deployment.ServiceDeployer; see debug logs for more details|
It has no effects on the SOAP test services, both works.

But the main goal of this issue is a security update because commons-httpclient-3.1 lib is deprecated, no longer maintained and vulnerable and must be replaced.

This commit also concerns OFBIZ-6755 but to not mix things OFBIZ-6755 will be completed later. So to not block this issue, the commons-httpclient-3.1 lib is moved from framework/service/lib to specialpurpose/passport/lib/ where it's still required.

Normally, as explained at https://axis.apache.org/axis2/java/core/release-notes/1.7.0.html, Axis2 1.7.1 requires "HttpClient 4.2.x and should work with 4.3.x and 4.4.x, but is incompatible with 4.5.x". I did not replace commons-httpclient-3.1 by HttpClient 4.2.1, which is bundled with Axis2 1.7.1, because we have already HttpClient/Core 4.4.1 in base/lib and it works well as is (HttpClient/Core 4.4.1 is in the classpath).

To use HttpClient/Core 4.4.1 you need to change the axis2.xml files as specified in the 1.7.0 release note. But where to place this file in OFBiz is not obvious! 

I decided the best way was to use Axis2 ConfigurationContextFactory.createConfigurationContextFromFileSystem() method to let know Axis2 we want the new httpclient instead of the default one (I really don't understand why the Axis2 team still prefers commons-httpclient-3.1 as default). I had to pass both locations to avoid hardcoding the repository location in the axis2.xml file.

I have also decided the best place for the "Axis2 repository" (as they call it) was in framework/service/axis2. So following Axis2 convention http://wso2.com/library/tutorials/axis2-repository/ I put the axis2.xml file in framework/service/axis2/conf.
Note: the Axis2 repository could be used to put [Apache Rampart|https://axis.apache.org/axis2/java/rampart/] as a module to secure web services...

After this change, there are a number of warnings thrown by Axis2 but they are actually interesting as they provide guidance for future use of modules and such (notably Apache Rampart)
    |ttp-bio-8443-exec-10 |Utils                         |W| [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher
    |ttp-bio-8443-exec-10 |Utils                         |W| [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher
    |ttp-bio-8443-exec-10 |Utils                         |W| [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker
    |ttp-bio-8443-exec-10 |Utils                         |W| [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher
    |ttp-bio-8443-exec-10 |Utils                         |W| [JAXWS] - unable to load org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher
    |ttp-bio-8443-exec-10 |AxisConfigBuilder             |W| Unable to instantiate deployer org.apache.axis2.deployment.ServiceDeployer; see debug logs for more details
    |ttp-bio-8443-exec-10 |AxisConfigBuilder             |W| Unable to instantiate deployer org.apache.axis2.jaxws.framework.JAXWSDeployer; see debug logs for more details


While at it I replaced StAXOMBuilder (deprecated) by OMXMLBuilderFactory

I will backport the changes in the supported releases branches but R12.04 which use a too old version of HttpClient/Core. Others all use versions older than 4.2.1. I'm aware I will have to handle several conflicts by hand, some are easy others "harder". We have the passport component only in R15.12, it will be easy to neglect in older releases. I expect more work with the LICENSE file and even more with the .classpath file. Since R15.12 we use tabs in it (Adrian rightly told us to use Eclipse internal tools to edit this file, though I noted it does not respect the alphabetical order) but older releases still use spaces (and this is often a pain now, but a bright future ahead ;))

Crossing fingers with this commit, I have other changes pending in this instance (notably for OFBIZ-6849) and it got quite complicated...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1733956 13f79535-47bb-0310-9956-ffa450edef68
2016-03-07 18:48:14 +00:00
Jacques Le Roux 2c79c094ea "Currently the testRemoteSoap test services does not work." - https://issues.apache.org/jira/browse/OFBIZ-6922
This temporarily replaces the demo-trunk.ofbiz.apache.org domain by ofbiz-vm.apache.org:8080

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1733951 13f79535-47bb-0310-9956-ffa450edef68
2016-03-07 18:14:53 +00:00