Hi Actually, my exception wasn't Castor's fault, and wasn't being thrown by Castor - it was more to do with Hibernate. But, it occurred while Castor was marshalling some of my objects.
It's just that Castor doesn't seem to produce any debug at all apart from this kind of stuff at the very beginning #startElement: field #startElement: bind-xml #endElement: bind-xml #endElement: field #startElement: field #startElement: bind-xml #endElement: bind-xml #endElement: field #startElement: field #startElement: bind-xml It might be nice to have a bit more detail (like which element it's working on at the time). Since it's in debug it shouldn't be much overhead and indeed will usually be turned off, but would be useful to have I think. BTW this is the debug setting I was using: org.exolab.castor.debug=true. Please correct me if there is another one I should use. Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -----Original Message----- From: Werner Guttmann [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 13, 2007 2:46 PM To: [email protected] Subject: AW: [castor-user] Preventing output of a certain element I think in general it should be possible to improve the verbosity of *some* exceptions. If you provided me with something that is wrong per definition, I could have a detailed look at the problem in question. Werner > -----Ursprüngliche Nachricht----- > Von: Gundersen, Richard [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 13. März 2007 15:14 > An: [email protected] > Betreff: RE: [castor-user] Preventing output of a certain element > > Hi > > Thanks for the reply. I changed the objects in the end and made sure there > wasn't a 'location' attribute so it comes out as a flat list. I figured it > would be best to fix the root of the problem - the objects, as you > suggested. > > As an aside, I've just spent some time debugging quite a tricky problem > caused ultimately by a hibernate mapping that someone had changed without > my knowledge. I only found out about it when Castor was trying to marshall > it. > > I had Castor in debug while trying to find the problem, but even then > there seemed to be very little debug coming out (actually the only bit was > when it was reading the mapping file). If this is the extent of the debug, > would it be possible to include a bit more, particularly e.g. when > marshalling, spit out the name of the class and member attributes are > being marshalled, so if an exception is thrown I have an idea of where in > my object graph to start looking? > > Richard Gundersen > Java Developer > > Email: [EMAIL PROTECTED] > Phone: 01618302398 > Fax: 01618342536 > London Scottish Bank plc > 24 Mount Street > Manchester > M2 3LS > > -----Original Message----- > From: Werner Guttmann [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 13, 2007 2:02 PM > To: [email protected] > Subject: AW: [castor-user] Preventing output of a certain element > > In your case, not really. If <Order> et alias would be part of a bigger > object hierarchy, you might be able to work with either the location > attribute or the container attribute. > > Werner > > > -----Ursprüngliche Nachricht----- > > Von: Gundersen, Richard [mailto:[EMAIL PROTECTED] > > Gesendet: Montag, 12. März 2007 17:06 > > An: [email protected] > > Betreff: [castor-user] Preventing output of a certain element > > > > Hi > > > > Is it possible to suppress the output of a certain element in the XML. > > For example, I have an order and orderItem, as mapped below: > > > > <class name="Order"> > > <map-to xml="Order" /> > > <field name="orderItems" collection="collection" > > type="OrderItem"> > > <bind-xml auto-naming="deriveByClass"/> > > </field> > > </class> > > > > <class name="OrderItem"> > > <map-to xml="OrderItem" /> > > <field name="orderItems" collection="collection" > > type="OrderItem"> > > <bind-xml auto-naming="deriveByClass"/> > > </field> > > </class> > > > > This will result in something like: > > > > <Order> > > <OrderItem> > > ... > > </OrderItem> > > <OrderItem> > > ... > > </OrderItem> > > </Order> > > > > What I'm wondering is if it's possible to omit the 'Order' element, so I > > end up with a flatter list i.e. > > > > <OrderItem> > > ... > > </OrderItem> > > <OrderItem> > > ... > > </OrderItem> > > > > ..Which could be achieved by something like '<map-to none/>'. I tried > > omitting the map-to element in 'Order' but as I expected, Castor uses > > reflection to put in 'order'. I'd just like to ignore it comepletely, > > but still output the objects inside Order. > > > > Regards > > > > Richard Gundersen > > Java Developer > > > > Email: [EMAIL PROTECTED] > > Phone: 01618302398 > > Fax: 01618342536 > > London Scottish Bank plc > > 24 Mount Street > > Manchester > > M2 3LS > > > > > > *** Disclaimer *** > > > > This electronic communication is confidential and for the exclusive use > of > > the addressee. It may contain private and confidential information. The > > information, attachments and opinions contained in this E-mail are those > > of its author only and do not necessarily represent those of London > > Scottish Bank PLC or any other members of the London Scottish Group. > > > > If you are not the intended addressee, you are prohibited from any > > disclosure, distribution or further copying or use of this communication > > or the information in it or taking any action in reliance on it. If you > > have received this communication in error please notify the Information > > Security Manager at [EMAIL PROTECTED] as soon as possible and > delete > > the message from all places in your computer where it is stored. > > > > We utilise virus scanning software but we cannot guarantee the security > of > > electronic communications and you are advised to check any attachments > for > > viruses. We do not accept liability for any loss resulting from any > > corruption or alteration of data or importation of any virus as a result > > of receiving this electronic communication. > > > > Replies to this E-mail may be monitored for operational or business > > reasons. London Scottish Bank PLC is regulated by the Financial Services > > Authority. > > ______________________________________________________________________ > > This email has been scanned by the MessageLabs Email Security System. > > > > --------------------------------------------------------------------- > > To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > *** Disclaimer *** > > This electronic communication is confidential and for the exclusive use of > the addressee. It may contain private and confidential information. The > information, attachments and opinions contained in this E-mail are those > of its author only and do not necessarily represent those of London > Scottish Bank PLC or any other members of the London Scottish Group. > > If you are not the intended addressee, you are prohibited from any > disclosure, distribution or further copying or use of this communication > or the information in it or taking any action in reliance on it. If you > have received this communication in error please notify the Information > Security Manager at [EMAIL PROTECTED] as soon as possible and delete > the message from all places in your computer where it is stored. > > We utilise virus scanning software but we cannot guarantee the security of > electronic communications and you are advised to check any attachments for > viruses. We do not accept liability for any loss resulting from any > corruption or alteration of data or importation of any virus as a result > of receiving this electronic communication. > > Replies to this E-mail may be monitored for operational or business > reasons. London Scottish Bank PLC is regulated by the Financial Services > Authority. > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

