Well done on the fix and an even bigger well done in getting the e-mail out ;)
Si -----Original Message----- From: Stefan Guggisberg [mailto:[EMAIL PROTECTED] Sent: 18 May 2005 09:35 To: [email protected] Subject: Re: Repository Fatal Error ok, this is not my day ;) reposting to the list... On 5/18/05, Stefan Guggisberg <[EMAIL PROTECTED]> wrote: > On 5/17/05, Simon Gash <[EMAIL PROTECTED]> wrote: > > OK I've walked my way through the code and this is what I found. > > > > The RSS reader passes the string (containing illegal XML character > > &) to me and then I use it to form the name of a new node. This is > > then saved in XML format by the persistence manager. However, when > > re-loading the node an XMLReader is used, this has problems with > > parsing the XML (containing the illegal character - its used to > > indicate the start of an entity reference) and logs an error, > > further down the stack an exception is raised as the node has no 'value'. > > > > I guess the solution would be to encode the xml on storage (& = > > &), I did this manually and it worked fine. I'm not sure if I > > should be checking the new nodes name to ensure its good XML or > > whether JackRabbit should be doing it ? > > you shouldn't need to worry about whether a name is a valid xml name > as long it is a valid jcr name. if an '&' within a node name causes > problems in the xml persistence manager that would definitely be a major bug. > i'll investigate. you were right. '&' (among others) within attribute values was not properly encoded (i.e. replaced by the corresponding entity reference). i fixed it in rev170721. cheers stefan > > thanks for bringing this up! > > cheers > stefan > > > Or how about using the CDATA to block escape literal text ? > > > > Any thoughts anyone... > > > > Thanks for your time. > > > > Simon > > > > -----Original Message----- > > From: Stefan Guggisberg [mailto:[EMAIL PROTECTED] > > Sent: 16 May 2005 14:28 > > To: [email protected] > > Subject: Re: Repository Fatal Error > > > > On 5/13/05, Simon Gash <[EMAIL PROTECTED]> wrote: > > > I'm using JackRabbit to store some RSS feeds but now and again I > > > get a > > > > > fatal error from the repository. I'm guessing that there is some > > > text in the RSS title that JackRabbit does not like (I'm > > > attempting to strip out punctuation but I'm probably missing something. > > > > > > Is there a way of repairing the repository ? and is there a way of > > > validating the input before I use it to create a node ? > > > > > > This is the repository exception I get > > > > > > [Fatal Error] :30:24: The entity name must immediately follow the '&' > > > in the entity reference. > > > ERROR: 'The entity name must immediately follow the '&' in the > > > entity > > > > > reference.' > > > java.util.NoSuchElementException: failed to retrieve item state of > > > item e2fa4f29-c6f7-4b46-b0d3-09568f564e0d > > > > please note that neither is a RepositoryException therefor it's > > hardly a "Repository Fatal Error". a stack trace would be helpful. > > > > cheers > > stefan > > > > > > > > Come visit us at: > > > > > > Internet World 2005. June 14 - 16, Earls Court, Stand # A60 > > > > > > Government Computing Expo. June 21 & 22, Earls Court, Stand # 804 > > > > > > SOCITM Annual Event. October 16 - 18 Brighton Hotel, Stand # 28 > > > GOSS - > > > > > Ranked 4th in the Deloitte Technology Fast 50 Awards 2004 and 88th > > > in > > the Deloitte Technology Fast 500 EMEA. > > > > > > This email contains proprietary information, some or all of which > > > may > > be legally privileged. It is for the intended recipient only. If an > > addressing or transmission error has misdirected this email, please > > notify the author by replying to this email. If you are not the > > intended recipient you may not use, disclose, distribute, copy, > > print or rely on this email. > > > > > > Email transmission cannot be guaranteed to be secure or error > > > free, as > > information may be intercepted, corrupted, lost, destroyed, arrive > > late or incomplete or contain viruses. This email and any files > > attached to it have been checked with virus detection software before transmission. > > You should nonetheless carry out your own virus check before opening > > any attachment. GOSS Interactive Ltd accepts no liability for any > > loss or damage that may be caused by software viruses. > > > > > > > > >
