fail uploading audio/video files to database
-------------------------------------------- Key: OFBIZ-4620 URL: https://issues.apache.org/jira/browse/OFBIZ-4620 Project: OFBiz Issue Type: Bug Components: framework Affects Versions: SVN trunk Reporter: Wai When uploading binary files (eg. image/audio/video) to the database, ofbiz throws a type casting exception because it is trying to type cast HeapByteBuffer to byte[]. I think the problem stems from configuring ofbiz to use java.nio.ByteBuffer and its subclass java.nio.HeapByteBuffer to contain uploaded binary data but no accommodation is made in the code to work with this type of object. To test this, you need to set content.properties/content.upload.always.local.file=false use https://http://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=Company and upload an image file. java.nio.HeapByteBuffer comes from java's rt.jar (make sure your classpath includes this) -- 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 |
[ https://issues.apache.org/jira/browse/OFBIZ-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wai updated OFBIZ-4620: ----------------------- Attachment: OFBIZ-4620.patch > fail uploading audio/video files to database > -------------------------------------------- > > Key: OFBIZ-4620 > URL: https://issues.apache.org/jira/browse/OFBIZ-4620 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Wai > Attachments: OFBIZ-4620.patch > > > When uploading binary files (eg. image/audio/video) to the database, ofbiz throws a type casting exception because it is trying to type cast HeapByteBuffer to byte[]. > I think the problem stems from configuring ofbiz to use java.nio.ByteBuffer and its subclass java.nio.HeapByteBuffer to contain uploaded binary data but no accommodation is made in the code to work with this type of object. > To test this, you need to set content.properties/content.upload.always.local.file=false > use https://http://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=Company and upload an image file. > java.nio.HeapByteBuffer comes from java's rt.jar (make sure your classpath includes this) -- 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 |
In reply to this post by Nicolas Malin (Jira)
Hello Committers,
Just a little nudge to see if there are any takers for this fix. Thanks, Wai |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13168617#comment-13168617 ] Wai commented on OFBIZ-4620: ---------------------------- Hi, Anybody interested in committing this patch? Thanks > fail uploading audio/video files to database > -------------------------------------------- > > Key: OFBIZ-4620 > URL: https://issues.apache.org/jira/browse/OFBIZ-4620 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Wai > Attachments: OFBIZ-4620.patch > > > When uploading binary files (eg. image/audio/video) to the database, ofbiz throws a type casting exception because it is trying to type cast HeapByteBuffer to byte[]. > I think the problem stems from configuring ofbiz to use java.nio.ByteBuffer and its subclass java.nio.HeapByteBuffer to contain uploaded binary data but no accommodation is made in the code to work with this type of object. > To test this, you need to set content.properties/content.upload.always.local.file=false > use https://http://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=Company and upload an image file. > java.nio.HeapByteBuffer comes from java's rt.jar (make sure your classpath includes this) -- 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 |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux reassigned OFBIZ-4620: -------------------------------------- Assignee: Jacques Le Roux > fail uploading audio/video files to database > -------------------------------------------- > > Key: OFBIZ-4620 > URL: https://issues.apache.org/jira/browse/OFBIZ-4620 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Wai > Assignee: Jacques Le Roux > Attachments: OFBIZ-4620.patch > > > When uploading binary files (eg. image/audio/video) to the database, ofbiz throws a type casting exception because it is trying to type cast HeapByteBuffer to byte[]. > I think the problem stems from configuring ofbiz to use java.nio.ByteBuffer and its subclass java.nio.HeapByteBuffer to contain uploaded binary data but no accommodation is made in the code to work with this type of object. > To test this, you need to set content.properties/content.upload.always.local.file=false > use https://http://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=Company and upload an image file. > java.nio.HeapByteBuffer comes from java's rt.jar (make sure your classpath includes this) -- 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 |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-4620. ---------------------------------- Resolution: Fixed Thanks Wai, Your patch is in trunk r1214124 R11.04 r1214125 Just 2 minor things {quote} To test this, you need to set content.properties/content.upload.always.local.file=false use https://http://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=Company and upload an image file. {quote} This was not a good idea, we would need to change content.properties on demo server and restart ;) Please when creating your patches with Subclipse remove the 2 1st lines, see [Patches how to|https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Contributors+Best+Practices#OFBizContributorsBestPractices-HowtoSendinYourContributions(orhowtocreateandapplypatches)] for details > fail uploading audio/video files to database > -------------------------------------------- > > Key: OFBIZ-4620 > URL: https://issues.apache.org/jira/browse/OFBIZ-4620 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Wai > Assignee: Jacques Le Roux > Attachments: OFBIZ-4620.patch > > > When uploading binary files (eg. image/audio/video) to the database, ofbiz throws a type casting exception because it is trying to type cast HeapByteBuffer to byte[]. > I think the problem stems from configuring ofbiz to use java.nio.ByteBuffer and its subclass java.nio.HeapByteBuffer to contain uploaded binary data but no accommodation is made in the code to work with this type of object. > To test this, you need to set content.properties/content.upload.always.local.file=false > use https://http://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=Company and upload an image file. > java.nio.HeapByteBuffer comes from java's rt.jar (make sure your classpath includes this) -- 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 |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-4620: ----------------------------------- Fix Version/s: SVN trunk Release Branch 11.04 > fail uploading audio/video files to database > -------------------------------------------- > > Key: OFBIZ-4620 > URL: https://issues.apache.org/jira/browse/OFBIZ-4620 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Wai > Assignee: Jacques Le Roux > Fix For: Release Branch 11.04, SVN trunk > > Attachments: OFBIZ-4620.patch > > > When uploading binary files (eg. image/audio/video) to the database, ofbiz throws a type casting exception because it is trying to type cast HeapByteBuffer to byte[]. > I think the problem stems from configuring ofbiz to use java.nio.ByteBuffer and its subclass java.nio.HeapByteBuffer to contain uploaded binary data but no accommodation is made in the code to work with this type of object. > To test this, you need to set content.properties/content.upload.always.local.file=false > use https://http://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=Company and upload an image file. > java.nio.HeapByteBuffer comes from java's rt.jar (make sure your classpath includes this) -- 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 |
Free forum by Nabble | Edit this page |