Error when clicking on shipment id from Sales Order
---------------------------------------------------
Key: OFBIZ-2821
URL: https://issues.apache.org/jira/browse/OFBIZ-2821
Project: OFBiz
Issue Type: Bug
Components: product
Affects Versions: Release Branch 9.04, SVN trunk
Reporter: Vince Clark
Copied and pasted from thread on ML. Note that the error occurs anywhere that
you click on a shipment link, not just from an order.
Original post be Eva Bowman
Hello all,
I get the error below when I click on the shipment id link from Sales Order. Is
this a bug?
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen
[component://product/widget/facility/ShipmentScreens.xml#ViewShipment]:
org.ofbiz.base.util.GeneralException: Error running Groovy script at location
[component://product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy]
(SQL Exception while executing the following:SELECT SVC.STATUS_ID,
SVC.STATUS_ID_TO, SVC.CONDITION_EXPRESSION, SVC.TRANSITION_NAME,
SI.STATUS_TYPE_ID, SI.STATUS_CODE, SI.SEQUENCE_ID, SI.DESCRIPTION FROM
dbo.STATUS_VALID_CHANGE SVC INNER JOIN dbo.STATUS_ITEM SI ON SVC.STATUS_ID_TO =
SI.STATUS_ID WHERE (SVC.STATUS_ID = ?) ORDER BY SI.SEQUENCE_ID ASC,
SI.SEQUENCE_ID ASC (A column has been specified more than once in the order by
list. Columns in the order by list must be unique.)) (Error running Groovy
script at location
[component://product/webapp/facility/WEB-INF/actions/shipment/EditShipmentRouteSegments.groovy]
(SQL Exception while executing the following:SELECT SVC.STATUS_ID,
SVC.STATUS_ID_TO, SVC.CONDITION_EXPRESSION, SVC.TRANSITION_NAME,
SI.STATUS_TYPE_ID, SI.STATUS_CODE, SI.SEQUENCE_ID, SI.DESCRIPTION FROM
dbo.STATUS_VALID_CHANGE SVC INNER JOIN dbo.STATUS_ITEM SI ON SVC.STATUS_ID_TO =
SI.STATUS_ID WHERE (SVC.STATUS_ID = ?) ORDER BY SI.SEQUENCE_ID ASC,
SI.SEQUENCE_ID ASC (A column has been specified more than once in the order by
list. Columns in the order by list must be unique.)))
Response by Scott Gray:
Hi Eva
Yes it is a bug although not reproducible OOTB because derby doesn't
complain about order by items not being unique. The problem occurs
because the view entity is adding sequenceId to the order by list and
then the actual delegator call also passes in the same order by,
causing the duplication.
Three possible solutions:
1. Remove the order by from the view entity
2. Remove the order by from any code querying the view entity (there
are quite a few)
3. Enhance the OrderByList class to throw out any duplicate
OrderByItem objects
I'm thinking 2 and 3 combined is probably the best solution. If you
have time could please create a jira issue for the bug?
Many thanks
Scott
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.