<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/skaringa/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/skaringa/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/skaringa/bugs/</id><updated>2006-07-14T14:49:59Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>XML indent not working in java 1.5</title><link href="https://sourceforge.net/p/skaringa/bugs/30/" rel="alternate"/><published>2006-07-14T14:49:59Z</published><updated>2006-07-14T14:49:59Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.net101a3efb0ac65f4917251083978e1cdea1460f39</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Using the following calls&lt;br /&gt;
trans.setProperty(javax.xml.transform.OutputKeys.INDENT,&lt;br /&gt;
"yes");&lt;br /&gt;
trans.setProperty("{http://xml.apache.org/xalan}indent-amount",&lt;br /&gt;
"2");&lt;br /&gt;
works fine in java 1.4, but does not produce formatted&lt;br /&gt;
output in 1.5&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>r3p5 handles duplicate refs differently than r3p4</title><link href="https://sourceforge.net/p/skaringa/bugs/29/" rel="alternate"/><published>2005-02-23T17:55:12Z</published><updated>2005-02-23T17:55:12Z</updated><author><name>Jasper Rosenberg</name><uri>https://sourceforge.net/u/perfnorm/</uri></author><id>https://sourceforge.net7107e6c30129206209b524631c31c8c14cbc5126</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The attached unit test prints in r3p5:&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;
&amp;lt;com.nlg.dps.services.im.SkaringaTest&lt;br /&gt;
xsi:type="com.nlg.dps.services.im.SkaringaTest"&lt;br /&gt;
xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;&lt;br /&gt;
&amp;lt;fName xsi:type="xsd:string" xsi:nil="true"/&amp;gt;&lt;br /&gt;
&amp;lt;_sharedObjects&lt;br /&gt;
xsi:type="array_of_com.nlg.dps.services.im.SkaringaTest._i.Dummy"&amp;gt;&lt;br /&gt;
&amp;lt;el&lt;br /&gt;
xsi:type="com.nlg.dps.services.im.SkaringaTest._i.Dummy"&amp;gt;&lt;br /&gt;
&amp;lt;_val1 xsi:type="xsd:int"&amp;gt;5&amp;lt;/_val1&amp;gt;&lt;br /&gt;
&amp;lt;_val2 xsi:type="xsd:string"&amp;gt;VALUE2&amp;lt;/_val2&amp;gt;&lt;br /&gt;
&amp;lt;/el&amp;gt;&lt;br /&gt;
&amp;lt;el&lt;br /&gt;
xsi:type="com.nlg.dps.services.im.SkaringaTest._i.Dummy"/&amp;gt;&lt;br /&gt;
&amp;lt;/_sharedObjects&amp;gt;&lt;br /&gt;
&amp;lt;/com.nlg.dps.services.im.SkaringaTest&amp;gt;&lt;/p&gt;
&lt;p&gt;but it prints in r3p4:&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;
&amp;lt;com.nlg.dps.services.im.SkaringaTest&lt;br /&gt;
xsi:type="com.nlg.dps.services.im.SkaringaTest"&lt;br /&gt;
xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;&lt;br /&gt;
&amp;lt;fName xsi:type="xsd:string" xsi:nil="true"/&amp;gt;&lt;br /&gt;
&amp;lt;_sharedObjects&lt;br /&gt;
xsi:type="array_of_com.nlg.dps.services.im.SkaringaTest._i.Dummy"&amp;gt;&lt;br /&gt;
&amp;lt;el&lt;br /&gt;
xsi:type="com.nlg.dps.services.im.SkaringaTest._i.Dummy"&amp;gt;&lt;br /&gt;
&amp;lt;_val1 xsi:type="xsd:int"&amp;gt;5&amp;lt;/_val1&amp;gt;&lt;br /&gt;
&amp;lt;_val2 xsi:type="xsd:string"&amp;gt;VALUE2&amp;lt;/_val2&amp;gt;&lt;br /&gt;
&amp;lt;/el&amp;gt;&lt;br /&gt;
&amp;lt;el&lt;br /&gt;
xsi:type="com.nlg.dps.services.im.SkaringaTest._i.Dummy"&amp;gt;&lt;br /&gt;
&amp;lt;_val1 xsi:type="xsd:int"&amp;gt;5&amp;lt;/_val1&amp;gt;&lt;br /&gt;
&amp;lt;_val2 xsi:type="xsd:string"&amp;gt;VALUE2&amp;lt;/_val2&amp;gt;&lt;br /&gt;
&amp;lt;/el&amp;gt;&lt;br /&gt;
&amp;lt;/_sharedObjects&amp;gt;&lt;br /&gt;
&amp;lt;/com.nlg.dps.services.im.SkaringaTest&amp;gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>skaWriteReplace not called if OMIT_ID property is true</title><link href="https://sourceforge.net/p/skaringa/bugs/28/" rel="alternate"/><published>2005-02-08T18:47:42Z</published><updated>2005-02-08T18:47:42Z</updated><author><name>Brad Geddes</name><uri>https://sourceforge.net/u/bgeddes/</uri></author><id>https://sourceforge.net509aff7f077d3b45ea5b695fe188b1639b248612</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The ObjectSerializer only calls skaWriteReplace if the&lt;br /&gt;
OMIT_ID property is false.  I assume it does this&lt;br /&gt;
because that's the only way to determine if the object&lt;br /&gt;
has been serialized, and you don't want this method to&lt;br /&gt;
be called multiple times.  But the documentation says:&lt;br /&gt;
"Because an object can be serialized more than once, be&lt;br /&gt;
careful with modifying the state of the object in&lt;br /&gt;
skaWriteReplace."  This leads me to believe that it's&lt;br /&gt;
expected for skaWriteReplace to be called multiple&lt;br /&gt;
times, and that it should always be called on an object&lt;br /&gt;
regardless of the OMIT_ID property.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Duplicate namespace attributes in output</title><link href="https://sourceforge.net/p/skaringa/bugs/27/" rel="alternate"/><published>2005-02-04T14:15:30Z</published><updated>2005-02-04T14:15:30Z</updated><author><name>Jasper Rosenberg</name><uri>https://sourceforge.net/u/perfnorm/</uri></author><id>https://sourceforge.netdf0c914058eaa7286f84aee279a1cb9f830c3c6b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If you run the following unit test below (using&lt;br /&gt;
skaringa-r3p4.jar), the output ends up with 3 xmlns:xsd&lt;br /&gt;
attributes and 2 xmlns:xsi attributes:&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt;&lt;br /&gt;
&amp;lt;xsd:string xmlns:xsd="xs"&lt;br /&gt;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;
xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;
xsi:type="xsd:string"&lt;br /&gt;
xmlns:xsd="http://www.w3.org/2001/XMLSchema"&lt;br /&gt;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt;Test&amp;lt;/xsd:string&amp;gt;&lt;/p&gt;
&lt;p&gt;I feed this output to a saxon transformer, which has&lt;br /&gt;
fits about duplicate attributes.&lt;/p&gt;
&lt;p&gt;---  SAMPLE CODE ---&lt;/p&gt;
&lt;p&gt;import java.io.StringWriter;&lt;/p&gt;
&lt;p&gt;import javax.xml.transform.Result;&lt;br /&gt;
import javax.xml.transform.stream.StreamResult;&lt;/p&gt;
&lt;p&gt;import junit.framework.TestCase;&lt;/p&gt;
&lt;p&gt;import com.skaringa.javaxml.ObjectTransformer;&lt;br /&gt;
import com.skaringa.javaxml.ObjectTransformerFactory;&lt;/p&gt;
&lt;p&gt;public class SkarignaTest extends TestCase&lt;br /&gt;
{&lt;br /&gt;
public void testSkaringa() throws Exception&lt;br /&gt;
{&lt;br /&gt;
StringWriter stringWriter = new StringWriter();&lt;br /&gt;
Result result = new StreamResult(stringWriter);&lt;/p&gt;
&lt;p&gt;ObjectTransformer trans =&lt;br /&gt;
ObjectTransformerFactory.getInstance().getImplementation();&lt;/p&gt;
&lt;p&gt;// Serialize the object into a file.&lt;br /&gt;
trans.serialize("Test", result);&lt;/p&gt;
&lt;p&gt;System.err.println(stringWriter.getBuffer().toString());&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Problem serializing Object[] as root object</title><link href="https://sourceforge.net/p/skaringa/bugs/26/" rel="alternate"/><published>2004-09-29T18:09:21Z</published><updated>2004-09-29T18:09:21Z</updated><author><name/><uri>https://sourceforge.net</uri></author><id>https://sourceforge.nete121a587f038fc1d92483877cc03d93eecf59612</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I've done some simple tests to compare Skaringa speed&lt;br /&gt;
between other XML serializers. For our project speed is&lt;br /&gt;
the only thing we need.&lt;/p&gt;
&lt;p&gt;During those tests I've found a problem. I'm trying to&lt;br /&gt;
serialize an Array of POJOs and as a result I'm getting&lt;br /&gt;
a quite strange name for the root node of the xml result.&lt;/p&gt;
&lt;p&gt;This is the code:&lt;/p&gt;
&lt;p&gt;Worka1[] arrayEntrada = new Worka1[2];&lt;br /&gt;
for (int i = 0; i &amp;lt; 2; i++) {&lt;br /&gt;
Worka1 e = new Worka1();&lt;br /&gt;
e.setVersiondispatcher("D10");&lt;br /&gt;
e.setTipoaplicacion("F");&lt;br /&gt;
...&lt;br /&gt;
arrayEntrada[i] = e;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;// here goes some code to disable types, nils, etc..&lt;/p&gt;
&lt;p&gt;StringWriter sw = new StringWriter();&lt;br /&gt;
trans.serialize(arrayEntrada, new StreamResult(sw));&lt;br /&gt;
sw.close();&lt;br /&gt;
System.out.println(sw);&lt;br /&gt;
arrayEntrada = (Worka1[]) trans.deserialize(new&lt;br /&gt;
StreamSource(new StringReader(sw.toString())));&lt;/p&gt;
&lt;p&gt;XML output is this:&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;
&amp;lt;[Lcom.prueba.Worka1;&amp;gt;&lt;br /&gt;
&amp;lt;el&amp;gt;&amp;lt;codorganinter&amp;gt;30&amp;lt;/codorganinter&amp;gt;&lt;br /&gt;
....&lt;br /&gt;
&amp;lt;/[Lcom.prueba.Worka1;&amp;gt;&lt;/p&gt;
&lt;p&gt;With this output IE complains, it does not like that&lt;br /&gt;
"[" and the ";".&lt;/p&gt;
&lt;p&gt;Code for deserialization fails with the following&lt;br /&gt;
exception:&lt;br /&gt;
[Fatal Error] :2:2: La marca del documento que precede&lt;br /&gt;
al elemento raíz debe estar bien formada.&lt;br /&gt;
331 [main] ERROR sax.ObjectTransformerSAXImpl -&lt;br /&gt;
javax.xml.transform.TransformerException:&lt;br /&gt;
org.xml.sax.SAXParseException: La marca del documento&lt;br /&gt;
que precede al elemento raíz debe estar bien formada.&lt;br /&gt;
com.skaringa.javaxml.DeserializerException:&lt;br /&gt;
org.xml.sax.SAXParseException: La marca del documento&lt;br /&gt;
que precede al elemento raíz debe estar bien formada.&lt;br /&gt;
at&lt;br /&gt;
com.skaringa.javaxml.impl.sax.ObjectTransformerSAXImpl.deserialize(Unknown&lt;br /&gt;
Source)&lt;br /&gt;
at com.prueba.Serializar.main(Serializar.java:83)&lt;br /&gt;
Exception in thread "main"&lt;/p&gt;
&lt;p&gt;In english it will read: "The markup in the document&lt;br /&gt;
preceding the root element must be well-formed"&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Can not deserialize LinkedHashMap</title><link href="https://sourceforge.net/p/skaringa/bugs/25/" rel="alternate"/><published>2004-09-29T09:15:58Z</published><updated>2004-09-29T09:15:58Z</updated><author><name/><uri>https://sourceforge.net</uri></author><id>https://sourceforge.net2ed8804080869f9f33bfbcb9e21a6d13ab54027a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This error occurs only if LinkedHashMap was never &lt;br /&gt;
serialized with the instance of Skaringa before &lt;br /&gt;
deserialization.&lt;br /&gt;
Same effect for  other Collection and Map types, that &lt;br /&gt;
are nor registered statically in the registry.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Invalid element name if root object is an inner class</title><link href="https://sourceforge.net/p/skaringa/bugs/24/" rel="alternate"/><published>2004-08-10T10:59:53Z</published><updated>2004-08-10T10:59:53Z</updated><author><name/><uri>https://sourceforge.net</uri></author><id>https://sourceforge.netba95979ca17153ce1c8e1c5bd7a117d2ab77c8c9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;If the root object is an inner class, then the name of the &lt;br /&gt;
root element contains a '$', which is not valid XML.&lt;/p&gt;
&lt;p&gt;see also bug 1004198&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Can't deserialize a map with a null key</title><link href="https://sourceforge.net/p/skaringa/bugs/23/" rel="alternate"/><published>2004-08-05T20:56:58Z</published><updated>2004-08-05T20:56:58Z</updated><author><name>Jasper Rosenberg</name><uri>https://sourceforge.net/u/perfnorm/</uri></author><id>https://sourceforge.net06cf229c3e3231a7c7b2cc19c3d7a8315d2277d4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Serialization of a map that contains a null key works fine:&lt;/p&gt;
&lt;p&gt;&amp;lt;mapentry xsi:type="MapEntry"&amp;gt;&lt;br /&gt;
&amp;lt;key xsi:type="java.lang.Object" xsi:nil="true"/&amp;gt;&lt;br /&gt;
&amp;lt;value xsi:type="java.lang.Object"/&amp;gt;&lt;br /&gt;
&amp;lt;/mapentry&amp;gt;&lt;/p&gt;
&lt;p&gt;But attempting to deserialize the same results in a &lt;br /&gt;
ClassCastException.&lt;/p&gt;
&lt;p&gt;I realize that not all Map implementations (for example, &lt;br /&gt;
Hashtable) support null keys, but it seems like this is not &lt;br /&gt;
a restriction to enforce in Skaringa since it is not a &lt;br /&gt;
restriction of the Map interface itself.  Let the map &lt;br /&gt;
implementation itself complain.&lt;/p&gt;
&lt;p&gt;Thanks in advance for any help you can give with this &lt;br /&gt;
issue.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>skaWriteReplace called too often</title><link href="https://sourceforge.net/p/skaringa/bugs/22/" rel="alternate"/><published>2004-06-08T19:12:00Z</published><updated>2004-06-08T19:12:00Z</updated><author><name>Mark Bolusmjak</name><uri>https://sourceforge.net/u/mgbolusm/</uri></author><id>https://sourceforge.net1fb4c1b55d6c975ef3002ea82289d85102e2b746</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have a class like this:&lt;/p&gt;
&lt;p&gt;class Foo&lt;br /&gt;
{&lt;br /&gt;
//object that's not used "live". &lt;br /&gt;
//Only used by skaringa serialization&lt;br /&gt;
//lazily updated in skaWriteReplace()&lt;br /&gt;
private Bar bar = new Bar(this); &lt;/p&gt;
&lt;p&gt;private Set otherStuff ...;&lt;/p&gt;
&lt;p&gt;public Object skaWriteReplace()&lt;br /&gt;
{&lt;br /&gt;
bar.update();&lt;br /&gt;
return this;&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Now objects in otherStuff contain references to the&lt;br /&gt;
instance of Foo in question. Everytime one of those&lt;br /&gt;
objects in otherstuff is serialized, it spits out the&lt;br /&gt;
reference to Foo:&lt;br /&gt;
&amp;lt;Foo id="i29719186"&amp;gt;.&lt;/p&gt;
&lt;p&gt;That's fine. What happens that I have a problem with,&lt;br /&gt;
is Foo's skaWriteReplace is called every time for each&lt;br /&gt;
object in the set! If we're just throwing down an ID,&lt;br /&gt;
why call skaWriteReplace()?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Skaringa XML should be valid</title><link href="https://sourceforge.net/p/skaringa/bugs/21/" rel="alternate"/><published>2004-06-04T18:19:53Z</published><updated>2004-06-04T18:19:53Z</updated><author><name>Mark Bolusmjak</name><uri>https://sourceforge.net/u/mgbolusm/</uri></author><id>https://sourceforge.neta710b3f3a87176fbc23cef73fa7274dd85615afe</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Some values are perfectly legitimate in Java, yet their&lt;br /&gt;
XML representation is illegal. &lt;/p&gt;
&lt;p&gt;e.g. In java there's nothing wrong with having a char&lt;br /&gt;
variable that is a control character. &lt;/p&gt;
&lt;p&gt;When Skaringa translates these to XML, it inadvertantly&lt;br /&gt;
creates illegal XML.&lt;/p&gt;
&lt;p&gt;Skaringa should (perhaps optionally) handle these cases&lt;br /&gt;
gracefully. Perhaps using a Skaringa-specific&lt;br /&gt;
escape-sequences to encode these troublesome entities.&lt;/p&gt;
&lt;p&gt;I think you can also get Skaringa to encode illegal&lt;br /&gt;
surrogate pairs, but my understanding of Unicode and&lt;br /&gt;
encoding schemes is not great.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>