Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Problems with XML Import
[CDO] Problems with XML Import [message #1008172] Mon, 11 February 2013 09:13 Go to next message
Jan Rosczak is currently offline Jan RosczakFriend
Messages: 53
Registered: July 2009
Location: Hamburg, Germany
Member
Hello,

I have a problem with the XML import into an empty repository (CDO 4.2, Build 1.2.2013). How the repository is created, see attached TestRepository.java.

If I import attached XML and then print out the names and types of the ResourceNodes I get the following output:

typesdescriptions : CDOResourceFolder@_FYh50HQfEeKp3LyXDhKQGQ
   AtomicAttributeDatatypes : CDOResource@_FYjvAHQfEeKp3LyXDhKQGQ
   AtomicAttributeDatatypes : CDOResource@_FYjvAHQfEeKp3LyXDhKQGQ


What I would have expected is this:

typesdescriptions : CDOResourceFolder@_uBTJIHQoEeKF5ryXDhKQGQ
   AtomicAttributeDatatypes : CDOResource@_uBU-UHQoEeKF5ryXDhKQGQ
   fis : CDOResourceFolder@_uHvvYHQoEeKF5ryXDhKQGQ


I noticed that after I looked up an EObject after the XML import. The EObject has the path "/typesdescriptions/fis/transient/training/qi/1/iqi1Airport". I was able to find the EObject, but I got an error message when trying to access its resource, saying that the node "fis" could not be found.

In addition my method TestRepository.dropAllData does not seem to work, because after it is called and I check the child nodes of the root resource, it still has one child left: "typesdescriptions". I would have expected the root node to not have any children.

//Jan

Re: [CDO] Problems with XML Import [message #1009551 is a reply to message #1008172] Fri, 15 February 2013 09:52 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Jan,

Sorry for the late reply! Comments below...

Am 11.02.2013 10:13, schrieb Jan Rosczak:
> Hello,
>
> I have a problem with the XML import into an empty repository (CDO 4.2, Build 1.2.2013).
Do you, by chance, know that the problem first occured with this particular build?

> How the repository is created, see attached TestRepository.java.
>
> If I import attached XML and then print out the names and types of the ResourceNodes I get the following output:
>
>
> typesdescriptions : CDOResourceFolder@_FYh50HQfEeKp3LyXDhKQGQ
> AtomicAttributeDatatypes : CDOResource@_FYjvAHQfEeKp3LyXDhKQGQ
> AtomicAttributeDatatypes : CDOResource@_FYjvAHQfEeKp3LyXDhKQGQ
>
>
> What I would have expected is this:
>
>
> typesdescriptions : CDOResourceFolder@_uBTJIHQoEeKF5ryXDhKQGQ
> AtomicAttributeDatatypes : CDOResource@_uBU-UHQoEeKF5ryXDhKQGQ
> fis : CDOResourceFolder@_uHvvYHQoEeKF5ryXDhKQGQ
Yes, according to the relevant XML pieces:

<revision id="U_FYh50HQfEeKp3LyXDhKQGQ" class="http://www.eclipse.org/emf/CDO/Eresource/4.0.0#CDOResourceFolder"
version="2" time="1360568763513" resource="U_FVbigHQfEeKp3LyXDhKQGQ">
<feature name="name" value="typesdescriptions"/>
<feature name="nodes" type="Object" value="U_FYjvAHQfEeKp3LyXDhKQGQ"/>
<feature name="nodes" type="Object" value="U_FdsGoHQfEeKp3LyXDhKQGQ"/>
</revision>

<revision id="U_FYjvAHQfEeKp3LyXDhKQGQ" class="http://www.eclipse.org/emf/CDO/Eresource/4.0.0#CDOResource"
version="1" time="1360568762995" container="U_FYh50HQfEeKp3LyXDhKQGQ">
<feature name="name" value="AtomicAttributeDatatypes"/>
</revision>

<revision id="U_FdsGoHQfEeKp3LyXDhKQGQ" class="http://www.eclipse.org/emf/CDO/Eresource/4.0.0#CDOResourceFolder"
version="2" time="1360568765499" container="U_FYh50HQfEeKp3LyXDhKQGQ">
<feature name="name" value="fis"/>
</revision>

> I noticed that after I looked up an EObject after the XML import. The EObject has the path "/typesdescriptions/fis/transient/training/qi/1/iqi1Airport". I was able to find the EObject, but I got an error message when trying to access its resource, saying that the node "fis" could not be found.
I hope that all this is not after you've tampered with the store's lifecycle in the way you outline below?

> In addition my method TestRepository.dropAllData does not seem to work, because after it is called and I check the child nodes of the root resource, it still has one child left: "typesdescriptions". I would have expected the root node to not have any children.
You should not cast to org.eclipse.emf.cdo.spi.server.Store in client code, use the InternalStore interface. And you
must not interfere with a store's lifecycle because it's controlled by the repository. IIRC it's not even expected to be
restartable. The DBStore respects isDropAllDataOnActivate() during doActivate(), though. You may be better off calling
DBUtil.dropAllTables(Connection, String) directly in tests. Follow the callers to find usage examples.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Problems with XML Import [message #1010835 is a reply to message #1009551] Mon, 18 February 2013 10:08 Go to previous messageGo to next message
Jan Rosczak is currently offline Jan RosczakFriend
Messages: 53
Registered: July 2009
Location: Hamburg, Germany
Member
Hi Eike,

I guess it first happened with the 1.2.2013 build.

Today I did the test again (build from 15.02.), same result. I did not tamper with the store's lifecycle, just export, import and check if the object and its resource exist.


//Jan
Re: [CDO] Problems with XML Import [message #1012755 is a reply to message #1010835] Fri, 22 February 2013 07:27 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 18.02.2013 11:08, schrieb Jan Rosczak:
> Hi Eike,
>
> I guess it first happened with the 1.2.2013 build.
Just to be sure: You know exactly that it had worked before some build X and then started to fail with X? To know this X
would be good but it's more important for me to know whether it's a regression at all or not. In any case please submit
a bugzilla.

> Today I did the test again (build from 15.02.), same result.
Is it possible that you provide me with the code+data (possibly through private email) that I'd need to reproduce the
problem?

> I did not tamper with the store's lifecycle, just export, import and check if the object and its resource exist.
Regarding your dropAllTables(), please have a look at my first reply.


Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Previous Topic:EMF 2.9 and RAP 1.5
Next Topic:[CDO] Net4j tied to old version of h2?
Goto Forum:
  


Current Time: Sat Apr 27 00:04:02 GMT 2024

Powered by FUDForum. Page generated in 0.03224 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top