Derby database can truncate entity fields > 8K
----------------------------------------------- Key: OFBIZ-3529 URL: https://issues.apache.org/jira/browse/OFBIZ-3529 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: SVN trunk Environment: OS X, Derby database Reporter: Mike Voytovich I was attempting to use the UPS shipment code in OFBiz to generate shipping labels. Note that this was using the default Derby database. OFBiz is able to send the confirm/accept requests and receive the responses, but an error is returned from UPS in handleUpsShipmentAcceptResponse - "The XML document is not well formed". It turns out that we're properly receiving a 20,000 byte "ShipmentDigest" from UPS in the handleUpsShipmentConfirmResponse method; but it looks like this is being truncated to exactly 8K when written out to the ShipmentRouteSegment entity. i.e., the ShipmentDigest data is truncated to 8K when being read back from the entity. The trackingDigest field-type is "very-long" with a SQL type of "CLOB", so I would expect it to save ~20K without issue. I switched over to MySQL for the database, and now the data is stored correctly. Note that there are no error messages in the logs regarding this truncation, and there's nothing in the documentation indicating that entity fields are limited to 8K when using the Derby database. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12840921#action_12840921 ] Mike Voytovich commented on OFBIZ-3529: --------------------------------------- Per a suggestion from Scott Gray, I made the diff below and performed a clean-all and rebuilt - and it did NOT fix the problem: --- framework/entity/fieldtype/fieldtypederby.xml (revision 140) +++ framework/entity/fieldtype/fieldtypederby.xml (working copy) @@ -42,7 +42,7 @@ <field-type-def type="very-short" sql-type="VARCHAR(10)" java-type="String"></field-type-def> <field-type-def type="short-varchar" sql-type="VARCHAR(60)" java-type="String"></field-type-def> <field-type-def type="long-varchar" sql-type="VARCHAR(255)" java-type="String"></field-type-def> - <field-type-def type="very-long" sql-type="CLOB" java-type="String"></field-type-def> + <field-type-def type="very-long" sql-type="CLOB(2M)" java-type="String"></field-type-def> <field-type-def type="comment" sql-type="VARCHAR(255)" java-type="String"></field-type-def> <field-type-def type="description" sql-type="VARCHAR(255)" java-type="String"></field-type-def> > Derby database can truncate entity fields > 8K > ----------------------------------------------- > > Key: OFBIZ-3529 > URL: https://issues.apache.org/jira/browse/OFBIZ-3529 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: OS X, Derby database > Reporter: Mike Voytovich > > I was attempting to use the UPS shipment code in OFBiz to generate shipping labels. Note that this was using the default Derby database. > OFBiz is able to send the confirm/accept requests and receive the responses, but an error is returned from UPS in handleUpsShipmentAcceptResponse - "The XML document is not well formed". > It turns out that we're properly receiving a 20,000 byte "ShipmentDigest" from UPS in the handleUpsShipmentConfirmResponse method; but it looks like this is being truncated to exactly 8K when written out to the ShipmentRouteSegment entity. i.e., the ShipmentDigest data is truncated to 8K when being read back from the entity. > The trackingDigest field-type is "very-long" with a SQL type of "CLOB", so I would expect it to save ~20K without issue. > I switched over to MySQL for the database, and now the data is stored correctly. > Note that there are no error messages in the logs regarding this truncation, and there's nothing in the documentation indicating that entity fields are limited to 8K when using the Derby database. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843971#action_12843971 ] Bilgin Ibryam commented on OFBIZ-3529: -------------------------------------- Hi Mike, could you check if the error is gone after rev 921455 Bilgin > Derby database can truncate entity fields > 8K > ----------------------------------------------- > > Key: OFBIZ-3529 > URL: https://issues.apache.org/jira/browse/OFBIZ-3529 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: OS X, Derby database > Reporter: Mike Voytovich > > I was attempting to use the UPS shipment code in OFBiz to generate shipping labels. Note that this was using the default Derby database. > OFBiz is able to send the confirm/accept requests and receive the responses, but an error is returned from UPS in handleUpsShipmentAcceptResponse - "The XML document is not well formed". > It turns out that we're properly receiving a 20,000 byte "ShipmentDigest" from UPS in the handleUpsShipmentConfirmResponse method; but it looks like this is being truncated to exactly 8K when written out to the ShipmentRouteSegment entity. i.e., the ShipmentDigest data is truncated to 8K when being read back from the entity. > The trackingDigest field-type is "very-long" with a SQL type of "CLOB", so I would expect it to save ~20K without issue. > I switched over to MySQL for the database, and now the data is stored correctly. > Note that there are no error messages in the logs regarding this truncation, and there's nothing in the documentation indicating that entity fields are limited to 8K when using the Derby database. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845601#action_12845601 ] Mike Voytovich commented on OFBIZ-3529: --------------------------------------- Hi Bilgin, Yes, I updated to tip of trunk, and the problem appears to be resolved. Regards, -mike > Derby database can truncate entity fields > 8K > ----------------------------------------------- > > Key: OFBIZ-3529 > URL: https://issues.apache.org/jira/browse/OFBIZ-3529 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: OS X, Derby database > Reporter: Mike Voytovich > > I was attempting to use the UPS shipment code in OFBiz to generate shipping labels. Note that this was using the default Derby database. > OFBiz is able to send the confirm/accept requests and receive the responses, but an error is returned from UPS in handleUpsShipmentAcceptResponse - "The XML document is not well formed". > It turns out that we're properly receiving a 20,000 byte "ShipmentDigest" from UPS in the handleUpsShipmentConfirmResponse method; but it looks like this is being truncated to exactly 8K when written out to the ShipmentRouteSegment entity. i.e., the ShipmentDigest data is truncated to 8K when being read back from the entity. > The trackingDigest field-type is "very-long" with a SQL type of "CLOB", so I would expect it to save ~20K without issue. > I switched over to MySQL for the database, and now the data is stored correctly. > Note that there are no error messages in the logs regarding this truncation, and there's nothing in the documentation indicating that entity fields are limited to 8K when using the Derby database. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3529?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-3529. ---------------------------------- Resolution: Fixed Fix Version/s: SVN trunk Assignee: Adrian Crum Thanks Bilgin, So fixed in trunk at r921455 > Derby database can truncate entity fields > 8K > ----------------------------------------------- > > Key: OFBIZ-3529 > URL: https://issues.apache.org/jira/browse/OFBIZ-3529 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Environment: OS X, Derby database > Reporter: Mike Voytovich > Assignee: Adrian Crum > Fix For: SVN trunk > > > I was attempting to use the UPS shipment code in OFBiz to generate shipping labels. Note that this was using the default Derby database. > OFBiz is able to send the confirm/accept requests and receive the responses, but an error is returned from UPS in handleUpsShipmentAcceptResponse - "The XML document is not well formed". > It turns out that we're properly receiving a 20,000 byte "ShipmentDigest" from UPS in the handleUpsShipmentConfirmResponse method; but it looks like this is being truncated to exactly 8K when written out to the ShipmentRouteSegment entity. i.e., the ShipmentDigest data is truncated to 8K when being read back from the entity. > The trackingDigest field-type is "very-long" with a SQL type of "CLOB", so I would expect it to save ~20K without issue. > I switched over to MySQL for the database, and now the data is stored correctly. > Note that there are no error messages in the logs regarding this truncation, and there's nothing in the documentation indicating that entity fields are limited to 8K when using the Derby database. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |