Applied patch from jira issue OFBIZ-4946 - Getting error when uploading a file after creating a data resource.
Thanks Ashish Ambulkar for creating the issue. Thanks Arun, Jacques for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1646984 13f79535-47bb-0310-9956-ffa450edef68