cancel
Showing results for 
Search instead for 
Did you mean: 

Error at Preview in Template

eleaese
Confirmed Champ
Confirmed Champ
We are using Alfresco 1.4 Community with DB2 UDB 9.1 on Windows 2003 .

After installing Alfresco, everything went fine, except for the following. When we choose to view details of a document, for example and html one, select action Preview in template, choose any template from the combo, we got the attached error from Hibernate:

Hibernate operation: could not load an entity: [org.alfresco.repo.domain.hibernate.NodeStatusImpl#component[protocol,identifier,guid]{protocol=workspace, guid=b08db99b-a354-11db-9288-afa9868bb29e_en_US, identifier=SpacesStore}]; SQL [select nodestatus0_.protocol as
Full text is at the end of the message.

SQLSTATE 22001 means:
Character data, right truncation occurred; for example, an update or insert value is a string that is too long for the column, or a datetime value cannot be assigned to a host variable, because it is too small.

Do anybody get the same issue and have a way to overcome the problem?

Thanks in advance.


The Hibernate exception
Hibernate operation: could not load an entity: [org.alfresco.repo.domain.hibernate.NodeStatusImpl#component[protocol,identifier,guid]{protocol=workspace, guid=b08db99b-a354-11db-9288-afa9868bb29e_en_US, identifier=SpacesStore}]; SQL [select nodestatus0_.protocol as protocol3_3_, nodestatus0_.identifier as identifier3_3_, nodestatus0_.guid as guid3_3_, nodestatus0_.transaction_id as transact4_3_3_, nodestatus0_.node_id as node5_3_3_, nodeimpl1_.id as id0_0_, nodeimpl1_.protocol as protocol0_0_, nodeimpl1_.identifier as identifier0_0_, nodeimpl1_.uuid as uuid0_0_, nodeimpl1_.type_qname as type5_0_0_, nodeimpl1_.acl_id as acl6_0_0_, storeimpl2_.protocol as protocol6_1_, storeimpl2_.identifier as identifier6_1_, storeimpl2_.root_node_id as root3_6_1_, aspects3_.node_id as node1_5_, aspects3_.qname as qname5_, parentasso4_.child_node_id as child3_6_, parentasso4_.id as id6_, parentasso4_.id as id4_2_, parentasso4_.parent_node_id as parent2_4_2_, parentasso4_.child_node_id as child3_4_2_, parentasso4_.type_qname as type4_4_2_, parentasso4_.qname as qname4_2_, parentasso4_.child_node_name as child6_4_2_, parentasso4_.child_node_name_crc as child7_4_2_, parentasso4_.is_primary as is8_4_2_, parentasso4_.assoc_index as assoc9_4_2_ from alf_node_status nodestatus0_ left outer join alf_node nodeimpl1_ on nodestatus0_.node_id=nodeimpl1_.id left outer join alf_store storeimpl2_ on nodeimpl1_.protocol=storeimpl2_.protocol and nodeimpl1_.identifier=storeimpl2_.identifier left outer join alf_node_aspects aspects3_ on nodeimpl1_.id=aspects3_.node_id left outer join alf_child_assoc parentasso4_ on nodeimpl1_.id=parentasso4_.child_node_id where nodestatus0_.protocol=? and nodestatus0_.identifier=? and nodestatus0_.guid=?]; DB2 SQL error: SQLCODE: -302, SQLSTATE: 22001, SQLERRMC: null; nested exception is com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -302, SQLSTATE: 22001, SQLERRMC: null
Smiley Very Happy
14 REPLIES 14

derek
Star Contributor
Star Contributor
Hi,

If you want this one to be fixed sooner rather than later, then I suggest you put a stack trace and a description of how to reproduce it onto the JIRA bug.

Regards

warren
Champ in-the-making
Champ in-the-making
Derek,

I have uploaded a strack trace and some screen shots to the jira issue.

I have also found another case where this error occurs - when mailing users of a space.


Let me know if you need anything else on this.

Regards,

Warren

warren
Champ in-the-making
Champ in-the-making
I noticed that this bug is now resolved with a single source file that was modified.

Kevin Roast [05-Mar-07 12:18 PM]
fixed

r5289 | kevinr | 2007-03-05 12:17:29 +0000 (Mon, 05 Mar 2007) | 1 line
Changed paths:
   M /alfresco/BRANCHES/V2.0/root/projects/repository/source/java/org/alfresco/repo/template/FreeMarkerProcessor.java

I would like to compile, package and test this in my environment however it does not seem to be updated in HEAD.

Is there anyway:
I can access BRANCHES via SVN?
I can have the file sent to me
It can be commited to HEAD?

Regards,

Warren

kevinr
Star Contributor
Star Contributor
The bug fix will be merged to HEAD shortly. If you want to make the change yourself now the change is very simple thus:

open the source for class:
org.alfresco.repo.template.FreeMarkerProcessor

in the method:
protected Configuration getConfig()

add this line:
config.setLocalizedLookup(false);

recompile and the issue will be fixed.

Hope this helps,

Kevin

warren
Champ in-the-making
Champ in-the-making
Kevin,

I'll do that quick patch tomorrow.

Thanks for the quick resolution. It will help progress our pilot of Alfesco.


Warren