|
Re: [CDO] Problems with XML Import [message #1009551 is a reply to message #1008172] |
Fri, 15 February 2013 09:52 |
|
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
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03509 seconds