First what version of castor are you using? Hard to help with the first problem (npe) with out knowing the specifics.
For the other ones, these are both configured in the castor.properties file in the castor jar. They are commented in there, one for 'pretty' printing and the other controls the rule for primitives to be marshalled as attributes or nested tags. Hope this helps! -Nick On 6/16/05, Israel, Kirk <[EMAIL PROTECTED]> wrote: > Hi there... > I've inherited a bit of a situation here. > > We've been using castor as quick(-and-too-dirty, or so it seems now) way > of doing serialization--so our QA people could more easily build up a > library of hand-editable test objects > > We're having an internal update of our product, and so, potentially, a > lot of things have changed. But I believe that the part that Castor > touches should have remained constant. > > At this point when I run an existing "document" object that our QA folk > swears works I get > java.lang.NullPointerException > at > org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.jav > a:1090) > at > org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U > nknown Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis > patcher.dispatch(Unknown Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno > wn Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source) > at > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:555) > at > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:487) > at > org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:627) > .....etc > > > Is there an established way of figuring out what's going wrong? > > Also, is there a default setting or something that determines if > getters/setters get turned into nested tags or just attributes? It > seems like earlier, most of the times you got nested tags, but in some > diagnostic work I've been doing, just marshalling objects that I have, I > tend to see a lot more attributes...also it tends to put everything on a > single line with no returns. > > I'm worried I missed something very basic here...have things changed a > lot with newer versions of Castor? > > Thanks for any advice! > > > > > > ------------------------------------------------- > If you wish to unsubscribe from this list, please > send an empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

