* 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
============================================
As we have Entity Query Builder implemented in trunk (OFBIZ-4053) and now we should add Junit tests for its methods.
As per initial analyses, we can write Junit tests for following methods of Entity Query Builder:
1. queryList()
2. queryFirst()
3. queryCount()
4. queryOne()
5. distinct()
6. filterByDate()
7. orderBy()
8. select()
9. cursorForwardOnly()
10. cursorScrollSensitive()
11. cursorScrollInSensitive()
12. fetchSize()
13. maxRows()
14. cache()
15. queryIterator()
=============================================
Thanks Arun for the contribution.
Thanks Scott, Jacopo and Adrian for your help in reviewing the patch content.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635894 13f79535-47bb-0310-9956-ffa450edef68
Re-running the same load test with a service call proves that the problem was not in the service call but only in the minilang implementation. So putting back this part.
There are more work to do as suggested Scott on dev ML: the call could be done in the same transaction right before committing, to reduce the amount of time the lock is held. But for now it's enough
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635567 13f79535-47bb-0310-9956-ffa450edef68
The storeOrder service, implemented by the OrderService.createOrder() method, synchronously calls the countProductQuantityOrdered service implemented in Minilang. OOTB, the countProductQuantityOrdered service is only called by the storeOrder service implementation. It's called inside a loop on orderItems.
While intentionally load testing a custom project with JMeter on a weak m1.small AWS machine, I noticed the overhead of the service call for each order item iteration was significant on this slow machine. With only 30 concurrent users the process was blocked by a timeout on the countProductQuantityOrdered service.
I then decided to transform the minilang code into an OrderService.countProductQuantityOrdered() method that can be directly called inside OrderService.createOrder() and also implements the countProductQuantityOrdered service. Hence it avoids the overhead of the minilang service calls in loop while still providing a countProductQuantityOrdered service for possible external uses. For that I moved the definition from Product component to Order component to avoid the hard coded dependency of Order to Product. I then did not cross issues with the same load test.
I also added a test for the countProductQuantityOrdered service by adding an order item of a virtual product (GZ-1006-1) in SalesOrderTest.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635192 13f79535-47bb-0310-9956-ffa450edef68
1) added a comment to summarize the default configuration, with a reference to the online log4j2 documentation for further customizations
2) added a new appender for errors (or greater); implemented using a filter to keep the logger definition as clean as possible
3) removed the external appender because the amount of log statements (warnings or greater) from external jars is not large and should not cause much confusion if we keep them with OFBiz log statements
4) increased the number of rolling files for ofbiz.log to 10
5) changed date format to "yyyy-mm-dd hh:mm:ss.sss"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1633550 13f79535-47bb-0310-9956-ffa450edef68
I discovered this issue a few weeks ago and reported it to the mailing list; the same issue has been recently reported by Pierre Smits in OFBIZ-5818.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1633362 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
==============================================================================
when displaying this portal page:
https://localhost:8443/myportal/control/main?portalPageId=MYPORTAL_EMPLOYEE0&parentPortalPageId=MYPORTAL_EMPLOYEE
this message is thrown to the console:
Message: Roll back error, could not commit transaction, was rolled back instead because of: Error in Service [executeFind]: Error running Find on the CommunicationEventAndRole entity: Field with name custRequestDate not found in the CommunicationEventAndRole Entity
==============================================================================
Thanks Mridul for the contribution and thanks Erwan for creating the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632801 13f79535-47bb-0310-9956-ffa450edef68
===========================================
Here is the steps to regenerate issue:
{code}
<PortalPagePortlet portalPageId="PartyProfile" portalPortletId="ShipperAccount" portletSeqId="00001" columnSeqId="00001" sequenceNum="7"/>
{code}
Upload the PortalPagePortlet data for shipper Account, and go to viewprofile screen. Now add shipper account from shipper account screen.
Expected Result: Newly added/ all shipper account of party should be listed under shipper account screen.
Actual Result:
No shipper accounts are listing.
===========================================
Thanks Deepak for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632797 13f79535-47bb-0310-9956-ffa450edef68
Thanks Divesh and Mridul for helping with resuluation.
Thanks Adrian for reporting it.
Thanks Chris Snow for reporting the issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632793 13f79535-47bb-0310-9956-ffa450edef68
===========================================================
1. find P.O.
2. select approaved p.o.
3. edit items
4 add item (at bottom of screen)
5. Comment does not save.
Note! shouldn't the comment be displayed on some of the P.O. screens?
I only know it does not save as I edited the .FTL on viewpo and pdf to include comment. Comments from the orignal create P.O. show up, ALso should be able to edit a comment, when edit items is entered.
===========================================================
Thanks Joel for creating the issue and Thanks Akash for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632777 13f79535-47bb-0310-9956-ffa450edef68
=======================================================================
The Shipment Box Type selection is at line item level on Pack Order screen where the package selection for each order item is made. It should instead be at package level next to the package weight input box.
Also, ShipmentBoxType values are supported only for USPS, which is hard coded in PackOrder.groovy.
There is a bug reported in OFBIZ-4606 for Release 11.04 but exists in Trunk as well. It should be fixed if we make the above change.
=======================================================================
Thanks Mridul for creating the issue and providing the patch for the same.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632772 13f79535-47bb-0310-9956-ffa450edef68
===================================================================
Pagination is handled in getProductCategoryAndLimitedMembers
Then the out of stock filtering is done in CategoryDetail.groovy.
Hence the pagination is screwed up. Certain pages might show less records or no records based upon data condition.
===================================================================
Thanks Arun for the contribution and Thanks Kiran for creating the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632750 13f79535-47bb-0310-9956-ffa450edef68
=========================================================================
In partymgr contrller.xml, we have view request named "ViewCommunicationEvent", and this request call an service event, due to this when we try to perform sorting on Child Communication Events, Customer Request List or any other screen over Communication screen then it will thorw following exception:
org.ofbiz.webapp.event.EventHandlerException: Found URL parameter [communicationEventId] passed to secure (https) request-map with uri [ViewCommunicationEvent] with an event that calls service [setCommEventRoleToRead]; this is not allowed for security reasons! The data should be encrypted by making it part of the request body (a form field) instead of the request URL. Moreover it would be kind if you could create a Jira sub-task of https://issues.apache.org/jira/browse/OFBIZ-2330 (check before if a sub-task for this error does not exist). If you are not sure how to create a Jira issue please have a look before at http://cwiki.apache.org/confluence/x/JIB2 Thank you in advance for your help.
Also due to this service event call on view request entry we can't open the communication events in new tab. Ideally this service should be call in screen context instead view request.
=====================================
Thanks Deepak for reporting the issue and providing the patch for the same.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632745 13f79535-47bb-0310-9956-ffa450edef68
===========================================================
The reported issue has been observed in the order manager application. It happens when there's no shopping cart in the session.
Steps to test -
1. Try changing visual theme in the order manager application.
Observations -
1. Returns ERROR MESSAGE - org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen component://order/widget/ordermgr/OrderEntryOrderScreens.xml#quickFinalizeOrder: java.lang.IllegalArgumentException: Error running script at location [component://order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutPayment.groovy]: java.lang.NullPointerException: Cannot invoke method getRelated() on null object (Error running script at location [component://order/webapp/ordermgr/WEB-INF/actions/entry/CheckoutPayment.groovy]: java.lang.NullPointerException: Cannot invoke method getRelated() on null object)
Thanks.
===========================================================
Thanks Vyom for reporting the issue and Thanks Pranay for providing the patch for the same.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1632733 13f79535-47bb-0310-9956-ffa450edef68