Login  Register

Re: Dev - [Fwd: Re: [OFBiz] Users - ERRROR No ShipmentPackageRouteSegs Moved to Dev

Posted by Fred Forester-2 on May 24, 2006; 7:35pm
URL: http://ofbiz.116.s1.nabble.com/Dev-Fwd-Re-OFBiz-Users-ERRROR-No-ShipmentPackageRouteSegs-Moved-to-Dev-tp168073p168075.html



the bug seems to be in "ensurePackageRouteSeg". these changes seem to
fix the first problem. I still get the missing Weight error during
confirm UPS.

Fred




Fred Forester wrote:

>
> Hi all,
>
> question about the ShipmentRouteSegment and ShipmentPackageRouteSeg
>
> it seems there is one ShipmentRouteSegment per shipmentid but they all
> have the same shipmentRouteSegmentId?
>
> the ShipmentPackageRouteSeg should be one for each shipmentid/packageseq?
>
> I noticed in ShipmentServices.xml that ensureRouteSegPackage is called
> sometimes with a shipmentRouteSegmentId and other times with a
> shipmentPackageSeqId?
>
> Thanx
> Fred
>
>
>
>
>
> Fred Forester wrote:
>
>>this maybe should be on the dev list now. :)
>>
>>
>>Fred Forester wrote:
>> > Agreed.
>> >
>> > I noticed that clicking Update on the route segments clears the first
>> > error but clicking Confirm Shipment with UPS again produces this.
>> > The Following Errors Occurred:
>> >
>> >      * Weight value not found for ShipmentRouteSegment with shipmentId
>> > 10032, shipmentRouteSegmentId 00001, and shipmentPackageSeqId 00001
>> >
>> >
>> >
>> > Fred
>> >
>> >
>> > Si Chen wrote:
>> >
>> >>I looked at ShipmentServices from before and now and couldn't tell what
>> >>is happening.  It's not as simple as just adding that back in.  There's
>> >>something else going on that broke it from opentaps 0.8 (august 2005) to
>> >>opentaps 0.9/current ofbiz svn.  We'll have to go through the two
>> >>versions and check more carefully.
>> >>
>> >>Si
>> >>
>> >>Fred Forester wrote:
>> >>
>> >>
>> >>>Si,
>> >>>
>> >>>no, I didn't do a code compare. I searched the list(s) for
>> >>>"ShipmentPackageRouteSegs" and found 3 entries all from svn.
>> >>>
>> >>>the error message shows up in the code here
>> >>>http://lists.ofbiz.org/pipermail/svn/2005-July/002290.html
>> >>>
>> >>>Thanx
>> >>>Fred
>> >>>
>> >>>
>> >>>
>> >>>Si Chen wrote:
>> >>>
>> >>>
>> >>>
>> >>>>Not sure...  Did you compare it with opentaps-0.8.4 code or older
>> >>>>versions?  If not, I'll check.
>> >>>>
>> >>>>Fred Forester wrote:
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>>It looks like that somewhere in
>> >>>>>"createShipmentForFacilityAndShipGroup" it needs to call
>> >>>>>"ensureRouteSegPackage". does this sound correct?
>> >>>>>
>> >>>>>
>> >>>>>it seems the entity has been around for a while and the fact that it
>> >>>>>doesn't exist is being enforced in the thirdparty shipping services.
>> >>>>>http://lists.ofbiz.org/pipermail/svn/2005-July/002290.html
>> >>>>>
>> >>>>>Thanx
>> >>>>>Fred
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>Si Chen wrote:
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>>>Yes, this might be a bug.  There's a jira issue for it.
>> >>>>>>
>> >>>>>>Note that this worked in opentaps 0.8.4, so the bug, if there is
>> >>>>>>one, is recent.  You might want to compare the two.
>> >>>>>>
>> >>>>>>Si
>> >>>>>>
>> >>>>>>Fred Forester wrote:
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>>Hi All
>> >>>>>>>
>> >>>>>>>after a quickship entire order then looking at the Route Segments
>> >>>>>>>and trying to confirm shipment with ups I get
>> >>>>>>>
>> >>>>>>>The Following Errors Occurred:
>> >>>>>>>
>> >>>>>>>    * No ShipmentPackageRouteSegs (ie No Packages) found for
>> >>>>>>>ShipmentRouteSegment with shipmentId 10000 and
>> >>>>>>>shipmentRouteSegmentId 00001
>> >>>>>>>
>> >>>>>>>and
>> >>>>>>>
>> >>>>>>>6775606 (http-0.0.0.0-8443-Processor2) [
>> >>>>>>>ServiceDispatcher.java:412:ERROR] Service Error
>> >>>>>>>[upsShipmentConfirm]: No ShipmentPackageRouteSegs (
>> >>>>>>>ie No Packages) found for ShipmentRouteSegment with shipmentId
>> >>>>>>>10012 and shipmentRouteSegmentId 00001
>> >>>>>>>6775611 (http-0.0.0.0-8443-Processor2) [
>> >>>>>>>TransactionUtil.java:243:ERROR]
>> >>>>>>>
>> >>>>>>>bug?
>> >>>>>>>
>> >>>>>>>Thanx
>> >>>>>>>Fred
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>_______________________________________________
>> >>>>>>>Users mailing list
>> >>>>>>>[hidden email]
>> >>>>>>>http://lists.ofbiz.org/mailman/listinfo/users
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>>_______________________________________________
>> >>>>>>Users mailing list
>> >>>>>>[hidden email]
>> >>>>>>http://lists.ofbiz.org/mailman/listinfo/users
>> >>>>>>
>> >>>>>>
>> >>>>>>
>> >>>>>
>> >>>>>
>> >>>>>_______________________________________________
>> >>>>>Users mailing list
>> >>>>>[hidden email]
>> >>>>>http://lists.ofbiz.org/mailman/listinfo/users
>> >>>>>
>> >>>>>
>> >>>>>
>> >>>>
>> >>>>
>> >>>>------------------------------------------------------------------------
>> >>>>
>> >>>>
>> >>>>_______________________________________________
>> >>>>Users mailing list
>> >>>>[hidden email]
>> >>>>http://lists.ofbiz.org/mailman/listinfo/users
>> >>>>
>> >>>
>> >>>
>> >>>_______________________________________________
>> >>>Users mailing list
>> >>>[hidden email]
>> >>>http://lists.ofbiz.org/mailman/listinfo/users
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >>
>> >>------------------------------------------------------------------------
>> >>
>> >>
>> >>_______________________________________________
>> >>Users mailing list
>> >>[hidden email]
>> >>http://lists.ofbiz.org/mailman/listinfo/users
>> >
>> >
>> > _______________________________________________
>> > Users mailing list
>> > [hidden email]
>> > http://lists.ofbiz.org/mailman/listinfo/users
>> >
>> >
>>
>>_______________________________________________
>>Dev mailing list
>>[hidden email]
>>http://lists.ofbiz.org/mailman/listinfo/dev
>>
>>
>
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>
>

Index: applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml
===================================================================
--- applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml    (revision 28)
+++ applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml    (working copy)
@@ -749,11 +749,14 @@
         <remove-value value-name="lookedUpValue"/>
     </simple-method>
     <simple-method method-name="ensurePackageRouteSeg" short-description="Ensure ShipmentPackageRouteSeg exists for all RouteSegments for th
is Package">
+        <log level="info" message="IN ensurePackageRouteSeg"/>
         <entity-and entity-name="ShipmentRouteSegment" list-name="shipmentRouteSegments">
-            <field-map field-name="shipmentId" env-name="lookupRouteSegmentsMap.shipmentId"/>
+            <field-map field-name="shipmentId" env-name="shipmentId"/>
         </entity-and>

+        <log level="info" message="IN ensurePackageRouteSeg ${shipmentRouteSegments}"/>
         <iterate entry-name="shipmentRouteSegment" list-name="shipmentRouteSegments">
+            <log level="info" message="IN ensurePackageRouteSeg iterate"/>
             <entity-one entity-name="ShipmentPackageRouteSeg" value-name="checkShipmentPackageRouteSeg" auto-field-map="false">
                 <field-map field-name="shipmentId" env-name="shipmentId"/>
                 <field-map field-name="shipmentPackageSeqId" env-name="shipmentPackageSeqId"/>
@@ -761,8 +764,12 @@
             </entity-one>

             <if-empty field-name="checkShipmentPackageRouteSeg">
-                <call-service service-name="createShipmentPackageRouteSeg" in-map-name="checkShipmentPackageRouteSegMap">
-                </call-service>
+               <log level="info" message="createShipmentPackageRouteSeg"/>
+               <set field="checkShipmentPackageRouteSegMap.shipmentRouteSegmentId" from-field="shipmentRouteSegment.shipmentRouteSegmentId"/
>
+               <set field="checkShipmentPackageRouteSegMap.shipmentPackageSeqId" from-field="shipmentPackageSeqId"/>
+               <set field="checkShipmentPackageRouteSegMap.shipmentId" from-field="shipmentId"/>
+               <call-service service-name="createShipmentPackageRouteSeg" in-map-name="checkShipmentPackageRouteSegMap">
+               </call-service>
             </if-empty>
         </iterate>
     </simple-method>
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev