Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Net4j old version of h2 Db used in plugin
[CDO] Net4j old version of h2 Db used in plugin [message #653702] Thu, 10 February 2011 18:28 Go to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi,

Is there an official way of updating the version of the database driver
embedded as a plugin in Eclipse and used by Net4J? The current H2 driver
is V1.1.14, we use 1.3.46 currently and it does create problems as the
databases are incompatible formats.

I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740 plugin
to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
version (org.h2-1.3.146.v201012120146.jar). But I get
java.lang.IllegalArgumentException: Unknown DB adapter: h2

Thx.

David
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654164 is a reply to message #653702] Mon, 14 February 2011 13:05 Go to previous messageGo to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
Hi David,

> Is there an official way of updating the version of the database driver
> embedded as a plugin in Eclipse and used by Net4J? The current H2 driver
> is V1.1.14, we use 1.3.46 currently and it does create problems as the
> databases are incompatible formats.

The most common way is to get it from Orbit, but right now it includes
1.1.117. Alternatively, and due to license incompatibilities, we provide
some drivers in our sourceforge repository, but is not the case of the
H2 Driver.

http://net4j.sourceforge.net/update/

So Im afraid you'll have to create your own H2 bundle :(

> I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740 plugin
> to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
> version (org.h2-1.3.146.v201012120146.jar). But I get
> java.lang.IllegalArgumentException: Unknown DB adapter: h2

Thats odd. Have you checked if the bundle org.eclipse.net4j.db.h2 is
indeed loaded properly by equinox?

I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
increase version ranges, to make it possible to include newer h2
versions. However, I just realized you are using 3.0.0... maybe we can
also patch 3.0.0 before SR2.

Cheers,
Víctor.
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654183 is a reply to message #654164] Mon, 14 February 2011 13:48 Go to previous messageGo to next message
Victor Roldan Betancort is currently offline Victor Roldan BetancortFriend
Messages: 524
Registered: July 2009
Senior Member
> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
> increase version ranges, to make it possible to include newer h2
> versions. However, I just realized you are using 3.0.0... maybe we can
> also patch 3.0.0 before SR2.

Created backport for 3.0.0

https://bugs.eclipse.org/bugs/show_bug.cgi?id=337118
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654694 is a reply to message #654164] Wed, 16 February 2011 17:31 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi,

I went to http://sourceforge.net/projects/net4j/ to see if I could look
at the HDBSQL setup and copy that to make my own H2 version. But there
are no files there at all. Any pointer son what I would need to do to
build a correct H2 1.3.nn bundle?

Thx.

David
On 14/02/11 13:05, Víctor Roldán Betancort wrote:
> Hi David,
>
>> Is there an official way of updating the version of the database driver
>> embedded as a plugin in Eclipse and used by Net4J? The current H2 driver
>> is V1.1.14, we use 1.3.46 currently and it does create problems as the
>> databases are incompatible formats.
>
> The most common way is to get it from Orbit, but right now it includes
> 1.1.117. Alternatively, and due to license incompatibilities, we provide
> some drivers in our sourceforge repository, but is not the case of the
> H2 Driver.
>
> http://net4j.sourceforge.net/update/
>
> So Im afraid you'll have to create your own H2 bundle :(
>
>> I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740 plugin
>> to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
>> version (org.h2-1.3.146.v201012120146.jar). But I get
>> java.lang.IllegalArgumentException: Unknown DB adapter: h2
>
> Thats odd. Have you checked if the bundle org.eclipse.net4j.db.h2 is
> indeed loaded properly by equinox?
>
> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
> increase version ranges, to make it possible to include newer h2
> versions. However, I just realized you are using 3.0.0... maybe we can
> also patch 3.0.0 before SR2.
>
> Cheers,
> Víctor.
>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654697 is a reply to message #654164] Wed, 16 February 2011 17:56 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
I also noticed something that looks a little strange. The current h2
1.1.17 has this entry in the MANIFEST.MF

Main-Class: org.h2.tools.Console


shouldn't this be

Main-Class: org.h2.tools.Server
?

Am I right in assuming that I have to create a bundle from scratch, i.e.
by changing the manifest bundles versions in my hacked jar MANIFEST.MF
and the class files to the later versions it changes the MANIFEST.SF
file signatures? Since I know nothing about this I might have to switch
to HSQLDB just to save time.

Thx.

David
On 14/02/11 13:05, Víctor Roldán Betancort wrote:
> Hi David,
>
>> Is there an official way of updating the version of the database driver
>> embedded as a plugin in Eclipse and used by Net4J? The current H2 driver
>> is V1.1.14, we use 1.3.46 currently and it does create problems as the
>> databases are incompatible formats.
>
> The most common way is to get it from Orbit, but right now it includes
> 1.1.117. Alternatively, and due to license incompatibilities, we provide
> some drivers in our sourceforge repository, but is not the case of the
> H2 Driver.
>
> http://net4j.sourceforge.net/update/
>
> So Im afraid you'll have to create your own H2 bundle :(
>
>> I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740 plugin
>> to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
>> version (org.h2-1.3.146.v201012120146.jar). But I get
>> java.lang.IllegalArgumentException: Unknown DB adapter: h2
>
> Thats odd. Have you checked if the bundle org.eclipse.net4j.db.h2 is
> indeed loaded properly by equinox?
>
> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
> increase version ranges, to make it possible to include newer h2
> versions. However, I just realized you are using 3.0.0... maybe we can
> also patch 3.0.0 before SR2.
>
> Cheers,
> Víctor.
>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654709 is a reply to message #654697] Wed, 16 February 2011 18:28 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 16.02.2011 18:56, schrieb David Wynter:
> I also noticed something that looks a little strange. The current h2 1.1.17 has this entry in the MANIFEST.MF
>
> Main-Class: org.h2.tools.Console
>
>
> shouldn't this be
>
> Main-Class: org.h2.tools.Server
> ?

I have no clue. This bundle is just redistributed from the Orbit project: http://www.eclipse.org/orbit/overview.php

> Am I right in assuming that I have to create a bundle from scratch, i.e. by changing the manifest bundles versions in my hacked jar MANIFEST.MF and the class files to the later versions it changes the MANIFEST.SF file signatures? Since I know nothing about this I might have to switch to HSQLDB just to save time.

There's a PDE new plugin wizard that creates a bundle from a plain java jar. Sometimes you can directly use the resulting bundle, sometimes you have to adjust the manifest entries. Usually it's good to add versions on the package exports, for example.

Cheers
/Eike

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


>
> Thx.
>
> David
> On 14/02/11 13:05, Víctor Roldán Betancort wrote:
>> Hi David,
>>
>>> Is there an official way of updating the version of the database driver
>>> embedded as a plugin in Eclipse and used by Net4J? The current H2 driver
>>> is V1.1.14, we use 1.3.46 currently and it does create problems as the
>>> databases are incompatible formats.
>>
>> The most common way is to get it from Orbit, but right now it includes
>> 1.1.117. Alternatively, and due to license incompatibilities, we provide
>> some drivers in our sourceforge repository, but is not the case of the
>> H2 Driver.
>>
>> http://net4j.sourceforge.net/update/
>>
>> So Im afraid you'll have to create your own H2 bundle :(
>>
>>> I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740 plugin
>>> to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
>>> version (org.h2-1.3.146.v201012120146.jar). But I get
>>> java.lang.IllegalArgumentException: Unknown DB adapter: h2
>>
>> Thats odd. Have you checked if the bundle org.eclipse.net4j.db.h2 is
>> indeed loaded properly by equinox?
>>
>> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
>> increase version ranges, to make it possible to include newer h2
>> versions. However, I just realized you are using 3.0.0... maybe we can
>> also patch 3.0.0 before SR2.
>>
>> Cheers,
>> Víctor.
>>
>


Re: [CDO] Net4j old version of h2 Db used in plugin [message #654710 is a reply to message #654697] Wed, 16 February 2011 18:50 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi,

I found the feature.xml in the org.eclipse.net4j.db.h2_3.0.0.v20110215-1555
I checked out this morning and updated the 2nd plugin entry to point at
my new h2 plugin, using the new version I created. I also learn't how to
sign that h2 jar with my key and did that and pasted the signatures from
my DAVIDWYN.SF into the MANIFEST.MF file.

But it still will not load the H2 Adapter, don't know why yet.

Any pointers welcome.

Thx.

David

On 16/02/11 17:56, David Wynter wrote:
> I also noticed something that looks a little strange. The current h2
> 1.1.17 has this entry in the MANIFEST.MF
>
> Main-Class: org.h2.tools.Console
>
>
> shouldn't this be
>
> Main-Class: org.h2.tools.Server
> ?
>
> Am I right in assuming that I have to create a bundle from scratch, i.e.
> by changing the manifest bundles versions in my hacked jar MANIFEST.MF
> and the class files to the later versions it changes the MANIFEST.SF
> file signatures? Since I know nothing about this I might have to switch
> to HSQLDB just to save time.
>
> Thx.
>
> David
> On 14/02/11 13:05, Víctor Roldán Betancort wrote:
>> Hi David,
>>
>>> Is there an official way of updating the version of the database driver
>>> embedded as a plugin in Eclipse and used by Net4J? The current H2 driver
>>> is V1.1.14, we use 1.3.46 currently and it does create problems as the
>>> databases are incompatible formats.
>>
>> The most common way is to get it from Orbit, but right now it includes
>> 1.1.117. Alternatively, and due to license incompatibilities, we provide
>> some drivers in our sourceforge repository, but is not the case of the
>> H2 Driver.
>>
>> http://net4j.sourceforge.net/update/
>>
>> So Im afraid you'll have to create your own H2 bundle :(
>>
>>> I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740 plugin
>>> to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
>>> version (org.h2-1.3.146.v201012120146.jar). But I get
>>> java.lang.IllegalArgumentException: Unknown DB adapter: h2
>>
>> Thats odd. Have you checked if the bundle org.eclipse.net4j.db.h2 is
>> indeed loaded properly by equinox?
>>
>> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
>> increase version ranges, to make it possible to include newer h2
>> versions. However, I just realized you are using 3.0.0... maybe we can
>> also patch 3.0.0 before SR2.
>>
>> Cheers,
>> Víctor.
>>
>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654719 is a reply to message #654710] Wed, 16 February 2011 19:06 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi,

Found the reason, clearly my signing is not up to scratch

!MESSAGE Either the manifest file or the signature file has been
tampered in this jar:
/home/david/opt1/eclipse/plugins/org.h2-1.3.146.v20101231014 6.jar

This is why it does not load.

David

On 16/02/11 18:50, David Wynter wrote:
> Hi,
>
> I found the feature.xml in the org.eclipse.net4j.db.h2_3.0.0.v20110215-1555
> I checked out this morning and updated the 2nd plugin entry to point at
> my new h2 plugin, using the new version I created. I also learn't how to
> sign that h2 jar with my key and did that and pasted the signatures from
> my DAVIDWYN.SF into the MANIFEST.MF file.
>
> But it still will not load the H2 Adapter, don't know why yet.
>
> Any pointers welcome.
>
> Thx.
>
> David
>
> On 16/02/11 17:56, David Wynter wrote:
>> I also noticed something that looks a little strange. The current h2
>> 1.1.17 has this entry in the MANIFEST.MF
>>
>> Main-Class: org.h2.tools.Console
>>
>>
>> shouldn't this be
>>
>> Main-Class: org.h2.tools.Server
>> ?
>>
>> Am I right in assuming that I have to create a bundle from scratch, i.e.
>> by changing the manifest bundles versions in my hacked jar MANIFEST.MF
>> and the class files to the later versions it changes the MANIFEST.SF
>> file signatures? Since I know nothing about this I might have to switch
>> to HSQLDB just to save time.
>>
>> Thx.
>>
>> David
>> On 14/02/11 13:05, Víctor Roldán Betancort wrote:
>>> Hi David,
>>>
>>>> Is there an official way of updating the version of the database driver
>>>> embedded as a plugin in Eclipse and used by Net4J? The current H2
>>>> driver
>>>> is V1.1.14, we use 1.3.46 currently and it does create problems as the
>>>> databases are incompatible formats.
>>>
>>> The most common way is to get it from Orbit, but right now it includes
>>> 1.1.117. Alternatively, and due to license incompatibilities, we provide
>>> some drivers in our sourceforge repository, but is not the case of the
>>> H2 Driver.
>>>
>>> http://net4j.sourceforge.net/update/
>>>
>>> So Im afraid you'll have to create your own H2 bundle :(
>>>
>>>> I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740 plugin
>>>> to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
>>>> version (org.h2-1.3.146.v201012120146.jar). But I get
>>>> java.lang.IllegalArgumentException: Unknown DB adapter: h2
>>>
>>> Thats odd. Have you checked if the bundle org.eclipse.net4j.db.h2 is
>>> indeed loaded properly by equinox?
>>>
>>> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
>>> increase version ranges, to make it possible to include newer h2
>>> versions. However, I just realized you are using 3.0.0... maybe we can
>>> also patch 3.0.0 before SR2.
>>>
>>> Cheers,
>>> Víctor.
>>>
>>
>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654720 is a reply to message #654719] Wed, 16 February 2011 19:14 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Looks like I am stymied. This is from the Eclipse page on signing jars

"A critical part of the security behind signing is that the private keys
used to produce the signatures are held in a secure location and never
transmitted or accessible via a network. To accomplish this, the signing
must be done on a secure machine that has access to the private key. The
Eclipse Foundation has set up a machine with a signing script. The build
will upload content to be signed to this machine, and a script is run to
perform the signing. Access to this machine will be given to trusted
parties that want to perform signing.

At the time of writing, persons who want to get jar signing privilege
need to be committers, and apply for that privilege with the Webmaster.
Project leads are required to authorize the request. Special permissions
will be granted to the committer's UNIX login on the jar signing machine."

HSQLDB here I come. The problem here is I imported a large model into my
H2 CDO repo, then opened it with H2 V1.3.46 (the later version) which
automatically converted the version to the post V1.1 format, now
unreadable by V1.1.17, so now screwed.

For some reason the Eclipse support is in the dark ages, which is
surprising given how good H2 is. I haven't used HSQLDB in years now.

David

On 16/02/11 19:06, David Wynter wrote:
> Hi,
>
> Found the reason, clearly my signing is not up to scratch
>
> !MESSAGE Either the manifest file or the signature file has been
> tampered in this jar:
> /home/david/opt1/eclipse/plugins/org.h2-1.3.146.v20101231014 6.jar
>
> This is why it does not load.
>
> David
>
> On 16/02/11 18:50, David Wynter wrote:
>> Hi,
>>
>> I found the feature.xml in the
>> org.eclipse.net4j.db.h2_3.0.0.v20110215-1555
>> I checked out this morning and updated the 2nd plugin entry to point at
>> my new h2 plugin, using the new version I created. I also learn't how to
>> sign that h2 jar with my key and did that and pasted the signatures from
>> my DAVIDWYN.SF into the MANIFEST.MF file.
>>
>> But it still will not load the H2 Adapter, don't know why yet.
>>
>> Any pointers welcome.
>>
>> Thx.
>>
>> David
>>
>> On 16/02/11 17:56, David Wynter wrote:
>>> I also noticed something that looks a little strange. The current h2
>>> 1.1.17 has this entry in the MANIFEST.MF
>>>
>>> Main-Class: org.h2.tools.Console
>>>
>>>
>>> shouldn't this be
>>>
>>> Main-Class: org.h2.tools.Server
>>> ?
>>>
>>> Am I right in assuming that I have to create a bundle from scratch, i.e.
>>> by changing the manifest bundles versions in my hacked jar MANIFEST.MF
>>> and the class files to the later versions it changes the MANIFEST.SF
>>> file signatures? Since I know nothing about this I might have to switch
>>> to HSQLDB just to save time.
>>>
>>> Thx.
>>>
>>> David
>>> On 14/02/11 13:05, Víctor Roldán Betancort wrote:
>>>> Hi David,
>>>>
>>>>> Is there an official way of updating the version of the database
>>>>> driver
>>>>> embedded as a plugin in Eclipse and used by Net4J? The current H2
>>>>> driver
>>>>> is V1.1.14, we use 1.3.46 currently and it does create problems as the
>>>>> databases are incompatible formats.
>>>>
>>>> The most common way is to get it from Orbit, but right now it includes
>>>> 1.1.117. Alternatively, and due to license incompatibilities, we
>>>> provide
>>>> some drivers in our sourceforge repository, but is not the case of the
>>>> H2 Driver.
>>>>
>>>> http://net4j.sourceforge.net/update/
>>>>
>>>> So Im afraid you'll have to create your own H2 bundle :(
>>>>
>>>>> I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740
>>>>> plugin
>>>>> to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
>>>>> version (org.h2-1.3.146.v201012120146.jar). But I get
>>>>> java.lang.IllegalArgumentException: Unknown DB adapter: h2
>>>>
>>>> Thats odd. Have you checked if the bundle org.eclipse.net4j.db.h2 is
>>>> indeed loaded properly by equinox?
>>>>
>>>> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
>>>> increase version ranges, to make it possible to include newer h2
>>>> versions. However, I just realized you are using 3.0.0... maybe we can
>>>> also patch 3.0.0 before SR2.
>>>>
>>>> Cheers,
>>>> Víctor.
>>>>
>>>
>>
>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654727 is a reply to message #654720] Wed, 16 February 2011 20:17 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 16.02.2011 20:14, schrieb David Wynter:
> Looks like I am stymied. This is from the Eclipse page on signing jars
>
> "A critical part of the security behind signing is that the private keys used to produce the signatures are held in a secure location and never transmitted or accessible via a network. To accomplish this, the signing must be done on a secure machine that has access to the private key. The Eclipse Foundation has set up a machine with a signing script. The build will upload content to be signed to this machine, and a script is run to perform the signing. Access to this machine will be given to trusted parties that want to perform signing.
>
> At the time of writing, persons who want to get jar signing privilege need to be committers, and apply for that privilege with the Webmaster. Project leads are required to authorize the request. Special permissions will be granted to the committer's UNIX login on the jar signing machine."

I'm not sure why you need to sign your own bundles. You may have good reasons. But I have no clue how all that works. I'm happy that Buckinster does all that for us ;-)


> HSQLDB here I come. The problem here is I imported a large model into my H2 CDO repo, then opened it with H2 V1.3.46 (the later version) which automatically converted the version to the post V1.1 format, now unreadable by V1.1.17, so now screwed.
>
> For some reason the Eclipse support is in the dark ages, which is surprising given how good H2 is.

Yes, we definitely recommend H2. Unfortunately we have no resources to keep up to date with all the new versions of the many different backend/database types we tend to support. The main blocker for us is that we're required to go through a legal review for each concrete version of each third party component, even if we don't ship that component but just refer to it, even if other Eclipse projects have already used it. I leave it to you to judge about this process, but I can certainly not change it ;-(

I haven't used HSQLDB in years now.

Me neither.

Cheers
/Eike

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


>
> David
>
> On 16/02/11 19:06, David Wynter wrote:
>> Hi,
>>
>> Found the reason, clearly my signing is not up to scratch
>>
>> !MESSAGE Either the manifest file or the signature file has been
>> tampered in this jar:
>> /home/david/opt1/eclipse/plugins/org.h2-1.3.146.v20101231014 6.jar
>>
>> This is why it does not load.
>>
>> David
>>
>> On 16/02/11 18:50, David Wynter wrote:
>>> Hi,
>>>
>>> I found the feature.xml in the
>>> org.eclipse.net4j.db.h2_3.0.0.v20110215-1555
>>> I checked out this morning and updated the 2nd plugin entry to point at
>>> my new h2 plugin, using the new version I created. I also learn't how to
>>> sign that h2 jar with my key and did that and pasted the signatures from
>>> my DAVIDWYN.SF into the MANIFEST.MF file.
>>>
>>> But it still will not load the H2 Adapter, don't know why yet.
>>>
>>> Any pointers welcome.
>>>
>>> Thx.
>>>
>>> David
>>>
>>> On 16/02/11 17:56, David Wynter wrote:
>>>> I also noticed something that looks a little strange. The current h2
>>>> 1.1.17 has this entry in the MANIFEST.MF
>>>>
>>>> Main-Class: org.h2.tools.Console
>>>>
>>>>
>>>> shouldn't this be
>>>>
>>>> Main-Class: org.h2.tools.Server
>>>> ?
>>>>
>>>> Am I right in assuming that I have to create a bundle from scratch, i.e.
>>>> by changing the manifest bundles versions in my hacked jar MANIFEST.MF
>>>> and the class files to the later versions it changes the MANIFEST.SF
>>>> file signatures? Since I know nothing about this I might have to switch
>>>> to HSQLDB just to save time.
>>>>
>>>> Thx.
>>>>
>>>> David
>>>> On 14/02/11 13:05, Víctor Roldán Betancort wrote:
>>>>> Hi David,
>>>>>
>>>>>> Is there an official way of updating the version of the database
>>>>>> driver
>>>>>> embedded as a plugin in Eclipse and used by Net4J? The current H2
>>>>>> driver
>>>>>> is V1.1.14, we use 1.3.46 currently and it does create problems as the
>>>>>> databases are incompatible formats.
>>>>>
>>>>> The most common way is to get it from Orbit, but right now it includes
>>>>> 1.1.117. Alternatively, and due to license incompatibilities, we
>>>>> provide
>>>>> some drivers in our sourceforge repository, but is not the case of the
>>>>> H2 Driver.
>>>>>
>>>>> http://net4j.sourceforge.net/update/
>>>>>
>>>>> So Im afraid you'll have to create your own H2 bundle :(
>>>>>
>>>>>> I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740
>>>>>> plugin
>>>>>> to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
>>>>>> version (org.h2-1.3.146.v201012120146.jar). But I get
>>>>>> java.lang.IllegalArgumentException: Unknown DB adapter: h2
>>>>>
>>>>> Thats odd. Have you checked if the bundle org.eclipse.net4j.db.h2 is
>>>>> indeed loaded properly by equinox?
>>>>>
>>>>> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
>>>>> increase version ranges, to make it possible to include newer h2
>>>>> versions. However, I just realized you are using 3.0.0... maybe we can
>>>>> also patch 3.0.0 before SR2.
>>>>>
>>>>> Cheers,
>>>>> Víctor.
>>>>>
>>>>
>>>
>>
>


Re: [CDO] Net4j old version of h2 Db used in plugin [message #654835 is a reply to message #654727] Thu, 17 February 2011 10:46 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi,

The problem for H2 users is that as of V1.2.120 the file format for the
database changed. There is an automatic conversion to the new format if
you include an additional jar on the classpath, once an old version is
converted there is no going back. I made that mistake, wanting to see
the data the CDO stored.

I tried stripping out all the signing information from the new h2 jar I
created, it still does not load, so there is some magic going on that is
not obvious. Now trying to import an old model I had in xml format into
Derby. Will then have to reenter the changes since then. To give you an
idea the xmi file is over 10K lines long... Which is why I persisted for
so long in trying to recvoer.

Thx for your help. I know more, but clearly not enough to create a new
plugin to do the job.

David

On 16/02/11 20:17, Eike Stepper wrote:
> Am 16.02.2011 20:14, schrieb David Wynter:
>> Looks like I am stymied. This is from the Eclipse page on signing jars
>>
>> "A critical part of the security behind signing is that the private
>> keys used to produce the signatures are held in a secure location and
>> never transmitted or accessible via a network. To accomplish this, the
>> signing must be done on a secure machine that has access to the
>> private key. The Eclipse Foundation has set up a machine with a
>> signing script. The build will upload content to be signed to this
>> machine, and a script is run to perform the signing. Access to this
>> machine will be given to trusted parties that want to perform signing.
>>
>> At the time of writing, persons who want to get jar signing privilege
>> need to be committers, and apply for that privilege with the
>> Webmaster. Project leads are required to authorize the request.
>> Special permissions will be granted to the committer's UNIX login on
>> the jar signing machine."
>
> I'm not sure why you need to sign your own bundles. You may have good
> reasons. But I have no clue how all that works. I'm happy that
> Buckinster does all that for us ;-)
>
>
>> HSQLDB here I come. The problem here is I imported a large model into
>> my H2 CDO repo, then opened it with H2 V1.3.46 (the later version)
>> which automatically converted the version to the post V1.1 format, now
>> unreadable by V1.1.17, so now screwed.
>>
>> For some reason the Eclipse support is in the dark ages, which is
>> surprising given how good H2 is.
>
> Yes, we definitely recommend H2. Unfortunately we have no resources to
> keep up to date with all the new versions of the many different
> backend/database types we tend to support. The main blocker for us is
> that we're required to go through a legal review for each concrete
> version of each third party component, even if we don't ship that
> component but just refer to it, even if other Eclipse projects have
> already used it. I leave it to you to judge about this process, but I
> can certainly not change it ;-(
>
> I haven't used HSQLDB in years now.
>
> Me neither.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>>
>> David
>>
>> On 16/02/11 19:06, David Wynter wrote:
>>> Hi,
>>>
>>> Found the reason, clearly my signing is not up to scratch
>>>
>>> !MESSAGE Either the manifest file or the signature file has been
>>> tampered in this jar:
>>> /home/david/opt1/eclipse/plugins/org.h2-1.3.146.v20101231014 6.jar
>>>
>>> This is why it does not load.
>>>
>>> David
>>>
>>> On 16/02/11 18:50, David Wynter wrote:
>>>> Hi,
>>>>
>>>> I found the feature.xml in the
>>>> org.eclipse.net4j.db.h2_3.0.0.v20110215-1555
>>>> I checked out this morning and updated the 2nd plugin entry to point at
>>>> my new h2 plugin, using the new version I created. I also learn't
>>>> how to
>>>> sign that h2 jar with my key and did that and pasted the signatures
>>>> from
>>>> my DAVIDWYN.SF into the MANIFEST.MF file.
>>>>
>>>> But it still will not load the H2 Adapter, don't know why yet.
>>>>
>>>> Any pointers welcome.
>>>>
>>>> Thx.
>>>>
>>>> David
>>>>
>>>> On 16/02/11 17:56, David Wynter wrote:
>>>>> I also noticed something that looks a little strange. The current h2
>>>>> 1.1.17 has this entry in the MANIFEST.MF
>>>>>
>>>>> Main-Class: org.h2.tools.Console
>>>>>
>>>>>
>>>>> shouldn't this be
>>>>>
>>>>> Main-Class: org.h2.tools.Server
>>>>> ?
>>>>>
>>>>> Am I right in assuming that I have to create a bundle from scratch,
>>>>> i.e.
>>>>> by changing the manifest bundles versions in my hacked jar MANIFEST.MF
>>>>> and the class files to the later versions it changes the MANIFEST.SF
>>>>> file signatures? Since I know nothing about this I might have to
>>>>> switch
>>>>> to HSQLDB just to save time.
>>>>>
>>>>> Thx.
>>>>>
>>>>> David
>>>>> On 14/02/11 13:05, Víctor Roldán Betancort wrote:
>>>>>> Hi David,
>>>>>>
>>>>>>> Is there an official way of updating the version of the database
>>>>>>> driver
>>>>>>> embedded as a plugin in Eclipse and used by Net4J? The current H2
>>>>>>> driver
>>>>>>> is V1.1.14, we use 1.3.46 currently and it does create problems
>>>>>>> as the
>>>>>>> databases are incompatible formats.
>>>>>>
>>>>>> The most common way is to get it from Orbit, but right now it
>>>>>> includes
>>>>>> 1.1.117. Alternatively, and due to license incompatibilities, we
>>>>>> provide
>>>>>> some drivers in our sourceforge repository, but is not the case of
>>>>>> the
>>>>>> H2 Driver.
>>>>>>
>>>>>> http://net4j.sourceforge.net/update/
>>>>>>
>>>>>> So Im afraid you'll have to create your own H2 bundle :(
>>>>>>
>>>>>>> I tried hacking the org.eclipse.net4j.db.h2_3.0.0.v20100626-0740
>>>>>>> plugin
>>>>>>> to accept V1.3.0 of the h3 plugin, and created a h2 plugin with that
>>>>>>> version (org.h2-1.3.146.v201012120146.jar). But I get
>>>>>>> java.lang.IllegalArgumentException: Unknown DB adapter: h2
>>>>>>
>>>>>> Thats odd. Have you checked if the bundle org.eclipse.net4j.db.h2 is
>>>>>> indeed loaded properly by equinox?
>>>>>>
>>>>>> I created https://bugs.eclipse.org/bugs/show_bug.cgi?id=337106 to
>>>>>> increase version ranges, to make it possible to include newer h2
>>>>>> versions. However, I just realized you are using 3.0.0... maybe we
>>>>>> can
>>>>>> also patch 3.0.0 before SR2.
>>>>>>
>>>>>> Cheers,
>>>>>> Víctor.
>>>>>>
>>>>>
>>>>
>>>
>>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654836 is a reply to message #654835] Thu, 17 February 2011 11:15 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 17.02.2011 11:46, schrieb David Wynter:
> Hi,
>
> The problem for H2 users is that as of V1.2.120 the file format for the database changed. There is an automatic conversion to the new format if you include an additional jar on the classpath, once an old version is converted there is no going back. I made that mistake, wanting to see the data the CDO stored.
>
> I tried stripping out all the signing information from the new h2 jar I created, it still does not load, so there is some magic going on that is not obvious. Now trying to import an old model I had in xml format into Derby. Will then have to reenter the changes since then. To give you an idea the xmi file is over 10K lines long... Which is why I persisted for so long in trying to recvoer.
>
> Thx for your help. I know more, but clearly not enough to create a new plugin to do the job.

Maybe the new repository export/import functionality can help you. It's backend-agnositc and also available through the OSGi console.

Cheers
/Eike

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


Re: [CDO] Net4j old version of h2 Db used in plugin [message #654852 is a reply to message #654836] Thu, 17 February 2011 12:26 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Yes, I had preivous;ly done that successfully, you helped me in another
thread, I think it took 8 attempts with a eclipse restart each time to
get success. But this time I have no such luck. Here are my steps

I use CDO Session view of my IDE, the view is shipped with
org.eclipse.emf.cdo.ui plug-in. The steps are:
1. Establish a connection to a CDO server
2. Import my model into the Registry
3. Open a transaction
4. Create a resource
5. Commit
6. Go to the resource editor by double clicking the created resource.
7. In the context menu select Import Roots and import my
content.xml document.
8. Commit the transaction.

At step 8 I get this:

org.eclipse.net4j.signal.RemoteException:
org.eclipse.emf.common.util.WrappedException:
java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
at
org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
at
org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
at
org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)

Not sure what I am missing here. I restart Eclipse and the CDO Server
each attempt and start with a new Resource each time. I get consistent
results. It look slike to me that my EMF project where I developed this
model needs somehow to be on the CDO Explorer's classpath?

thx.

David

On 17/02/11 11:15, Eike Stepper wrote:
> Am 17.02.2011 11:46, schrieb David Wynter:
>> Hi,
>>
>> The problem for H2 users is that as of V1.2.120 the file format for
>> the database changed. There is an automatic conversion to the new
>> format if you include an additional jar on the classpath, once an old
>> version is converted there is no going back. I made that mistake,
>> wanting to see the data the CDO stored.
>>
>> I tried stripping out all the signing information from the new h2 jar
>> I created, it still does not load, so there is some magic going on
>> that is not obvious. Now trying to import an old model I had in xml
>> format into Derby. Will then have to reenter the changes since then.
>> To give you an idea the xmi file is over 10K lines long... Which is
>> why I persisted for so long in trying to recvoer.
>>
>> Thx for your help. I know more, but clearly not enough to create a new
>> plugin to do the job.
>
> Maybe the new repository export/import functionality can help you. It's
> backend-agnositc and also available through the OSGi console.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654853 is a reply to message #654852] Thu, 17 February 2011 12:39 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Something else I noticed about CDO Explorer. When importing the Roots I
get 4 of these every single time, in the .log file

!ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable
(java.util.ConcurrentModificationException)
at org.eclipse.swt.SWT.error(SWT.java:4083)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: java.util.ConcurrentModificationException
at
org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
at
org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
at
org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
at
org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
at
org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
at
org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
at
org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
at
org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
at
org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
at
org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
at
org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
at
org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
at
org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
at
org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
at
org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
at
org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
at
org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
at
org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
at
org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
at
org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
... 23 more

David

On 17/02/11 12:26, David Wynter wrote:
> Yes, I had preivous;ly done that successfully, you helped me in another
> thread, I think it took 8 attempts with a eclipse restart each time to
> get success. But this time I have no such luck. Here are my steps
>
> I use CDO Session view of my IDE, the view is shipped with
> org.eclipse.emf.cdo.ui plug-in. The steps are:
> 1. Establish a connection to a CDO server
> 2. Import my model into the Registry
> 3. Open a transaction
> 4. Create a resource
> 5. Commit
> 6. Go to the resource editor by double clicking the created resource.
> 7. In the context menu select Import Roots and import my content.xml
> document.
> 8. Commit the transaction.
>
> At step 8 I get this:
>
> org.eclipse.net4j.signal.RemoteException:
> org.eclipse.emf.common.util.WrappedException:
> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
> at
> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>
> at
> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>
> at
> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>
>
> Not sure what I am missing here. I restart Eclipse and the CDO Server
> each attempt and start with a new Resource each time. I get consistent
> results. It look slike to me that my EMF project where I developed this
> model needs somehow to be on the CDO Explorer's classpath?
>
> thx.
>
> David
>
> On 17/02/11 11:15, Eike Stepper wrote:
>> Am 17.02.2011 11:46, schrieb David Wynter:
>>> Hi,
>>>
>>> The problem for H2 users is that as of V1.2.120 the file format for
>>> the database changed. There is an automatic conversion to the new
>>> format if you include an additional jar on the classpath, once an old
>>> version is converted there is no going back. I made that mistake,
>>> wanting to see the data the CDO stored.
>>>
>>> I tried stripping out all the signing information from the new h2 jar
>>> I created, it still does not load, so there is some magic going on
>>> that is not obvious. Now trying to import an old model I had in xml
>>> format into Derby. Will then have to reenter the changes since then.
>>> To give you an idea the xmi file is over 10K lines long... Which is
>>> why I persisted for so long in trying to recvoer.
>>>
>>> Thx for your help. I know more, but clearly not enough to create a new
>>> plugin to do the job.
>>
>> Maybe the new repository export/import functionality can help you. It's
>> backend-agnositc and also available through the OSGi console.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #654870 is a reply to message #654852] Thu, 17 February 2011 13:24 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi David,

With generic repository export/import I was referring to the new server-side mechanism that is available either through server side API (look for uses of CDOServerExporter and CDOServerImporter) or via the OSGi console of the server.

Cheers
/Eike

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



Am 17.02.2011 13:26, schrieb David Wynter:
> Yes, I had preivous;ly done that successfully, you helped me in another thread, I think it took 8 attempts with a eclipse restart each time to get success. But this time I have no such luck. Here are my steps
>
> I use CDO Session view of my IDE, the view is shipped with org.eclipse.emf.cdo.ui plug-in. The steps are:
> 1. Establish a connection to a CDO server
> 2. Import my model into the Registry
> 3. Open a transaction
> 4. Create a resource
> 5. Commit
> 6. Go to the resource editor by double clicking the created resource.
> 7. In the context menu select Import Roots and import my content.xml document.
> 8. Commit the transaction.
>
> At step 8 I get this:
>
> org.eclipse.net4j.signal.RemoteException: org.eclipse.emf.common.util.WrappedException: java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
> at org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
> at org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
> at org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>
> Not sure what I am missing here. I restart Eclipse and the CDO Server each attempt and start with a new Resource each time. I get consistent results. It look slike to me that my EMF project where I developed this model needs somehow to be on the CDO Explorer's classpath?
>
> thx.
>
> David
>
> On 17/02/11 11:15, Eike Stepper wrote:
>> Am 17.02.2011 11:46, schrieb David Wynter:
>>> Hi,
>>>
>>> The problem for H2 users is that as of V1.2.120 the file format for
>>> the database changed. There is an automatic conversion to the new
>>> format if you include an additional jar on the classpath, once an old
>>> version is converted there is no going back. I made that mistake,
>>> wanting to see the data the CDO stored.
>>>
>>> I tried stripping out all the signing information from the new h2 jar
>>> I created, it still does not load, so there is some magic going on
>>> that is not obvious. Now trying to import an old model I had in xml
>>> format into Derby. Will then have to reenter the changes since then.
>>> To give you an idea the xmi file is over 10K lines long... Which is
>>> why I persisted for so long in trying to recvoer.
>>>
>>> Thx for your help. I know more, but clearly not enough to create a new
>>> plugin to do the job.
>>
>> Maybe the new repository export/import functionality can help you. It's
>> backend-agnositc and also available through the OSGi console.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>


Re: [CDO] Net4j old version of h2 Db used in plugin [message #654871 is a reply to message #654853] Thu, 17 February 2011 13:26 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
I've never seen that before. Please file a bugzilla with exact steps how I can reproduce that (have you tried the same thing with the example model we're shipping?). I'm busy with a customer work at the moment, so please don't expect me to jump onto this bug immediately ;-)

Cheers
/Eike

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



Am 17.02.2011 13:39, schrieb David Wynter:
> Something else I noticed about CDO Explorer. When importing the Roots I get 4 of these every single time, in the .log file
>
> !ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
> !MESSAGE Unhandled event loop exception
> !STACK 0
> org.eclipse.swt.SWTException: Failed to execute runnable (java.util.ConcurrentModificationException)
> at org.eclipse.swt.SWT.error(SWT.java:4083)
> at org.eclipse.swt.SWT.error(SWT.java:3998)
> at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:616)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
> Caused by: java.util.ConcurrentModificationException
> at org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
> at org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
> at org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
> at org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
> at org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
> at org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
> at org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
> at org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
> at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
> at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
> at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
> at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
> at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
> at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
> at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
> at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
> at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
> at org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
> at org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
> at org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
> at org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
> at org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
> at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
> at org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
> at org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
> at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
> ... 23 more
>
> David
>
> On 17/02/11 12:26, David Wynter wrote:
>> Yes, I had preivous;ly done that successfully, you helped me in another
>> thread, I think it took 8 attempts with a eclipse restart each time to
>> get success. But this time I have no such luck. Here are my steps
>>
>> I use CDO Session view of my IDE, the view is shipped with
>> org.eclipse.emf.cdo.ui plug-in. The steps are:
>> 1. Establish a connection to a CDO server
>> 2. Import my model into the Registry
>> 3. Open a transaction
>> 4. Create a resource
>> 5. Commit
>> 6. Go to the resource editor by double clicking the created resource.
>> 7. In the context menu select Import Roots and import my content.xml
>> document.
>> 8. Commit the transaction.
>>
>> At step 8 I get this:
>>
>> org.eclipse.net4j.signal.RemoteException:
>> org.eclipse.emf.common.util.WrappedException:
>> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
>> at
>> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>>
>> at
>> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>>
>> at
>> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>>
>>
>> Not sure what I am missing here. I restart Eclipse and the CDO Server
>> each attempt and start with a new Resource each time. I get consistent
>> results. It look slike to me that my EMF project where I developed this
>> model needs somehow to be on the CDO Explorer's classpath?
>>
>> thx.
>>
>> David
>>
>> On 17/02/11 11:15, Eike Stepper wrote:
>>> Am 17.02.2011 11:46, schrieb David Wynter:
>>>> Hi,
>>>>
>>>> The problem for H2 users is that as of V1.2.120 the file format for
>>>> the database changed. There is an automatic conversion to the new
>>>> format if you include an additional jar on the classpath, once an old
>>>> version is converted there is no going back. I made that mistake,
>>>> wanting to see the data the CDO stored.
>>>>
>>>> I tried stripping out all the signing information from the new h2 jar
>>>> I created, it still does not load, so there is some magic going on
>>>> that is not obvious. Now trying to import an old model I had in xml
>>>> format into Derby. Will then have to reenter the changes since then.
>>>> To give you an idea the xmi file is over 10K lines long... Which is
>>>> why I persisted for so long in trying to recvoer.
>>>>
>>>> Thx for your help. I know more, but clearly not enough to create a new
>>>> plugin to do the job.
>>>
>>> Maybe the new repository export/import functionality can help you. It's
>>> backend-agnositc and also available through the OSGi console.
>>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://www.esc-net.de
>>> http://thegordian.blogspot.com
>>> http://twitter.com/eikestepper
>>>
>>
>


Re: [CDO] Net4j old version of h2 Db used in plugin [message #655230 is a reply to message #654871] Fri, 18 February 2011 17:24 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi,

I went looking for the example model you said was shipping, I looked in
org.eclipse.emf.cdo.examples.* jar files
and in
org.eclipse.emf.cdo.test.* jar files and could not find a paired xmi
file with it's ecore file.

Where is the example you mention?

Thx.

David


On 17/02/11 13:26, Eike Stepper wrote:
> I've never seen that before. Please file a bugzilla with exact steps how
> I can reproduce that (have you tried the same thing with the example
> model we're shipping?). I'm busy with a customer work at the moment, so
> please don't expect me to jump onto this bug immediately ;-)
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
> Am 17.02.2011 13:39, schrieb David Wynter:
>> Something else I noticed about CDO Explorer. When importing the Roots
>> I get 4 of these every single time, in the .log file
>>
>> !ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
>> !MESSAGE Unhandled event loop exception
>> !STACK 0
>> org.eclipse.swt.SWTException: Failed to execute runnable
>> (java.util.ConcurrentModificationException)
>> at org.eclipse.swt.SWT.error(SWT.java:4083)
>> at org.eclipse.swt.SWT.error(SWT.java:3998)
>> at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
>>
>> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
>> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
>> at
>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>>
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
>>
>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>> at
>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>>
>> at
>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
>>
>> at java.lang.reflect.Method.invoke(Method.java:616)
>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
>> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>> Caused by: java.util.ConcurrentModificationException
>> at
>> org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
>>
>> at
>> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
>>
>> at
>> org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
>>
>> at
>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
>>
>> at
>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
>>
>> at
>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
>>
>> at
>> org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
>>
>> at
>> org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
>>
>> at
>> org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
>>
>> at
>> org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
>> at
>> org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
>>
>> at
>> org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
>>
>> at
>> org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
>>
>> at
>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
>>
>> at
>> org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
>>
>> at
>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
>>
>> at
>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
>>
>> at
>> org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
>>
>> at
>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
>>
>> at
>> org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
>>
>> at
>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
>>
>> at
>> org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
>>
>> at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
>> at
>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
>>
>> at
>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
>>
>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>> at
>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
>>
>> ... 23 more
>>
>> David
>>
>> On 17/02/11 12:26, David Wynter wrote:
>>> Yes, I had preivous;ly done that successfully, you helped me in another
>>> thread, I think it took 8 attempts with a eclipse restart each time to
>>> get success. But this time I have no such luck. Here are my steps
>>>
>>> I use CDO Session view of my IDE, the view is shipped with
>>> org.eclipse.emf.cdo.ui plug-in. The steps are:
>>> 1. Establish a connection to a CDO server
>>> 2. Import my model into the Registry
>>> 3. Open a transaction
>>> 4. Create a resource
>>> 5. Commit
>>> 6. Go to the resource editor by double clicking the created resource.
>>> 7. In the context menu select Import Roots and import my content.xml
>>> document.
>>> 8. Commit the transaction.
>>>
>>> At step 8 I get this:
>>>
>>> org.eclipse.net4j.signal.RemoteException:
>>> org.eclipse.emf.common.util.WrappedException:
>>> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
>>> at
>>> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>>>
>>>
>>> at
>>> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>>>
>>>
>>> at
>>> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>>>
>>>
>>>
>>> Not sure what I am missing here. I restart Eclipse and the CDO Server
>>> each attempt and start with a new Resource each time. I get consistent
>>> results. It look slike to me that my EMF project where I developed this
>>> model needs somehow to be on the CDO Explorer's classpath?
>>>
>>> thx.
>>>
>>> David
>>>
>>> On 17/02/11 11:15, Eike Stepper wrote:
>>>> Am 17.02.2011 11:46, schrieb David Wynter:
>>>>> Hi,
>>>>>
>>>>> The problem for H2 users is that as of V1.2.120 the file format for
>>>>> the database changed. There is an automatic conversion to the new
>>>>> format if you include an additional jar on the classpath, once an old
>>>>> version is converted there is no going back. I made that mistake,
>>>>> wanting to see the data the CDO stored.
>>>>>
>>>>> I tried stripping out all the signing information from the new h2 jar
>>>>> I created, it still does not load, so there is some magic going on
>>>>> that is not obvious. Now trying to import an old model I had in xml
>>>>> format into Derby. Will then have to reenter the changes since then.
>>>>> To give you an idea the xmi file is over 10K lines long... Which is
>>>>> why I persisted for so long in trying to recvoer.
>>>>>
>>>>> Thx for your help. I know more, but clearly not enough to create a new
>>>>> plugin to do the job.
>>>>
>>>> Maybe the new repository export/import functionality can help you. It's
>>>> backend-agnositc and also available through the OSGi console.
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>> ----
>>>> http://www.esc-net.de
>>>> http://thegordian.blogspot.com
>>>> http://twitter.com/eikestepper
>>>>
>>>
>>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #655231 is a reply to message #655230] Fri, 18 February 2011 17:48 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 18.02.2011 18:24, schrieb David Wynter:
> Hi,
>
> I went looking for the example model you said was shipping, I looked in
> org.eclipse.emf.cdo.examples.* jar files
> and in
> org.eclipse.emf.cdo.test.* jar files and could not find a paired xmi file with it's ecore file.
>
> Where is the example you mention?

I'm not sure, what a paired xmi file is supposed to be. I was talking about the org.eclipse.emf.cdo.examples.company model plugin.

Cheers
/Eike

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


>
> Thx.
>
> David
>
>
> On 17/02/11 13:26, Eike Stepper wrote:
>> I've never seen that before. Please file a bugzilla with exact steps how
>> I can reproduce that (have you tried the same thing with the example
>> model we're shipping?). I'm busy with a customer work at the moment, so
>> please don't expect me to jump onto this bug immediately ;-)
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>> Am 17.02.2011 13:39, schrieb David Wynter:
>>> Something else I noticed about CDO Explorer. When importing the Roots
>>> I get 4 of these every single time, in the .log file
>>>
>>> !ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
>>> !MESSAGE Unhandled event loop exception
>>> !STACK 0
>>> org.eclipse.swt.SWTException: Failed to execute runnable
>>> (java.util.ConcurrentModificationException)
>>> at org.eclipse.swt.SWT.error(SWT.java:4083)
>>> at org.eclipse.swt.SWT.error(SWT.java:3998)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
>>>
>>> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
>>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
>>> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
>>> at
>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>>>
>>> at
>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
>>>
>>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>> at
>>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>>>
>>> at
>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>
>>> at
>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>
>>> at
>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
>>>
>>> at
>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:616)
>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>>> Caused by: java.util.ConcurrentModificationException
>>> at
>>> org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
>>>
>>> at
>>> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
>>>
>>> at
>>> org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
>>>
>>> at
>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
>>>
>>> at
>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
>>>
>>> at
>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
>>>
>>> at
>>> org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
>>>
>>> at
>>> org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
>>>
>>> at
>>> org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
>>>
>>> at
>>> org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
>>> at
>>> org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
>>>
>>> at
>>> org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
>>>
>>> at
>>> org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
>>>
>>> at
>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
>>>
>>> at
>>> org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
>>>
>>> at
>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
>>>
>>> at
>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
>>>
>>> at
>>> org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
>>>
>>> at
>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
>>>
>>> at
>>> org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
>>>
>>> at
>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
>>>
>>> at
>>> org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
>>>
>>> at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
>>> at
>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
>>>
>>> at
>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
>>>
>>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>> at
>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
>>>
>>> ... 23 more
>>>
>>> David
>>>
>>> On 17/02/11 12:26, David Wynter wrote:
>>>> Yes, I had preivous;ly done that successfully, you helped me in another
>>>> thread, I think it took 8 attempts with a eclipse restart each time to
>>>> get success. But this time I have no such luck. Here are my steps
>>>>
>>>> I use CDO Session view of my IDE, the view is shipped with
>>>> org.eclipse.emf.cdo.ui plug-in. The steps are:
>>>> 1. Establish a connection to a CDO server
>>>> 2. Import my model into the Registry
>>>> 3. Open a transaction
>>>> 4. Create a resource
>>>> 5. Commit
>>>> 6. Go to the resource editor by double clicking the created resource.
>>>> 7. In the context menu select Import Roots and import my content.xml
>>>> document.
>>>> 8. Commit the transaction.
>>>>
>>>> At step 8 I get this:
>>>>
>>>> org.eclipse.net4j.signal.RemoteException:
>>>> org.eclipse.emf.common.util.WrappedException:
>>>> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
>>>> at
>>>> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>>>>
>>>>
>>>>
>>>> Not sure what I am missing here. I restart Eclipse and the CDO Server
>>>> each attempt and start with a new Resource each time. I get consistent
>>>> results. It look slike to me that my EMF project where I developed this
>>>> model needs somehow to be on the CDO Explorer's classpath?
>>>>
>>>> thx.
>>>>
>>>> David
>>>>
>>>> On 17/02/11 11:15, Eike Stepper wrote:
>>>>> Am 17.02.2011 11:46, schrieb David Wynter:
>>>>>> Hi,
>>>>>>
>>>>>> The problem for H2 users is that as of V1.2.120 the file format for
>>>>>> the database changed. There is an automatic conversion to the new
>>>>>> format if you include an additional jar on the classpath, once an old
>>>>>> version is converted there is no going back. I made that mistake,
>>>>>> wanting to see the data the CDO stored.
>>>>>>
>>>>>> I tried stripping out all the signing information from the new h2 jar
>>>>>> I created, it still does not load, so there is some magic going on
>>>>>> that is not obvious. Now trying to import an old model I had in xml
>>>>>> format into Derby. Will then have to reenter the changes since then.
>>>>>> To give you an idea the xmi file is over 10K lines long... Which is
>>>>>> why I persisted for so long in trying to recvoer.
>>>>>>
>>>>>> Thx for your help. I know more, but clearly not enough to create a new
>>>>>> plugin to do the job.
>>>>>
>>>>> Maybe the new repository export/import functionality can help you. It's
>>>>> backend-agnositc and also available through the OSGi console.
>>>>>
>>>>> Cheers
>>>>> /Eike
>>>>>
>>>>> ----
>>>>> http://www.esc-net.de
>>>>> http://thegordian.blogspot.com
>>>>> http://twitter.com/eikestepper
>>>>>
>>>>
>>>
>


Re: [CDO] Net4j old version of h2 Db used in plugin [message #655251 is a reply to message #655231] Fri, 18 February 2011 19:35 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi,

It is a file with data content that matches the ecore model. When you
import your model into the registry you then load a resource that has
data that matches that model. It would have been nice to do that with a
model different to ours to see if my problem was model specific.

I sent my Derby Db to a collegue and he successfully imported the xml
that contained my model data. He then sent me the Derby Db and I used
that for my Repo. It get the same error when I open that resource, so by
a different route I proved that it is not the model. I then realised the
only difference is that I updated to the snapshot CDO 3.0 from the 15th
February (to get the Net4j plugin that accepted V1.3 off H2), his was
the 3.0 release.

I have now tried the release version 3.0 of CDO and still get the same
exception. I have lost 2 days work, but have no choice but to trace CDO
now to see what is wrong. It makes no logical sense that it should be
trying to load a class that it would never have access to, this class is
similar to the generated class from the genmodel file, but not the same,
as the package name is missing - edmmodel.EdmmodelPackage

Thx.

David

On 18/02/11 17:48, Eike Stepper wrote:
> Am 18.02.2011 18:24, schrieb David Wynter:
>> Hi,
>>
>> I went looking for the example model you said was shipping, I looked in
>> org.eclipse.emf.cdo.examples.* jar files
>> and in
>> org.eclipse.emf.cdo.test.* jar files and could not find a paired xmi
>> file with it's ecore file.
>>
>> Where is the example you mention?
>
> I'm not sure, what a paired xmi file is supposed to be. I was talking
> about the org.eclipse.emf.cdo.examples.company model plugin.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>>
>> Thx.
>>
>> David
>>
>>
>> On 17/02/11 13:26, Eike Stepper wrote:
>>> I've never seen that before. Please file a bugzilla with exact steps how
>>> I can reproduce that (have you tried the same thing with the example
>>> model we're shipping?). I'm busy with a customer work at the moment, so
>>> please don't expect me to jump onto this bug immediately ;-)
>>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://www.esc-net.de
>>> http://thegordian.blogspot.com
>>> http://twitter.com/eikestepper
>>>
>>>
>>>
>>> Am 17.02.2011 13:39, schrieb David Wynter:
>>>> Something else I noticed about CDO Explorer. When importing the Roots
>>>> I get 4 of these every single time, in the .log file
>>>>
>>>> !ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
>>>> !MESSAGE Unhandled event loop exception
>>>> !STACK 0
>>>> org.eclipse.swt.SWTException: Failed to execute runnable
>>>> (java.util.ConcurrentModificationException)
>>>> at org.eclipse.swt.SWT.error(SWT.java:4083)
>>>> at org.eclipse.swt.SWT.error(SWT.java:3998)
>>>> at
>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
>>>>
>>>>
>>>> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
>>>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
>>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
>>>> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
>>>> at
>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>>>>
>>>>
>>>> at
>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
>>>>
>>>>
>>>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>>> at
>>>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>>>>
>>>>
>>>> at
>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
>>>>
>>>>
>>>> at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>
>>>>
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
>>>>
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
>>>>
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:616)
>>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>>>> Caused by: java.util.ConcurrentModificationException
>>>> at
>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
>>>>
>>>>
>>>> at
>>>> org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
>>>> at
>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
>>>>
>>>>
>>>> at
>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
>>>>
>>>>
>>>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>> at
>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
>>>>
>>>>
>>>> ... 23 more
>>>>
>>>> David
>>>>
>>>> On 17/02/11 12:26, David Wynter wrote:
>>>>> Yes, I had preivous;ly done that successfully, you helped me in
>>>>> another
>>>>> thread, I think it took 8 attempts with a eclipse restart each time to
>>>>> get success. But this time I have no such luck. Here are my steps
>>>>>
>>>>> I use CDO Session view of my IDE, the view is shipped with
>>>>> org.eclipse.emf.cdo.ui plug-in. The steps are:
>>>>> 1. Establish a connection to a CDO server
>>>>> 2. Import my model into the Registry
>>>>> 3. Open a transaction
>>>>> 4. Create a resource
>>>>> 5. Commit
>>>>> 6. Go to the resource editor by double clicking the created resource.
>>>>> 7. In the context menu select Import Roots and import my content.xml
>>>>> document.
>>>>> 8. Commit the transaction.
>>>>>
>>>>> At step 8 I get this:
>>>>>
>>>>> org.eclipse.net4j.signal.RemoteException:
>>>>> org.eclipse.emf.common.util.WrappedException:
>>>>> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
>>>>> at
>>>>> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>>>>>
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Not sure what I am missing here. I restart Eclipse and the CDO Server
>>>>> each attempt and start with a new Resource each time. I get consistent
>>>>> results. It look slike to me that my EMF project where I developed
>>>>> this
>>>>> model needs somehow to be on the CDO Explorer's classpath?
>>>>>
>>>>> thx.
>>>>>
>>>>> David
>>>>>
>>>>> On 17/02/11 11:15, Eike Stepper wrote:
>>>>>> Am 17.02.2011 11:46, schrieb David Wynter:
>>>>>>> Hi,
>>>>>>>
>>>>>>> The problem for H2 users is that as of V1.2.120 the file format for
>>>>>>> the database changed. There is an automatic conversion to the new
>>>>>>> format if you include an additional jar on the classpath, once an
>>>>>>> old
>>>>>>> version is converted there is no going back. I made that mistake,
>>>>>>> wanting to see the data the CDO stored.
>>>>>>>
>>>>>>> I tried stripping out all the signing information from the new h2
>>>>>>> jar
>>>>>>> I created, it still does not load, so there is some magic going on
>>>>>>> that is not obvious. Now trying to import an old model I had in xml
>>>>>>> format into Derby. Will then have to reenter the changes since then.
>>>>>>> To give you an idea the xmi file is over 10K lines long... Which is
>>>>>>> why I persisted for so long in trying to recvoer.
>>>>>>>
>>>>>>> Thx for your help. I know more, but clearly not enough to create
>>>>>>> a new
>>>>>>> plugin to do the job.
>>>>>>
>>>>>> Maybe the new repository export/import functionality can help you.
>>>>>> It's
>>>>>> backend-agnositc and also available through the OSGi console.
>>>>>>
>>>>>> Cheers
>>>>>> /Eike
>>>>>>
>>>>>> ----
>>>>>> http://www.esc-net.de
>>>>>> http://thegordian.blogspot.com
>>>>>> http://twitter.com/eikestepper
>>>>>>
>>>>>
>>>>
>>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #655252 is a reply to message #655251] Fri, 18 February 2011 19:38 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Here is the full stack trace when I try to view that Resource in the
repo in the Resource editor

!ENTRY org.eclipse.net4j 4 0 2011-02-18 19:30:46.654
!MESSAGE java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
!STACK 0
org.eclipse.emf.common.util.WrappedException:
java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
at
org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
at
org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
at
org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
at
org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackagesFromGlobalRegistry(CDOPackageUnitImpl.java:366)
at
org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .load(CDOPackageUnitImpl.java:236)
at
org.eclipse.emf.cdo.internal.common.model.CDOPackageInfoImpl .getEPackage(CDOPackageInfoImpl.java:133)
at
org.eclipse.emf.cdo.internal.common.model.CDOPackageInfoImpl .getEPackage(CDOPackageInfoImpl.java:120)
at
org.eclipse.emf.cdo.internal.common.model.CDOPackageRegistry Impl$MetaInstanceMapperImpl.lookupMetaInstance(CDOPackageReg istryImpl.java:612)
at
org.eclipse.emf.cdo.server.internal.db.MetaDataManager.getMe taInstance(MetaDataManager.java:83)
at
org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.Ob jectTypeCache.getObjectType(ObjectTypeCache.java:108)
at
org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.Ab stractHorizontalMappingStrategy.readObjectType(AbstractHoriz ontalMappingStrategy.java:71)
at
org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.readO bjectType(DBStoreAccessor.java:158)
at
org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.getOb jectType(DBStoreAccessor.java:175)
at
org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.readR evision(DBStoreAccessor.java:200)
at
org.eclipse.emf.cdo.internal.server.Repository.loadRevisions (Repository.java:418)
at
org.eclipse.emf.cdo.internal.common.revision.CDORevisionMana gerImpl.loadRevisions(CDORevisionManagerImpl.java:365)
at
org.eclipse.emf.cdo.internal.common.revision.CDORevisionMana gerImpl.getRevisions(CDORevisionManagerImpl.java:268)
at
org.eclipse.emf.cdo.internal.common.revision.CDORevisionMana gerImpl.getRevision(CDORevisionManagerImpl.java:250)
at
org.eclipse.emf.cdo.spi.common.revision.RevisionInfo.execute (RevisionInfo.java:132)
at
org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadRevis ionsIndication.responding(LoadRevisionsIndication.java:169)
at
org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServer Indication.responding(CDOServerIndication.java:126)
at
org.eclipse.net4j.signal.IndicationWithResponse.doExtendedOu tput(IndicationWithResponse.java:96)
at org.eclipse.net4j.signal.Signal.doOutput(Signal.java:285)
at
org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:65)
at
org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOReadIn dication.execute(CDOReadIndication.java:36)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:240)
at org.eclipse.net4j.signal.Signal.run(Signal.java:146)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInter nal(BundleLoader.java:506)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:422)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(Bund leLoader.java:410)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
org.eclipse.osgi.internal.loader.BundleLoader.loadClass(Bund leLoader.java:338)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:232)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1197)
at
org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:272)
... 29 more

David

On 18/02/11 19:35, David Wynter wrote:
> Hi,
>
> It is a file with data content that matches the ecore model. When you
> import your model into the registry you then load a resource that has
> data that matches that model. It would have been nice to do that with a
> model different to ours to see if my problem was model specific.
>
> I sent my Derby Db to a collegue and he successfully imported the xml
> that contained my model data. He then sent me the Derby Db and I used
> that for my Repo. It get the same error when I open that resource, so by
> a different route I proved that it is not the model. I then realised the
> only difference is that I updated to the snapshot CDO 3.0 from the 15th
> February (to get the Net4j plugin that accepted V1.3 off H2), his was
> the 3.0 release.
>
> I have now tried the release version 3.0 of CDO and still get the same
> exception. I have lost 2 days work, but have no choice but to trace CDO
> now to see what is wrong. It makes no logical sense that it should be
> trying to load a class that it would never have access to, this class is
> similar to the generated class from the genmodel file, but not the same,
> as the package name is missing - edmmodel.EdmmodelPackage
>
> Thx.
>
> David
>
> On 18/02/11 17:48, Eike Stepper wrote:
>> Am 18.02.2011 18:24, schrieb David Wynter:
>>> Hi,
>>>
>>> I went looking for the example model you said was shipping, I looked in
>>> org.eclipse.emf.cdo.examples.* jar files
>>> and in
>>> org.eclipse.emf.cdo.test.* jar files and could not find a paired xmi
>>> file with it's ecore file.
>>>
>>> Where is the example you mention?
>>
>> I'm not sure, what a paired xmi file is supposed to be. I was talking
>> about the org.eclipse.emf.cdo.examples.company model plugin.
>>
>> Cheers
>> /Eike
>>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #655305 is a reply to message #655251] Sat, 19 February 2011 05:39 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 18.02.2011 20:35, schrieb David Wynter:
> Hi,
>
> It is a file with data content that matches the ecore model. When you import your model into the registry you then load a resource that has data that matches that model. It would have been nice to do that with a model different to ours to see if my problem was model specific.

I don't see why you can't create any instance of your choice from one of our example models. Why should we provide example instances while it is so easy to create them with EMF? I guess that we have a major misunderstanding here ;-)


> I sent my Derby Db to a collegue and he successfully imported the xml that contained my model data. He then sent me the Derby Db and I used that for my Repo. It get the same error when I open that resource, so by a different route I proved that it is not the model. I then realised the only difference is that I updated to the snapshot CDO 3.0 from the 15th February (to get the Net4j plugin that accepted V1.3 off H2), his was the 3.0 release.

Internally our Helios SR2 version is of course a little different from the original Helios release because we fixed a number of bugs in maintenance. Still it may be the case that not all bugs that have been identified and fixed in HEAD have also been backported to maintenance. Have you already tried a 4.0 build?

> I have now tried the release version 3.0 of CDO and still get the same exception. I have lost 2 days work, but have no choice but to trace CDO now to see what is wrong. It makes no logical sense that it should be trying to load a class that it would never have access to, this class is similar to the generated class from the genmodel file, but not the same, as the package name is missing - edmmodel.EdmmodelPackage

The stacktrace in your newer post sugests that you have a package registry issue on the server. I'm not yet sure how that's related to the ConcurrentModificationException in your UI. Some questions:

1. Are your models generated? Have you followed http://wiki.eclipse.org/CDO/Preparing_EMF_Models ?
2. Does your model consist of multiple GenModels? Are they interrelated?
3. Do you have nested EPackages? Are they interrelated?
4. Do all packages have proper nsURIs? Do they match the nsURIs in your plugin.xml?
5. Does your model instance include "meta references" (references to EModelElements)?

Cheers
/Eike

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



>
> Thx.
>
> David
>
> On 18/02/11 17:48, Eike Stepper wrote:
>> Am 18.02.2011 18:24, schrieb David Wynter:
>>> Hi,
>>>
>>> I went looking for the example model you said was shipping, I looked in
>>> org.eclipse.emf.cdo.examples.* jar files
>>> and in
>>> org.eclipse.emf.cdo.test.* jar files and could not find a paired xmi
>>> file with it's ecore file.
>>>
>>> Where is the example you mention?
>>
>> I'm not sure, what a paired xmi file is supposed to be. I was talking
>> about the org.eclipse.emf.cdo.examples.company model plugin.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>>
>>> Thx.
>>>
>>> David
>>>
>>>
>>> On 17/02/11 13:26, Eike Stepper wrote:
>>>> I've never seen that before. Please file a bugzilla with exact steps how
>>>> I can reproduce that (have you tried the same thing with the example
>>>> model we're shipping?). I'm busy with a customer work at the moment, so
>>>> please don't expect me to jump onto this bug immediately ;-)
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>> ----
>>>> http://www.esc-net.de
>>>> http://thegordian.blogspot.com
>>>> http://twitter.com/eikestepper
>>>>
>>>>
>>>>
>>>> Am 17.02.2011 13:39, schrieb David Wynter:
>>>>> Something else I noticed about CDO Explorer. When importing the Roots
>>>>> I get 4 of these every single time, in the .log file
>>>>>
>>>>> !ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
>>>>> !MESSAGE Unhandled event loop exception
>>>>> !STACK 0
>>>>> org.eclipse.swt.SWTException: Failed to execute runnable
>>>>> (java.util.ConcurrentModificationException)
>>>>> at org.eclipse.swt.SWT.error(SWT.java:4083)
>>>>> at org.eclipse.swt.SWT.error(SWT.java:3998)
>>>>> at
>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
>>>>>
>>>>>
>>>>> at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
>>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
>>>>> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
>>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
>>>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
>>>>> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
>>>>> at
>>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
>>>>>
>>>>>
>>>>> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>>>> at
>>>>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>
>>>>>
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>> at
>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
>>>>>
>>>>>
>>>>> at
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
>>>>>
>>>>>
>>>>> at java.lang.reflect.Method.invoke(Method.java:616)
>>>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>>>>> Caused by: java.util.ConcurrentModificationException
>>>>> at
>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
>>>>> at
>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
>>>>>
>>>>>
>>>>> at
>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
>>>>>
>>>>>
>>>>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>>> at
>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
>>>>>
>>>>>
>>>>> ... 23 more
>>>>>
>>>>> David
>>>>>
>>>>> On 17/02/11 12:26, David Wynter wrote:
>>>>>> Yes, I had preivous;ly done that successfully, you helped me in
>>>>>> another
>>>>>> thread, I think it took 8 attempts with a eclipse restart each time to
>>>>>> get success. But this time I have no such luck. Here are my steps
>>>>>>
>>>>>> I use CDO Session view of my IDE, the view is shipped with
>>>>>> org.eclipse.emf.cdo.ui plug-in. The steps are:
>>>>>> 1. Establish a connection to a CDO server
>>>>>> 2. Import my model into the Registry
>>>>>> 3. Open a transaction
>>>>>> 4. Create a resource
>>>>>> 5. Commit
>>>>>> 6. Go to the resource editor by double clicking the created resource.
>>>>>> 7. In the context menu select Import Roots and import my content.xml
>>>>>> document.
>>>>>> 8. Commit the transaction.
>>>>>>
>>>>>> At step 8 I get this:
>>>>>>
>>>>>> org.eclipse.net4j.signal.RemoteException:
>>>>>> org.eclipse.emf.common.util.WrappedException:
>>>>>> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
>>>>>> at
>>>>>> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Not sure what I am missing here. I restart Eclipse and the CDO Server
>>>>>> each attempt and start with a new Resource each time. I get consistent
>>>>>> results. It look slike to me that my EMF project where I developed
>>>>>> this
>>>>>> model needs somehow to be on the CDO Explorer's classpath?
>>>>>>
>>>>>> thx.
>>>>>>
>>>>>> David
>>>>>>
>>>>>> On 17/02/11 11:15, Eike Stepper wrote:
>>>>>>> Am 17.02.2011 11:46, schrieb David Wynter:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> The problem for H2 users is that as of V1.2.120 the file format for
>>>>>>>> the database changed. There is an automatic conversion to the new
>>>>>>>> format if you include an additional jar on the classpath, once an
>>>>>>>> old
>>>>>>>> version is converted there is no going back. I made that mistake,
>>>>>>>> wanting to see the data the CDO stored.
>>>>>>>>
>>>>>>>> I tried stripping out all the signing information from the new h2
>>>>>>>> jar
>>>>>>>> I created, it still does not load, so there is some magic going on
>>>>>>>> that is not obvious. Now trying to import an old model I had in xml
>>>>>>>> format into Derby. Will then have to reenter the changes since then.
>>>>>>>> To give you an idea the xmi file is over 10K lines long... Which is
>>>>>>>> why I persisted for so long in trying to recvoer.
>>>>>>>>
>>>>>>>> Thx for your help. I know more, but clearly not enough to create
>>>>>>>> a new
>>>>>>>> plugin to do the job.
>>>>>>>
>>>>>>> Maybe the new repository export/import functionality can help you.
>>>>>>> It's
>>>>>>> backend-agnositc and also available through the OSGi console.
>>>>>>>
>>>>>>> Cheers
>>>>>>> /Eike
>>>>>>>
>>>>>>> ----
>>>>>>> http://www.esc-net.de
>>>>>>> http://thegordian.blogspot.com
>>>>>>> http://twitter.com/eikestepper
>>>>>>>
>>>>>>
>>>>>
>>>
>


Re: [CDO] Net4j old version of h2 Db used in plugin [message #655322 is a reply to message #655305] Sat, 19 February 2011 12:22 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi,

Yes, it was a major misunderstanding, takes a while to get a grip on all
this new stuff. I found the problem. I have a separate project in my
workspace with a ecore of the same name that is a cut down version of
the one I am attempting to load, trying to do the right thing in cutting
down the complexity for someone that only needs part of the model.

When I break on line 272 of RegistryReader.class I see that
element.getDeclaringExtension().getContributor().getName()
returns the name of this partial model. I probably accidently loaded
that into the registry. I tried renaming that partial model ecore, but
it appears that once you have imported a model into the registry with
the CDO Explorer there is no way of removing it.

I later found that it scans my workspace and it registers the first
ecore of that same name it comes to, and that is not the right one. I
removed the project from my workspace to be sure. It now works.

It uses "-dev
file:/home/david/workspace/.metadata/.plugins/org.eclipse.pd e.core/CDO_Client/dev.properties "
to list the packages it registers. So I could have renamed my partial
model ecore to a different package and edited this file to make sure it
got the right ecore.

Also the UI thread exception appears harmless and is unrelated to the
issue I have with loading resources, just a bit of a red herring.

Strictly I have to wait for CDO 4.0 to be a release version before using
it. This I assume will be the next Eclipse release?

Thx for your help. In the end a mistake on my part then and obscure
consequence of that mistake lost me a lot of time.

David


On 19/02/11 05:39, Eike Stepper wrote:
> Am 18.02.2011 20:35, schrieb David Wynter:
>> Hi,
>>
>> It is a file with data content that matches the ecore model. When you
>> import your model into the registry you then load a resource that has
>> data that matches that model. It would have been nice to do that with
>> a model different to ours to see if my problem was model specific.
>
> I don't see why you can't create any instance of your choice from one of
> our example models. Why should we provide example instances while it is
> so easy to create them with EMF? I guess that we have a major
> misunderstanding here ;-)
>
>
>> I sent my Derby Db to a collegue and he successfully imported the xml
>> that contained my model data. He then sent me the Derby Db and I used
>> that for my Repo. It get the same error when I open that resource, so
>> by a different route I proved that it is not the model. I then
>> realised the only difference is that I updated to the snapshot CDO 3.0
>> from the 15th February (to get the Net4j plugin that accepted V1.3 off
>> H2), his was the 3.0 release.
>
> Internally our Helios SR2 version is of course a little different from
> the original Helios release because we fixed a number of bugs in
> maintenance. Still it may be the case that not all bugs that have been
> identified and fixed in HEAD have also been backported to maintenance.
> Have you already tried a 4.0 build?
>
>> I have now tried the release version 3.0 of CDO and still get the same
>> exception. I have lost 2 days work, but have no choice but to trace
>> CDO now to see what is wrong. It makes no logical sense that it should
>> be trying to load a class that it would never have access to, this
>> class is similar to the generated class from the genmodel file, but
>> not the same, as the package name is missing - edmmodel.EdmmodelPackage
>
> The stacktrace in your newer post sugests that you have a package
> registry issue on the server. I'm not yet sure how that's related to the
> ConcurrentModificationException in your UI. Some questions:
>
> 1. Are your models generated? Have you followed
> http://wiki.eclipse.org/CDO/Preparing_EMF_Models ?
> 2. Does your model consist of multiple GenModels? Are they interrelated?
> 3. Do you have nested EPackages? Are they interrelated?
> 4. Do all packages have proper nsURIs? Do they match the nsURIs in your
> plugin.xml?
> 5. Does your model instance include "meta references" (references to
> EModelElements)?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>
>>
>> Thx.
>>
>> David
>>
>> On 18/02/11 17:48, Eike Stepper wrote:
>>> Am 18.02.2011 18:24, schrieb David Wynter:
>>>> Hi,
>>>>
>>>> I went looking for the example model you said was shipping, I looked in
>>>> org.eclipse.emf.cdo.examples.* jar files
>>>> and in
>>>> org.eclipse.emf.cdo.test.* jar files and could not find a paired xmi
>>>> file with it's ecore file.
>>>>
>>>> Where is the example you mention?
>>>
>>> I'm not sure, what a paired xmi file is supposed to be. I was talking
>>> about the org.eclipse.emf.cdo.examples.company model plugin.
>>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://www.esc-net.de
>>> http://thegordian.blogspot.com
>>> http://twitter.com/eikestepper
>>>
>>>
>>>>
>>>> Thx.
>>>>
>>>> David
>>>>
>>>>
>>>> On 17/02/11 13:26, Eike Stepper wrote:
>>>>> I've never seen that before. Please file a bugzilla with exact
>>>>> steps how
>>>>> I can reproduce that (have you tried the same thing with the example
>>>>> model we're shipping?). I'm busy with a customer work at the
>>>>> moment, so
>>>>> please don't expect me to jump onto this bug immediately ;-)
>>>>>
>>>>> Cheers
>>>>> /Eike
>>>>>
>>>>> ----
>>>>> http://www.esc-net.de
>>>>> http://thegordian.blogspot.com
>>>>> http://twitter.com/eikestepper
>>>>>
>>>>>
>>>>>
>>>>> Am 17.02.2011 13:39, schrieb David Wynter:
>>>>>> Something else I noticed about CDO Explorer. When importing the Roots
>>>>>> I get 4 of these every single time, in the .log file
>>>>>>
>>>>>> !ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
>>>>>> !MESSAGE Unhandled event loop exception
>>>>>> !STACK 0
>>>>>> org.eclipse.swt.SWTException: Failed to execute runnable
>>>>>> (java.util.ConcurrentModificationException)
>>>>>> at org.eclipse.swt.SWT.error(SWT.java:4083)
>>>>>> at org.eclipse.swt.SWT.error(SWT.java:3998)
>>>>>> at
>>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
>>>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
>>>>>> at
>>>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
>>>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
>>>>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
>>>>>> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
>>>>>> at
>>>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>>>>> at
>>>>>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>> at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at java.lang.reflect.Method.invoke(Method.java:616)
>>>>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>>>>>> Caused by: java.util.ConcurrentModificationException
>>>>>> at
>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
>>>>>> at
>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at
>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
>>>>>>
>>>>>>
>>>>>>
>>>>>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>>>> at
>>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
>>>>>>
>>>>>>
>>>>>>
>>>>>> ... 23 more
>>>>>>
>>>>>> David
>>>>>>
>>>>>> On 17/02/11 12:26, David Wynter wrote:
>>>>>>> Yes, I had preivous;ly done that successfully, you helped me in
>>>>>>> another
>>>>>>> thread, I think it took 8 attempts with a eclipse restart each
>>>>>>> time to
>>>>>>> get success. But this time I have no such luck. Here are my steps
>>>>>>>
>>>>>>> I use CDO Session view of my IDE, the view is shipped with
>>>>>>> org.eclipse.emf.cdo.ui plug-in. The steps are:
>>>>>>> 1. Establish a connection to a CDO server
>>>>>>> 2. Import my model into the Registry
>>>>>>> 3. Open a transaction
>>>>>>> 4. Create a resource
>>>>>>> 5. Commit
>>>>>>> 6. Go to the resource editor by double clicking the created
>>>>>>> resource.
>>>>>>> 7. In the context menu select Import Roots and import my content.xml
>>>>>>> document.
>>>>>>> 8. Commit the transaction.
>>>>>>>
>>>>>>> At step 8 I get this:
>>>>>>>
>>>>>>> org.eclipse.net4j.signal.RemoteException:
>>>>>>> org.eclipse.emf.common.util.WrappedException:
>>>>>>> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Not sure what I am missing here. I restart Eclipse and the CDO
>>>>>>> Server
>>>>>>> each attempt and start with a new Resource each time. I get
>>>>>>> consistent
>>>>>>> results. It look slike to me that my EMF project where I developed
>>>>>>> this
>>>>>>> model needs somehow to be on the CDO Explorer's classpath?
>>>>>>>
>>>>>>> thx.
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> On 17/02/11 11:15, Eike Stepper wrote:
>>>>>>>> Am 17.02.2011 11:46, schrieb David Wynter:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> The problem for H2 users is that as of V1.2.120 the file format
>>>>>>>>> for
>>>>>>>>> the database changed. There is an automatic conversion to the new
>>>>>>>>> format if you include an additional jar on the classpath, once an
>>>>>>>>> old
>>>>>>>>> version is converted there is no going back. I made that mistake,
>>>>>>>>> wanting to see the data the CDO stored.
>>>>>>>>>
>>>>>>>>> I tried stripping out all the signing information from the new h2
>>>>>>>>> jar
>>>>>>>>> I created, it still does not load, so there is some magic going on
>>>>>>>>> that is not obvious. Now trying to import an old model I had in
>>>>>>>>> xml
>>>>>>>>> format into Derby. Will then have to reenter the changes since
>>>>>>>>> then.
>>>>>>>>> To give you an idea the xmi file is over 10K lines long...
>>>>>>>>> Which is
>>>>>>>>> why I persisted for so long in trying to recvoer.
>>>>>>>>>
>>>>>>>>> Thx for your help. I know more, but clearly not enough to create
>>>>>>>>> a new
>>>>>>>>> plugin to do the job.
>>>>>>>>
>>>>>>>> Maybe the new repository export/import functionality can help you.
>>>>>>>> It's
>>>>>>>> backend-agnositc and also available through the OSGi console.
>>>>>>>>
>>>>>>>> Cheers
>>>>>>>> /Eike
>>>>>>>>
>>>>>>>> ----
>>>>>>>> http://www.esc-net.de
>>>>>>>> http://thegordian.blogspot.com
>>>>>>>> http://twitter.com/eikestepper
>>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #655323 is a reply to message #655322] Sat, 19 February 2011 12:41 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 19.02.2011 13:22, schrieb David Wynter:
> Hi,
>
> Yes, it was a major misunderstanding, takes a while to get a grip on all this new stuff. I found the problem. I have a separate project in my workspace with a ecore of the same name that is a cut down version of the one I am attempting to load, trying to do the right thing in cutting down the complexity for someone that only needs part of the model.
>
> When I break on line 272 of RegistryReader.class I see that
> element.getDeclaringExtension().getContributor().getName()
> returns the name of this partial model. I probably accidently loaded that into the registry. I tried renaming that partial model ecore, but it appears that once you have imported a model into the registry with the CDO Explorer there is no way of removing it.

What exactly do you mean by CDOExplorer? Our CNF integration?

> I later found that it scans my workspace

"it" == something in CDO? That would be new to me (also a new feeling for me :P )

> and it registers the first ecore of that same name it comes to, and that is not the right one. I removed the project from my workspace to be sure. It now works.
>
> It uses "-dev file:/home/david/workspace/.metadata/.plugins/org.eclipse.pd e.core/CDO_Client/dev.properties " to list the packages it registers. So I could have renamed my partial model ecore to a different package and edited this file to make sure it got the right ecore.
>
> Also the UI thread exception appears harmless and is unrelated to the issue I have with loading resources, just a bit of a red herring.
>
> Strictly I have to wait for CDO 4.0 to be a release version before using it. This I assume will be the next Eclipse release?

Yes, CDO 4.0 will be final together with Indigo in June.

> Thx for your help. In the end a mistake on my part then and obscure consequence of that mistake lost me a lot of time.

Good that you solved it!

Cheers
/Eike

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


>
> David
>
>
> On 19/02/11 05:39, Eike Stepper wrote:
>> Am 18.02.2011 20:35, schrieb David Wynter:
>>> Hi,
>>>
>>> It is a file with data content that matches the ecore model. When you
>>> import your model into the registry you then load a resource that has
>>> data that matches that model. It would have been nice to do that with
>>> a model different to ours to see if my problem was model specific.
>>
>> I don't see why you can't create any instance of your choice from one of
>> our example models. Why should we provide example instances while it is
>> so easy to create them with EMF? I guess that we have a major
>> misunderstanding here ;-)
>>
>>
>>> I sent my Derby Db to a collegue and he successfully imported the xml
>>> that contained my model data. He then sent me the Derby Db and I used
>>> that for my Repo. It get the same error when I open that resource, so
>>> by a different route I proved that it is not the model. I then
>>> realised the only difference is that I updated to the snapshot CDO 3.0
>>> from the 15th February (to get the Net4j plugin that accepted V1.3 off
>>> H2), his was the 3.0 release.
>>
>> Internally our Helios SR2 version is of course a little different from
>> the original Helios release because we fixed a number of bugs in
>> maintenance. Still it may be the case that not all bugs that have been
>> identified and fixed in HEAD have also been backported to maintenance.
>> Have you already tried a 4.0 build?
>>
>>> I have now tried the release version 3.0 of CDO and still get the same
>>> exception. I have lost 2 days work, but have no choice but to trace
>>> CDO now to see what is wrong. It makes no logical sense that it should
>>> be trying to load a class that it would never have access to, this
>>> class is similar to the generated class from the genmodel file, but
>>> not the same, as the package name is missing - edmmodel.EdmmodelPackage
>>
>> The stacktrace in your newer post sugests that you have a package
>> registry issue on the server. I'm not yet sure how that's related to the
>> ConcurrentModificationException in your UI. Some questions:
>>
>> 1. Are your models generated? Have you followed
>> http://wiki.eclipse.org/CDO/Preparing_EMF_Models ?
>> 2. Does your model consist of multiple GenModels? Are they interrelated?
>> 3. Do you have nested EPackages? Are they interrelated?
>> 4. Do all packages have proper nsURIs? Do they match the nsURIs in your
>> plugin.xml?
>> 5. Does your model instance include "meta references" (references to
>> EModelElements)?
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>
>>>
>>> Thx.
>>>
>>> David
>>>
>>> On 18/02/11 17:48, Eike Stepper wrote:
>>>> Am 18.02.2011 18:24, schrieb David Wynter:
>>>>> Hi,
>>>>>
>>>>> I went looking for the example model you said was shipping, I looked in
>>>>> org.eclipse.emf.cdo.examples.* jar files
>>>>> and in
>>>>> org.eclipse.emf.cdo.test.* jar files and could not find a paired xmi
>>>>> file with it's ecore file.
>>>>>
>>>>> Where is the example you mention?
>>>>
>>>> I'm not sure, what a paired xmi file is supposed to be. I was talking
>>>> about the org.eclipse.emf.cdo.examples.company model plugin.
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>> ----
>>>> http://www.esc-net.de
>>>> http://thegordian.blogspot.com
>>>> http://twitter.com/eikestepper
>>>>
>>>>
>>>>>
>>>>> Thx.
>>>>>
>>>>> David
>>>>>
>>>>>
>>>>> On 17/02/11 13:26, Eike Stepper wrote:
>>>>>> I've never seen that before. Please file a bugzilla with exact
>>>>>> steps how
>>>>>> I can reproduce that (have you tried the same thing with the example
>>>>>> model we're shipping?). I'm busy with a customer work at the
>>>>>> moment, so
>>>>>> please don't expect me to jump onto this bug immediately ;-)
>>>>>>
>>>>>> Cheers
>>>>>> /Eike
>>>>>>
>>>>>> ----
>>>>>> http://www.esc-net.de
>>>>>> http://thegordian.blogspot.com
>>>>>> http://twitter.com/eikestepper
>>>>>>
>>>>>>
>>>>>>
>>>>>> Am 17.02.2011 13:39, schrieb David Wynter:
>>>>>>> Something else I noticed about CDO Explorer. When importing the Roots
>>>>>>> I get 4 of these every single time, in the .log file
>>>>>>>
>>>>>>> !ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
>>>>>>> !MESSAGE Unhandled event loop exception
>>>>>>> !STACK 0
>>>>>>> org.eclipse.swt.SWTException: Failed to execute runnable
>>>>>>> (java.util.ConcurrentModificationException)
>>>>>>> at org.eclipse.swt.SWT.error(SWT.java:4083)
>>>>>>> at org.eclipse.swt.SWT.error(SWT.java:3998)
>>>>>>> at
>>>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
>>>>>>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
>>>>>>> at
>>>>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
>>>>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
>>>>>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
>>>>>>> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
>>>>>>> at
>>>>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>>>>>> at
>>>>>>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>> at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at java.lang.reflect.Method.invoke(Method.java:616)
>>>>>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
>>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
>>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>>>>>>> Caused by: java.util.ConcurrentModificationException
>>>>>>> at
>>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
>>>>>>> at
>>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at
>>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>>>>> at
>>>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ... 23 more
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>> On 17/02/11 12:26, David Wynter wrote:
>>>>>>>> Yes, I had preivous;ly done that successfully, you helped me in
>>>>>>>> another
>>>>>>>> thread, I think it took 8 attempts with a eclipse restart each
>>>>>>>> time to
>>>>>>>> get success. But this time I have no such luck. Here are my steps
>>>>>>>>
>>>>>>>> I use CDO Session view of my IDE, the view is shipped with
>>>>>>>> org.eclipse.emf.cdo.ui plug-in. The steps are:
>>>>>>>> 1. Establish a connection to a CDO server
>>>>>>>> 2. Import my model into the Registry
>>>>>>>> 3. Open a transaction
>>>>>>>> 4. Create a resource
>>>>>>>> 5. Commit
>>>>>>>> 6. Go to the resource editor by double clicking the created
>>>>>>>> resource.
>>>>>>>> 7. In the context menu select Import Roots and import my content.xml
>>>>>>>> document.
>>>>>>>> 8. Commit the transaction.
>>>>>>>>
>>>>>>>> At step 8 I get this:
>>>>>>>>
>>>>>>>> org.eclipse.net4j.signal.RemoteException:
>>>>>>>> org.eclipse.emf.common.util.WrappedException:
>>>>>>>> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Not sure what I am missing here. I restart Eclipse and the CDO
>>>>>>>> Server
>>>>>>>> each attempt and start with a new Resource each time. I get
>>>>>>>> consistent
>>>>>>>> results. It look slike to me that my EMF project where I developed
>>>>>>>> this
>>>>>>>> model needs somehow to be on the CDO Explorer's classpath?
>>>>>>>>
>>>>>>>> thx.
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>> On 17/02/11 11:15, Eike Stepper wrote:
>>>>>>>>> Am 17.02.2011 11:46, schrieb David Wynter:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> The problem for H2 users is that as of V1.2.120 the file format
>>>>>>>>>> for
>>>>>>>>>> the database changed. There is an automatic conversion to the new
>>>>>>>>>> format if you include an additional jar on the classpath, once an
>>>>>>>>>> old
>>>>>>>>>> version is converted there is no going back. I made that mistake,
>>>>>>>>>> wanting to see the data the CDO stored.
>>>>>>>>>>
>>>>>>>>>> I tried stripping out all the signing information from the new h2
>>>>>>>>>> jar
>>>>>>>>>> I created, it still does not load, so there is some magic going on
>>>>>>>>>> that is not obvious. Now trying to import an old model I had in
>>>>>>>>>> xml
>>>>>>>>>> format into Derby. Will then have to reenter the changes since
>>>>>>>>>> then.
>>>>>>>>>> To give you an idea the xmi file is over 10K lines long...
>>>>>>>>>> Which is
>>>>>>>>>> why I persisted for so long in trying to recvoer.
>>>>>>>>>>
>>>>>>>>>> Thx for your help. I know more, but clearly not enough to create
>>>>>>>>>> a new
>>>>>>>>>> plugin to do the job.
>>>>>>>>>
>>>>>>>>> Maybe the new repository export/import functionality can help you.
>>>>>>>>> It's
>>>>>>>>> backend-agnositc and also available through the OSGi console.
>>>>>>>>>
>>>>>>>>> Cheers
>>>>>>>>> /Eike
>>>>>>>>>
>>>>>>>>> ----
>>>>>>>>> http://www.esc-net.de
>>>>>>>>> http://thegordian.blogspot.com
>>>>>>>>> http://twitter.com/eikestepper
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>
>>>
>


Re: [CDO] Net4j old version of h2 Db used in plugin [message #655331 is a reply to message #655323] Sat, 19 February 2011 13:43 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
On 19/02/11 12:41, Eike Stepper wrote:
> Am 19.02.2011 13:22, schrieb David Wynter:
>> Hi,
>>
>> Yes, it was a major misunderstanding, takes a while to get a grip on
>> all this new stuff. I found the problem. I have a separate project in
>> my workspace with a ecore of the same name that is a cut down version
>> of the one I am attempting to load, trying to do the right thing in
>> cutting down the complexity for someone that only needs part of the
>> model.
>>
>> When I break on line 272 of RegistryReader.class I see that
>> element.getDeclaringExtension().getContributor().getName()
>> returns the name of this partial model. I probably accidently loaded
>> that into the registry. I tried renaming that partial model ecore, but
>> it appears that once you have imported a model into the registry with
>> the CDO Explorer there is no way of removing it.
>
> What exactly do you mean by CDOExplorer? Our CNF integration?
>
Actually that is a misnomer, it is actually the
org.eclipse.emf.cdo.server.product in a Debug config that loads the
models in registry, here is the console message when I launch it

BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments: -product org.eclipse.emf.cdo.server.product
Command-line arguments: -product org.eclipse.emf.cdo.server.product
-data /home/david/workspace/com.example.mdwmui/cdo -dev
file:/home/david/workspace/.metadata/.plugins/org.eclipse.pd e.core/CDO_Client/dev.properties
-os linux -ws gtk -arch x86_64 -consoleLog

>> I later found that it scans my workspace
>
> "it" == something in CDO? That would be new to me (also a new feeling
> for me :P )
The dev.properties file in that command line above contains entries for
all the projects that have ecore models in my workspace with a timestamp
that matches when I run the Debug task for starting my CDO repo at the
top, like so

#Sat Feb 19 12:12:05 GMT 2011
Algo=bin
org.eclipse.emf.cdo.examples.hibernate.client=bin
....

So I assumed it, "org.eclipse.emf.cdo.server.product", was scanning the
workspace and building that file.

David
>
>> and it registers the first ecore of that same name it comes to, and
>> that is not the right one. I removed the project from my workspace to
>> be sure. It now works.
>>
>> It uses "-dev
>> file:/home/david/workspace/.metadata/.plugins/org.eclipse.pd e.core/CDO_Client/dev.properties "
>> to list the packages it registers. So I could have renamed my partial
>> model ecore to a different package and edited this file to make sure
>> it got the right ecore.
>>
>> Also the UI thread exception appears harmless and is unrelated to the
>> issue I have with loading resources, just a bit of a red herring.
>>
>> Strictly I have to wait for CDO 4.0 to be a release version before
>> using it. This I assume will be the next Eclipse release?
>
> Yes, CDO 4.0 will be final together with Indigo in June.
>
>> Thx for your help. In the end a mistake on my part then and obscure
>> consequence of that mistake lost me a lot of time.
>
> Good that you solved it!
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>>
>> David
>>
>>
>> On 19/02/11 05:39, Eike Stepper wrote:
>>> Am 18.02.2011 20:35, schrieb David Wynter:
>>>> Hi,
>>>>
>>>> It is a file with data content that matches the ecore model. When you
>>>> import your model into the registry you then load a resource that has
>>>> data that matches that model. It would have been nice to do that with
>>>> a model different to ours to see if my problem was model specific.
>>>
>>> I don't see why you can't create any instance of your choice from one of
>>> our example models. Why should we provide example instances while it is
>>> so easy to create them with EMF? I guess that we have a major
>>> misunderstanding here ;-)
>>>
>>>
>>>> I sent my Derby Db to a collegue and he successfully imported the xml
>>>> that contained my model data. He then sent me the Derby Db and I used
>>>> that for my Repo. It get the same error when I open that resource, so
>>>> by a different route I proved that it is not the model. I then
>>>> realised the only difference is that I updated to the snapshot CDO 3.0
>>>> from the 15th February (to get the Net4j plugin that accepted V1.3 off
>>>> H2), his was the 3.0 release.
>>>
>>> Internally our Helios SR2 version is of course a little different from
>>> the original Helios release because we fixed a number of bugs in
>>> maintenance. Still it may be the case that not all bugs that have been
>>> identified and fixed in HEAD have also been backported to maintenance.
>>> Have you already tried a 4.0 build?
>>>
>>>> I have now tried the release version 3.0 of CDO and still get the same
>>>> exception. I have lost 2 days work, but have no choice but to trace
>>>> CDO now to see what is wrong. It makes no logical sense that it should
>>>> be trying to load a class that it would never have access to, this
>>>> class is similar to the generated class from the genmodel file, but
>>>> not the same, as the package name is missing - edmmodel.EdmmodelPackage
>>>
>>> The stacktrace in your newer post sugests that you have a package
>>> registry issue on the server. I'm not yet sure how that's related to the
>>> ConcurrentModificationException in your UI. Some questions:
>>>
>>> 1. Are your models generated? Have you followed
>>> http://wiki.eclipse.org/CDO/Preparing_EMF_Models ?
>>> 2. Does your model consist of multiple GenModels? Are they interrelated?
>>> 3. Do you have nested EPackages? Are they interrelated?
>>> 4. Do all packages have proper nsURIs? Do they match the nsURIs in your
>>> plugin.xml?
>>> 5. Does your model instance include "meta references" (references to
>>> EModelElements)?
>>>
>>> Cheers
>>> /Eike
>>>
>>> ----
>>> http://www.esc-net.de
>>> http://thegordian.blogspot.com
>>> http://twitter.com/eikestepper
>>>
>>>
>>>
>>>>
>>>> Thx.
>>>>
>>>> David
>>>>
>>>> On 18/02/11 17:48, Eike Stepper wrote:
>>>>> Am 18.02.2011 18:24, schrieb David Wynter:
>>>>>> Hi,
>>>>>>
>>>>>> I went looking for the example model you said was shipping, I
>>>>>> looked in
>>>>>> org.eclipse.emf.cdo.examples.* jar files
>>>>>> and in
>>>>>> org.eclipse.emf.cdo.test.* jar files and could not find a paired xmi
>>>>>> file with it's ecore file.
>>>>>>
>>>>>> Where is the example you mention?
>>>>>
>>>>> I'm not sure, what a paired xmi file is supposed to be. I was talking
>>>>> about the org.eclipse.emf.cdo.examples.company model plugin.
>>>>>
>>>>> Cheers
>>>>> /Eike
>>>>>
>>>>> ----
>>>>> http://www.esc-net.de
>>>>> http://thegordian.blogspot.com
>>>>> http://twitter.com/eikestepper
>>>>>
>>>>>
>>>>>>
>>>>>> Thx.
>>>>>>
>>>>>> David
>>>>>>
>>>>>>
>>>>>> On 17/02/11 13:26, Eike Stepper wrote:
>>>>>>> I've never seen that before. Please file a bugzilla with exact
>>>>>>> steps how
>>>>>>> I can reproduce that (have you tried the same thing with the example
>>>>>>> model we're shipping?). I'm busy with a customer work at the
>>>>>>> moment, so
>>>>>>> please don't expect me to jump onto this bug immediately ;-)
>>>>>>>
>>>>>>> Cheers
>>>>>>> /Eike
>>>>>>>
>>>>>>> ----
>>>>>>> http://www.esc-net.de
>>>>>>> http://thegordian.blogspot.com
>>>>>>> http://twitter.com/eikestepper
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Am 17.02.2011 13:39, schrieb David Wynter:
>>>>>>>> Something else I noticed about CDO Explorer. When importing the
>>>>>>>> Roots
>>>>>>>> I get 4 of these every single time, in the .log file
>>>>>>>>
>>>>>>>> !ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
>>>>>>>> !MESSAGE Unhandled event loop exception
>>>>>>>> !STACK 0
>>>>>>>> org.eclipse.swt.SWTException: Failed to execute runnable
>>>>>>>> (java.util.ConcurrentModificationException)
>>>>>>>> at org.eclipse.swt.SWT.error(SWT.java:4083)
>>>>>>>> at org.eclipse.swt.SWT.error(SWT.java:3998)
>>>>>>>> at
>>>>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
>>>>>>>> at
>>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
>>>>>>>> at
>>>>>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
>>>>>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
>>>>>>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
>>>>>>>> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
>>>>>>>> at
>>>>>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>> at
>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:616)
>>>>>>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
>>>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
>>>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>>>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>>>>>>>> Caused by: java.util.ConcurrentModificationException
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at
>>>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>>>>>> at
>>>>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ... 23 more
>>>>>>>>
>>>>>>>> David
>>>>>>>>
>>>>>>>> On 17/02/11 12:26, David Wynter wrote:
>>>>>>>>> Yes, I had preivous;ly done that successfully, you helped me in
>>>>>>>>> another
>>>>>>>>> thread, I think it took 8 attempts with a eclipse restart each
>>>>>>>>> time to
>>>>>>>>> get success. But this time I have no such luck. Here are my steps
>>>>>>>>>
>>>>>>>>> I use CDO Session view of my IDE, the view is shipped with
>>>>>>>>> org.eclipse.emf.cdo.ui plug-in. The steps are:
>>>>>>>>> 1. Establish a connection to a CDO server
>>>>>>>>> 2. Import my model into the Registry
>>>>>>>>> 3. Open a transaction
>>>>>>>>> 4. Create a resource
>>>>>>>>> 5. Commit
>>>>>>>>> 6. Go to the resource editor by double clicking the created
>>>>>>>>> resource.
>>>>>>>>> 7. In the context menu select Import Roots and import my
>>>>>>>>> content.xml
>>>>>>>>> document.
>>>>>>>>> 8. Commit the transaction.
>>>>>>>>>
>>>>>>>>> At step 8 I get this:
>>>>>>>>>
>>>>>>>>> org.eclipse.net4j.signal.RemoteException:
>>>>>>>>> org.eclipse.emf.common.util.WrappedException:
>>>>>>>>> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Not sure what I am missing here. I restart Eclipse and the CDO
>>>>>>>>> Server
>>>>>>>>> each attempt and start with a new Resource each time. I get
>>>>>>>>> consistent
>>>>>>>>> results. It look slike to me that my EMF project where I developed
>>>>>>>>> this
>>>>>>>>> model needs somehow to be on the CDO Explorer's classpath?
>>>>>>>>>
>>>>>>>>> thx.
>>>>>>>>>
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>> On 17/02/11 11:15, Eike Stepper wrote:
>>>>>>>>>> Am 17.02.2011 11:46, schrieb David Wynter:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> The problem for H2 users is that as of V1.2.120 the file format
>>>>>>>>>>> for
>>>>>>>>>>> the database changed. There is an automatic conversion to the
>>>>>>>>>>> new
>>>>>>>>>>> format if you include an additional jar on the classpath,
>>>>>>>>>>> once an
>>>>>>>>>>> old
>>>>>>>>>>> version is converted there is no going back. I made that
>>>>>>>>>>> mistake,
>>>>>>>>>>> wanting to see the data the CDO stored.
>>>>>>>>>>>
>>>>>>>>>>> I tried stripping out all the signing information from the
>>>>>>>>>>> new h2
>>>>>>>>>>> jar
>>>>>>>>>>> I created, it still does not load, so there is some magic
>>>>>>>>>>> going on
>>>>>>>>>>> that is not obvious. Now trying to import an old model I had in
>>>>>>>>>>> xml
>>>>>>>>>>> format into Derby. Will then have to reenter the changes since
>>>>>>>>>>> then.
>>>>>>>>>>> To give you an idea the xmi file is over 10K lines long...
>>>>>>>>>>> Which is
>>>>>>>>>>> why I persisted for so long in trying to recvoer.
>>>>>>>>>>>
>>>>>>>>>>> Thx for your help. I know more, but clearly not enough to create
>>>>>>>>>>> a new
>>>>>>>>>>> plugin to do the job.
>>>>>>>>>>
>>>>>>>>>> Maybe the new repository export/import functionality can help
>>>>>>>>>> you.
>>>>>>>>>> It's
>>>>>>>>>> backend-agnositc and also available through the OSGi console.
>>>>>>>>>>
>>>>>>>>>> Cheers
>>>>>>>>>> /Eike
>>>>>>>>>>
>>>>>>>>>> ----
>>>>>>>>>> http://www.esc-net.de
>>>>>>>>>> http://thegordian.blogspot.com
>>>>>>>>>> http://twitter.com/eikestepper
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>
>>>>
>>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #655339 is a reply to message #655331] Sat, 19 February 2011 14:31 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 19.02.2011 14:43, schrieb David Wynter:
> On 19/02/11 12:41, Eike Stepper wrote:
>> Am 19.02.2011 13:22, schrieb David Wynter:
>>> Hi,
>>>
>>> Yes, it was a major misunderstanding, takes a while to get a grip on
>>> all this new stuff. I found the problem. I have a separate project in
>>> my workspace with a ecore of the same name that is a cut down version
>>> of the one I am attempting to load, trying to do the right thing in
>>> cutting down the complexity for someone that only needs part of the
>>> model.
>>>
>>> When I break on line 272 of RegistryReader.class I see that
>>> element.getDeclaringExtension().getContributor().getName()
>>> returns the name of this partial model. I probably accidently loaded
>>> that into the registry. I tried renaming that partial model ecore, but
>>> it appears that once you have imported a model into the registry with
>>> the CDO Explorer there is no way of removing it.
>>
>> What exactly do you mean by CDOExplorer? Our CNF integration?
>>
> Actually that is a misnomer, it is actually the org.eclipse.emf.cdo.server.product in a Debug config that loads the models in registry, here is the console message when I launch it
>
> BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
> Framework arguments: -product org.eclipse.emf.cdo.server.product
> Command-line arguments: -product org.eclipse.emf.cdo.server.product -data /home/david/workspace/com.example.mdwmui/cdo -dev file:/home/david/workspace/.metadata/.plugins/org.eclipse.pd e.core/CDO_Client/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog
>
>>> I later found that it scans my workspace
>>
>> "it" == something in CDO? That would be new to me (also a new feeling
>> for me :P )
> The dev.properties file in that command line above contains entries for all the projects that have ecore models in my workspace with a timestamp that matches when I run the Debug task for starting my CDO repo at the top, like so
>
> #Sat Feb 19 12:12:05 GMT 2011
> Algo=bin
> org.eclipse.emf.cdo.examples.hibernate.client=bin
> ...
>
> So I assumed it, "org.eclipse.emf.cdo.server.product", was scanning the workspace and building that file.

I'm still clueless. AFAIK CDO does not scan the workspace or build properties files.

Cheers
/Eike

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


>
> David
>>
>>> and it registers the first ecore of that same name it comes to, and
>>> that is not the right one. I removed the project from my workspace to
>>> be sure. It now works.
>>>
>>> It uses "-dev
>>> file:/home/david/workspace/.metadata/.plugins/org.eclipse.pd e.core/CDO_Client/dev.properties "
>>> to list the packages it registers. So I could have renamed my partial
>>> model ecore to a different package and edited this file to make sure
>>> it got the right ecore.
>>>
>>> Also the UI thread exception appears harmless and is unrelated to the
>>> issue I have with loading resources, just a bit of a red herring.
>>>
>>> Strictly I have to wait for CDO 4.0 to be a release version before
>>> using it. This I assume will be the next Eclipse release?
>>
>> Yes, CDO 4.0 will be final together with Indigo in June.
>>
>>> Thx for your help. In the end a mistake on my part then and obscure
>>> consequence of that mistake lost me a lot of time.
>>
>> Good that you solved it!
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>
>>>
>>> David
>>>
>>>
>>> On 19/02/11 05:39, Eike Stepper wrote:
>>>> Am 18.02.2011 20:35, schrieb David Wynter:
>>>>> Hi,
>>>>>
>>>>> It is a file with data content that matches the ecore model. When you
>>>>> import your model into the registry you then load a resource that has
>>>>> data that matches that model. It would have been nice to do that with
>>>>> a model different to ours to see if my problem was model specific.
>>>>
>>>> I don't see why you can't create any instance of your choice from one of
>>>> our example models. Why should we provide example instances while it is
>>>> so easy to create them with EMF? I guess that we have a major
>>>> misunderstanding here ;-)
>>>>
>>>>
>>>>> I sent my Derby Db to a collegue and he successfully imported the xml
>>>>> that contained my model data. He then sent me the Derby Db and I used
>>>>> that for my Repo. It get the same error when I open that resource, so
>>>>> by a different route I proved that it is not the model. I then
>>>>> realised the only difference is that I updated to the snapshot CDO 3.0
>>>>> from the 15th February (to get the Net4j plugin that accepted V1.3 off
>>>>> H2), his was the 3.0 release.
>>>>
>>>> Internally our Helios SR2 version is of course a little different from
>>>> the original Helios release because we fixed a number of bugs in
>>>> maintenance. Still it may be the case that not all bugs that have been
>>>> identified and fixed in HEAD have also been backported to maintenance.
>>>> Have you already tried a 4.0 build?
>>>>
>>>>> I have now tried the release version 3.0 of CDO and still get the same
>>>>> exception. I have lost 2 days work, but have no choice but to trace
>>>>> CDO now to see what is wrong. It makes no logical sense that it should
>>>>> be trying to load a class that it would never have access to, this
>>>>> class is similar to the generated class from the genmodel file, but
>>>>> not the same, as the package name is missing - edmmodel.EdmmodelPackage
>>>>
>>>> The stacktrace in your newer post sugests that you have a package
>>>> registry issue on the server. I'm not yet sure how that's related to the
>>>> ConcurrentModificationException in your UI. Some questions:
>>>>
>>>> 1. Are your models generated? Have you followed
>>>> http://wiki.eclipse.org/CDO/Preparing_EMF_Models ?
>>>> 2. Does your model consist of multiple GenModels? Are they interrelated?
>>>> 3. Do you have nested EPackages? Are they interrelated?
>>>> 4. Do all packages have proper nsURIs? Do they match the nsURIs in your
>>>> plugin.xml?
>>>> 5. Does your model instance include "meta references" (references to
>>>> EModelElements)?
>>>>
>>>> Cheers
>>>> /Eike
>>>>
>>>> ----
>>>> http://www.esc-net.de
>>>> http://thegordian.blogspot.com
>>>> http://twitter.com/eikestepper
>>>>
>>>>
>>>>
>>>>>
>>>>> Thx.
>>>>>
>>>>> David
>>>>>
>>>>> On 18/02/11 17:48, Eike Stepper wrote:
>>>>>> Am 18.02.2011 18:24, schrieb David Wynter:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I went looking for the example model you said was shipping, I
>>>>>>> looked in
>>>>>>> org.eclipse.emf.cdo.examples.* jar files
>>>>>>> and in
>>>>>>> org.eclipse.emf.cdo.test.* jar files and could not find a paired xmi
>>>>>>> file with it's ecore file.
>>>>>>>
>>>>>>> Where is the example you mention?
>>>>>>
>>>>>> I'm not sure, what a paired xmi file is supposed to be. I was talking
>>>>>> about the org.eclipse.emf.cdo.examples.company model plugin.
>>>>>>
>>>>>> Cheers
>>>>>> /Eike
>>>>>>
>>>>>> ----
>>>>>> http://www.esc-net.de
>>>>>> http://thegordian.blogspot.com
>>>>>> http://twitter.com/eikestepper
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Thx.
>>>>>>>
>>>>>>> David
>>>>>>>
>>>>>>>
>>>>>>> On 17/02/11 13:26, Eike Stepper wrote:
>>>>>>>> I've never seen that before. Please file a bugzilla with exact
>>>>>>>> steps how
>>>>>>>> I can reproduce that (have you tried the same thing with the example
>>>>>>>> model we're shipping?). I'm busy with a customer work at the
>>>>>>>> moment, so
>>>>>>>> please don't expect me to jump onto this bug immediately ;-)
>>>>>>>>
>>>>>>>> Cheers
>>>>>>>> /Eike
>>>>>>>>
>>>>>>>> ----
>>>>>>>> http://www.esc-net.de
>>>>>>>> http://thegordian.blogspot.com
>>>>>>>> http://twitter.com/eikestepper
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Am 17.02.2011 13:39, schrieb David Wynter:
>>>>>>>>> Something else I noticed about CDO Explorer. When importing the
>>>>>>>>> Roots
>>>>>>>>> I get 4 of these every single time, in the .log file
>>>>>>>>>
>>>>>>>>> !ENTRY org.eclipse.ui 4 0 2011-02-17 12:37:43.732
>>>>>>>>> !MESSAGE Unhandled event loop exception
>>>>>>>>> !STACK 0
>>>>>>>>> org.eclipse.swt.SWTException: Failed to execute runnable
>>>>>>>>> (java.util.ConcurrentModificationException)
>>>>>>>>> at org.eclipse.swt.SWT.error(SWT.java:4083)
>>>>>>>>> at org.eclipse.swt.SWT.error(SWT.java:3998)
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:137)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.jav a:3515)
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3164)
>>>>>>>>> at
>>>>>>>>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
>>>>>>>>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
>>>>>>>>> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
>>>>>>>>> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
>>>>>>>>> at
>>>>>>>>> org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>>> at
>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:57)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:43)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:616)
>>>>>>>>> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
>>>>>>>>> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
>>>>>>>>> at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
>>>>>>>>> at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
>>>>>>>>> Caused by: java.util.ConcurrentModificationException
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.checkMod Count(AbstractEList.java:762)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.doNext(A bstractEList.java:710)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.common.util.AbstractEList$EIterator.next(Abs tractEList.java:696)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getChildre n(ItemProviderAdapter.java:340)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.edit.provider.ItemProviderAdapter.getElement s(ItemProviderAdapter.java:310)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er.getElements(AdapterFactoryContentProvider.java:160)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.getRawChildren(St ructuredViewer.java:989)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.ColumnViewer.getRawChildren(Column Viewer.java:703)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren( AbstractTreeViewer.java:1332)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeView er.java:391)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.getFilteredChildr en(StructuredViewer.java:896)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildr en(AbstractTreeViewer.java:601)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren( AbstractTreeViewer.java:2581)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh Struct(AbstractTreeViewer.java:1867)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(T reeViewer.java:721)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1842)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh (AbstractTreeViewer.java:1799)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.StructuredViewer$8.run(StructuredV iewer.java:1514)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1422)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.TreeViewer.preservingSelection(Tre eViewer.java:403)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.preservingSelecti on(StructuredViewer.java:1383)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.StructuredViewer.refresh(Structure dViewer.java:1512)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer. java:548)
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.refresh(AdapterFactoryContentProvider.java: 495)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at
>>>>>>>>> org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvid er$ViewerRefresh.run(AdapterFactoryContentProvider.java:463)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:3 5)
>>>>>>>>> at
>>>>>>>>> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchr onizer.java:134)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ... 23 more
>>>>>>>>>
>>>>>>>>> David
>>>>>>>>>
>>>>>>>>> On 17/02/11 12:26, David Wynter wrote:
>>>>>>>>>> Yes, I had preivous;ly done that successfully, you helped me in
>>>>>>>>>> another
>>>>>>>>>> thread, I think it took 8 attempts with a eclipse restart each
>>>>>>>>>> time to
>>>>>>>>>> get success. But this time I have no such luck. Here are my steps
>>>>>>>>>>
>>>>>>>>>> I use CDO Session view of my IDE, the view is shipped with
>>>>>>>>>> org.eclipse.emf.cdo.ui plug-in. The steps are:
>>>>>>>>>> 1. Establish a connection to a CDO server
>>>>>>>>>> 2. Import my model into the Registry
>>>>>>>>>> 3. Open a transaction
>>>>>>>>>> 4. Create a resource
>>>>>>>>>> 5. Commit
>>>>>>>>>> 6. Go to the resource editor by double clicking the created
>>>>>>>>>> resource.
>>>>>>>>>> 7. In the context menu select Import Roots and import my
>>>>>>>>>> content.xml
>>>>>>>>>> document.
>>>>>>>>>> 8. Commit the transaction.
>>>>>>>>>>
>>>>>>>>>> At step 8 I get this:
>>>>>>>>>>
>>>>>>>>>> org.eclipse.net4j.signal.RemoteException:
>>>>>>>>>> org.eclipse.emf.common.util.WrappedException:
>>>>>>>>>> java.lang.ClassNotFoundException: edmmodel.EdmmodelPackage
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.plugin.RegistryReader$EPackageDescript or.getEPackage(RegistryReader.java:279)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.ecore.impl.EPackageRegistryImpl.getEPackage( EPackageRegistryImpl.java:133)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .loadPackageFromGlobalRegistry(CDOPackageUnitImpl.java:378)
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Not sure what I am missing here. I restart Eclipse and the CDO
>>>>>>>>>> Server
>>>>>>>>>> each attempt and start with a new Resource each time. I get
>>>>>>>>>> consistent
>>>>>>>>>> results. It look slike to me that my EMF project where I developed
>>>>>>>>>> this
>>>>>>>>>> model needs somehow to be on the CDO Explorer's classpath?
>>>>>>>>>>
>>>>>>>>>> thx.
>>>>>>>>>>
>>>>>>>>>> David
>>>>>>>>>>
>>>>>>>>>> On 17/02/11 11:15, Eike Stepper wrote:
>>>>>>>>>>> Am 17.02.2011 11:46, schrieb David Wynter:
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> The problem for H2 users is that as of V1.2.120 the file format
>>>>>>>>>>>> for
>>>>>>>>>>>> the database changed. There is an automatic conversion to the
>>>>>>>>>>>> new
>>>>>>>>>>>> format if you include an additional jar on the classpath,
>>>>>>>>>>>> once an
>>>>>>>>>>>> old
>>>>>>>>>>>> version is converted there is no going back. I made that
>>>>>>>>>>>> mistake,
>>>>>>>>>>>> wanting to see the data the CDO stored.
>>>>>>>>>>>>
>>>>>>>>>>>> I tried stripping out all the signing information from the
>>>>>>>>>>>> new h2
>>>>>>>>>>>> jar
>>>>>>>>>>>> I created, it still does not load, so there is some magic
>>>>>>>>>>>> going on
>>>>>>>>>>>> that is not obvious. Now trying to import an old model I had in
>>>>>>>>>>>> xml
>>>>>>>>>>>> format into Derby. Will then have to reenter the changes since
>>>>>>>>>>>> then.
>>>>>>>>>>>> To give you an idea the xmi file is over 10K lines long...
>>>>>>>>>>>> Which is
>>>>>>>>>>>> why I persisted for so long in trying to recvoer.
>>>>>>>>>>>>
>>>>>>>>>>>> Thx for your help. I know more, but clearly not enough to create
>>>>>>>>>>>> a new
>>>>>>>>>>>> plugin to do the job.
>>>>>>>>>>>
>>>>>>>>>>> Maybe the new repository export/import functionality can help
>>>>>>>>>>> you.
>>>>>>>>>>> It's
>>>>>>>>>>> backend-agnositc and also available through the OSGi console.
>>>>>>>>>>>
>>>>>>>>>>> Cheers
>>>>>>>>>>> /Eike
>>>>>>>>>>>
>>>>>>>>>>> ----
>>>>>>>>>>> http://www.esc-net.de
>>>>>>>>>>> http://thegordian.blogspot.com
>>>>>>>>>>> http://twitter.com/eikestepper
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>
>>>
>


Re: [CDO] Net4j old version of h2 Db used in plugin [message #655993 is a reply to message #655339] Wed, 23 February 2011 16:40 Go to previous messageGo to next message
David Wynter is currently offline David WynterFriend
Messages: 4624
Registered: July 2009
Senior Member
Hi Eike,

Took me a while to get back to this. But I got sick of moving the
project that causes this issue in and out of the workplace.

Here is a summary. If I have a particular project in my workspace
(com.example.nrl.parser) that used to have an ecore model of the same
name as the one I have loaded into the CDO registry it tries to read it
from that project, even though it no longer has a model component. The
offending line of code is here (ln 273 RegistryReader.class for CDO
Client 3.0.1v20100911-0901)

Class<?> javaClass =
Platform.getBundle(element.getDeclaringExtension().getContri butor().getName()).loadClass(element.getAttribute(attributeN ame));

This
element.getDeclaringExtension().getContributor().getName()
returns
"com.example.nrl.parser"

instead of
"com.example.edmmodel" where the model actually resides, this project is
also shown in the Registry Import dialog when I start from a new repo,
but it still tries to load the wrong one in the RegistryReader.

The only reference I can find to this directory is in dev.properties
held by the PDE config under the
workspace/.metadata/plugins.org.eclipse.pde.core

The contents look like this
#
#Wed Feb 23 16:12:50 GMT 2011
org.eclipse.datatools.modelbase.sql=bin
org.eclipse.datatools.enablement.mysql=bin
org.eclipse.datatools.modelbase.sql.edit=bin
com.example.mdwmui.system=bin
@ignoredot@=true
com.example.nrl.parser=bin

This may be a total red herring, I just thought maybe the RegistryReader
or other class in that stack uses the PDE to find the ecore file?

I have to actually move that com.example.nrl.parser directory from the
workspace to get CDO to 'find' the right EPackage in com.example.edmmodel

The workings of how it gets the "com.example.nrl.parser" as the
contributor are not clear to me.

Thx.

David


On 19/02/11 14:31, Eike Stepper wrote:
> Am 19.02.2011 14:43, schrieb David Wynter:
>> On 19/02/11 12:41, Eike Stepper wrote:
>>> Am 19.02.2011 13:22, schrieb David Wynter:
>>>> Hi,
>>>>
>>>> Yes, it was a major misunderstanding, takes a while to get a grip on
>>>> all this new stuff. I found the problem. I have a separate project in
>>>> my workspace with a ecore of the same name that is a cut down version
>>>> of the one I am attempting to load, trying to do the right thing in
>>>> cutting down the complexity for someone that only needs part of the
>>>> model.
>>>>
>>>> When I break on line 272 of RegistryReader.class I see that
>>>> element.getDeclaringExtension().getContributor().getName()
>>>> returns the name of this partial model. I probably accidently loaded
>>>> that into the registry. I tried renaming that partial model ecore, but
>>>> it appears that once you have imported a model into the registry with
>>>> the CDO Explorer there is no way of removing it.
>>>
>>> What exactly do you mean by CDOExplorer? Our CNF integration?
>>>
>> Actually that is a misnomer, it is actually the
>> org.eclipse.emf.cdo.server.product in a Debug config that loads the
>> models in registry, here is the console message when I launch it
>>
>> BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
>> Framework arguments: -product org.eclipse.emf.cdo.server.product
>> Command-line arguments: -product org.eclipse.emf.cdo.server.product
>> -data /home/david/workspace/com.example.mdwmui/cdo -dev
>> file:/home/david/workspace/.metadata/.plugins/org.eclipse.pd e.core/CDO_Client/dev.properties
>> -os linux -ws gtk -arch x86_64 -consoleLog
>>
>>>> I later found that it scans my workspace
>>>
>>> "it" == something in CDO? That would be new to me (also a new feeling
>>> for me :P )
>> The dev.properties file in that command line above contains entries
>> for all the projects that have ecore models in my workspace with a
>> timestamp that matches when I run the Debug task for starting my CDO
>> repo at the top, like so
>>
>> #Sat Feb 19 12:12:05 GMT 2011
>> Algo=bin
>> org.eclipse.emf.cdo.examples.hibernate.client=bin
>> ...
>>
>> So I assumed it, "org.eclipse.emf.cdo.server.product", was scanning
>> the workspace and building that file.
>
> I'm still clueless. AFAIK CDO does not scan the workspace or build
> properties files.
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
Re: [CDO] Net4j old version of h2 Db used in plugin [message #656001 is a reply to message #655993] Wed, 23 February 2011 16:51 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi David,

I apologize but I have no clue what's all this about. RegistryReader is not a CDO class.

Cheers
/Eike

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




Am 23.02.2011 17:40, schrieb David Wynter:
> Hi Eike,
>
> Took me a while to get back to this. But I got sick of moving the project that causes this issue in and out of the workplace.
>
> Here is a summary. If I have a particular project in my workspace (com.example.nrl.parser) that used to have an ecore model of the same name as the one I have loaded into the CDO registry it tries to read it from that project, even though it no longer has a model component. The offending line of code is here (ln 273 RegistryReader.class for CDO Client 3.0.1v20100911-0901)
>
> Class<?> javaClass = Platform.getBundle(element.getDeclaringExtension().getContri butor().getName()).loadClass(element.getAttribute(attributeN ame));
>
> This
> element.getDeclaringExtension().getContributor().getName()
> returns
> "com.example.nrl.parser"
>
> instead of
> "com.example.edmmodel" where the model actually resides, this project is also shown in the Registry Import dialog when I start from a new repo, but it still tries to load the wrong one in the RegistryReader.
>
> The only reference I can find to this directory is in dev.properties held by the PDE config under the workspace/.metadata/plugins.org.eclipse.pde.core
>
> The contents look like this
> #
> #Wed Feb 23 16:12:50 GMT 2011
> org.eclipse.datatools.modelbase.sql=bin
> org.eclipse.datatools.enablement.mysql=bin
> org.eclipse.datatools.modelbase.sql.edit=bin
> com.example.mdwmui.system=bin
> @ignoredot@=true
> com.example.nrl.parser=bin
>
> This may be a total red herring, I just thought maybe the RegistryReader or other class in that stack uses the PDE to find the ecore file?
>
> I have to actually move that com.example.nrl.parser directory from the workspace to get CDO to 'find' the right EPackage in com.example.edmmodel
>
> The workings of how it gets the "com.example.nrl.parser" as the contributor are not clear to me.
>
> Thx.
>
> David
>
>
> On 19/02/11 14:31, Eike Stepper wrote:
>> Am 19.02.2011 14:43, schrieb David Wynter:
>>> On 19/02/11 12:41, Eike Stepper wrote:
>>>> Am 19.02.2011 13:22, schrieb David Wynter:
>>>>> Hi,
>>>>>
>>>>> Yes, it was a major misunderstanding, takes a while to get a grip on
>>>>> all this new stuff. I found the problem. I have a separate project in
>>>>> my workspace with a ecore of the same name that is a cut down version
>>>>> of the one I am attempting to load, trying to do the right thing in
>>>>> cutting down the complexity for someone that only needs part of the
>>>>> model.
>>>>>
>>>>> When I break on line 272 of RegistryReader.class I see that
>>>>> element.getDeclaringExtension().getContributor().getName()
>>>>> returns the name of this partial model. I probably accidently loaded
>>>>> that into the registry. I tried renaming that partial model ecore, but
>>>>> it appears that once you have imported a model into the registry with
>>>>> the CDO Explorer there is no way of removing it.
>>>>
>>>> What exactly do you mean by CDOExplorer? Our CNF integration?
>>>>
>>> Actually that is a misnomer, it is actually the
>>> org.eclipse.emf.cdo.server.product in a Debug config that loads the
>>> models in registry, here is the console message when I launch it
>>>
>>> BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
>>> Framework arguments: -product org.eclipse.emf.cdo.server.product
>>> Command-line arguments: -product org.eclipse.emf.cdo.server.product
>>> -data /home/david/workspace/com.example.mdwmui/cdo -dev
>>> file:/home/david/workspace/.metadata/.plugins/org.eclipse.pd e.core/CDO_Client/dev.properties
>>> -os linux -ws gtk -arch x86_64 -consoleLog
>>>
>>>>> I later found that it scans my workspace
>>>>
>>>> "it" == something in CDO? That would be new to me (also a new feeling
>>>> for me :P )
>>> The dev.properties file in that command line above contains entries
>>> for all the projects that have ecore models in my workspace with a
>>> timestamp that matches when I run the Debug task for starting my CDO
>>> repo at the top, like so
>>>
>>> #Sat Feb 19 12:12:05 GMT 2011
>>> Algo=bin
>>> org.eclipse.emf.cdo.examples.hibernate.client=bin
>>> ...
>>>
>>> So I assumed it, "org.eclipse.emf.cdo.server.product", was scanning
>>> the workspace and building that file.
>>
>> I'm still clueless. AFAIK CDO does not scan the workspace or build
>> properties files.
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://www.esc-net.de
>> http://thegordian.blogspot.com
>> http://twitter.com/eikestepper
>>
>>


Previous Topic:[CDO] TimeoutRuntime Exception while opening a session
Next Topic:[CDO] synchronize model changes with backend
Goto Forum:
  


Current Time: Thu Mar 28 17:32:48 GMT 2024

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

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

Back to the top