<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-12138</id>
	<title>Nabble - xstream - user</title>
	<updated>2009-12-23T07:29:21Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/xstream---user-f12138.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/xstream---user-f12138.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26903600</id>
	<title>Re: JDO with a parent and child collection</title>
	<published>2009-12-23T07:29:21Z</published>
	<updated>2009-12-23T07:29:21Z</updated>
	<author>
		<name>Vikram-17</name>
	</author>
	<content type="html">Jörg Schaible &amp;lt;joerg.schaible@...&amp;gt; writes:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My answer is still exactly the same.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - Jörg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;Hi,
&lt;br&gt;&lt;br&gt;What security settings I need to change. I am hosting this on Google App 
&lt;br&gt;Engine where I cannot change the security setting.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Vikram
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/JDO-with-a-parent-and-child-collection-tp26897959p26903600.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26902712</id>
	<title>Re: JDO with a parent and child collection</title>
	<published>2009-12-23T06:12:20Z</published>
	<updated>2009-12-23T06:12:20Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Vikram,
&lt;br&gt;&lt;br&gt;Vikram wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Jörg Schaible &amp;lt;joerg.schaible@...&amp;gt; writes:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Hi Vikram,
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Vikram wrote:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I have a Parent class (TripDO) and a child class (FlightDO). Trip
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; contains collection of Flights.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; @Persistent
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String TravelMode;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String Origin;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String Destination;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String DepDate;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String RetDate;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; @Persistent
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private List&amp;lt;FlightDO&amp;gt; lstFlightDO = new ArrayList();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; public TripDO(String TravelMode, String Origin, String
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; Destination, String
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; DepDate, String RetDate, String TripName)
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.TravelMode = TravelMode;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Origin = Origin;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Destination = Destination;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.DepDate = DepDate;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.RetDate = RetDate;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //this.TripName = TripName;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; public void addFlight(FlightDO objFlightDO)
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lstFlightDO.add(objFlightDO);
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;FlightDO&amp;gt; getContent()
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return lstFlightDO;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; When I serialize this with the following code, I get access denied
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; (java.io.SerializablePermission enableSubclassImplementation) error:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; This simply means that in your environment a SecurityManager is active
&lt;br&gt;&amp;gt;&amp;gt; which prevents XStream from handling a Serializable type at
&lt;br&gt;&amp;gt;&amp;gt; deserialization time. It's up to you to provide the proper permissions,
&lt;br&gt;&amp;gt;&amp;gt; there's nothing XStream can do about.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; TripDO t1 = (TripDO)iter.next();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;FlightDO&amp;gt; lstFlightDO = t1.getContent();
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XStream xstream = new XStream(new DomDriver());
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xstream.autodetectAnnotations(true);
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; You do not use XStream's annotations, therefore enabling auto-detection
&lt;br&gt;&amp;gt;&amp;gt; of annotations simply is a waste of time.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resp.getWriter().println(&amp;quot;XML Output: &amp;quot;+
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xstream.toXML(t1));
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; But when I serialize when creating a new object it works fine.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; You mean when you serialize the object? Well, serializing and
&lt;br&gt;&amp;gt;&amp;gt; deserializing is obviously implemented differently and it depends on the
&lt;br&gt;&amp;gt;&amp;gt; SecurityManager which operation it allows and which not.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I could not
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; understand the difference. Whan am I doing wrong here? How to serialize
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; the object when retrieved from the db?
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Setup the proper permissions. It's part of your runtime environment.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; - Jörg
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks for the quick response.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; May be I was not clear with my questions.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Lets have a look at the following code:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; TripDO objTrip = new TripDO(&amp;quot;abc&amp;quot;,&amp;quot;xyz&amp;quot;);
&lt;br&gt;&amp;gt; FlightDO objFlight1 = new FlightDO();
&lt;br&gt;&amp;gt; FlightDO objFlight2 = new FlightDO();
&lt;br&gt;&amp;gt; objTrip.addFlight(objFlight1);
&lt;br&gt;&amp;gt; objTrip.addFlight(objFlight2);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; XStream xstream = new XStream(new DomDriver());
&lt;br&gt;&amp;gt; xstream.toXML(objTrip);
&lt;br&gt;&amp;gt; When I serialize this I am able to get a proper xml output:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; When I retirve these objects from a datastore as below:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; TripDO t1 = (TripDO)iter.next();
&lt;br&gt;&amp;gt; List&amp;lt;FlightDO&amp;gt; lstFlightDO = t1.getContent();
&lt;br&gt;&amp;gt; XStream xstream = new XStream(new DomDriver());
&lt;br&gt;&amp;gt; xstream.toXML(t1);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In this scenario, I get the above mentioned error. between these two
&lt;br&gt;&amp;gt; scenarios, the security setting has not changed.
&lt;/div&gt;&lt;br&gt;My answer is still exactly the same.
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/JDO-with-a-parent-and-child-collection-tp26897959p26902712.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26900846</id>
	<title>Re: JDO with a parent and child collection</title>
	<published>2009-12-23T03:24:51Z</published>
	<updated>2009-12-23T03:24:51Z</updated>
	<author>
		<name>Vikram-17</name>
	</author>
	<content type="html">Jörg Schaible &amp;lt;joerg.schaible@...&amp;gt; writes:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi Vikram,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Vikram wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I have a Parent class (TripDO) and a child class (FlightDO). Trip contains
&lt;br&gt;&amp;gt; &amp;gt; collection of Flights.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; @Persistent
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String TravelMode;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String Origin;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String Destination;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String DepDate;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String RetDate;
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; @Persistent
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private List&amp;lt;FlightDO&amp;gt; lstFlightDO = new ArrayList();
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; public TripDO(String TravelMode, String Origin, String Destination,
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; String
&lt;br&gt;&amp;gt; &amp;gt; DepDate, String RetDate, String TripName)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.TravelMode = TravelMode;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Origin = Origin;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Destination = Destination;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.DepDate = DepDate;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.RetDate = RetDate;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //this.TripName = TripName;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; public void addFlight(FlightDO objFlightDO)
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lstFlightDO.add(objFlightDO);
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;FlightDO&amp;gt; getContent()
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return lstFlightDO;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;gt; When I serialize this with the following code, I get access denied
&lt;br&gt;&amp;gt; &amp;gt; (java.io.SerializablePermission enableSubclassImplementation) error:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This simply means that in your environment a SecurityManager is active which 
&lt;br&gt;&amp;gt; prevents XStream from handling a Serializable type at deserialization time. 
&lt;br&gt;&amp;gt; It's up to you to provide the proper permissions, there's nothing XStream 
&lt;br&gt;&amp;gt; can do about.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; TripDO t1 = (TripDO)iter.next();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;FlightDO&amp;gt; lstFlightDO = t1.getContent();
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XStream xstream = new XStream(new DomDriver());
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xstream.autodetectAnnotations(true);
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You do not use XStream's annotations, therefore enabling auto-detection of 
&lt;br&gt;&amp;gt; annotations simply is a waste of time.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resp.getWriter().println(&amp;quot;XML Output: &amp;quot;+
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xstream.toXML(t1));
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; But when I serialize when creating a new object it works fine.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; You mean when you serialize the object? Well, serializing and deserializing 
&lt;br&gt;&amp;gt; is obviously implemented differently and it depends on the SecurityManager 
&lt;br&gt;&amp;gt; which operation it allows and which not.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; I could not
&lt;br&gt;&amp;gt; &amp;gt; understand the difference. Whan am I doing wrong here? How to serialize
&lt;br&gt;&amp;gt; &amp;gt; the object when retrieved from the db?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Setup the proper permissions. It's part of your runtime environment.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; - Jörg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------
&lt;br&gt;&amp;gt; To unsubscribe from this list, please visit:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;Thanks for the quick response. 
&lt;br&gt;&lt;br&gt;May be I was not clear with my questions. 
&lt;br&gt;&lt;br&gt;Lets have a look at the following code:
&lt;br&gt;&lt;br&gt;TripDO objTrip = new TripDO(&amp;quot;abc&amp;quot;,&amp;quot;xyz&amp;quot;);
&lt;br&gt;FlightDO objFlight1 = new FlightDO();
&lt;br&gt;FlightDO objFlight2 = new FlightDO();
&lt;br&gt;objTrip.addFlight(objFlight1);
&lt;br&gt;objTrip.addFlight(objFlight2);
&lt;br&gt;&lt;br&gt;XStream xstream = new XStream(new DomDriver());
&lt;br&gt;xstream.toXML(objTrip);
&lt;br&gt;When I serialize this I am able to get a proper xml output:
&lt;br&gt;&lt;br&gt;When I retirve these objects from a datastore as below:
&lt;br&gt;&lt;br&gt;TripDO t1 = (TripDO)iter.next();
&lt;br&gt;List&amp;lt;FlightDO&amp;gt; lstFlightDO = t1.getContent();
&lt;br&gt;XStream xstream = new XStream(new DomDriver());
&lt;br&gt;xstream.toXML(t1);
&lt;br&gt;&lt;br&gt;In this scenario, I get the above mentioned error. between these two scenarios,
&lt;br&gt;the security setting has not changed.
&lt;br&gt;&lt;br&gt;Thanks in advance,
&lt;br&gt;Vikram
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/JDO-with-a-parent-and-child-collection-tp26897959p26900846.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26899849</id>
	<title>Re: JDO with a parent and child collection</title>
	<published>2009-12-23T01:33:56Z</published>
	<updated>2009-12-23T01:33:56Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Vikram,
&lt;br&gt;&lt;br&gt;Vikram wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have a Parent class (TripDO) and a child class (FlightDO). Trip contains
&lt;br&gt;&amp;gt; collection of Flights.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; @Persistent
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String TravelMode;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String Origin;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String Destination;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String DepDate;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String RetDate;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; @Persistent
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; private List&amp;lt;FlightDO&amp;gt; lstFlightDO = new ArrayList();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; public TripDO(String TravelMode, String Origin, String Destination,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; String
&lt;br&gt;&amp;gt; DepDate, String RetDate, String TripName)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.TravelMode = TravelMode;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Origin = Origin;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Destination = Destination;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.DepDate = DepDate;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.RetDate = RetDate;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //this.TripName = TripName;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; public void addFlight(FlightDO objFlightDO)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lstFlightDO.add(objFlightDO);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;FlightDO&amp;gt; getContent()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return lstFlightDO;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; When I serialize this with the following code, I get access denied
&lt;br&gt;&amp;gt; (java.io.SerializablePermission enableSubclassImplementation) error:
&lt;/div&gt;&lt;br&gt;This simply means that in your environment a SecurityManager is active which 
&lt;br&gt;prevents XStream from handling a Serializable type at deserialization time. 
&lt;br&gt;It's up to you to provide the proper permissions, there's nothing XStream 
&lt;br&gt;can do about.
&lt;br&gt;&lt;br&gt;&amp;gt; TripDO t1 = (TripDO)iter.next();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;FlightDO&amp;gt; lstFlightDO = t1.getContent();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XStream xstream = new XStream(new DomDriver());
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xstream.autodetectAnnotations(true);
&lt;br&gt;&lt;br&gt;You do not use XStream's annotations, therefore enabling auto-detection of 
&lt;br&gt;annotations simply is a waste of time.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resp.getWriter().println(&amp;quot;XML Output: &amp;quot;+
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xstream.toXML(t1));
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But when I serialize when creating a new object it works fine.
&lt;br&gt;&lt;br&gt;You mean when you serialize the object? Well, serializing and deserializing 
&lt;br&gt;is obviously implemented differently and it depends on the SecurityManager 
&lt;br&gt;which operation it allows and which not.
&lt;br&gt;&lt;br&gt;&amp;gt; I could not
&lt;br&gt;&amp;gt; understand the difference. Whan am I doing wrong here? How to serialize
&lt;br&gt;&amp;gt; the object when retrieved from the db?
&lt;br&gt;&lt;br&gt;Setup the proper permissions. It's part of your runtime environment.
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/JDO-with-a-parent-and-child-collection-tp26897959p26899849.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26897959</id>
	<title>JDO with a parent and child collection</title>
	<published>2009-12-22T06:51:35Z</published>
	<updated>2009-12-22T06:51:35Z</updated>
	<author>
		<name>Vikram-17</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;I have a Parent class (TripDO) and a child class (FlightDO). Trip contains
&lt;br&gt;collection of Flights. 
&lt;br&gt;&lt;br&gt;@Persistent
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; private String TravelMode;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; private String Origin;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; private String Destination;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; private String DepDate;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; @Persistent
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; private String RetDate;
&lt;br&gt;&lt;br&gt;@Persistent
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; private List&amp;lt;FlightDO&amp;gt; lstFlightDO = new ArrayList();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; public TripDO(String TravelMode, String Origin, String Destination, String
&lt;br&gt;DepDate, String RetDate, String TripName)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.TravelMode = TravelMode;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Origin = Origin;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.Destination = Destination;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.DepDate = DepDate;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.RetDate = RetDate;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //this.TripName = TripName;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;public void addFlight(FlightDO objFlightDO)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lstFlightDO.add(objFlightDO);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;FlightDO&amp;gt; getContent()
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return lstFlightDO;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;When I serialize this with the following code, I get access denied
&lt;br&gt;(java.io.SerializablePermission enableSubclassImplementation) error:
&lt;br&gt;&lt;br&gt;TripDO t1 = (TripDO)iter.next();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List&amp;lt;FlightDO&amp;gt; lstFlightDO = t1.getContent();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; XStream xstream = new XStream(new DomDriver());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xstream.autodetectAnnotations(true);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resp.getWriter().println(&amp;quot;XML Output: &amp;quot;+ xstream.toXML(t1));
&lt;br&gt;&lt;br&gt;But when I serialize when creating a new object it works fine. I could not
&lt;br&gt;understand the difference. Whan am I doing wrong here? How to serialize the
&lt;br&gt;object when retrieved from the db?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks in advance,
&lt;br&gt;Vikram
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/JDO-with-a-parent-and-child-collection-tp26897959p26897959.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26810525</id>
	<title>Re: Tomcat6 Security Problems with XStream (Access Denied)</title>
	<published>2009-12-16T04:43:05Z</published>
	<updated>2009-12-16T04:43:05Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Jeff,
&lt;br&gt;&lt;br&gt;Jeff Arnold(tesco) wrote at Mittwoch, 16. Dezember 2009 13:05:
&lt;br&gt;&lt;br&gt;&amp;gt; Hi guys,
&lt;br&gt;&amp;gt; From what I can see, tomcat5.x and 6.x changed their security models.
&lt;br&gt;&amp;gt; Now my is getting access denied errors.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Can anyone please say what needs to be added to the tomcat conf / policy
&lt;br&gt;&amp;gt; files to give XStream permission.
&lt;br&gt;&lt;br&gt;Please have a look at XStream's acceptance tests. There's a 
&lt;br&gt;SecurityManagerTest that should give you some ideas.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Tomcat6-Security-Problems-with-XStream-%28Access-Denied%29-tp26810112p26810525.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26810112</id>
	<title>Tomcat6 Security Problems with XStream (Access Denied)</title>
	<published>2009-12-16T04:05:50Z</published>
	<updated>2009-12-16T04:05:50Z</updated>
	<author>
		<name>Jeff Arnold(tesco)</name>
	</author>
	<content type="html">Hi guys,
&lt;br&gt;From what I can see, tomcat5.x and 6.x changed their security models.
&lt;br&gt;Now my is getting access denied errors.
&lt;br&gt;&lt;br&gt;Can anyone please say what needs to be added to the tomcat conf / policy
&lt;br&gt;files to give XStream permission.
&lt;br&gt;&lt;br&gt;Thanks
&lt;br&gt;Jeff.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Tomcat6-Security-Problems-with-XStream-%28Access-Denied%29-tp26810112p26810112.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26807334</id>
	<title>Re: re[xstream-user] peating element inside converter</title>
	<published>2009-12-15T23:35:24Z</published>
	<updated>2009-12-15T23:35:24Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Erik,
&lt;br&gt;&lt;br&gt;coop207 wrote at Sonntag, 13. Dezember 2009 18:21:
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I don't actually have an implicit on this one. Here is my bean:
&lt;br&gt;&lt;br&gt;[snip]
&lt;br&gt;&lt;br&gt;Did you find your error by now? I did not recognize it on the first look, it 
&lt;br&gt;was too hidden between the system.outs:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; public Object unmarshal(HierarchicalStreamReader reader,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UnmarshallingContext context) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RelateCustomerNameBean name = new RelateCustomerNameBean();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ArrayList&amp;lt;String&amp;gt; nameList = null;
&lt;br&gt;&amp;gt; nameList = new ArrayList&amp;lt;String&amp;gt;();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // here we need to create a list of names to return
&lt;br&gt;&amp;gt; if (reader.hasMoreChildren()) {
&lt;br&gt;&amp;gt; reader.moveDown();
&lt;br&gt;&amp;gt; nameList.add(reader.getValue());
&lt;br&gt;&amp;gt; reader.moveUp();
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name.setName(nameList);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal after namelist&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return name;
&lt;br&gt;&amp;gt; }
&lt;/div&gt;&lt;br&gt;&lt;br&gt;Exchange the &amp;quot;if&amp;quot; with &amp;quot;while&amp;quot; and it reads more than one child ;-)
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/repeating-element-inside-converter-tp26752064p26807334.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26807270</id>
	<title>Re: Re[xstream-user] petition with Implicit Collection</title>
	<published>2009-12-15T23:30:55Z</published>
	<updated>2009-12-15T23:30:55Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Erik,
&lt;br&gt;&lt;br&gt;coop207 wrote at Friday, 11. December 2009 23:07:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; I have a repeating element that I use with an implicit collection (on the
&lt;br&gt;&amp;gt; EMail element) to generate the following out:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ContactInformation&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Address SequenceNumber=&amp;quot;1&amp;quot; ValidFlag=&amp;quot;true&amp;quot; TypeCode=&amp;quot;HOME&amp;quot;
&lt;br&gt;&amp;gt; PrimaryFlag=&amp;quot;true&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Country&amp;gt;USA&amp;lt;/Country&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;AddressLine1&amp;gt;100 Main St&amp;lt;/AddressLine1&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;City&amp;gt;Columbus&amp;lt;/City&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Territory&amp;gt;OH&amp;lt;/Territory&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;PostalCode&amp;gt;43125&amp;lt;/PostalCode&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Address&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;/div&gt;&amp;lt;EMailAddress&amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26807270&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;email@...&lt;/a&gt;&amp;lt;/EMailAddress&amp;gt;
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ContactInformation&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; There can be multiple EMail elements and I use the implicit collection to
&lt;br&gt;&amp;gt; prevent the creation of an additional element around the EMail. This works
&lt;br&gt;&amp;gt; fine for creating outbound XML, but does not work for reading in XML.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If I remove by implicit collection so that the generated XML looks like
&lt;br&gt;&amp;gt; this:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ContactInformation&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Address SequenceNumber=&amp;quot;1&amp;quot; ValidFlag=&amp;quot;true&amp;quot; TypeCode=&amp;quot;HOME&amp;quot;
&lt;br&gt;&amp;gt; PrimaryFlag=&amp;quot;true&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Country&amp;gt;USA&amp;lt;/Country&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;AddressLine1&amp;gt;100 Main St&amp;lt;/AddressLine1&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;City&amp;gt;Columbus&amp;lt;/City&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Territory&amp;gt;OH&amp;lt;/Territory&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;PostalCode&amp;gt;43125&amp;lt;/PostalCode&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Address&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;/div&gt;&amp;lt;EMailAddress&amp;gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26807270&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;email@...&lt;/a&gt;&amp;lt;/EMailAddress&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ContactInformation&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Then my reader can parse it fine.
&lt;br&gt;&lt;br&gt;Where's the difference here? I suppose the original has some tag around the 
&lt;br&gt;EmailAddress ...
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; However, the requirement is to remove the additional &amp;quot;EMail&amp;quot; element. Is
&lt;br&gt;&amp;gt; there a different configuration needed to tell xstream to read in using
&lt;br&gt;&amp;gt; the implicit collection (to not expect the additional element to exist)?
&lt;br&gt;&lt;br&gt;How did you initialize XStream? You're aware of this: 
&lt;br&gt;&lt;a href=&quot;http://xstream.codehaus.org/annotations-tutorial.html#AutoDetect&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xstream.codehaus.org/annotations-tutorial.html#AutoDetect&lt;/a&gt;&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Repetition-with-Implicit-Collection-tp26752135p26807270.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26767908</id>
	<title>Re: repeating element inside converter</title>
	<published>2009-12-13T09:21:27Z</published>
	<updated>2009-12-13T09:21:27Z</updated>
	<author>
		<name>coop207</name>
	</author>
	<content type="html">I don't actually have an implicit on this one. Here is my bean:
&lt;br&gt;&lt;br&gt;package com.mr.interfaces.relate.xstream.beans;
&lt;br&gt;&lt;br&gt;import java.util.List;
&lt;br&gt;import java.util.ArrayList;
&lt;br&gt;import com.thoughtworks.xstream.annotations.*;
&lt;br&gt;&lt;br&gt;@XStreamAlias(&amp;quot;Name&amp;quot;)
&lt;br&gt;public class RelateCustomerNameBean {
&lt;br&gt;&lt;br&gt;&amp;nbsp; private ArrayList&amp;lt;String&amp;gt; name;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; public ArrayList&amp;lt;String&amp;gt; getName() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return name;
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&amp;nbsp; public void setName(ArrayList&amp;lt;String&amp;gt; name) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.name = name;
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;}
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/repeating-element-inside-converter-tp26752064p26767908.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26759984</id>
	<title>Re: Annotation Issue with repeating group that has an attribute</title>
	<published>2009-12-12T10:24:03Z</published>
	<updated>2009-12-12T10:24:03Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Jörg Schaible wrote:
&lt;br&gt;&lt;br&gt;[snip]
&lt;br&gt;&lt;br&gt;Sorry, wrong thread.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Annotation-Issue-with-repeating-group-that-has-an-attribute-tp26717404p26759984.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26759991</id>
	<title>Re: re[xstream-user] peating element inside converter</title>
	<published>2009-12-12T10:22:20Z</published>
	<updated>2009-12-12T10:22:20Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Erik,
&lt;br&gt;&lt;br&gt;coop207 wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; I wrote a custom converter to handle a certain repeating element issue.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am able to create the outbound data as desired:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;Britney&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;M&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;Spears&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But when going from XML, I am only able to get the first repetition of the
&lt;br&gt;&amp;gt; inner Name element:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;Britney&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; My converter is posted below. In the unmarshall method is there something
&lt;br&gt;&amp;gt; that I can do to gain access to the multiple repetitions of the inner Name
&lt;br&gt;&amp;gt; element? I check the hasMoreChildren and it always has only one child.
&lt;/div&gt;&lt;br&gt;[snip]
&lt;br&gt;&lt;br&gt;You converter looks OK. But I guess you have an XStreamImplicit attribute 
&lt;br&gt;for the member containing the RelateCustomerNameBean? Drop it. Or show the 
&lt;br&gt;bean itself.
&lt;br&gt;&lt;br&gt;BTW: If you post code, please drop these System.out lines first, it makes 
&lt;br&gt;it 
&lt;br&gt;really hard to see anything.
&lt;br&gt;&lt;br&gt;- Jörg 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/repeating-element-inside-converter-tp26752064p26759991.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26759955</id>
	<title>Re: Annotation Issue with repeating group that has an attribute</title>
	<published>2009-12-12T10:18:05Z</published>
	<updated>2009-12-12T10:18:05Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Erik,
&lt;br&gt;&lt;br&gt;coop207 wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; I wrote a custom converter to handle a certain repeating element issue.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I am able to create the outbound data as desired:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;Britney&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;M&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;Spears&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But when going from XML, I am only able to get the first repetition of the
&lt;br&gt;&amp;gt; inner Name element:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;Britney&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; My converter is posted below. In the unmarshall method is there something
&lt;br&gt;&amp;gt; that I can do to gain access to the multiple repetitions of the inner Name
&lt;br&gt;&amp;gt; element? I check the hasMoreChildren and it always has only one child.
&lt;/div&gt;&lt;br&gt;[snip]
&lt;br&gt;&lt;br&gt;You converter looks OK. But I guess you have an XStreamImplicit attribute 
&lt;br&gt;for the member containing the RelateCustomerNameBean? Drop it. Or show the 
&lt;br&gt;bean itself.
&lt;br&gt;&lt;br&gt;BTW: If you post code, please drop these System.out lines first, it makes it 
&lt;br&gt;really hard to see anything.
&lt;br&gt;&lt;br&gt;- Jörg 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Annotation-Issue-with-repeating-group-that-has-an-attribute-tp26717404p26759955.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26752135</id>
	<title>Repetition with Implicit Collection</title>
	<published>2009-12-11T14:07:04Z</published>
	<updated>2009-12-11T14:07:04Z</updated>
	<author>
		<name>coop207</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;I have a repeating element that I use with an implicit collection (on the EMail element) to generate the following out:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ContactInformation&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Address SequenceNumber=&amp;quot;1&amp;quot; ValidFlag=&amp;quot;true&amp;quot; TypeCode=&amp;quot;HOME&amp;quot; PrimaryFlag=&amp;quot;true&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Country&amp;gt;USA&amp;lt;/Country&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;AddressLine1&amp;gt;100 Main St&amp;lt;/AddressLine1&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;City&amp;gt;Columbus&amp;lt;/City&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Territory&amp;gt;OH&amp;lt;/Territory&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;PostalCode&amp;gt;43125&amp;lt;/PostalCode&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Address&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EMail SequenceNumber=&quot;1&quot; TypeCode=&quot;HOME&quot; PrimaryFlag=&quot;true&quot;&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EMailAddress&amp;gt;email@domain.com&amp;lt;/EMailAddress&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/EMail&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ContactInformation&amp;gt;
&lt;br&gt;&lt;br&gt;There can be multiple EMail elements and I use the implicit collection to prevent the creation of an additional element around the EMail. This works fine for creating outbound XML, but does not work for reading in XML.
&lt;br&gt;&lt;br&gt;If I remove by implicit collection so that the generated XML looks like this:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;ContactInformation&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Address SequenceNumber=&amp;quot;1&amp;quot; ValidFlag=&amp;quot;true&amp;quot; TypeCode=&amp;quot;HOME&amp;quot; PrimaryFlag=&amp;quot;true&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Country&amp;gt;USA&amp;lt;/Country&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;AddressLine1&amp;gt;100 Main St&amp;lt;/AddressLine1&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;City&amp;gt;Columbus&amp;lt;/City&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Territory&amp;gt;OH&amp;lt;/Territory&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;PostalCode&amp;gt;43125&amp;lt;/PostalCode&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Address&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EMail&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;EMail SequenceNumber=&quot;1&quot; TypeCode=&quot;HOME&quot; PrimaryFlag=&quot;true&quot;&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;EMailAddress&amp;gt;email@domain.com&amp;lt;/EMailAddress&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/EMail&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/EMail&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/ContactInformation&amp;gt;
&lt;br&gt;&lt;br&gt;Then my reader can parse it fine.
&lt;br&gt;&lt;br&gt;However, the requirement is to remove the additional &amp;quot;EMail&amp;quot; element. Is there a different configuration needed to tell xstream to read in using the implicit collection (to not expect the additional element to exist)?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Erik</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Repetition-with-Implicit-Collection-tp26752135p26752135.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26752064</id>
	<title>repeating element inside converter</title>
	<published>2009-12-11T14:01:45Z</published>
	<updated>2009-12-11T14:01:45Z</updated>
	<author>
		<name>coop207</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;I wrote a custom converter to handle a certain repeating element issue.
&lt;br&gt;&lt;br&gt;I am able to create the outbound data as desired:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;Britney&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;M&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;Spears&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&lt;br&gt;But when going from XML, I am only able to get the first repetition of the inner Name element:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot; LookupType=&amp;quot;StartsWith&amp;quot;&amp;gt;Britney&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp;
&lt;br&gt;My converter is posted below. In the unmarshall method is there something that I can do to gain access to the multiple repetitions of the inner Name element? I check the hasMoreChildren and it always has only one child.
&lt;br&gt;&lt;br&gt;&lt;br&gt;package com.mr.interfaces.relate.xstream.beans.converters;
&lt;br&gt;&lt;br&gt;import java.util.ArrayList;
&lt;br&gt;import java.util.List;
&lt;br&gt;&lt;br&gt;import com.thoughtworks.xstream.converters.Converter;
&lt;br&gt;import com.thoughtworks.xstream.converters.MarshallingContext;
&lt;br&gt;import com.thoughtworks.xstream.converters.UnmarshallingContext;
&lt;br&gt;import com.thoughtworks.xstream.io.HierarchicalStreamReader;
&lt;br&gt;import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
&lt;br&gt;import com.mr.interfaces.relate.xstream.beans.RelateCustomerNameBean;
&lt;br&gt;&lt;br&gt;public class NameConverter implements Converter {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public boolean canConvert(Class clazz) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return clazz.equals(RelateCustomerNameBean.class);
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;public void marshal(Object value, HierarchicalStreamWriter writer,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MarshallingContext context) {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RelateCustomerNameBean name = (RelateCustomerNameBean) value;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (name.getName() != null) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 	// we get in a list of strings
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 	// loop through all names in the name list
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 	List&amp;lt;String&amp;gt; nameList = name.getName();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 	for (int x=0;x&amp;lt;nameList.size();x++) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		if (nameList.get(x) !=null &amp;&amp; nameList.get(x).equals(&amp;quot;&amp;quot;)==false) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			writer.startNode(&amp;quot;Name&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		if (x==0) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			// first name
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			writer.addAttribute(&amp;quot;Location&amp;quot;, &amp;quot;First&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			writer.addAttribute(&amp;quot;LookupType&amp;quot;, &amp;quot;StartsWith&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		} else if (x==1) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			// middle name
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			writer.addAttribute(&amp;quot;Location&amp;quot;, &amp;quot;Middle&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			writer.addAttribute(&amp;quot;LookupType&amp;quot;, &amp;quot;StartsWith&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		} else if (x==2) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			// last name
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			writer.addAttribute(&amp;quot;Location&amp;quot;, &amp;quot;Last&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 			writer.addAttribute(&amp;quot;LookupType&amp;quot;, &amp;quot;StartsWith&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		writer.setValue(nameList.get(x));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		writer.endNode();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 		}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 	}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;public Object unmarshal(HierarchicalStreamReader reader,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; UnmarshallingContext context) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RelateCustomerNameBean name = new RelateCustomerNameBean();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ArrayList&amp;lt;String&amp;gt; nameList = null;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nameList = new ArrayList&amp;lt;String&amp;gt;();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // here we need to create a list of names to return
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal Has More Children before Move Down:&amp;quot; + reader.hasMoreChildren());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (reader.hasMoreChildren()) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reader.moveDown();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal reader:&amp;quot; + reader);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal context:&amp;quot; + context.toString());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal node:&amp;quot; + reader.getNodeName());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal attributes:&amp;quot; + reader.getAttributeCount());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal Location:&amp;quot; + reader.getAttribute(&amp;quot;Location&amp;quot;));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal Has More Children:&amp;quot; + reader.hasMoreChildren());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal value:&amp;quot; + reader.getValue());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nameList.add(reader.getValue());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal after first get value&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //reader.moveDown();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //reader.moveUp();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal value:&amp;quot; + reader.getValue());
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal after second get value&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal after value&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; reader.moveUp();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal called with no children&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //nameList.add(&amp;quot;C&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; name.setName(nameList);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&amp;quot;name converter unmarshal after namelist&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return name;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Erik</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/repeating-element-inside-converter-tp26752064p26752064.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26727243</id>
	<title>Re: Annotation Issue with repeating group that has an attribute</title>
	<published>2009-12-10T05:31:48Z</published>
	<updated>2009-12-10T05:31:48Z</updated>
	<author>
		<name>Tim O.</name>
	</author>
	<content type="html">Thanks Jörg
&lt;br&gt;&lt;br&gt;We will go the converter path.
&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Jörg Schaible-2 wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hi Tim,
&lt;br&gt;&lt;br&gt;Tim O. wrote at Mittwoch, 9. Dezember 2009 21:45:
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is a strange xml which we need to create from a bean.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The way we want the xml to look is like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot;&amp;gt;Erik&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But it is coming out like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;Erik&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any Help would be greatly appreciated :)
&lt;br&gt;&lt;br&gt;You cannot configure something like: The value of the tag is assigned to a 
&lt;br&gt;specific field in my class and all other fields must be expressed with 
&lt;br&gt;attributes - there are too many implications for more complex types. 
&lt;br&gt;Therefore you will have to write a custom converter for your 
&lt;br&gt;RelateCustomerNameNameBean class. See the converter tutorial, it's easy to 
&lt;br&gt;write one.
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Annotation-Issue-with-repeating-group-that-has-an-attribute-tp26717404p26727243.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26723533</id>
	<title>Re: Annotation Issue with repeating group that has an attribute</title>
	<published>2009-12-10T00:14:52Z</published>
	<updated>2009-12-10T00:14:52Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Tim,
&lt;br&gt;&lt;br&gt;Tim O. wrote at Mittwoch, 9. Dezember 2009 21:45:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; This is a strange xml which we need to create from a bean.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The way we want the xml to look is like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot;&amp;gt;Erik&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But it is coming out like this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;Erik&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any Help would be greatly appreciated :)
&lt;/div&gt;&lt;br&gt;You cannot configure something like: The value of the tag is assigned to a 
&lt;br&gt;specific field in my class and all other fields must be expressed with 
&lt;br&gt;attributes - there are too many implications for more complex types. 
&lt;br&gt;Therefore you will have to write a custom converter for your 
&lt;br&gt;RelateCustomerNameNameBean class. See the converter tutorial, it's easy to 
&lt;br&gt;write one.
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Annotation-Issue-with-repeating-group-that-has-an-attribute-tp26717404p26723533.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26723437</id>
	<title>Re: Re: Re: Serialize specific fields</title>
	<published>2009-12-10T00:03:07Z</published>
	<updated>2009-12-10T00:03:07Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;ad wrote at Montag, 7. Dezember 2009 19:10:
&lt;br&gt;&lt;br&gt;&amp;gt; I have used PropertyUtilsBean to access a specific attribute using this
&lt;br&gt;&amp;gt; notation &amp;quot;bean.attribute.bean.attribute&amp;quot;, but this can't work to get a
&lt;br&gt;&amp;gt; List
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is there a way to make a generic Converter?
&lt;br&gt;&lt;br&gt;Yes.
&lt;br&gt;&lt;br&gt;It's up to you to decide when your implementation of the canConvert method 
&lt;br&gt;returns true, isn't it? The range of classes that can be handles by a 
&lt;br&gt;converter is completely dependent on its implementation - your code. You can 
&lt;br&gt;look at XStream's converters to see specialized converters handling only one 
&lt;br&gt;type at all (like StringConverter), a bunch of types (like 
&lt;br&gt;CollectionConverter) or completely generic (like ReflectionConverter).
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Serialize-specific-fields-tp26491993p26723437.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26718903</id>
	<title>Re: Annotation Issue with repeating group that has an attribute</title>
	<published>2009-12-09T14:28:44Z</published>
	<updated>2009-12-09T14:28:44Z</updated>
	<author>
		<name>coop207</name>
	</author>
	<content type="html">To add a little extra information, we are trying to set up the inner name as a repeating element, for example it will be necessary to create something like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot;&amp;gt;Erik&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;Last&amp;quot;&amp;gt;Smith&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Annotation-Issue-with-repeating-group-that-has-an-attribute-tp26717404p26718903.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26717404</id>
	<title>Annotation Issue with repeating group that has an attribute</title>
	<published>2009-12-09T12:45:58Z</published>
	<updated>2009-12-09T12:45:58Z</updated>
	<author>
		<name>Tim O.</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;This is a strange xml which we need to create from a bean.
&lt;br&gt;&lt;br&gt;The way we want the xml to look is like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot;&amp;gt;Erik&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&lt;br&gt;But it is coming out like this:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name Location=&amp;quot;First&amp;quot;&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;Name&amp;gt;Erik&amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/Name&amp;gt;
&lt;br&gt;&lt;br&gt;Any Help would be greatly appreciated :)
&lt;br&gt;&lt;br&gt;Here are the classes that are annotated:
&lt;br&gt;&lt;br&gt;************************First Class**************************
&lt;br&gt;package com.mr.interfaces.relate.xstream.beans;
&lt;br&gt;&lt;br&gt;import java.util.List;
&lt;br&gt;import com.thoughtworks.xstream.annotations.*;
&lt;br&gt;&lt;br&gt;@XStreamAlias(&amp;quot;Name&amp;quot;)
&lt;br&gt;public class RelateCustomerNameBean {
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @XStreamImplicit(itemFieldName=&amp;quot;Name&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; private List&amp;lt;RelateCustomerNameNameBean&amp;gt; name;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public List&amp;lt;RelateCustomerNameNameBean&amp;gt; getName() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return name;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void setName(List&amp;lt;RelateCustomerNameNameBean&amp;gt; name) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.name = name;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;}
&lt;br&gt;************************Second Class**************************
&lt;br&gt;package com.mr.interfaces.relate.xstream.beans;
&lt;br&gt;&lt;br&gt;import java.util.List;
&lt;br&gt;&lt;br&gt;import com.thoughtworks.xstream.annotations.*;
&lt;br&gt;&lt;br&gt;@XStreamAlias(&amp;quot;Name&amp;quot;)
&lt;br&gt;public class RelateCustomerNameNameBean {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @XStreamAlias(&amp;quot;Location&amp;quot;) @XStreamAsAttribute &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private String location;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; public String getLocation() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return location;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; public void setLocation(String location) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.location = location;
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; @XStreamImplicit(itemFieldName=&amp;quot;Name&amp;quot;)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private List&amp;lt;String&amp;gt; name;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public List&amp;lt;String&amp;gt; getName() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return name;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public void setName(List&amp;lt;String&amp;gt; name) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; this.name = name;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;}</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Annotation-Issue-with-repeating-group-that-has-an-attribute-tp26717404p26717404.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26681455</id>
	<title>Re: Re: Re: Serialize specific fields</title>
	<published>2009-12-07T10:10:41Z</published>
	<updated>2009-12-07T10:10:41Z</updated>
	<author>
		<name>skystar3</name>
	</author>
	<content type="html">I have used PropertyUtilsBean to access a specific attribute using this notation &amp;quot;bean.attribute.bean.attribute&amp;quot;, but this can&amp;#39;t work to get a List&lt;br&gt;&lt;br&gt;Is there a way to make a generic Converter?&lt;br&gt;&lt;br&gt;Thanks in advance for your help&lt;br&gt;
&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Dec 4, 2009 at 2:05 AM, Jörg Schaible &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26681455&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;joerg.schaible@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
&lt;div class=&quot;im&quot;&gt;ad wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt; Problem solved with a custom converter :)&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;This is, what is done in the converter tutorial. I ask myself, why did you&lt;br&gt;
try to solve it always in a generic way i.e. for a lot of classes if you&lt;br&gt;
have individual behavior of each type?&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
- Jörg&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Serialize-specific-fields-tp26491993p26681455.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26657376</id>
	<title>Re: Re: XStream fromXML NPE</title>
	<published>2009-12-05T09:10:14Z</published>
	<updated>2009-12-05T09:10:14Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Tom,
&lt;br&gt;&lt;br&gt;Tom Barber wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Jörg
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks for the reply, yeah I guessed that was the issue, I was just
&lt;br&gt;&amp;gt; clutching at straws ;)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; We use an Olap interface called Olap4j, which in turn creates our queries
&lt;br&gt;&amp;gt; and other crazy things
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.olap4j.org/head/api/overview-summary.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.olap4j.org/head/api/overview-summary.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In turn we serialize the query model that it generates:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.olap4j.org/head/api/org/olap4j/query/package-summary.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.olap4j.org/head/api/org/olap4j/query/package-summary.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Using one of the Olap4J connection modes(XML/A) we can save and load fine,
&lt;br&gt;&amp;gt; but using the other mode(neat mondrian) this is when it throws the error,
&lt;br&gt;&amp;gt; I suspect in my newb wisdom this is when it tried to use the mondrian
&lt;br&gt;&amp;gt; library also.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; We are using the latest Maven build 1.3.1.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I understand this is more our issue than xstream, whilst we have no direct
&lt;br&gt;&amp;gt; access to modify Olap4J we do have the ability to commit patches, have you
&lt;br&gt;&amp;gt; any suggestions as how to get around this?
&lt;/div&gt;&lt;br&gt;You might have the possibility to trim the XML. Example: Look at the source 
&lt;br&gt;of the Locale class of Java. It contains quite a lot of members and all kind 
&lt;br&gt;of stuff. However, XStream is delivered with a LocaleConverter and all that 
&lt;br&gt;is written into XML is something like &amp;quot;&amp;lt;locale&amp;gt;en_US&amp;lt;/locale&amp;gt;&amp;quot;. This is the 
&lt;br&gt;only information that is necessary to recreate the object, simply because 
&lt;br&gt;you deal with some kind of named singletons. You got the point.
&lt;br&gt;&lt;br&gt;Look at this path:
&lt;br&gt;/query/axes/entry/axis/dimensions/list/querydimension/inclusions/list/org.olap4j.query.SelectionImpl/member/member/rolapMember/level/hierarchy/dimension/schema/internalConnection/schemaReader/role/schemaGrants/entry
&lt;br&gt;&lt;br&gt;I wonder about the &amp;quot;schema/internalConnection&amp;quot;. This sounds as there's also 
&lt;br&gt;some kind of data that does not necessarily have to be written into XML. 
&lt;br&gt;Maybe that schema can also be represented by a simple name only and you're 
&lt;br&gt;able to recreate such an object at deserialization time within a custom 
&lt;br&gt;converter - just a thought.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XStream-fromXML-NPE-tp26606416p26657376.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26657264</id>
	<title>RE: Re: IBM Web Sphere JVM</title>
	<published>2009-12-05T08:55:48Z</published>
	<updated>2009-12-05T08:55:48Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Frangis, Socrates CIV NSWC PHD, L46 wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I do not have the system in my possession yet which will be running the
&lt;br&gt;&amp;gt; Real Time Virtual Machine. If I can get to a Linux system running this
&lt;br&gt;&amp;gt; RTJS and test out Xstream, what should I see when I run: &amp;quot;$ java -cp
&lt;br&gt;&amp;gt; xstream-1.3.1.jar com.thoughtworks.xstream.core.JVM&amp;quot; ?
&lt;br&gt;&lt;br&gt;Try it elsewhere and you'll see :)
&lt;br&gt;&lt;br&gt;&amp;gt; Will it tell me whether or not EnhancedMode/PureJava are supported?
&lt;br&gt;&lt;br&gt;Yes. But it's a default, you can override it. But it does not mean that it 
&lt;br&gt;really works.
&lt;br&gt;&lt;br&gt;&amp;gt; A link to the product site is at:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.alphaworks.ibm.com/topics/realtimejava&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.alphaworks.ibm.com/topics/realtimejava&lt;/a&gt;&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IBM-Web-Sphere-JVM-tp26619645p26657264.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26647964</id>
	<title>Re: Custom CollectionConverter Called from another Converter</title>
	<published>2009-12-04T11:30:44Z</published>
	<updated>2009-12-04T11:30:44Z</updated>
	<author>
		<name>skystar3</name>
	</author>
	<content type="html">Problem solved after creating a default mapper and apply some modification on AbstractCollectionConverter to omit some attributes in the object contained in the List.&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Dec 4, 2009 at 6:30 PM, ad &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26647964&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahmadqsoftnet@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;Hello Jörg,&lt;br&gt;&lt;br&gt;I want to skip some attributes of the objects that are contained in ListArray, so i have extended the CollectionConverter class. &lt;br&gt;
&lt;br&gt;I can call this converter from xstream object and register it xstream.registerConverter(new CustomCollectionConverter(xstream.getMapper())); But this will not work with my case hence i am calling it from another converter using marshallcontext.mc.convertAnother(nextItem, customCollectionConverter);&lt;br&gt;

&lt;br&gt;But when i am creating a new CustomCollectionConverter it needs a mapper in its constructor, so how can i pass the mapper here (from another converter).&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;Ahmad&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/pre&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Custom-CollectionConverter-Called-from-another-Converter-tp26645183p26647964.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26645183</id>
	<title>Custom CollectionConverter Called from another Converter</title>
	<published>2009-12-04T08:30:54Z</published>
	<updated>2009-12-04T08:30:54Z</updated>
	<author>
		<name>skystar3</name>
	</author>
	<content type="html">Hello Jörg,&lt;br&gt;&lt;br&gt;I want to skip some attributes of the objects that are contained in ListArray, so i have extended the CollectionConverter class. &lt;br&gt;&lt;br&gt;I can call this converter from xstream object and register it xstream.registerConverter(new CustomCollectionConverter(xstream.getMapper())); But this will not work with my case hence i am calling it from another converter using marshallcontext.mc.convertAnother(nextItem, customCollectionConverter);&lt;br&gt;
&lt;br&gt;But when i am creating a new CustomCollectionConverter it needs a mapper in its constructor, so how can i pass the mapper here (from another converter).&lt;br&gt;&lt;br&gt;Thanks&lt;br&gt;Ahmad&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;/pre&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Custom-CollectionConverter-Called-from-another-Converter-tp26645183p26645183.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26639782</id>
	<title>Re: Re: XStream fromXML NPE</title>
	<published>2009-12-04T01:14:35Z</published>
	<updated>2009-12-04T01:14:35Z</updated>
	<author>
		<name>Tom Barber-3</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
  &lt;head&gt;
    &lt;meta content=&quot;text/html; charset=UTF-8&quot; http-equiv=&quot;Content-Type&quot; /&gt;
    &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;

  &lt;body&gt;
    Hi J&amp;#246;rg&lt;br /&gt;
    &lt;br /&gt;
    Thanks for the reply, yeah I guessed that was the issue, I was just clutching at straws ;)&lt;br /&gt;
    &lt;br /&gt;
    We use an Olap interface called Olap4j, which in turn creates our queries and other crazy things &lt;br /&gt;
    http://www.olap4j.org/head/api/overview-summary.html&lt;br /&gt;
    &lt;br /&gt;
    In turn we serialize the query model that it generates:&lt;br /&gt;
    http://www.olap4j.org/head/api/org/olap4j/query/package-summary.html&lt;br /&gt;
    &lt;br /&gt;
    Using one of the Olap4J connection modes(XML/A) we can save and load fine, but using the other mode(neat mondrian) this is when it throws the error, I suspect in my newb wisdom this is when it tried to use the mondrian library also.&lt;br /&gt;
    &lt;br /&gt;
    We are using the latest Maven build 1.3.1.&lt;br /&gt;
    &lt;br /&gt;
    I understand this is more our issue than xstream, whilst we have no direct access to modify Olap4J we do have the ability to commit patches, have you any suggestions as how to get around this?&lt;br /&gt;
    &lt;br /&gt;
    Cheers&lt;br /&gt;
    &lt;br /&gt;
    Tom&lt;br /&gt;
    &lt;br /&gt;
    On 02 December 2009 at 22:51 &amp;quot;J&amp;#246;rg Schaible&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26639782&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;joerg.schaible@...&lt;/a&gt;&amp;gt; wrote:&lt;br /&gt;
    &lt;br /&gt;
    &amp;gt; Hi Tom,&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; Tom Barber wrote:&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; &amp;gt; Hi Guys&lt;br /&gt;
    &amp;gt; &amp;gt; &lt;br /&gt;
    &amp;gt; &amp;gt; Sorry for the newb question but I&amp;#39;ve hit upon a problem that I am yet to&lt;br /&gt;
    &amp;gt; &amp;gt; solve. I have been tinkering with XStream to save a query model for a GWT&lt;br /&gt;
    &amp;gt; &amp;gt; based db app I am working on. Saving works fine but loading the query&lt;br /&gt;
    &amp;gt; &amp;gt; model back up throws an error the crux of which is the following:&lt;br /&gt;
    &amp;gt; &amp;gt; &lt;br /&gt;
    &amp;gt; &amp;gt; [INFO] ---- Debugging information ----&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO] cause-exception&amp;#160; &amp;#160; &amp;#160;: java.lang.NullPointerException&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO] cause-message&amp;#160; &amp;#160; &amp;#160; &amp;#160;: null&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO] class&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;: org.olap4j.query.Query&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO] required-type&amp;#160; &amp;#160; &amp;#160; &amp;#160;: java.util.HashMap&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO] path&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; :&lt;br /&gt;
    &amp;gt; &amp;gt; &lt;br /&gt;
    &amp;gt; /query/axes/entry/axis/dimensions/list/querydimension/inclusions/list/org.olap4j&lt;br /&gt;
    &amp;gt; &amp;gt; &lt;br /&gt;
    &amp;gt; .query.SelectionImpl/member/member/rolapMember/level/hierarchy/dimension/schema/&lt;br /&gt;
    &amp;gt; &amp;gt; internalConnection/schemaReader/role/schemaGrants/entry&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO] line number&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;: 6520&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO] -------------------------------&lt;br /&gt;
    &amp;gt; &amp;gt; &lt;br /&gt;
    &amp;gt; &amp;gt; I spent yesterday googling and tinkering, now I know that there are the&lt;br /&gt;
    &amp;gt; &amp;gt; conversion tutorials on the website where you sort of rebuild the object,&lt;br /&gt;
    &amp;gt; &amp;gt; but the problem I appear to have which isn&amp;#39;t covered is the fact this&lt;br /&gt;
    &amp;gt; &amp;gt; query model is generated by a 3rd party lib and so can&amp;#39;t be &amp;#39;rebuilt&amp;#39; in&lt;br /&gt;
    &amp;gt; &amp;gt; the way that the tutorial suggests. I also saw some people having success&lt;br /&gt;
    &amp;gt; &amp;gt; by setting the class loader similar to this:&lt;br /&gt;
    &amp;gt; &amp;gt; &lt;br /&gt;
    &amp;gt; &amp;gt; final XStream xstream = new XStream();&lt;br /&gt;
    &amp;gt; &amp;gt; xstream.setClassLoader(org.olap4j.query.Query.class.getClassLoader());&lt;br /&gt;
    &amp;gt; &amp;gt; Object oQuery = xstream.fromXML(sc.getXml());&lt;br /&gt;
    &amp;gt; &amp;gt; &lt;br /&gt;
    &amp;gt; &amp;gt; But that appears to make no difference to me, I have attached the full&lt;br /&gt;
    &amp;gt; &amp;gt; stack trace and any suggestions or a slap round the face would be most&lt;br /&gt;
    &amp;gt; &amp;gt; appreciated.&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; This is not a classpath issue. Actually the problem is here:&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; [snip]&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; &amp;gt; [INFO] Caused by: java.lang.NullPointerException&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO]&amp;#160; at mondrian.rolap.RolapSchema.hashCode(RolapSchema.java:261)&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO]&amp;#160; at java.util.HashMap.put(HashMap.java:372)&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO]&amp;#160; at &lt;br /&gt;
    &amp;gt; com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:82)&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO]&amp;#160; at &lt;br /&gt;
    &amp;gt; com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:66)&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO]&amp;#160; at &lt;br /&gt;
    &amp;gt; com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)&lt;br /&gt;
    &amp;gt; &amp;gt; [INFO]&amp;#160; ... 189 more&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; The XML contains a serialized HashMap. At deserialization time each element &lt;br /&gt;
    &amp;gt; is unmarhsalled one by one and added to the HashMap again. This means that &lt;br /&gt;
    &amp;gt; the element&amp;#39;s hash code will be requested. However, in your case the element &lt;br /&gt;
    &amp;gt; is a RolapSchema and it seems not yet initialized. Where does this class &lt;br /&gt;
    &amp;gt; come from?&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; Which version of XStream do you use?&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; Cheers,&lt;br /&gt;
    &amp;gt; J&amp;#246;rg&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; ---------------------------------------------------------------------&lt;br /&gt;
    &amp;gt; To unsubscribe from this list, please visit:&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt;&amp;#160; &amp;#160; &amp;#160;http://xircles.codehaus.org/manage_email&lt;br /&gt;
    &amp;gt; &lt;br /&gt;
    &amp;gt; &lt;br /&gt;
  &lt;/body&gt;
&lt;/html&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XStream-fromXML-NPE-tp26606416p26639782.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26635650</id>
	<title>RE: Re: IBM Web Sphere JVM</title>
	<published>2009-12-03T16:13:26Z</published>
	<updated>2009-12-03T16:13:26Z</updated>
	<author>
		<name>Frangis, Socrates CIV NSWC PHD, L46</name>
	</author>
	<content type="html">I do not have the system in my possession yet which will be running the Real Time Virtual Machine.
&lt;br&gt;If I can get to a Linux system running this RTJS and test out Xstream,
&lt;br&gt;what should I see when I run: &amp;quot;$ java -cp xstream-1.3.1.jar com.thoughtworks.xstream.core.JVM&amp;quot; ?
&lt;br&gt;&lt;br&gt;Will it tell me whether or not EnhancedMode/PureJava are supported?
&lt;br&gt;&lt;br&gt;A link to the product site is at:
&lt;br&gt;&lt;a href=&quot;http://www.alphaworks.ibm.com/topics/realtimejava&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.alphaworks.ibm.com/topics/realtimejava&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;V/R,
&lt;br&gt;Socrates Frangis
&lt;br&gt;Mathematician
&lt;br&gt;NSWC PHD, Code L46
&lt;br&gt;805-228-7740
&lt;br&gt;DSN: 296-7740 
&lt;br&gt;-----Original Message-----
&lt;br&gt;From: news [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26635650&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;news@...&lt;/a&gt;] On Behalf Of Jörg Schaible
&lt;br&gt;Sent: Thursday, December 03, 2009 16:01
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26635650&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;user@...&lt;/a&gt;
&lt;br&gt;Subject: [xstream-user] Re: IBM Web Sphere JVM
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;Frangis, Socrates CIV NSWC PHD, L46 wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I was evaluating Xstream for use with a project and had a question. 
&lt;br&gt;&amp;gt; After going through the FAQ I saw that there are levels of 
&lt;br&gt;&amp;gt; compatibility with different JVM's (depending on use of Enhanced Mode, 
&lt;br&gt;&amp;gt; Pure Java, or even the JVM itself).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; IBM was listed on the FAQ as working with the enhanced mode, though, I 
&lt;br&gt;&amp;gt; have come across multiple message board posts talking about issues 
&lt;br&gt;&amp;gt; they have had with Web Sphere and Apache Harmony (Basically Open Source J9).
&lt;br&gt;&amp;gt; Also, there are multiple versions of the J9 (Web sphere, Real-time Web 
&lt;br&gt;&amp;gt; Sphere, Harmony, etc), which was a little confusing when the FAQ just 
&lt;br&gt;&amp;gt; lists 'IBM' as being compatible.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I will be using the current Real Time IBM Web Sphere JVM.
&lt;br&gt;&amp;gt; Are there any known issues with this?
&lt;/div&gt;&lt;/div&gt;Cannot say, this JVM has never been tested. Personally, I was not even aware that there is an additional WebSphere Real Time JVM. What's the output
&lt;br&gt;running:
&lt;br&gt;&lt;br&gt;&amp;nbsp;$ java -cp xstream-1.3.1.jar com.thoughtworks.xstream.core.JVM
&lt;br&gt;&lt;br&gt;What has been tested is the standard IBM JVM. Apache Harmony is currently not supported and will not run.
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (6K) &lt;a href=&quot;http://old.nabble.com/attachment/26635650/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IBM-Web-Sphere-JVM-tp26619645p26635650.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26635621</id>
	<title>Re: Re: Serialize specific fields</title>
	<published>2009-12-03T16:05:36Z</published>
	<updated>2009-12-03T16:05:36Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">ad wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Problem solved with a custom converter :)
&lt;br&gt;&lt;br&gt;This is, what is done in the converter tutorial. I ask myself, why did you 
&lt;br&gt;try to solve it always in a generic way i.e. for a lot of classes if you 
&lt;br&gt;have individual behavior of each type?
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Serialize-specific-fields-tp26491993p26635621.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26635568</id>
	<title>Re: Re: Serialize specific fields</title>
	<published>2009-12-03T16:03:48Z</published>
	<updated>2009-12-03T16:03:48Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Ahmad,
&lt;br&gt;&lt;br&gt;ad wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hello Jörg,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The problem now solved by replacing the Map arg with an
&lt;br&gt;&amp;gt; OrderRetainingMap() object in the FieldKeySorter interface, and know i can
&lt;br&gt;&amp;gt; omit the field i want, but this will suppress this field for all objects
&lt;br&gt;&amp;gt; of the defined type in object-model.
&lt;br&gt;&lt;br&gt;Yes, this is a global modification. I htought, that was your goal.
&lt;br&gt;&lt;br&gt;&amp;gt; And i need to suppress a specific field in a specific object while
&lt;br&gt;&amp;gt; serialize it in other object, hence both objects are from the same type,
&lt;br&gt;&amp;gt; for example i have Employee class one object in supervisor role, and the
&lt;br&gt;&amp;gt; other in supervisee role.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; So how can i implement this functionality in XStream?
&lt;br&gt;&lt;br&gt;Not in a generic way.
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Serialize-specific-fields-tp26491993p26635568.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26635534</id>
	<title>Re: IBM Web Sphere JVM</title>
	<published>2009-12-03T16:01:16Z</published>
	<updated>2009-12-03T16:01:16Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Frangis, Socrates CIV NSWC PHD, L46 wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I was evaluating Xstream for use with a project and had a question. After
&lt;br&gt;&amp;gt; going through the FAQ I saw that there are levels of compatibility with
&lt;br&gt;&amp;gt; different JVM's (depending on use of Enhanced Mode, Pure Java, or even the
&lt;br&gt;&amp;gt; JVM itself).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; IBM was listed on the FAQ as working with the enhanced mode, though, I
&lt;br&gt;&amp;gt; have come across multiple message board posts talking about issues they
&lt;br&gt;&amp;gt; have had with Web Sphere and Apache Harmony (Basically Open Source J9).
&lt;br&gt;&amp;gt; Also, there are multiple versions of the J9 (Web sphere, Real-time Web
&lt;br&gt;&amp;gt; Sphere, Harmony, etc), which was a little confusing when the FAQ just
&lt;br&gt;&amp;gt; lists 'IBM' as being compatible.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I will be using the current Real Time IBM Web Sphere JVM.
&lt;br&gt;&amp;gt; Are there any known issues with this?
&lt;/div&gt;&lt;br&gt;Cannot say, this JVM has never been tested. Personally, I was not even aware 
&lt;br&gt;that there is an additional WebSphere Real Time JVM. What's the output 
&lt;br&gt;running:
&lt;br&gt;&lt;br&gt;&amp;nbsp;$ java -cp xstream-1.3.1.jar com.thoughtworks.xstream.core.JVM
&lt;br&gt;&lt;br&gt;What has been tested is the standard IBM JVM. Apache Harmony is currently 
&lt;br&gt;not supported and will not run.
&lt;br&gt;&lt;br&gt;- Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IBM-Web-Sphere-JVM-tp26619645p26635534.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26631705</id>
	<title>Re: Re: Serialize specific fields</title>
	<published>2009-12-03T11:27:00Z</published>
	<updated>2009-12-03T11:27:00Z</updated>
	<author>
		<name>skystar3</name>
	</author>
	<content type="html">Problem solved with a custom converter :)&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Thu, Dec 3, 2009 at 1:07 PM, ad &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26631705&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahmadqsoftnet@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;
Hello Jörg,&lt;br&gt;&lt;br&gt;The problem now solved by replacing the Map arg with an OrderRetainingMap() object in the FieldKeySorter interface, and know i can omit the field i want, but this will suppress this field for all objects of the defined type in object-model.&lt;br&gt;

&lt;br&gt;And i need to suppress a specific field in a specific object while serialize it in other object, hence both objects are from the same type, for example i have Employee class one object in supervisor role, and the other in supervisee role.&lt;br&gt;

&lt;br&gt;So how can i implement this functionality in XStream?&lt;br&gt;&lt;br&gt;Thank you&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;&lt;br&gt;Ahmad &lt;br&gt;&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Dec 2, 2009 at 11:19 PM, ad &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26631705&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahmadqsoftnet@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div dir=&quot;ltr&quot;&gt;Sorry i was mistaken &lt;br&gt;Now i have implemented the FieldKeySorter interface, and in the public Map sort(Class arg0, Map arg1) {} method i intercepted the Map arg, and i made a remove operation on the argument as the following:&lt;br&gt;


&lt;br&gt;arg1.remove(new FieldKey(&amp;quot;myField&amp;quot;, myClass, 0));&lt;br&gt;&lt;br&gt;but the resulted XML still contain this field&lt;br&gt;&lt;br&gt;Xstream configured as the following:&lt;br&gt;&lt;br&gt;Filter filter = new Filter();&lt;div&gt;&lt;br&gt;&lt;br&gt;
        xstream = new XStream(new Sun14ReflectionProvider(new FieldDictionary(&lt;br&gt;&lt;/div&gt;
                filter)));&lt;br&gt;&lt;br&gt;Waiting your clarification on this&lt;br&gt;&lt;br&gt;Thank you&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Dec 2, 2009 at 9:42 PM, ad &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26631705&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahmadqsoftnet@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;


&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div dir=&quot;ltr&quot;&gt;Hello Jörg,&lt;br&gt;&lt;br&gt;As you stated that i can use the FieldKeySorter to suppress specific fields in my class, and i used it as the following:&lt;br&gt;


&lt;br&gt;SortableFieldKeySorter sorter = new SortableFieldKeySorter();&lt;br&gt;
        &lt;br&gt;        sorter.registerFieldOrder(MyClass.class, new String[] { &amp;quot;NeededfieldName&amp;quot; });&lt;br&gt;&lt;br&gt;        xstream = new XStream(new Sun14ReflectionProvider(new FieldDictionary(&lt;br&gt;                sorter)));&lt;br&gt;



&lt;br&gt;Then i got this exception:&lt;br&gt;&lt;br&gt;Exception in thread &amp;quot;main&amp;quot; com.thoughtworks.xstream.io.StreamException: You have not given XStream a list of all fields to be serialized.&lt;br&gt;    at com.thoughtworks.xstream.converters.reflection.SortableFieldKeySorter$FieldComparator.compare(SortableFieldKeySorter.java:82)&lt;br&gt;



    at com.thoughtworks.xstream.converters.reflection.SortableFieldKeySorter$FieldComparator.compare(SortableFieldKeySorter.java:91)&lt;br&gt;    at java.util.Arrays.mergeSort(Unknown Source)&lt;br&gt;    at java.util.Arrays.sort(Unknown Source)&lt;br&gt;



    at com.thoughtworks.xstream.converters.reflection.SortableFieldKeySorter.sort(SortableFieldKeySorter.java:37)&lt;br&gt;    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:141)&lt;br&gt;



    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldsFor(FieldDictionary.java:75)&lt;br&gt;    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:121)&lt;br&gt;



    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:67)&lt;br&gt;    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:58)&lt;br&gt;



    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)&lt;br&gt;    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)&lt;br&gt;    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)&lt;br&gt;



    at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:98)&lt;br&gt;    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:38)&lt;br&gt;    at com.thoughtworks.xstream.XStream.marshal(XStream.java:837)&lt;br&gt;



    at com.thoughtworks.xstream.XStream.marshal(XStream.java:826)&lt;br&gt;    at com.thoughtworks.xstream.XStream.toXML(XStream.java:801)&lt;br&gt;    at com.thoughtworks.xstream.XStream.toXML(XStream.java:789)&lt;br&gt;    at manager.TestFields.main(TestFields.java:26)&lt;br&gt;



&lt;br&gt;Any idea?&lt;br&gt;&lt;br&gt;Waiting your clarification &lt;br&gt;&lt;br&gt;Thank you&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Nov 25, 2009 at 11:41 AM, Jörg Schaible &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26631705&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;joerg.schaible@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;



&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;Hi ahmad,&lt;br&gt;
&lt;br&gt;
ahmad wrote at Dienstag, 24. November 2009 09:12:&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Is there a method that is opposite to omitField(MyClass.class, “myField”)&lt;br&gt;
&amp;gt; in its function, which only serialize the fields that I specify, and omit&lt;br&gt;
&amp;gt; the others?&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;there are several ways. As you&amp;#39;ve already learned, the solution with the own&lt;br&gt;
Mapper does currently only work for serialization, but not for&lt;br&gt;
deserialization.&lt;br&gt;
&lt;br&gt;
One possibility is used in the CGLIBEnhancedConverter. That one derives from&lt;br&gt;
the ReflectionConverter and filters the fields by name that are normally&lt;br&gt;
provided with the ReflectionProvider.&lt;br&gt;
&lt;br&gt;
Another approach is to use a FieldKeySorter&lt;br&gt;
(&lt;a href=&quot;http://xstream.codehaus.org/faq.html#Serialization_sort_fields&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xstream.codehaus.org/faq.html#Serialization_sort_fields&lt;/a&gt;). While it&lt;br&gt;
is basically there to define the sequence of the fields, it can also be used&lt;br&gt;
to suppress fields.&lt;br&gt;
&lt;br&gt;
IIRC, for Serializable types XStream additionally respects the&lt;br&gt;
&amp;quot;serialPersistentFields&amp;quot; element (see Sun spec).&lt;br&gt;
&lt;br&gt;
- Jörg&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Serialize-specific-fields-tp26491993p26631705.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26624261</id>
	<title>Re: Re: Serialize specific fields</title>
	<published>2009-12-03T03:07:29Z</published>
	<updated>2009-12-03T03:07:29Z</updated>
	<author>
		<name>skystar3</name>
	</author>
	<content type="html">Hello Jörg,&lt;br&gt;&lt;br&gt;The problem now solved by replacing the Map arg with an OrderRetainingMap() object in the FieldKeySorter interface, and know i can omit the field i want, but this will suppress this field for all objects of the defined type in object-model.&lt;br&gt;
&lt;br&gt;And i need to suppress a specific field in a specific object while serialize it in other object, hence both objects are from the same type, for example i have Employee class one object in supervisor role, and the other in supervisee role.&lt;br&gt;
&lt;br&gt;So how can i implement this functionality in XStream?&lt;br&gt;&lt;br&gt;Thank you&lt;br&gt;&lt;br&gt;Ahmad &lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Dec 2, 2009 at 11:19 PM, ad &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26624261&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahmadqsoftnet@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div dir=&quot;ltr&quot;&gt;Sorry i was mistaken &lt;br&gt;Now i have implemented the FieldKeySorter interface, and in the public Map sort(Class arg0, Map arg1) {} method i intercepted the Map arg, and i made a remove operation on the argument as the following:&lt;br&gt;

&lt;br&gt;arg1.remove(new FieldKey(&amp;quot;myField&amp;quot;, myClass, 0));&lt;br&gt;&lt;br&gt;but the resulted XML still contain this field&lt;br&gt;&lt;br&gt;Xstream configured as the following:&lt;br&gt;&lt;br&gt;Filter filter = new Filter();&lt;div class=&quot;im&quot;&gt;&lt;br&gt;&lt;br&gt;
        xstream = new XStream(new Sun14ReflectionProvider(new FieldDictionary(&lt;br&gt;&lt;/div&gt;
                filter)));&lt;br&gt;&lt;br&gt;Waiting your clarification on this&lt;br&gt;&lt;br&gt;Thank you&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Dec 2, 2009 at 9:42 PM, ad &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26624261&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ahmadqsoftnet@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;

&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;&lt;div dir=&quot;ltr&quot;&gt;Hello Jörg,&lt;br&gt;&lt;br&gt;As you stated that i can use the FieldKeySorter to suppress specific fields in my class, and i used it as the following:&lt;br&gt;

&lt;br&gt;SortableFieldKeySorter sorter = new SortableFieldKeySorter();&lt;br&gt;
        &lt;br&gt;        sorter.registerFieldOrder(MyClass.class, new String[] { &amp;quot;NeededfieldName&amp;quot; });&lt;br&gt;&lt;br&gt;        xstream = new XStream(new Sun14ReflectionProvider(new FieldDictionary(&lt;br&gt;                sorter)));&lt;br&gt;


&lt;br&gt;Then i got this exception:&lt;br&gt;&lt;br&gt;Exception in thread &amp;quot;main&amp;quot; com.thoughtworks.xstream.io.StreamException: You have not given XStream a list of all fields to be serialized.&lt;br&gt;    at com.thoughtworks.xstream.converters.reflection.SortableFieldKeySorter$FieldComparator.compare(SortableFieldKeySorter.java:82)&lt;br&gt;


    at com.thoughtworks.xstream.converters.reflection.SortableFieldKeySorter$FieldComparator.compare(SortableFieldKeySorter.java:91)&lt;br&gt;    at java.util.Arrays.mergeSort(Unknown Source)&lt;br&gt;    at java.util.Arrays.sort(Unknown Source)&lt;br&gt;


    at com.thoughtworks.xstream.converters.reflection.SortableFieldKeySorter.sort(SortableFieldKeySorter.java:37)&lt;br&gt;    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:141)&lt;br&gt;


    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldsFor(FieldDictionary.java:75)&lt;br&gt;    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:121)&lt;br&gt;


    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:67)&lt;br&gt;    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:58)&lt;br&gt;


    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)&lt;br&gt;    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)&lt;br&gt;    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)&lt;br&gt;


    at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:98)&lt;br&gt;    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:38)&lt;br&gt;    at com.thoughtworks.xstream.XStream.marshal(XStream.java:837)&lt;br&gt;


    at com.thoughtworks.xstream.XStream.marshal(XStream.java:826)&lt;br&gt;    at com.thoughtworks.xstream.XStream.toXML(XStream.java:801)&lt;br&gt;    at com.thoughtworks.xstream.XStream.toXML(XStream.java:789)&lt;br&gt;    at manager.TestFields.main(TestFields.java:26)&lt;br&gt;


&lt;br&gt;Any idea?&lt;br&gt;&lt;br&gt;Waiting your clarification &lt;br&gt;&lt;br&gt;Thank you&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Wed, Nov 25, 2009 at 11:41 AM, Jörg Schaible &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26624261&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;joerg.schaible@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;


&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;&quot;&gt;Hi ahmad,&lt;br&gt;
&lt;br&gt;
ahmad wrote at Dienstag, 24. November 2009 09:12:&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Is there a method that is opposite to omitField(MyClass.class, “myField”)&lt;br&gt;
&amp;gt; in its function, which only serialize the fields that I specify, and omit&lt;br&gt;
&amp;gt; the others?&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;there are several ways. As you&amp;#39;ve already learned, the solution with the own&lt;br&gt;
Mapper does currently only work for serialization, but not for&lt;br&gt;
deserialization.&lt;br&gt;
&lt;br&gt;
One possibility is used in the CGLIBEnhancedConverter. That one derives from&lt;br&gt;
the ReflectionConverter and filters the fields by name that are normally&lt;br&gt;
provided with the ReflectionProvider.&lt;br&gt;
&lt;br&gt;
Another approach is to use a FieldKeySorter&lt;br&gt;
(&lt;a href=&quot;http://xstream.codehaus.org/faq.html#Serialization_sort_fields&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xstream.codehaus.org/faq.html#Serialization_sort_fields&lt;/a&gt;). While it&lt;br&gt;
is basically there to define the sequence of the fields, it can also be used&lt;br&gt;
to suppress fields.&lt;br&gt;
&lt;br&gt;
IIRC, for Serializable types XStream additionally respects the&lt;br&gt;
&amp;quot;serialPersistentFields&amp;quot; element (see Sun spec).&lt;br&gt;
&lt;br&gt;
- Jörg&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
---------------------------------------------------------------------&lt;br&gt;
To unsubscribe from this list, please visit:&lt;br&gt;
&lt;br&gt;
    &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Serialize-specific-fields-tp26491993p26624261.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26619645</id>
	<title>IBM Web Sphere JVM</title>
	<published>2009-12-02T17:32:36Z</published>
	<updated>2009-12-02T17:32:36Z</updated>
	<author>
		<name>Frangis, Socrates CIV NSWC PHD, L46</name>
	</author>
	<content type="html">I was evaluating Xstream for use with a project and had a question. After going through the FAQ I saw that there are levels of compatibility with different JVM's (depending on use of Enhanced Mode, Pure Java, or even the JVM itself).
&lt;br&gt;&lt;br&gt;IBM was listed on the FAQ as working with the enhanced mode, though, I have come across multiple message board posts talking about issues they have had with Web Sphere and Apache Harmony (Basically Open Source J9). Also, there are multiple versions of the J9 (Web sphere, Real-time Web Sphere, Harmony, etc), which was a little confusing when the FAQ just lists 'IBM' as being compatible.
&lt;br&gt;&lt;br&gt;I will be using the current Real Time IBM Web Sphere JVM.
&lt;br&gt;Are there any known issues with this?&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (6K) &lt;a href=&quot;http://old.nabble.com/attachment/26619645/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/IBM-Web-Sphere-JVM-tp26619645p26619645.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26617125</id>
	<title>Re: XStream fromXML NPE</title>
	<published>2009-12-02T13:51:30Z</published>
	<updated>2009-12-02T13:51:30Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Hi Tom,
&lt;br&gt;&lt;br&gt;Tom Barber wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Guys
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Sorry for the newb question but I've hit upon a problem that I am yet to
&lt;br&gt;&amp;gt; solve. I have been tinkering with XStream to save a query model for a GWT
&lt;br&gt;&amp;gt; based db app I am working on. Saving works fine but loading the query
&lt;br&gt;&amp;gt; model back up throws an error the crux of which is the following:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; [INFO] ---- Debugging information ----
&lt;br&gt;&amp;gt; [INFO] cause-exception &amp;nbsp; &amp;nbsp; : java.lang.NullPointerException
&lt;br&gt;&amp;gt; [INFO] cause-message &amp;nbsp; &amp;nbsp; &amp;nbsp; : null
&lt;br&gt;&amp;gt; [INFO] class &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : org.olap4j.query.Query
&lt;br&gt;&amp;gt; [INFO] required-type &amp;nbsp; &amp;nbsp; &amp;nbsp; : java.util.HashMap
&lt;br&gt;&amp;gt; [INFO] path &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;:
&lt;br&gt;&amp;gt; 
&lt;/div&gt;/query/axes/entry/axis/dimensions/list/querydimension/inclusions/list/org.olap4j
&lt;br&gt;&amp;gt; 
&lt;br&gt;.query.SelectionImpl/member/member/rolapMember/level/hierarchy/dimension/schema/
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; internalConnection/schemaReader/role/schemaGrants/entry
&lt;br&gt;&amp;gt; [INFO] line number &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 6520
&lt;br&gt;&amp;gt; [INFO] -------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I spent yesterday googling and tinkering, now I know that there are the
&lt;br&gt;&amp;gt; conversion tutorials on the website where you sort of rebuild the object,
&lt;br&gt;&amp;gt; but the problem I appear to have which isn't covered is the fact this
&lt;br&gt;&amp;gt; query model is generated by a 3rd party lib and so can't be 'rebuilt' in
&lt;br&gt;&amp;gt; the way that the tutorial suggests. I also saw some people having success
&lt;br&gt;&amp;gt; by setting the class loader similar to this:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; final XStream xstream = new XStream();
&lt;br&gt;&amp;gt; xstream.setClassLoader(org.olap4j.query.Query.class.getClassLoader());
&lt;br&gt;&amp;gt; Object oQuery = xstream.fromXML(sc.getXml());
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; But that appears to make no difference to me, I have attached the full
&lt;br&gt;&amp;gt; stack trace and any suggestions or a slap round the face would be most
&lt;br&gt;&amp;gt; appreciated.
&lt;/div&gt;&lt;br&gt;This is not a classpath issue. Actually the problem is here:
&lt;br&gt;&lt;br&gt;[snip]
&lt;br&gt;&lt;br&gt;&amp;gt; [INFO] Caused by: java.lang.NullPointerException
&lt;br&gt;&amp;gt; [INFO] &amp;nbsp;at mondrian.rolap.RolapSchema.hashCode(RolapSchema.java:261)
&lt;br&gt;&amp;gt; [INFO] &amp;nbsp;at java.util.HashMap.put(HashMap.java:372)
&lt;br&gt;&amp;gt; [INFO] &amp;nbsp;at 
&lt;br&gt;com.thoughtworks.xstream.converters.collections.MapConverter.populateMap(MapConverter.java:82)
&lt;br&gt;&amp;gt; [INFO] &amp;nbsp;at 
&lt;br&gt;com.thoughtworks.xstream.converters.collections.MapConverter.unmarshal(MapConverter.java:66)
&lt;br&gt;&amp;gt; [INFO] &amp;nbsp;at 
&lt;br&gt;com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:82)
&lt;br&gt;&amp;gt; [INFO] &amp;nbsp;... 189 more
&lt;br&gt;&lt;br&gt;The XML contains a serialized HashMap. At deserialization time each element 
&lt;br&gt;is unmarhsalled one by one and added to the HashMap again. This means that 
&lt;br&gt;the element's hash code will be requested. However, in your case the element 
&lt;br&gt;is a RolapSchema and it seems not yet initialized. Where does this class 
&lt;br&gt;come from?
&lt;br&gt;&lt;br&gt;Which version of XStream do you use?
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/XStream-fromXML-NPE-tp26606416p26617125.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26616688</id>
	<title>Re: URL Object References?</title>
	<published>2009-12-02T13:20:39Z</published>
	<updated>2009-12-02T13:20:39Z</updated>
	<author>
		<name>Jörg Schaible-2</name>
	</author>
	<content type="html">Jean-Philippe Steinmetz wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Everyone,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; In the same way that XML supports external file linking I have a
&lt;br&gt;&amp;gt; situation where I'd like xstream to de-serialize XML which contains a
&lt;br&gt;&amp;gt; URL as the reference instead of a relative path within the document. For
&lt;br&gt;&amp;gt; instance if I have the following XML:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;lt;list&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;lt;object reference=&amp;quot;&lt;a href=&quot;http://someurl/to/object/1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://someurl/to/object/1&lt;/a&gt;&amp;quot;/&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;lt;object reference=&amp;quot; &lt;a href=&quot;http://someurl/to/object/2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://someurl/to/object/2&lt;/a&gt;&amp;quot;/&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/list&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; De-serializing this would retrieve the two objects for the array by
&lt;br&gt;&amp;gt; looking up the URLs &lt;a href=&quot;http://someurl/to/object/1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://someurl/to/object/1&lt;/a&gt;&amp;nbsp;and
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://someurl/to/object/2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://someurl/to/object/2&lt;/a&gt;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Is this currently possible with xstream? If not how difficult would it
&lt;br&gt;&amp;gt; be to add such functionality?
&lt;/div&gt;&lt;br&gt;this scenario is not directly supported, but XStream actually has something 
&lt;br&gt;similar. Please have a look at the tutorial for the persistence API 
&lt;br&gt;(&lt;a href=&quot;http://xstream.codehaus.org/persistence-tutorial.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xstream.codehaus.org/persistence-tutorial.html&lt;/a&gt;). Simply take the 
&lt;br&gt;source of this package and have a closer look , it will help you to realize 
&lt;br&gt;something similar.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Jörg
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe from this list, please visit:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &lt;a href=&quot;http://xircles.codehaus.org/manage_email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://xircles.codehaus.org/manage_email&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/URL-Object-References--tp26602427p26616688.html" />
</entry>

</feed>
