[Building Sakai] Discussion to Forum conversion question

Nuno Fernandes nuno at ufp.edu.pt
Thu Jun 4 01:30:38 PDT 2009


No Omer, you're using the latest version!
Quite strange as it should not be given that error. You may edit the file at
discussion2forums/src/java/org/sakaiproject/discforumsconv/ConversionImpl.java,
near line 335 to force the use of extended description:

// if(topicBody.length() <= 255){
//     topic.setShortDescription(topicBody);
// }else{
    topic.setExtendedDescription(topicBody);
// }

Compile, deploy and give it a try (and please let me know if it solved)!

Thanks,
Nuno



2009/6/3 Omer Piperdi <omer at rice.edu>

> Hi Nuno,
>
> I checked it out from
>
> https://source.sakaiproject.org/contrib/ufp/discussion2forums/trunk/
>
> on June 1.. Anything change since then or different location?
>
> Thanks again..
> Omer
>
> Nuno Fernandes wrote:
>
>> I Omer,
>>
>> Ideally, you should truncate those fields to 255 chars and re-run the
>> conversion (only the remaining 5 sites will be processed).
>>
>> Do you have the latest dicussion2forums project code? You can issue a "svn
>> up" on the project folder just to make sure (and compile and deploy if code
>> was updated). I am asking you this because in the latest code, the code
>> block that sets the topic shortDescription already checks the text length:
>>
>> if(topicBody.length() <= 255){
>>    topic.setShortDescription(topicBody);
>> }else{
>>    topic.setExtendedDescription(topicBody);
>> }
>>
>> Hope it helps,
>> Nuno
>>
>>
>>
>> 2009/6/2 Omer Piperdi <omer at rice.edu <mailto:omer at rice.edu>>
>>
>>
>>    During the Discussion to Forum conversion.. I got about 5 sites out
>>    of about 11000 sites not converted.. I can see the database error
>>    because of Discussion has longer description than Forum can hold..
>>
>>    If I rerun the conversion (Quartz job) again, only those 5 sites
>>    will be converted or it will start all over again?
>>
>>    Thanks
>>    Omer
>>
>>
>>
>>    ------------
>>    ERROR: 'Discussion' --> 'Forums': failed to convert site CHIN 212
>>    001 Sp08. Conversion for this site was aborted - check the errors in
>>    logs and re-run this conversion! (2009-06-02 14:46:30,386
>>
>>  QuartzScheduler_Worker-3_org.sakaiproject.discforumsconv.ConversionImpl)
>>    org.springframework.jdbc.UncategorizedSQLException: Hibernate
>>    flushing: Could not execute JDBC batch update; uncategorized
>>    SQLException for SQL [insert into MFR_TOPIC_T (VERSION, UUID,
>>    CREATED, CREATED_BY, MODIFIED, MODIFIED_BY, DEFAULTASSIGNNAME,
>>    TITLE, SHORT_DESCRIPTION, EXTENDED_DESCRIPTION, MODERATED, MUTABLE,
>>    SORT_INDEX, TYPE_UUID, of_surrogateKey, pf_surrogateKey, LOCKED,
>>    DRAFT, CONFIDENTIAL_RESPONSES, MUST_RESPOND_BEFORE_READING,
>>    HOUR_BEFORE_RESPONSES_VISIBLE, GRADEBOOK, GRADEBOOK_ASSIGNMENT,
>>    TOPIC_DTYPE, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
>>    ?, ?, ?, ?, ?, ?, ?, ?, ?, 'DT', ?)]; SQL state [72000]; error code
>>    [12899]; ORA-12899: value too large for column
>>    "SAKAIPROD"."MFR_TOPIC_T"."SHORT_DESCRIPTION" (actual: 361, maximum:
>>    255)
>>    ; nested exception is java.sql.BatchUpdateException: ORA-12899:
>>    value too large for column
>>    "SAKAIPROD"."MFR_TOPIC_T"."SHORT_DESCRIPTION" (actual: 361, maximum:
>>    255)
>>    -----------
>>
>>    _______________________________________________
>>    sakai-dev mailing list
>>    sakai-dev at collab.sakaiproject.org
>>    <mailto:sakai-dev at collab.sakaiproject.org>
>>    http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>>    TO UNSUBSCRIBE: send email to
>>    sakai-dev-unsubscribe at collab.sakaiproject.org
>>    <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a
>>    subject of "unsubscribe"
>>
>>
>>
>>
>> --
>> Nuno Fernandes  [www.linkedin.com/in/nfgrilo <
>> http://www.linkedin.com/in/nfgrilo>]
>> Software Developer - UFP-UV  [Universidade Virtual]
>> Software Developer - Sakai Foundation  [sakaiproject.org <
>> http://sakaiproject.org>]
>> Sakai Fellow 2008 - Sakai Foundation  [
>> confluence.sakaiproject.org/confluence/x/FIF9AQ <
>> http://confluence.sakaiproject.org/confluence/x/FIF9AQ>]
>>
>> Universidade Fernando Pessoa  [www.ufp.pt <http://www.ufp.pt>]
>> Praça 9 de Abril, 349
>> 4249-004 Porto
>> tel: + 351 22 507 13 00
>> fax: + 351 22 550 82 69
>> !DSPAM:2294,4a264b30164803938018231!
>>
>
>


-- 
Nuno Fernandes  [www.linkedin.com/in/nfgrilo]
Software Developer - UFP-UV  [Universidade Virtual]
Software Developer - Sakai Foundation  [sakaiproject.org]
Sakai Fellow 2008 - Sakai Foundation  [
confluence.sakaiproject.org/confluence/x/FIF9AQ]

Universidade Fernando Pessoa  [www.ufp.pt]
Praça 9 de Abril, 349
4249-004 Porto
tel: + 351 22 507 13 00
fax: + 351 22 550 82 69
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090604/21cd2154/attachment.html 


More information about the sakai-dev mailing list