Hi Malcolm, Ivan, Charles,
Actually, I've reproduced this crash. There is definitely a bug in Sedna.
I'm still digging it and not quite sure whether empty document is the
reason or not: one XML:DB API document load may run a bunch of queries.
Anyway, thank you for your feedback, guys. We'll try to fix this asap.
Ivan Shcheklein,
Sedna Team
Hi Malcolm,
>
> Valid remarks.
>
> But this was still a bug. Of course, I didn't intend to load an absolutely
> empty file into XML DB. It was unexpected and actually an odd behavior of
> the data provider. But what I'd really expect in this situation is an
> Exception thrown that I can catch nicely instead of XML DB going down with
> possible data corruption :)
>
> Anyway the bug is fixed now and I'm happy. Enjoy the weekend!
>
> Best regards,
> Ivan Lagunov
>
> -----Original Message-----
> From: Malcolm G. Davis [mailto:[email protected]]
> Sent: Friday, October 26, 2012 5:29 PM
> To: [email protected]
> Subject: Re: [Sedna-discussion] Sedna-discussion Digest, Vol 74, Issue 2
>
> BTW: I think this is a strange bug. Our system inserts empty XML content
> all the time, with additional content later in the same connection.
>
> Notes:
> 1. Our content is not truly empty. There is always beginning and ending
> tags with all our content, example <customers></customers>.
> 2. I don't think an application should insert purely empty (null)
> documents.
> 3. We use our own Java wrapper, not the XML:DP API compliant
> implementation.
>
> Just my thoughts,
> Malcolm
>
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]
> Sent: Friday, October 26, 2012 4:37 AM
> To: [email protected]
> Subject: Sedna-discussion Digest, Vol 74, Issue 2
>
> Send Sedna-discussion mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of Sedna-discussion digest..."
>
>
> Today's Topics:
>
> 1. Uploading empty xml critical bug (Ivan Lagunov)
> 2. Re: Uploading empty xml critical bug (Charles Foster)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 25 Oct 2012 19:20:46 +0200
> From: "Ivan Lagunov" <[email protected]>
> Subject: [Sedna-discussion] Uploading empty xml critical bug
> To: <[email protected]>, "'Charles Foster'"
> <[email protected]>
> Message-ID: <002401cdb2d5$12e5ca40$38b15ec0$@com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hello Sedna support and Charles Foster,
>
>
>
> I've faced a bug that led to Sedna database files corruption. As a result,
> I
> had to restore the database from a backup. Luckily, it was on test
> environment.
>
>
>
> The bug occurs when you try to upload an xml with empty contents and then
> try to upload anything else within the same connection.
>
> Results:
>
> - Empty document is correctly uploaded into XML DB;
>
> - XML DB immediately goes down right after the second upload;
>
> - No errors in event.log;
>
> - org.xmldb.api.base.XMLDBException: IOException occoured
> (Connection reset).
>
>
>
> Please find the Java code that reproduces the bug attached together with
> java.log and event.log. I reproduced the bug both on Windows and Linux
> Sedna
> builds 3.5.161.
>
>
>
> I consider it's a bug in both Sedna XML DB itself and Sedna Java XML:DP API
> implementation by Charles Foster. I'd never expect XML DB to go down
> immediately, even without any error messages in event.log. Also it seems
> something inappropriate happens in Java API implementation.
>
>
>
> Charles,
>
> I understand that you stopped working on the Java API implementation but I
> hope you'll consider fixing this bug as it's quite critical.
>
>
>
> Best regards,
>
> Ivan Lagunov
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: java.log
> Type: application/octet-stream
> Size: 813 bytes
> Desc: not available
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: TestEmptyXmlBug.java
> Type: application/octet-stream
> Size: 1636 bytes
> Desc: not available
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: event.log
> Type: application/octet-stream
> Size: 6379 bytes
> Desc: not available
>
> ------------------------------
>
> Message: 2
> Date: Fri, 26 Oct 2012 10:36:34 +0100
> From: Charles Foster <[email protected]>
> Subject: Re: [Sedna-discussion] Uploading empty xml critical bug
> To: Ivan Lagunov <[email protected]>
> Cc: [email protected]
> Message-ID:
> <CA+9gsYimp-PUyH1meaG8oZhfV9g=
> [email protected]>
> Content-Type: text/plain; charset="windows-1252"
>
> Hi Ivan,
>
> Please try the following jar. If you try to insert empty content, the
> XML:DB
> API will now throw an Exception. You should not be able to insert document
> fragments which are completely empty.
>
> If you get errors about not being able to read data from an internal jar
> property file, please refresh your IDE.
>
> Please let me know how you get on.
>
> Regards,
>
> Charles
>
> On 25 October 2012 18:20, Ivan Lagunov <[email protected]> wrote:
> > Hello Sedna support and Charles Foster,
> >
> >
> >
> > I?ve faced a bug that led to Sedna database files corruption. As a
> > result, I had to restore the database from a backup. Luckily, it was
> > on test environment.
> >
> >
> >
> > The bug occurs when you try to upload an xml with empty contents and
> > then try to upload anything else within the same connection.
> >
> > Results:
> >
> > - Empty document is correctly uploaded into XML DB;
> >
> > - XML DB immediately goes down right after the second upload;
> >
> > - No errors in event.log;
> >
> > - org.xmldb.api.base.XMLDBException: IOException occoured
> > (Connection reset).
> >
> >
> >
> > Please find the Java code that reproduces the bug attached together
> > with java.log and event.log. I reproduced the bug both on Windows and
> > Linux Sedna builds 3.5.161.
> >
> >
> >
> > I consider it?s a bug in both Sedna XML DB itself and Sedna Java
> > XML:DP API implementation by Charles Foster. I?d never expect XML DB
> > to go down immediately, even without any error messages in event.log.
> > Also it seems something inappropriate happens in Java API implementation.
> >
> >
> >
> > Charles,
> >
> > I understand that you stopped working on the Java API implementation
> > but I hope you?ll consider fixing this bug as it?s quite critical.
> >
> >
> >
> > Best regards,
> >
> > Ivan Lagunov
> >
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: sedna-xmldb.jar
> Type: application/java-archive
> Size: 50081 bytes
> Desc: not available
>
> ------------------------------
>
>
> ----------------------------------------------------------------------------
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics Download AppDynamics Lite for
> free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
>
> ------------------------------
>
> _______________________________________________
> Sedna-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>
>
> End of Sedna-discussion Digest, Vol 74, Issue 2
> ***********************************************
>
>
>
> ----------------------------------------------------------------------------
> --
> The Windows 8 Center
> In partnership with Sourceforge
> Your idea - your app - 30 days. Get started!
> http://windows8center.sourceforge.net/
> what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
> _______________________________________________
> Sedna-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>
>
>
> ------------------------------------------------------------------------------
> The Windows 8 Center
> In partnership with Sourceforge
> Your idea - your app - 30 days. Get started!
> http://windows8center.sourceforge.net/
> what-html-developers-need-to-know-about-coding-windows-8-metro-style-apps/
> _______________________________________________
> Sedna-discussion mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sedna-discussion
>
------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people. Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
Sedna-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sedna-discussion