Re: NullPointerException in DataImportHandler

2009-07-30 Thread Noble Paul നോബിള്‍ नोब्ळ्
On Thu, Jul 30, 2009 at 9:45 PM, Andrew Clegg wrote: > > > Erik Hatcher wrote: >> >> >> On Jul 30, 2009, at 11:54 AM, Andrew Clegg wrote: >>>            >> url="${domain.pdb_code}-noatom.xml" processor="XPathEntityProcessor" >>> forEach="/"> >>>                >> xpath="//*[local-name()='structCate

Re: NullPointerException in DataImportHandler

2009-07-30 Thread Chantal Ackermann
It's very easy to write your own entity processor. At least, that is my experience with extending the SQLEntityProcessor to my needs. So, maybe you'd be better off subclassing the xpath processor and handling the xpath in a way you can keep your configuration straight forward. Andrew Clegg sc

Re: NullPointerException in DataImportHandler

2009-07-30 Thread Erik Hatcher
On Jul 30, 2009, at 12:19 PM, Andrew Clegg wrote: Don't worry -- your hints put me on the right track :-) I got it working with: Now, to get it to ignore missing files without an error... Hmm... onError="skip" or abort, or continue Erik

Re: NullPointerException in DataImportHandler

2009-07-30 Thread Andrew Clegg
Chantal Ackermann wrote: > > > my experience with XPathEntityProcessor is non-existent. ;-) > > Don't worry -- your hints put me on the right track :-) I got it working with: Now, to get it to ignore missing files without an error... Hmm... Che

Re: NullPointerException in DataImportHandler

2009-07-30 Thread Andrew Clegg
Erik Hatcher wrote: > > > On Jul 30, 2009, at 11:54 AM, Andrew Clegg wrote: >>> url="${domain.pdb_code}-noatom.xml" processor="XPathEntityProcessor" >> forEach="/"> >>> xpath="//*[local-name()='structCategory']/*[local-name()='struct']/ >> *[local-name()='title']" >

Re: NullPointerException in DataImportHandler

2009-07-30 Thread Chantal Ackermann
Hi Andrew, my experience with XPathEntityProcessor is non-existent. ;-) Just after a quick look at the method that throws the exception: private void addField0(String xpath, String name, boolean multiValued, boolean isRecord) { List paths = new LinkedList(Arrays.

Re: NullPointerException in DataImportHandler

2009-07-30 Thread Erik Hatcher
On Jul 30, 2009, at 11:54 AM, Andrew Clegg wrote: xpath="//*[local-name()='structCategory']/*[local-name()='struct']/ *[local-name()='title']" /> The XPathEntityProcessor doesn't support that fancy of an xpath - it supports only a limited subset. Try /structCate

Re: NullPointerException in DataImportHandler

2009-07-30 Thread Andrew Clegg
Chantal Ackermann wrote: > > Hi Andrew, > > your inner entity uses an XML type datasource. The default entity > processor is the SQL one, however. > > For your inner entity, you have to specify the correct entity processor > explicitly. You do that by adding the attribute "processor", and th

Re: NullPointerException in DataImportHandler

2009-07-30 Thread Chantal Ackermann
Hi Andrew, your inner entity uses an XML type datasource. The default entity processor is the SQL one, however. For your inner entity, you have to specify the correct entity processor explicitly. You do that by adding the attribute "processor", and the value is the classname of the processor