<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/rtftemplate/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/rtftemplate/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Fri, 24 May 2013 16:25:47 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/rtftemplate/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>#7 RTFTemplate not thread safe</title><link>https://sourceforge.net/p/rtftemplate/bugs/7/?limit=25#3f1e</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Angelo, thanks for quick response.&lt;br /&gt;
It is no problem for us to try XDocReport, sometimes we will explore it and according to amount of migration work we perhaps migrate. I hope this issue doesn't reproduce in XDocReport.&lt;br /&gt;
Maybe could the existence of new library be better communicated on main pages of RTFTemplate - &lt;a href="http://rtftemplate.sourceforge.net/"&gt;http://rtftemplate.sourceforge.net/&lt;/a&gt; and &lt;a href="https://sourceforge.net/projects/rtftemplate/"&gt;https://sourceforge.net/projects/rtftemplate/&lt;/a&gt; ? Or did I miss something?&lt;br /&gt;
Thanks&lt;br /&gt;
Tomáš&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomáš Záluský</dc:creator><pubDate>Fri, 24 May 2013 16:25:47 -0000</pubDate><guid>https://sourceforge.net655805a7fb4272aecaa4682629b17f5ead8d35b0</guid></item><item><title>#7 RTFTemplate not thread safe</title><link>https://sourceforge.net/p/rtftemplate/bugs/7/?limit=50#4300</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Tomáš,&lt;/p&gt;
&lt;p&gt;I'm sorry but I hav egaven RTFTemplate for XDocReport &lt;a href="https://code.google.com/p/xdocreport/" rel="nofollow"&gt;https://code.google.com/p/xdocreport/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you can use docx or odt as template source (instead of using RTF), I suggest really to switch to XDocReport. It is more performant, can convert to PDF or XHTML, manage text styling (set html in your context to style text (bold, italic, etc) instead simple text).&lt;/p&gt;
&lt;p&gt;Regards Angelo&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Angelo Zerr</dc:creator><pubDate>Fri, 24 May 2013 15:01:24 -0000</pubDate><guid>https://sourceforge.netdbd625bc96f5046c414626fa2bfbca87f6559c2f</guid></item><item><title>RTFTemplate not thread safe</title><link>https://sourceforge.net/p/rtftemplate/bugs/7/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hallo,&lt;br /&gt;
I use RTF template library in our project, thanks for your open source contribution. I was confronted with following behaviour:&lt;/p&gt;
&lt;p&gt;If two threads run java code like the one shown on the top of page &lt;a href="http://rtftemplate.sourceforge.net/userguide/integration-rtftemplate-java/integration-rtftemplate-java.html"&gt;http://rtftemplate.sourceforge.net/userguide/integration-rtftemplate-java/integration-rtftemplate-java.html&lt;/a&gt; , race condition can happen. According to your internal spring configuration, bean vmRTFTemplate has prototype scope but defaultRTFParser has singleton scope. Hence, every new call of builder.newRTFTemplate() creates new instance with the same autowired field parser. Since RTFDocumentHandler stores state of automaton into currentRTFElement field, field can be overwritten by different thread. &lt;/p&gt;
&lt;p&gt;My workaround is to ignore spring singleton and explicitly setParser(new RTFDocumentHandler()); after template creation. However I think the parser should also be of prototype scope in spring context.&lt;/p&gt;
&lt;p&gt;I reproduced this bug in a test with 40 concurrent threads which repeatedly generated RTF (model template was the same every time but parameters differed). Strange behaviour comprised ArraysIndexOutOfBoundsExceptions, StringIndexOutOfBoundsExceptions, IOException("Current RTF element is null. RTF stream is not valid.") or inappropriately long and corrupted RTF files (4MB where 50k was expected, probably due to returning state of automaton to former position). After applying workaround race conditions dismissed.&lt;/p&gt;
&lt;p&gt;Thanks for response&lt;br /&gt;
Tomáš Záluský&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tomáš Záluský</dc:creator><pubDate>Fri, 24 May 2013 14:51:22 -0000</pubDate><guid>https://sourceforge.net01b123ab8fdaee0f0688443835dfec44e8b76c4b</guid></item><item><title>Real dependencies</title><link>https://sourceforge.net/p/rtftemplate/bugs/6/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Please set the optional libraries (not required to run) to optional in maven pom.xml, because now all library set to required. (I think spring.xml not required in all case).&lt;/p&gt;
&lt;p&gt;More info about optional dependencies: &lt;a href="http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html" rel="nofollow"&gt;http://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks. Cow&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">boci</dc:creator><pubDate>Mon, 26 Jan 2009 15:29:49 -0000</pubDate><guid>https://sourceforge.netacc035e3397cc1c396286abc318af9793fc04e02</guid></item><item><title>Collections of String fails when used as object property</title><link>https://sourceforge.net/p/rtftemplate/bugs/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Accessing collections of string as object properties doesn't work when used in a loop.&lt;/p&gt;
&lt;p&gt;I have modified the loop test case as an example.&lt;/p&gt;
&lt;p&gt;Developer object add tools collection.&lt;/p&gt;
&lt;p&gt;....&lt;/p&gt;
&lt;p&gt;private Collection tools;&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;public Developer(String name, String email) {&lt;br /&gt;
this.name = name;&lt;br /&gt;
this.email = email;&lt;br /&gt;
roles = new ArrayList();&lt;br /&gt;
tools = new ArrayList();&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;public Collection getTools() {&lt;br /&gt;
return tools;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;public void addTool(String tool) {&lt;br /&gt;
tools.add(tool);&lt;/p&gt;
&lt;p&gt;....&lt;/p&gt;
&lt;p&gt;Modify configuration in net.sourceforge.rtf.usecases.loop.RTFJakartaVelocityProjectWithVelocity&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;List developers = new ArrayList();&lt;br /&gt;
Developer developer = new Developer("Will Glass-Husain", "wglass@apache.org");&lt;br /&gt;
developer.addRole("Java Developer");&lt;br /&gt;
developer.addRole("Release Manager");&lt;br /&gt;
developer.addTool("Eclipse");&lt;br /&gt;
developer.addTool("VI");&lt;br /&gt;
developers.add(developer);&lt;br /&gt;
context.put("developer", developer);&lt;br /&gt;
context.put("tools", developer.getTools());&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;Modify loop.rtf&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;Test 11: Loop over the tools in a simple table – works&lt;br /&gt;
«$tools»&lt;/p&gt;
&lt;p&gt;Test 12: Loop over developer tools in a simple table – doesn’t work&lt;br /&gt;
«$developer.Tools»&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;Let me know if you need additional information.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">otter</dc:creator><pubDate>Mon, 14 Jan 2008 17:34:46 -0000</pubDate><guid>https://sourceforge.net98da4248de9208b0de81f8eb79cd4937a577d626</guid></item><item><title>Looping forever</title><link>https://sourceforge.net/p/rtftemplate/bugs/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have a problem.&lt;br /&gt;
When a VO "visited" have bidiretional with others VOs.&lt;br /&gt;
Thus it goes to come back to visit all again.&lt;/p&gt;
&lt;p&gt;Unhappyly, I don't have usecases.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pizão</dc:creator><pubDate>Thu, 16 Aug 2007 14:35:57 -0000</pubDate><guid>https://sourceforge.net9b41ab4b6f17b417e87eb3e557c59fb0aa2a04a4</guid></item><item><title>white space character is added in front of the replaced text</title><link>https://sourceforge.net/p/rtftemplate/bugs/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It seems that a white space character is added in front of the replaced text.&lt;br /&gt;
Version rtftemplate-1.0.1-b9 with Velocity.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">mcvloo</dc:creator><pubDate>Wed, 07 Mar 2007 10:51:32 -0000</pubDate><guid>https://sourceforge.net953d5893e67238df4c617e22f7d5e0b6ab04c450</guid></item><item><title>Poor documentation</title><link>https://sourceforge.net/p/rtftemplate/bugs/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The devlopper's documentation is quit good, but final&lt;br /&gt;
user documenttion (how to make a rtf template with&lt;br /&gt;
word), what field type must be used...&lt;/p&gt;
&lt;p&gt;PS : In English in the text two&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 14 Sep 2006 14:11:42 -0000</pubDate><guid>https://sourceforge.net41dc7faecf84ace7e3cc6f9ac0de78fca14f3d8b</guid></item><item><title>Character {  and } in data =&gt; crash or bad document</title><link>https://sourceforge.net/p/rtftemplate/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;If { is in data to print =&amp;gt; browser's crash&lt;br /&gt;
If } is in data to print =&amp;gt; bad end of rtf document&lt;/p&gt;
&lt;p&gt;PS : In english in the texte please&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Thu, 14 Sep 2006 14:05:05 -0000</pubDate><guid>https://sourceforge.netd59c54ca5fd47706eba67654e436fe66bfc57ab7</guid></item></channel></rss>