Details
-
Bug
-
Resolution: Won't Fix
-
Low
-
None
-
4.2.11
-
None
-
either java version "1.6.0_18"
or java version "1.6.0_18-ea"
Description
When attempting to paste character literals from above the BMP into a noformat box, confluence generates a runtime error when attempting to save the page. Characters above the BMP are typically stored as two characters in Java, requiring internally the representation using surrogate pairs.
To reproduce the issue:
- create a valid Unicode character above 65535 in a Unicode-capable terminal, i.e. using "perl -CSD -le 'print chr(0x24B24)'"
- open a page for editing
- start a noformat macro
- copy and paste the above (Chinese) character into the box
- attempt to save
I believe that Confluence should be able to handle Unicodes with a code point value above 65535 that are not in the Unicode categories for control (Cc), surrogate (Cs), private-use (Co) or unassigned (Cn).
The errors returned are:
Cause
java.lang.RuntimeException: Error rendering template for decorator root
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:186)
caused by: java.lang.RuntimeException: Error rendering template for decorator page
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:186)
caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getWebInterfaceContext' in class com.atlassian.confluence.pages.actions.EditPageAction threw exception net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection at template/includes/menu-macros.vm[line 67, column 79]
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
caused by: net.sf.hibernate.LazyInitializationException: Failed to lazily initialize a collection
at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:201)
caused by: net.sf.hibernate.HibernateException: collection was evicted
at net.sf.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:3307)