Commit Graph
1604 Commits
Author SHA1 Message Date
Hans Bakker afb70f3469 corrections of errors introduced with r1511742
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1512129 13f79535-47bb-0310-9956-ffa450edef68
2013-08-09 02:35:39 +00:00
Jacques Le Roux 1956e731a3 No functional changes, only formatting.
While looking for other cases like r1459222 and r1509164 introduced by r1300812 and r1305309. I noticed there were a lot of wrong for loops formatting (miss a white space after for), this changes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1511742 13f79535-47bb-0310-9956-ffa450edef68
2013-08-08 12:28:01 +00:00
Adrian Crum 9d76e3b412 Improved the parsing logic in FlexibleStringExpander.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1506151 13f79535-47bb-0310-9956-ffa450edef68
2013-07-23 16:41:02 +00:00
Hans Bakker ad8ae088de add a csv import/export invoices at an organizational level with partyid and productid translation functions, more imports/exports will follow
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1502093 13f79535-47bb-0310-9956-ffa450edef68
2013-07-11 03:14:30 +00:00
Adrian Crum c563479956 Removed support for runtime nested expressions in FlexibleStringExpander.java. This fixes the vulnerability CVE-2013-2250
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1500772 13f79535-47bb-0310-9956-ffa450edef68
2013-07-08 14:37:37 +00:00
Jacopo Cappellato 498ab7e68c Fix for typo in a comment.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1499706 13f79535-47bb-0310-9956-ffa450edef68
2013-07-04 09:34:20 +00:00
Adam Heath e746f4da83 FIX: java.sql.Timestamp extends java.util.Date, and both have converters
registered.  In some cases, however, the Date convertor would be used
instead of the more correct Timestamp convertor.  This fix implements a
most-specific type algorithm to find the better convertor.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1497890 13f79535-47bb-0310-9956-ffa450edef68
2013-06-28 19:08:16 +00:00
Jacques Le Roux 5dba698b83 No functional changes while working on OFBIZ-4794
* Organize imports
* Fix wrong comments

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1495807 13f79535-47bb-0310-9956-ffa450edef68
2013-06-23 11:02:41 +00:00
Jacopo Cappellato a4db370bbc Removed appender-ref reference that I forgot to remove as part of 1489461; thanks to Deepak Dixit for reporting this.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1493658 13f79535-47bb-0310-9956-ffa450edef68
2013-06-17 06:57:40 +00:00
Adrian Crum 5fe2414094 Much smarter UtilXml.java nodeNameToJavaName method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1493473 13f79535-47bb-0310-9956-ffa450edef68
2013-06-16 07:34:46 +00:00
Adrian Crum 34704f3fdc Some work on the security component:
1. Fixed the XSD.
2. Fixed a bad config file.
3. Removed cached DOM code.
4. Simplified Security factory code.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1491345 13f79535-47bb-0310-9956-ffa450edef68
2013-06-10 05:53:54 +00:00
Jacques Le Roux e07c466c36 Implement the change for "Currently we can dynamically change the log level in webtools but not for a class or a package." https://issues.apache.org/jira/browse/OFBIZ-5207
If in Webtools Log Configuration, I check all debugging levels (ie add verbose to OOTB default), I don't get simple verbose lines in log, same with OFBiz trunk and all releases, but old R4.0 from 2007 where you get tons of lines (including debug lines from 3rd parties libs, this last feature still works in newer code versions).

By simple verbose lines I mean
{code}
Debug.logVerbose()
{code}
or
{code}
if (Debug.verboseOn()) Debug.logVerbose()
{code}
contrary to
{code}
if (Debug.verboseOn()) Debug.logInfo()
{code}
Which are of course shown ,if you force the debugging levels to verbose (I noted this scheme is often used in OFBiz OOTB).

When you set a logger to ALL (aka verbose) for a specific package or class, then also it does not work (no Debug.logVerbose() lines printed in logs)
I tried in webtools log config to add a logger to a class or/and package, set to DEBUG or ALL, and to even to use -DDEBUG=true system property (found in Debug class code), to no avail.

I barely checked the situation is the same from OFBiz R9.04 (included) to trunk.

Let me clarify again:
* Setting, dynamically or not, the verbose level, you get all Debug.log() levels lines in log, including lower levels like DEBUG (not used in OFBiz but in 3rd parties libs), but not the OFBiz Debug.logVerbose() lines
* Adding a logger for a class or package with ALL level does not work. You don't get the verbose lines of this class/package in logs.

With trunk demo, you can easily try both Webtools Log Configurations and any combinations running the getPartyFromEmail service from Webtools (paramater: ofbiztest@example.com) and checking the log: https://demo-trunk.ofbiz.apache.org/webtools/control/LogView.

I believe the previous behaviour (like in R4.0) where, when you set all debugging levels, you get all log lines including Debug.logVerbose() ones, is not wanted. You then get too much lines and it's barely usable (too much information kills the information). What I want: see only Debug.logVerbose() lines for a class or package, I don't want to see all Debug.logVerbose() lines (you never get them at the moment anyway) or if (Debug.verboseOn()) lines (you get them when checking all debugging levels).

I thought this was working, but I must say I never succeeded to get it working. So I thought it was my way of doing it. But now, I'm quite sure  it's an incomplete feature, that I even qualify a bug (we need that, even in previous releases)

As I said, putting the whole on Verbose level works but is not enough. You are then facing too much information and it blurs/clutters logs too much
Dynamically setting the log level for a class or package is most useful when willing to debug core features and even custom ones.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1491188 13f79535-47bb-0310-9956-ffa450edef68
2013-06-09 12:05:33 +00:00
Adrian Crum c3ceb113ea More work on ResourceLoader.java:
1. ResourceLoader instances are now thread-safe, though the static methods that cache DOM objects are not.
2. Code cleanup and better XML validation.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489801 13f79535-47bb-0310-9956-ffa450edef68
2013-06-05 10:38:06 +00:00
Adrian Crum 6073ef6dea Some first steps in fixing the concurrency issues in ResourceLoader.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489748 13f79535-47bb-0310-9956-ffa450edef68
2013-06-05 08:56:58 +00:00
Jacopo Cappellato 4ae936a5f3 The content rendered in the Webtools "view log" screen is now rendered from the ofbiz.log file rather then the ofbiz.html file in order to provide more control on the html code rendered in the screen. This fixes the vulnerability CVE-2013-2137
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489461 13f79535-47bb-0310-9956-ffa450edef68
2013-06-04 14:48:40 +00:00
Adrian Crum 33f04b40e7 New method for UtilXml.java - convert a DOM node name to a Java field name or Java class name.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489360 13f79535-47bb-0310-9956-ffa450edef68
2013-06-04 09:41:34 +00:00
Jacques Le Roux 334c716283 Add a mean to collect and show the Requests Events durations using Metrics https://issues.apache.org/jira/browse/OFBIZ-5198
This has involuntarily slipped in, thanks to Adrian who reviewed

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1485620 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 09:05:38 +00:00
Jacques Le Roux eb9f05e7aa Add a mean to collect and show the Requests Events durations using Metrics https://issues.apache.org/jira/browse/OFBIZ-5198
Fulfill the goal with some more:
* makes the Metrics main parameters (estimationSize, estimationTime and smoothing) dynamically changeable (added in serverstats.properties)
* there is no threshold handling for event metrics


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1485601 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 07:55:14 +00:00
Adrian Crum e0ccd44b0f Small improvement to the Performance Metrics feature - sort by name the list of metrics.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484150 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 17:31:45 +00:00
Adrian Crum 9bd42ec3a2 Reverted revision 1483822.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484134 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 16:12:50 +00:00
Jacques Le Roux 929a06dfd5 Improves the Metrics stats by adding a new column used only by requests. It's quite useful to measure the real (not smoothed) durations of events in notably *chained* requests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1483822 13f79535-47bb-0310-9956-ffa450edef68
2013-05-17 14:21:02 +00:00
Adam Heath 8133384848 FEATURE: Add TimestampToString converter; this parallels the existing StringToTimestamp implementation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482507 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:09:22 +00:00
Adam Heath 01822c38e0 FEATURE: Add safeAdd, which protects against BigDecimal addition when the right operand is null.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482506 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:09:16 +00:00
Adam Heath 4e5c0a7647 FIX: in urlEncodeArgs, don't call obj.toString if the obj is an Array or
a Collection; instead, iterate over each memeber and encode that.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482131 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:31:12 +00:00
Adam Heath 2046bec01a FIX: Forgot to add this new file when I added the ability to disable ssl
certificate checking.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482126 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 22:30:32 +00:00
Adam Heath 2cbd5ac701 FEATURE: Add a join() variant that takes a collection.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482069 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 20:06:11 +00:00
Adam Heath 92079f7a65 OPTIMIZE: join() now calls UtilValidate.isEmpty().
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482067 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 20:06:03 +00:00
Adam Heath 105854b8f6 FEATURE: Add ability to disable client and server side certificate
checking.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482064 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 20:05:33 +00:00
Adam Heath a5385a682f FEATURE: Reworked to expose a getSSLContext helper method, called by
everything else.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482062 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 20:05:26 +00:00
Adam Heath 3cfa43e2b1 FIX: In stripNamedParamsFromQueryString, prevent && from occuring in the
resultant buffer.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482061 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 20:05:18 +00:00
Adam Heath 432ce20711 FEATURE: Switch derby <inline-jdbc> to use the external
passwords.properties.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482057 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 20:04:59 +00:00
Adam Heath 158bc8b1de FEATURE: Allow for passwords in entityengine.xml to come from an
external passwords.properties file; nothing actually uses this yet,
however.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482056 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 20:04:51 +00:00
Adam Heath dbbc11d18e FEATURE: Switch ResourceLoader.getXmlDocument() to a version of
UtilXml.readXmlDocument that records line/column information.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482003 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:02:01 +00:00
Adam Heath 1625a1a80f FIX/FEATURE: When shutting down, make certain to close down log4j as
well.  This will ensure that any asynchronous logs have finished
writing to disk, or to the console.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482000 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:01:47 +00:00
Jacques Le Roux 0638e8fa03 A sligthly modified patch from Christoph Neuroth for "Exceptions logged when caches contain collections with unserializable objects" https://issues.apache.org/jira/browse/OFBIZ-5184
jacopoc commited revision 1352575 which would prevent stack traces to be logged when viewing the cache overview screen in /webtools. However, a stacktrace is still logged when the caches contain collections which themselves contain objects which cannot be serialized.

jleroux: I simply used logWarning instead of info

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1480079 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 21:09:47 +00:00
Adrian Crum 73f64676df Added an Observable class and Observer interface. These will be used in an improved GenericEntity implementation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470389 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 05:37:31 +00:00
Jacques Le Roux 67f1143c65 Fixes "Bug in properties management." https://issues.apache.org/jira/browse/OFBIZ-5159
Yesterday, I faced a weird bug in properties management.
For a reason, a copy of a project slipped in the project itself (like if you had a copy of ofbiz root in ofbiz root).
And in this project a properties file (in a hotdeploy component) as the same name than the project (like ofbiz.properties)
Then, as properties for this file, I got all the content of the sub-dir (here would be the files in ofbiz/ofbiz) instead of the properties

This fixes it, no performance issues since properties are cached so properties file are only accessed once

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470176 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 15:29:45 +00:00
Jacques Le Roux 36872419e7 billhuang noticed at https://issues.apache.org/jira/browse/OFBIZ-5172 that "description is incorrect":
int org.ofbiz.base.util.UtilValidate.java file:
    public static final String isMinuteMsg = "The Hour must be a number between 0 and 59.";
    public static final String isSecondMsg = "The Hour must be a number between 0 and 59.";
should be 
    public static final String isMinuteMsg = "The Minute must be a number between 0 and 59.";
    public static final String isSecondMsg = "The Second must be a number between 0 and 59.";


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465351 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 09:35:26 +00:00
Jacopo Cappellato 6a72085f8b Updated commons logging to the latest bug fix release 1.1.2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465345 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 08:41:21 +00:00
Jacopo Cappellato 42e11fe17d Replaced Commons Beanutils jar with the "core" (slightly lighter) version that doesn't contain Beanutils Collections classes that shouldn't be required by OFBiz.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465334 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 07:29:29 +00:00
Jacopo Cappellato 3cad56e33b Moved Jetty component from framework to specialpurpose
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465283 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 18:04:11 +00:00
Jacopo Cappellato c04409e2eb Removed two jar files that contain classes already available in other jars:
* el-api-2.2.jar is a duplicate of juel-2.2.1.jar
* geronimo-qname_1.1_spec-1.0.jar is a duplicate of xml-apis-2.9.1.ja



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465281 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 17:47:02 +00:00
Jacopo Cappellato 62d02aaea9 Removed the GroovyShellContainer, that was disabled by default for security reasons, mostly because it was based on some code distributed with unclear license terms.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465254 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 14:48:10 +00:00
Adrian Crum 8b122612cd Removed Javolution from UtilMisc.java. Also removed the SimpleMap class - which provided no benefit because it was converted to a "real Map" 99.8% of the time.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465253 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 14:44:34 +00:00
Adrian Crum ecae60f467 Small optimization for location resolvers - don't go to the file system while building URLs. This will benefit single box (app server + DB server) installations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1464750 13f79535-47bb-0310-9956-ffa450edef68
2013-04-04 20:57:46 +00:00
Adrian Crum 25928aba2a Small fixup for CachedClassLoader.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1464744 13f79535-47bb-0310-9956-ffa450edef68
2013-04-04 20:53:21 +00:00
Adrian Crum 01fcde7134 Some optimizations in FlexibleMapAccessor.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1464032 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 14:10:01 +00:00
Adrian Crum 48c26a3216 CachedClassLoader.java - replaced Javolution with non-blocking java.util.concurrent.* classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1464015 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 13:54:10 +00:00
Jacopo Cappellato e66239876f Small improvements to error log messages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1463885 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 08:56:31 +00:00
Adrian Crum 19e3b14945 Fixed bug in BaseUnitTests.java where the original debugging levels were not restored.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1463856 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 07:53:11 +00:00