Re: jdk7 feature that might be good for ofbiz

2012-05-28 Thread Jacopo Cappellato
This page may be useful:

http://javolution.org/doc/benchmark.html

Jacopo

On May 27, 2012, at 6:56 PM, Adam Heath wrote:

 On 05/27/2012 07:09 AM, Jacques Le Roux wrote:
 From: Adrian Crum adrian.c...@sandglass-software.com
 FYI, in the Mini-language overhaul I interned the Element tag name
 Strings.
 
 Yes, that's really a good improvment! Things are much more clear now.
 It's only in minilang though (I mean not in widgets actions yet), right?
 
 Another thing to discuss is the proper use of Javolution and/or
 whether we still need it.
 
 Yes, I also wondered about that last week when willing to cast to a
 TreeMap.
 The fact that it's a one man project and will maybe less and less
 supported http://javolution.org/#HISTORY is not yet an issue but could be
 
 I personally see no need for javolution.  It's non-standard 
 concurrency(java.util.concurrent).  It does it's own memory allocation, which 
 prevents escape-analysis from working(allocating memory on the stack instead 
 of the heap).
 



[jira] [Created] (OFBIZ-4902) Replace in Freemarker templates the deprecated built-ins: default, exists, if_exists

2012-05-28 Thread Jacopo Cappellato (JIRA)
Jacopo Cappellato created OFBIZ-4902:


 Summary: Replace in Freemarker templates the deprecated built-ins: 
default, exists, if_exists
 Key: OFBIZ-4902
 URL: https://issues.apache.org/jira/browse/OFBIZ-4902
 Project: OFBiz
  Issue Type: Improvement
  Components: ALL COMPONENTS
Affects Versions: SVN trunk
Reporter: Jacopo Cappellato
Priority: Minor


http://freemarker.org/docs/ref_depr_builtin.html


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (OFBIZ-3913) Automated action triggered by event

2012-05-28 Thread Nicolas Malin (JIRA)

[ 
https://issues.apache.org/jira/browse/OFBIZ-3913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13284323#comment-13284323
 ] 

Nicolas Malin commented on OFBIZ-3913:
--

Hi Jacques, 

I check your last patch, I found a duplication data on file : 
framework/common/data/CommonTypeData.xml. Your change it's good to me, thanks 
for your works jacques. This would have been to me to resynchronize the patch 
on trunk that you don't waste your time with it.

On the dev mailing list I find this thread 
http://ofbiz.135035.n4.nabble.com/Configure-printer-on-OFBiz-for-direct-printing-td2330823.html.
 To understand Why I use seca, the better and simple example is with order 
preparation :

#. An user approve an order - automaticly print this order on configured 
printer
#. An user valide a picklist - automaticly print the prick list on configured 
printer (detect by user login and/or enumeration (computer/site/location) 
and/or purpose process)

A little complex process :

#. An user approve order - automaticly print this order on his printer and 
print all product content with prurpose documentation associate on each product 
on this order on package printer
#. An user finalise a shipment - for each package print their content, the 
carrier information, internal tracking number and print on docks's printer the 
package list that will arrive

It really depends on the deploy site so external device isn't OOTB. I will 
create a Help to configure.

Nicolas


 Automated action triggered by event
 ---

 Key: OFBIZ-3913
 URL: https://issues.apache.org/jira/browse/OFBIZ-3913
 Project: OFBiz
  Issue Type: New Feature
  Components: framework
Affects Versions: SVN trunk
Reporter: Nicolas Malin
Assignee: Jacques Le Roux
 Attachments: ExternalDevice.patch, ExternalDevice.patch, 
 ExternalDevice.patch, ExternalDevice.png, OFBIZ-3913.ogv, OFBIZ-3913.patch, 
 OFBIZ-3913.patch, OFBIZ-3913.patch, OFBIZ-3913.patch, OFBIZ-3913.patch, 
 PDFCreator.png, What I did with PDFCreator.jpg


 Following a thread on the dev list, related to a printer automated selection, 
 by an user and an event, here is a first draft.
 I added a new entity, ExternalDevice, which list all devices OFBiz can reach 
 (and the associated command). This entity is related to an ExternalDeviceType 
 and each record has a status, so we know if the device is available, out of 
 order, in maintenance, waiting, etc...
 Then I added another entity, ExternalDeviceUserAction, which defines a device 
 for an user, and/or an action through Enumeration. Finally, I added a service 
 which find the commnand to execute based on an action and/or an user.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (OFBIZ-4903) addition of item to shopping list is not working

2012-05-28 Thread Ivan Cauchi (JIRA)
Ivan Cauchi created OFBIZ-4903:
--

 Summary: addition of item to shopping list is not working
 Key: OFBIZ-4903
 URL: https://issues.apache.org/jira/browse/OFBIZ-4903
 Project: OFBiz
  Issue Type: Bug
  Components: party, specialpurpose/ecommerce
Affects Versions: Release Branch 12.04
 Environment: Ofbiz 12.04 r133603 on Ubuntu 10.04.4 LTS
Reporter: Ivan Cauchi
Priority: Minor


When attempting to add an item to a shopping list, the transaction fails, both 
when accessed through the ecommerce or the party manager application, with the 
following error:

The Following Errors Occurred:
ERROR: Could not complete the Create a ShoppingList Item 
[file:/home/xxx/ofbiz/branches/trunk/applications/order/script/org/ofbiz/order/shoppinglist/ShoppingListServices.xml#createShoppingListItem]
 process [problem creating the newEntity value: Error while inserting: 
[GenericEntity:ShoppingListItem][createdStamp,2012-05-28 
18:57:53.715(java.sql.Timestamp)][createdTxStamp,2012-05-28 
18:57:53.694(java.sql.Timestamp)][lastUpdatedStamp,2012-05-28 
18:57:53.715(java.sql.Timestamp)][lastUpdatedTxStamp,2012-05-28 
18:57:53.694(java.sql.Timestamp)][productId,test(java.lang.String)][quantity,1(java.math.BigDecimal)][shoppingListId,1(java.lang.String)][shoppingListItemSeqId,1(java.lang.String)]
 (SQL Exception while executing the following:INSERT INTO 
OFBIZ.SHOPPING_LIST_ITEM (SHOPPING_LIST_ID, SHOPPING_LIST_ITEM_SEQ_ID, 
PRODUCT_ID, QUANTITY, MODIFIED_PRICE, RESERV_START, RESERV_LENGTH, 
RESERV_PERSONS, QUANTITY_PURCHASED, CONFIG_ID, LAST_UPDATED_STAMP, 
LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table 'SHOPPING_LIST_ITEM' caused a 
violation of foreign key constraint 'SHLIST_ITEM_PROD' for key (test). The 
statement has been rolled back.))]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (OFBIZ-4901) Update ICU4j jar to its latest revision.

2012-05-28 Thread Jacopo Cappellato (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-4901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacopo Cappellato reassigned OFBIZ-4901:


Assignee: Jacopo Cappellato

 Update ICU4j jar to its latest revision.
 

 Key: OFBIZ-4901
 URL: https://issues.apache.org/jira/browse/OFBIZ-4901
 Project: OFBiz
  Issue Type: Improvement
  Components: framework
Reporter: Deepak Dixit
Assignee: Jacopo Cappellato
Priority: Minor
 Fix For: SVN trunk

 Attachments: OFBIZ-4901.patch, icu4j-49_1.jar


 http://site.icu-project.org/download/49

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




End of month : Main New features

2012-05-28 Thread Jacques Le Roux

Please devs, don't forget to add your changes in Main New features with shorts 
explanations

https://cwiki.apache.org/confluence/display/OFBIZ/Main+New+Features

Thanks

Jacques


[jira] [Closed] (OFBIZ-4901) Update ICU4j jar to its latest revision.

2012-05-28 Thread Jacopo Cappellato (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-4901?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacopo Cappellato closed OFBIZ-4901.



 Update ICU4j jar to its latest revision.
 

 Key: OFBIZ-4901
 URL: https://issues.apache.org/jira/browse/OFBIZ-4901
 Project: OFBiz
  Issue Type: Improvement
  Components: framework
Reporter: Deepak Dixit
Assignee: Jacopo Cappellato
Priority: Minor
 Fix For: SVN trunk

 Attachments: OFBIZ-4901.patch, icu4j-49_1.jar


 http://site.icu-project.org/download/49

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




Cleaned up a lot of Tomcat jars using the Embedded Tomcat distribution.

2012-05-28 Thread Jacopo Cappellato
In rev. 1343263 I have removed several jars files from catalina/lib and 
replaced a few of them with the ones packaged in the new Embedded 
distribution of Tomcat (at the same version 7.0.27):

http://tomcat.apache.org/download-70.cgi

I hope that the notes of the process I have followed will be useful for future 
upgrades:

https://cwiki.apache.org/confluence/display/OFBTECH/How+to+upgrade+the+embedded+Tomcat

I did some cursory tests and all looks good so far, but please help with tests 
and report any issues you will find.

Thanks,

Jacopo



Removing some unnecessary synchronization for cache objects

2012-05-28 Thread Jacopo Cappellato
Hi devs,

please review my commit below because I am working to apply a similar pattern 
to a lot of other classes in OFBiz. This effort is not a search-and-replace 
task but instead I am reviewing each individual usage of static UtilCache 
objects and refactoring (when necessary) the code to follow the pattern you see 
below.
Here are some points to notice (feedback is highly appreciated because I am 
planning to use a similar approach on several other classes):
1) if possible, make the static fields that hold the reference to UtilCache a 
private and final field; I know this is not required but in my opinion makes 
the code easier to read and more secure
2) when useful, use the new method UtilCache.putIfAbsentAndGet that always 
returns a value (the reference of the object passed to it or the reference of 
the object found in the cache); of course this is not mandatory because I could 
use putIfAbsent and then use the reference of the passed object (if the 
returnedvalue is null, which means that it was added to the cache) but I think 
that putIfAbsentAndGet often makes the code slightly more readable
3) removed the synchronized block in favour of two calls to the thread safe 
UtilCache object: get and putIfAbsentAndGet (or putIfAbsent)

Kind regards,

Jacopo

Begin forwarded message:

 From: jaco...@apache.org
 Subject: svn commit: r1343277 - 
 /ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/region/RegionManager.java
 Date: May 28, 2012 5:02:39 PM GMT+02:00
 To: comm...@ofbiz.apache.org
 Reply-To: dev@ofbiz.apache.org
 
 Author: jacopoc
 Date: Mon May 28 15:02:39 2012
 New Revision: 1343277
 
 URL: http://svn.apache.org/viewvc?rev=1343277view=rev
 Log:
 Improved code that manages the cache:
 * removed unnecessary synchronization  
 * protected the UtilCache object (static field) by making it private and final
 
 Modified:
ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/region/RegionManager.java
 
 Modified: 
 ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/region/RegionManager.java
 URL: 
 http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/region/RegionManager.java?rev=1343277r1=1343276r2=1343277view=diff
 ==
 --- 
 ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/region/RegionManager.java 
 (original)
 +++ 
 ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/region/RegionManager.java 
 Mon May 28 15:02:39 2012
 @@ -38,7 +38,7 @@ public class RegionManager {
 
 public static final String module = RegionManager.class.getName();
 
 -protected static UtilCacheURL, MapString, Region regionCache = 
 UtilCache.createUtilCache(webapp.Regions.Config, 0, 0);
 +private static final UtilCacheURL, MapString, Region regionCache = 
 UtilCache.createUtilCache(webapp.Regions.Config, 0, 0);
 
 protected URL regionFile = null;
 
 @@ -54,14 +54,8 @@ public class RegionManager {
 public MapString, Region getRegions() {
 MapString, Region regions = regionCache.get(regionFile);
 if (regions == null) {
 -synchronized (this) {
 -regions = regionCache.get(regionFile);
 -if (regions == null) {
 -if (Debug.verboseOn()) Debug.logVerbose(Regions not 
 loaded for  + regionFile + , loading now, module);
 -regions = readRegionXml(regionFile);
 -regionCache.put(regionFile, regions);
 -}
 -}
 +if (Debug.verboseOn()) Debug.logVerbose(Regions not loaded for 
  + regionFile + , loading now, module);
 +regions = regionCache.putIfAbsentAndGet(regionFile, 
 readRegionXml(regionFile));
 }
 return regions;
 }
 
 



OFBiz tutorial

2012-05-28 Thread G.Ben
Hello everyone, 
I'm looking for help please 
I'm working with the OFBiz tutorial at this 
http://www.opensourcestrategies.com/ofbiz/tutorials.php website .
for the 1st step wich is HelloWorld1 it doesn't work :( and for the 2nd one
too ( Helloworld2)
for the last one i get the following error when i type :
localhost:8080/hello2/control/main
Error rendering included template at location
[component://hello2/webapp/hello2/includes/header.ftl]:
java.lang.IllegalArgumentException: FreeMarker file not found at location:
component://hello2/webapp/hello2/includes/header.ftl Error rendering
included template at location
[component://hello2/webapp/hello2/includes/main.ftl]:
java.lang.IllegalArgumentException: FreeMarker file not found at location:
component://hello2/webapp/hello2/includes/main.ftl Error rendering included
template at location [component://hello2/webapp/hello2/includes/footer.ftl]:
java.lang.IllegalArgumentException: FreeMarker file not found at location:
component://hello2/webapp/hello2/includes/footer.ftl 

Any help please 

--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/OFBiz-tutorial-tp4632569.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.


Re: Removing some unnecessary synchronization for cache objects

2012-05-28 Thread Jacopo Cappellato
Please also review the following commit because it is another pattern I am 
going to apply to other code:


On May 28, 2012, at 5:25 PM, jaco...@apache.org wrote:

 Author: jacopoc
 Date: Mon May 28 15:25:46 2012
 New Revision: 1343278
 
 URL: http://svn.apache.org/viewvc?rev=1343278view=rev
 Log:
 Improved code that manages the cache:
 * protected the UtilCache object (static field) by making it private and final
 * instead of using the put method, use the putIfAbsentAndGet method to 
 prevent the risk of adding the new value if another concurrent thread added 
 it in the meantime
 
 
 Modified:

 ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java
 
 Modified: 
 ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java
 URL: 
 http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java?rev=1343278r1=1343277r2=1343278view=diff
 ==
 --- 
 ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java 
 (original)
 +++ 
 ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java 
 Mon May 28 15:25:46 2012
 @@ -56,7 +56,7 @@ import javax.xml.transform.stream.Stream
 public final class XslTransform {
 
 public static final String module = XslTransform.class.getName();
 -public static UtilCacheString, Templates xslTemplatesCache = 
 UtilCache.createUtilCache(XsltTemplates, 0, 0);
 +private static final UtilCacheString, Templates xslTemplatesCache = 
 UtilCache.createUtilCache(XsltTemplates, 0, 0);
 
 /**
  * @param template the content or url of the xsl template
 @@ -116,7 +116,7 @@ public final class XslTransform {
 Source templateSource = getSource(templateDocument, templateUrl, 
 templateString);
 translet = tFactory.newTemplates(templateSource);
 if (UtilValidate.isNotEmpty(templateName)) {
 -xslTemplatesCache.put(templateName, translet);
 +translet = xslTemplatesCache.putIfAbsentAndGet(templateName, 
 translet);
 }
 }
 if (translet != null) {
 
 

Jacopo



Re: OFBiz tutorial

2012-05-28 Thread Jacopo Cappellato
Please post your question to the user list.

Kind regards,

Jacopo

On May 28, 2012, at 5:18 PM, G.Ben wrote:

 Hello everyone, 
 I'm looking for help please 
 I'm working with the OFBiz tutorial at this 
 http://www.opensourcestrategies.com/ofbiz/tutorials.php website .
 for the 1st step wich is HelloWorld1 it doesn't work :( and for the 2nd one
 too ( Helloworld2)
 for the last one i get the following error when i type :
 localhost:8080/hello2/control/main
 Error rendering included template at location
 [component://hello2/webapp/hello2/includes/header.ftl]:
 java.lang.IllegalArgumentException: FreeMarker file not found at location:
 component://hello2/webapp/hello2/includes/header.ftl Error rendering
 included template at location
 [component://hello2/webapp/hello2/includes/main.ftl]:
 java.lang.IllegalArgumentException: FreeMarker file not found at location:
 component://hello2/webapp/hello2/includes/main.ftl Error rendering included
 template at location [component://hello2/webapp/hello2/includes/footer.ftl]:
 java.lang.IllegalArgumentException: FreeMarker file not found at location:
 component://hello2/webapp/hello2/includes/footer.ftl 
 
 Any help please 
 
 --
 View this message in context: 
 http://ofbiz.135035.n4.nabble.com/OFBiz-tutorial-tp4632569.html
 Sent from the OFBiz - Dev mailing list archive at Nabble.com.



Re: Removing some unnecessary synchronization for cache objects

2012-05-28 Thread Jacopo Cappellato
Please also review this one because I have other similar upcoming.

Thanks,

Jacopo

On May 28, 2012, at 5:32 PM, jaco...@apache.org wrote:

 Author: jacopoc
 Date: Mon May 28 15:32:28 2012
 New Revision: 1343287
 
 URL: http://svn.apache.org/viewvc?rev=1343287view=rev
 Log:
 Improved code that manages the cache:
 * replaced putIfAbsent + get with putIfAbsentAndGet to avoid the risk of a 
 NPE if the cache entry is removed (or expired) between the two calls
 
 
 Modified:

 ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldTypeReader.java
 
 Modified: 
 ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldTypeReader.java
 URL: 
 http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldTypeReader.java?rev=1343287r1=1343286r2=1343287view=diff
 ==
 --- 
 ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldTypeReader.java
  (original)
 +++ 
 ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelFieldTypeReader.java
  Mon May 28 15:32:28 2012
 @@ -89,10 +89,8 @@ public class ModelFieldTypeReader implem
 throw new IllegalStateException(Error loading field type 
 file  + fieldTypeResourceHandler.getLocation());
 }
 MapString, ModelFieldType fieldTypeMap = 
 createFieldTypeCache(document.getDocumentElement(), 
 fieldTypeResourceHandler.getLocation());
 -reader = new ModelFieldTypeReader(fieldTypeMap);
 -readers.putIfAbsent(tempModelName, reader);
 +reader = readers.putIfAbsentAndGet(tempModelName, new 
 ModelFieldTypeReader(fieldTypeMap));
 
 utilTimer.timerString([ModelFieldTypeReader.getModelFieldTypeReader] Read  
 + fieldTypeMap.size() +  field types);
 -reader = readers.get(tempModelName);
 }
 return reader;
 }
 


Re: Removing some unnecessary synchronization for cache objects

2012-05-28 Thread David E Jones

Looks like a good pattern.

-David


On May 28, 2012, at 9:27 AM, Jacopo Cappellato 
jacopo.cappell...@hotwaxmedia.com wrote:

 Please also review the following commit because it is another pattern I am 
 going to apply to other code:
 
 
 On May 28, 2012, at 5:25 PM, jaco...@apache.org wrote:
 
 Author: jacopoc
 Date: Mon May 28 15:25:46 2012
 New Revision: 1343278
 
 URL: http://svn.apache.org/viewvc?rev=1343278view=rev
 Log:
 Improved code that manages the cache:
 * protected the UtilCache object (static field) by making it private and 
 final
 * instead of using the put method, use the putIfAbsentAndGet method to 
 prevent the risk of adding the new value if another concurrent thread added 
 it in the meantime
 
 
 Modified:
   
 ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java
 
 Modified: 
 ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java
 URL: 
 http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java?rev=1343278r1=1343277r2=1343278view=diff
 ==
 --- 
 ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java
  (original)
 +++ 
 ofbiz/trunk/framework/base/src/org/ofbiz/base/util/template/XslTransform.java
  Mon May 28 15:25:46 2012
 @@ -56,7 +56,7 @@ import javax.xml.transform.stream.Stream
 public final class XslTransform {
 
public static final String module = XslTransform.class.getName();
 -public static UtilCacheString, Templates xslTemplatesCache = 
 UtilCache.createUtilCache(XsltTemplates, 0, 0);
 +private static final UtilCacheString, Templates xslTemplatesCache = 
 UtilCache.createUtilCache(XsltTemplates, 0, 0);
 
/**
 * @param template the content or url of the xsl template
 @@ -116,7 +116,7 @@ public final class XslTransform {
Source templateSource = getSource(templateDocument, templateUrl, 
 templateString);
translet = tFactory.newTemplates(templateSource);
if (UtilValidate.isNotEmpty(templateName)) {
 -xslTemplatesCache.put(templateName, translet);
 +translet = 
 xslTemplatesCache.putIfAbsentAndGet(templateName, translet);
}
}
if (translet != null) {
 
 
 
 Jacopo
 


buildbot failure in ASF Buildbot on ofbiz-trunk

2012-05-28 Thread buildbot
The Buildbot has detected a new failure on builder ofbiz-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/ofbiz-trunk/builds/3133

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch ofbiz/trunk] 1343458
Blamelist: hansbak

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





Re: svn commit: r1343088 - /ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

2012-05-28 Thread Adam Heath

On 05/27/2012 03:28 PM, jler...@apache.org wrote:

Author: jleroux
Date: Sun May 27 20:28:16 2012
New Revision: 1343088

URL: http://svn.apache.org/viewvc?rev=1343088view=rev
Log:
Fixes this error found by chance in log

 exception report --
ERROR: Cannot do a find that returns an EntityListIterator with no transaction 
in place. Wrap this call in a transaction.
Exception: java.lang.Exception
Message: Stack Trace
 stack trace ---
java.lang.Exception: Stack Trace
org.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1751)
org.ofbiz.order.order.OrderServices$1.call(OrderServices.java:5610)
org.ofbiz.order.order.OrderServices$1.call(OrderServices.java:5605)

Modified:
 ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java

Modified: 
ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java?rev=1343088r1=1343087r2=1343088view=diff
==
--- ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java 
(original)
+++ ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderServices.java 
Sun May 27 20:28:16 2012
@@ -5601,7 +5601,9 @@ public class OrderServices {
  }
  final EntityCondition cond = 
EntityCondition.makeCondition(orderCondList);
  ListString  orderIds;
+boolean beganTransaction = false;
  try {
+beganTransaction = TransactionUtil.begin();
  orderIds = TransactionUtil.doNewTransaction(new 
CallableListString() {
  public ListString  call() throws Exception {
  ListString  orderIds = new LinkedListString();


Er, really?  This is not the correct fix.  Do you see that 
TransactionUtil.doNewTransaction call?  Do you understand what that 
does(or what it is supposed to do)?


The real problem is in TransactionUtil.doNewTransaction, and it's my fault.

I fixed the root cause in 1343469, then backed out your change in 1343470.


Re: svn commit: r1343469 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java

2012-05-28 Thread Adam Heath

On 05/28/2012 10:55 PM, doo...@apache.org wrote:

Author: doogie
Date: Tue May 29 03:55:05 2012
New Revision: 1343469

URL: http://svn.apache.org/viewvc?rev=1343469view=rev
Log:
FIX: This is the correct fix for 1343088;
TransactionUtil.doNewTransaction was starting a new transaction, then
immediately suspending it.  This caused confusion in calling code that
tried to use doNewTransaction.  Fortunately, this was not used very
much,


I need to backport this to 12.04.  I'll get around to it when I backport 
the rest of the deprecation code.




Modified:
 
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java

Modified: 
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java?rev=1343469r1=1343468r2=1343469view=diff
==
--- 
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java
 (original)
+++ 
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/transaction/TransactionUtil.java
 Tue May 29 03:55:05 2012
@@ -78,16 +78,16 @@ public class TransactionUtil implements

  @Deprecated
  public staticV  V doNewTransaction(String ifErrorMessage, CallableV  
callable) throws GenericEntityException {
-return inTransaction(noTransaction(callable), ifErrorMessage, 0, 
true).call();
+return noTransaction(inTransaction(callable, ifErrorMessage, 0, 
true)).call();
  }

  @Deprecated
  public staticV  V doNewTransaction(String ifErrorMessage, boolean 
printException, CallableV  callable) throws GenericEntityException {
-return inTransaction(noTransaction(callable), ifErrorMessage, 0, 
printException).call();
+return noTransaction(inTransaction(callable, ifErrorMessage, 0, 
printException)).call();
  }

  public staticV  V doNewTransaction(CallableV  callable, String 
ifErrorMessage, int timeout, boolean printException) throws GenericEntityException {
-return inTransaction(noTransaction(callable), ifErrorMessage, timeout, 
printException).call();
+return noTransaction(inTransaction(callable, ifErrorMessage, timeout, 
printException)).call();
  }

  @Deprecated






[jira] [Created] (OFBIZ-4904) Addition of ID Attributes for Web Component in the OFBIZ

2012-05-28 Thread Nguyen Hoang Thanh Duc (JIRA)
Nguyen Hoang Thanh Duc created OFBIZ-4904:
-

 Summary: Addition of ID Attributes for Web Component in the OFBIZ
 Key: OFBIZ-4904
 URL: https://issues.apache.org/jira/browse/OFBIZ-4904
 Project: OFBiz
  Issue Type: Improvement
  Components: site
Reporter: Nguyen Hoang Thanh Duc
Priority: Trivial


This page would be updated constantly along with the progression of below 
project: 

https://cwiki.apache.org/confluence/display/OFBIZ/Functional+testing+in+the+OFBiz+-+Implementation+using+pure+Java+WebDriver

At present, there are some components (div, input, ...) that have not their IDs 
or name declared, and I suggest we have them. 

As a result, a list of those items will be created, maintained and discussed as 
which would/would not be modified.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




buildbot success in ASF Buildbot on ofbiz-trunk

2012-05-28 Thread buildbot
The Buildbot has detected a restored build on builder ofbiz-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/ofbiz-trunk/builds/3134

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch ofbiz/trunk] 1343470
Blamelist: doogie

Build succeeded!

sincerely,
 -The Buildbot





Re: Slim-down continue [was Re: svn commit: r1340414 - ...]

2012-05-28 Thread Adam Heath

On 05/25/2012 01:22 AM, Adam Heath wrote:

On 05/25/2012 12:26 AM, Jacques Le Roux wrote:

From: Jacques Le Roux jacques.le.r...@les7arts.com

From: Adam Heath doo...@brainfood.com

On 05/24/2012 04:05 PM, Jacques Le Roux wrote:

From: Adam Heath doo...@brainfood.com

On 05/24/2012 10:18 AM, Adam Heath wrote:
The idea was that you would parse the sqlCondition once, in a static
{} block somewhere, then at runtime, just build that map. This
builds-upon the map/list idea inherent in ofbiz.

I also had plans that you could store sql strings into a properties
file somewhere, so that they could possibly be changed by the
end-user
without having to recompile.

I need to revisit the SELECT a.partyId, b.* EXCLUDE(partyId) FROM
Party a LEFT JOIN PartyContactMech b USING (partyId), now that ofbiz
better supports conditions on the join clauses, esp. when combining
views into other views.


Thanks for the explanation,

So should we not rather create a Jira with all the needed in a patch
until this is finished?
Or maybe a branch would be easier?

Still with the slim-down idea in mind and as objective.


I like the slimdown, but tbh, I would like to see the framework/sql
stuff used more than it is(0 right now). Andrew Zeneski was an
original requestor for something that parsed sql into
EntityCondition. I took his suggestion, but went further, to allow
CREATE VIEW AS SELECT to work.

I've noticed that there aren't that many view definitions in ofbiz.
As I've been deprecating all this code recently, I've noticed java
code doing nested loop kinda-stuff, instead of just doing a view. I'm
guessing because view-xml is verbose and not how people actually think.

However, with what I committed, you can define the view using a SQL
syntax, which is then backed by a DynamicViewEntity.

I've seen rather impressive speedups just rewriting code to a single
SQL query, instead of java loops; the database can be rather
efficient. So making view writing simpler is a laudable goal.


Great, but still, why not a branch as long as it's not finished?

Also something which I think is pretty neat in the principle (I still
did not review the code) and would speed up views:
https://issues.apache.org/jira/browse/OFBIZ-4041

Jacques


BTW another stuff that could be part of this branch
https://issues.apache.org/jira/browse/OFBIZ-3575


Ok, I suppose. This weekend I'll create such a branch to
fix/improve the view system. This will also attempt to fix the reverse
cache clearing issues.


branches/improved-entityengine-features-20120528

Also see 1343540, which adds a README that has some things that we might 
want to implement in the branch.




Re: buildbot success in ASF Buildbot on ofbiz-trunk

2012-05-28 Thread Adam Heath

On 05/28/2012 11:48 PM, build...@apache.org wrote:

The Buildbot has detected a restored build on builder ofbiz-trunk while 
building ASF Buildbot.
Full details are available at:
  http://ci.apache.org/builders/ofbiz-trunk/builds/3134

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch ofbiz/trunk] 1343470
Blamelist: doogie

Build succeeded!

sincerely,
  -The Buildbot


I'm going to guess that buildbot is still giving false negatives.  Hans 
supposedly broke it, and there is *nothing* I did that could have 
altered his last commit.  So it is still being flakey.


[jira] [Updated] (OFBIZ-4905) Authorize.net Customer Information Manager

2012-05-28 Thread Sam Hamilton (JIRA)

 [ 
https://issues.apache.org/jira/browse/OFBIZ-4905?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sam Hamilton updated OFBIZ-4905:


Attachment: Readme.txt
authorize_CIM_V8.patch

 Authorize.net Customer Information Manager
 --

 Key: OFBIZ-4905
 URL: https://issues.apache.org/jira/browse/OFBIZ-4905
 Project: OFBiz
  Issue Type: Improvement
Reporter: Sam Hamilton
 Fix For: SVN trunk

 Attachments: Readme.txt, authorize_CIM_V8.patch


 This is a patch to allow OFBiz to store credit card information inside the 
 Authorize.net Customer Information Manager platform. 
 The required SDK can be downloaded from 
 http://developer.authorize.net/downloads/
 As this a major patch we would love some developer feedback and reviews
 Thanks
 Sam 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (OFBIZ-4905) Authorize.net Customer Information Manager

2012-05-28 Thread Sam Hamilton (JIRA)
Sam Hamilton created OFBIZ-4905:
---

 Summary: Authorize.net Customer Information Manager
 Key: OFBIZ-4905
 URL: https://issues.apache.org/jira/browse/OFBIZ-4905
 Project: OFBiz
  Issue Type: Improvement
Reporter: Sam Hamilton
 Fix For: SVN trunk
 Attachments: Readme.txt, authorize_CIM_V8.patch

This is a patch to allow OFBiz to store credit card information inside the 
Authorize.net Customer Information Manager platform. 

The required SDK can be downloaded from 
http://developer.authorize.net/downloads/

As this a major patch we would love some developer feedback and reviews

Thanks
Sam 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




buildbot failure in ASF Buildbot on ofbiz-trunk

2012-05-28 Thread buildbot
The Buildbot has detected a new failure on builder ofbiz-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/ofbiz-trunk/builds/3135

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: portunus_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch ofbiz/trunk] 1343532
Blamelist: doogie

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot