1. Class path loading was ignoring component settings, so class paths for disabled components were being loaded.
2. Configuration files were parsed twice.
3. Potential problem with unloading a loader that failed loading.
I was unable to test Cobertura because the necessary class (org.ofbiz.base.config.CoberturaInstrumenter) isn't being compiled for some reason.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1676746 13f79535-47bb-0310-9956-ffa450edef68
This should fix, at least as a temporary solution, the recent issues happening after the upgrade to the new ESAPI.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1659224 13f79535-47bb-0310-9956-ffa450edef68
Thanks Nils for creating the issue and providing the patch for the same. Thanks Divesh for your help in verification.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649393 13f79535-47bb-0310-9956-ffa450edef68
I had to comment out two lines in the unit tests because they were failing after the upgrade; still investigating on this.
This commit resolves OFBIZ-5343.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648747 13f79535-47bb-0310-9956-ffa450edef68
The DefaultEncoder from OWASP ESAPI, used internally by UtilCodec is now built with the default constructor that also adds the JavascriptCodec to the list of codecs used to canonicalize and validate the input.
Renamed the UrlEncoder class to UrlCodec in order to better describe its behavior.
Misc minor cleanups.
Added to the list of tests of the base component a series of Junit test classes that were missing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648403 13f79535-47bb-0310-9956-ffa450edef68
1. Replace DCL code with lazy-initializer class.
2. Remove class name from static method calls.
3. Remove some @Deprecated annotations.
When they were written, the deprecated methods simulated forthcoming Java 6 functionality - with the intent that they would be replaced with Java 6 equivalents, but the Java 6 functionality behaves differently than the deprecated methods. So, replacing the deprecated methods with Java 6 equivalents would cause undesired behavior.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647866 13f79535-47bb-0310-9956-ffa450edef68
* Groovy services and Groovy events now use the same util methods from GroovyUtil to parse/execute the scripts
* the script base class is now specified in the base/config/groovy.parameter file rather than in the serviceengine.xml
* the same util methods (DSL) are now available to all Groovy scripts (executed as services, events or widget actions)
* removed a series of unused methods in the GroovyUtil class
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636346 13f79535-47bb-0310-9956-ffa450edef68
* moved the json-lib jar (json-lib-2.2.3-jdk15.jar) from the framework/webapp to the framework/base component
* removed the SQL select Parser.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code
* removed the JSON.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code apart from the JSON Converters (now migrated to json-lib, see next items in this list) some utility methods in UtilIO.java (that have been removed too because they have never been used in OFBiz)
* removed the JavaCC jar and related ant scripts because no more needed after the removal of Parser.jj and JSON.jj
* converted the JSONConverter code that was based on JSON.jj to Jackson
* added a new class org.ofbiz.base.lang.JSON that have been contributed by Adrian Crum that is a facade for simplifying the client code and for hiding the specific JSON library being used
* removed an unused method: ImageManagementServices.toJsonObject(...)
* added TestBooleanConverters to the list of tests
* new unit tests for the new JSON converters
* refactored Ajax code in applications to use the common request json response rather than a custom method
* OFBIZ-5790 Implemented ability to call a service event by passing its input parameters in the request body as JSON data. These classes provide a simple mechanism, based on the request's content type, that can be extended to support other formats (e.g. XML).
This commit resolves OFBIZ-4572, OFBIZ-3365, OFBIZ-5751, OFBIZ-5790
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635901 13f79535-47bb-0310-9956-ffa450edef68
Before this change the following classloader hierarchy was setup:
1) the "application" classloader for the "start" component
2) one "native lib" classloader for the "base" component
3) one "native lib" classloader for the all the other (non "base") framework/application/specialpurpose/hot-deploy components
4) one "web app" classloader for each of the webapplications
After this commit the hierarchy is simplified by merging #2 and #3:
a) the "application" classloader for the "start" component
b) one "native lib" classloader for the all the framework/application/specialpurpose/hot-deploy components (including the "base" component)
c) one "web app" classloader for each of the webapplications
This has been achieved by merging the code that was setting up classloader #2 in the start component (for the "base" component) with the code that was setting up the classloader #3 in the base component: now all the code is in the start component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1633182 13f79535-47bb-0310-9956-ffa450edef68
In RFC2045 (Section 5.1) there is:
"Content-type: text/plain; charset=us-ascii (Plain text)
Content-type: text/plain; charset="us-ascii"
are completely equivalent".
In current revision, if the 'Content-Type' of http response includes the quotation mark around the charset name, HttpClient throws out unsupported encoding exception.
This patch removes quotation marks from charset name extracted from http response header.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1627230 13f79535-47bb-0310-9956-ffa450edef68