[Building Sakai] convertToFile

Paul Dagnall pdagnall1 at udayton.edu
Tue Aug 28 14:12:40 PDT 2012


Hi
Using Sakai 2.6 and Oracle 11g, I'm trying to use the convertToFile method
in DbContentService to move binary content out of the
CONTENT_RESOURCE_BINARY_BODY table and into a mounted file store.

In sakai.properties I set:
convertToFile at org.sakaiproject.content.api.ContentHostingService=true

I confirmed we have this
(KNL-164<https://jira.sakaiproject.org/browse/KNL-164>)
update in my code, but when I start tomcat with copyToFile set, it outputs:

2012-08-28 15:50:47,008  INFO main
org.sakaiproject.content.impl.DbContentService - Migration of data to the
Binary format will be performed by this node
2012-08-28 15:50:47,051  INFO main
org.sakaiproject.content.impl.BaseContentService - Loaded Storage as
org.sakaiproject.content.impl.DbContentService$DbStorage at 65334b1a for
org.sakaiproject.content.impl.DbContentService at a87cbde
2012-08-28 15:50:47,062  INFO main
org.sakaiproject.content.impl.BaseContentService - init(): site quota:
6291456 body path: /volume/ volumes: 11sp/11sp1, 11sp/11sp2, 11sp/11sp3,
11sp/11sp4,
2012-08-28 15:50:47,096  INFO main
org.sakaiproject.content.impl.DbContentService - convertToFile
2012-08-28 15:50:47,129  WARN main
org.sakaiproject.content.impl.DbContentService - convertToFile(): null xml
:
2012-08-28 15:50:47,129  WARN main
org.sakaiproject.content.impl.DbContentService - convertToFile(): null xml
:
2012-08-28 15:50:47,130  WARN main
org.sakaiproject.content.impl.DbContentService - convertToFile(): null xml
:
2012-08-28 15:50:47,130  WARN main
org.sakaiproject.content.impl.DbContentService - convertToFile(): null xml
:
....
{these convertToFile(): null xml : messages repeat until it's done. No file
names.}

I checked the notes in
SAK-18389<https://jira.sakaiproject.org/browse/SAK-18389>and
everything is in order.

The query, "select RESOURCE_ID, XML, BINARY_ENTITY from CONTENT_RESOURCE
where FILE_PATH IS NULL" is used in the code, and I verified it returns
about 1.2 million records and then the clob file is extracted from:

Object clob = result.getObject(3);

This returns null which I think is the problem. It should be getting the
BINARY_ENTITY value, which I presume points to the BODY column in
CONTENT_RESOURCE_BINARY_BODY. Does anyone have any idea why it would be
giving me a null there? I did notice that the data type on the BODY column
is blob.

Thank you!

Paul Dagnall
Application Developer & Administrator
University of Dayton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120828/01aebf7a/attachment.html 


More information about the sakai-dev mailing list