[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Implementation of XML:DB API



On Mon, 20 Aug 2001 20:07:03 +0200
"Per Nyfelt" <per.nyfelt@nordicwave.com> wrote:

> Thanks for the hint Lars. I hade to wipe out all traces of ozone and do a
> complete checkout to get it to compile but anyway:
> 
> I'm not sure what you meant in your mail on the 15:th. Are you expecting the
> xml sample to work? After editing the build.xml (i attach a patch) so that

What was the problem with the build.xml? I don't see any difference?

> it builds i get an Exception (Transaction - ta(121): uncaught exception:
> (java.lang.RuntimeException: The given DOM document must not have children
> if a whole document shall be converted!) is this what you talked about
> before regarding the transaction bug?

Exactly this is the "bug" I mean. Even if clearDocument() is called,
the content of the persistent doc node is removed, and the document
doesn't contain any child node the encasing methods in XMLContainer
complain about a non-empty document what result in the exception above.
I'm not sure if we're talking about nested transactions here, because
such transactions are not allowed/implemented.


	Client			     Server

     XMLContainer ----- XMLContainerHelper
  (SAXChunkProducer)    (SAXChunkConsumer)

					  |

 			 	  Document

   					  |

				clearDocument()


Here's what happens (simplified):

1. the sample code on client side starts a new transaction to enclose
the XMLContainer.domStore(null, transientNode) method. "null" means:
overwrite the existing persistent node with the given "transientNode".

2. XMLContainerHelper creates a new SAXChunkConsumer when beginInputSequence()
is called. Before returning the new SAXChunkConsumer the helper calls
clearDocument() on the existing persitent Document Node to remove the
content.

3. SAXChunkProducer creates chunks of SAX events which are streamed
to the server side (SAXChunkConsumer), unpacked and invoked on the
persistent Node. But this fails beacuse the Document node isn't empty.



Hope this helps a little bit...
Lars


> Here's what i do:
> D:\home\ozone\samples\XML>ojvm Client domstore test.xml
> DOM store: filename=test.xml
> Document already found in Database.
> Would you like to overwrite the existing Document? [y/N]: y
> ATTENTION: Existing Document will be overwritten!
> DOM store: parse time: 841 ms
> Exception in thread "main" java.lang.RuntimeException: The given DOM
> document must not have children if a whole document shall be converted!
>         at
> org.ozoneDB.xml.util.XMLContainerHelperImpl_Proxy.putChunk(XMLContainerHelpe
> rImpl_Proxy.java:120)
>         at org.ozoneDB.xml.util.XMLContainer.storeDOM(XMLContainer.java:234)
>         at Client.domStore(Client.java:229)
>         at Client.main(Client.java:152)
> D:\home\ozone\samples\XML>
> 
> Best regards,
> Per
> 
> > -----Original Message-----
> > From: owner-ozone-dev@ozone-db.org
> > [mailto:owner-ozone-dev@ozone-db.org]On Behalf Of Lars Martin
> > Sent: den 20 augusti 2001 10:01
> > To: ozone-dev@ozone-db.org
> > Subject: Re: Implementation of XML:DB API
> >
> >
> > On Sat, 18 Aug 2001 17:52:25 +0200
> > "Per Nyfelt" <per.nyfelt@nordicwave.com> wrote:
> >
> > > Thanks Lars, this looks like it would solve the problem I had. I have
> > > problems compiling though:
> > >
> > > <snip>
> > >     [javac] Compiling 16 source files to D:\home\ozone\build\classes
> > >     [javac]
> > >
> > D:\home\ozone\build\srcgen\org\ozoneDB\xml\dom\DocumentImpl_Proxy.java:15:
> > > org.ozoneDB.xml.dom.DocumentImpl_Proxy should be declared
> > abstract; it does
> > > not define
> > > clearDocument() in org.ozoneDB.xml.dom.DocumentImpl_Proxy
> > >     [javac] public final class DocumentImpl_Proxy
> > >     [javac]              ^
> > >     [javac]
> > >
> > D:\home\ozone\build\srcgen\org\ozoneDB\xml\dom\DocumentTypeImpl_Pr
> > oxy.java:1
> > > 5: org.ozoneDB.xml.dom.DocumentTypeImpl_Proxy should be
> > declared abstract;
> > > it does not define
> > > clearDocument() in org.ozoneDB.xml.dom.DocumentTypeImpl_Proxy
> > >     [javac] public final class DocumentTypeImpl_Proxy
> > >     [javac]              ^
> > >     [javac] 2 errors
> > >
> > > BUILD FAILED
> > >
> > > D:\home\ozone\build.xml:371: Compile failed, messages should have been
> > > provided.
> > >
> > > I'll look into it some more to see if i can find the cause. If
> > you have any
> > > suggestions though, please let me know.
> >
> >
> > Did you build the proxies properly? Seems that your proxies are not
> > in sync with the new interface. ("ant clean all")
> >
> > Regards,
> > Lars
> >
> > > Best regards,
> > > Per
> > >
> > > > -----Original Message-----
> > > > From: owner-ozone-dev@ozone-db.org
> > > > [mailto:owner-ozone-dev@ozone-db.org]On Behalf Of Lars Martin
> > > > Sent: den 15 augusti 2001 11:23
> > > > To: ozone-dev@ozone-db.org
> > > > Subject: Re: Implementation of XML:DB API
> > > >
> > > >
> > > > On Sun, 12 Aug 2001 11:58:11 +0200
> > > > "Per Nyfelt" <per.nyfelt@nordicwave.com> wrote:
> > > >
> > > > > Great! I'll tidy up and check in what i have next week then.
> > > > >
> > > > > I'll let you know when it's there.
> > > >
> > > > Ok, my patch is in CVS. See the new clearDocument() method in
> > > > DocumentImpl.
> > > > This method is now called when Document.onDelete() was
> > called. It removes
> > > > all child nodes (content) of the document.
> > > >
> > > > This new method is also called from
> > > > XMLContainerHelperImpl.beginInputSequence(Node pNode) and pNode is a
> > > > Document node which already exists in the database. The problem is
> > > > that the content *is* removed (you can log this in clearDocument())
> > > > but this transaction is somehow *not* commited and so all following
> > > > actions complain about a non-empty Document.
> > > >
> > > > See domStore() in samples/XML/Client.java for usage if a Document
> > > > already exist.
> > > >
> > > >
> > > > > Thanks,
> > > > > Per
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: owner-ozone-dev@ozone-db.org
> > > > > > [mailto:owner-ozone-dev@ozone-db.org]On Behalf Of Tom Bradford
> > > > > > Sent: den 10 augusti 2001 20:17
> > > > > > To: ozone-dev@ozone-db.org
> > > > > > Subject: Re: Implementation of XML:DB API
> > > > > >
> > > > > >
> > > > > > Per Nyfelt wrote:
> > > > > > > That being said, if it is going to take me a long time to get
> > > > > > there, I'd be
> > > > > > > more than happy to share what I have right now. (currently i
> > > > > > cannot move on
> > > > > > > until the DOM problem with XMLContainer and the underlying
> > > > > > transaction issue
> > > > > > > is resolved) SAX and String works fine and I have JUnit
> > > > test scripts for
> > > > > > > Level-0 compliance. So if you want to and have the time to
> > > > look at it, i
> > > > > > > could rip out the stuff that does not work and commit
> > the stuff that
> > > > > > > does -sort of a 2/3 level-0 compliance.
> > > > > >
> > > > > > I'd also be willing to take a look at it and give some
> > advice based on
> > > > > > our implementation.
> > > > --
> > > > ______________________________________________________________________
> > > > Lars Martin                                    mailto:lars@smb-tec.com
> > > > SMB GmbH                                        http://www.smb-tec.com
> > > >
> > > > ----------------------------------------------------------------------
> > > > Post a message:         mailto:ozone-dev@ozone-db.org
> > > > Unsubscribe:
> > > > mailto:ozone-dev-request@ozone-db.org?body=unsubscribe
> > > > Contact administrator:  mailto:ozone-dev-owner@ozone-db.org
> > > > Read archived messages: http://www.ozone-db.org/
> > > > ----------------------------------------------------------------------
> > > >
> > >
> > > ----------------------------------------------------------------------
> > > Post a message:         mailto:ozone-dev@ozone-db.org
> > > Unsubscribe:
> > mailto:ozone-dev-request@ozone-db.org?body=unsubscribe
> > > Contact administrator:  mailto:ozone-dev-owner@ozone-db.org
> > > Read archived messages: http://www.ozone-db.org/
> > > ----------------------------------------------------------------------
> >
> >
> > --
> > ______________________________________________________________________
> > Lars Martin                                    mailto:lars@smb-tec.com
> > SMB GmbH                                        http://www.smb-tec.com
> >
> > ----------------------------------------------------------------------
> > Post a message:         mailto:ozone-dev@ozone-db.org
> > Unsubscribe:
> > mailto:ozone-dev-request@ozone-db.org?body=unsubscribe
> > Contact administrator:  mailto:ozone-dev-owner@ozone-db.org
> > Read archived messages: http://www.ozone-db.org/
> > ----------------------------------------------------------------------
> >
> 


--
______________________________________________________________________
Lars Martin                                    mailto:lars@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com

----------------------------------------------------------------------
Post a message:         mailto:ozone-dev@ozone-db.org
Unsubscribe:            mailto:ozone-dev-request@ozone-db.org?body=unsubscribe
Contact administrator:  mailto:ozone-dev-owner@ozone-db.org
Read archived messages: http://www.ozone-db.org/
----------------------------------------------------------------------