Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [Validation] Re: java.lang.ClassCircularityError: myPackage/ValidationDelegateClientSelector
[Validation] Re: java.lang.ClassCircularityError: myPackage/ValidationDelegateClientSelector [message #415286] Mon, 10 December 2007 13:16 Go to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Loïc,

This is an EMF Validation Framework question, so I have replied to that
newsgroup.

Are you trying to re-use the client-context defined by the example?

This problem has come up a few times before in the EMF newsgroup, so you
might search for possible solutions (or is that what you meant by "what
[you] have read so far?")

One work-around that I recall having some success is to exclude the package
in which the client-context selector is defined from the lazy-start header
in the bundle manifest.

HTH,

Christian


Loïc Quéran wrote:

> When EMF Validation examples are not loaded, the exception occurs. When
> EMF Validation examples are loaded, the exception does not occur.
>
> Any idea on the reason for this would be appreciated.
>
> Eclipse Version: 3.3.0 Build id: I20070621-1340
> Sun JRE 1.6.02
>
> EMF Validation 1.1.1 200708161445
>
> What I have read so far on ClassCircularityError seems irrelevant (given
> the previously mentionned version numbers).
>
>
> Loïc

-----8<-----
Re: [Validation] Re: java.lang.ClassCircularityError: myPackage/ValidationDelegateClientSelector [message #415287 is a reply to message #415286] Mon, 10 December 2007 13:58 Go to previous messageGo to next message
LoÃ?¯c QuÃ?©ran is currently offline LoÃ?¯c QuÃ?©ranFriend
Messages: 45
Registered: July 2009
Member
Hi Christian,

I define a context of my own.

<extension
point="org.eclipse.emf.validation.constraintBindings">
<clientContext default="false"
id="com.aaa.bbb.model.validation.clientContext1">
<selector
class=" com.aaa.bbb.validation.constraints.ValidationDelegateClientS elector "/>
</clientContext>
<binding
context="com.aaa.bbb.model.validation.clientContext1">
<category
ref="com.aaa.bbb.model.validation">
</category>
<!--<category
ref="com.aaa.bbb.model.validation.ocl">
</category>-->
</binding>
</extension>


What I have read so far is the result of a search "Eclipse
ClassCircularityError" with Google ... It seems there were problems
before Eclipse 3.3, but that these were overcome. I have also found a
wiki page http://wiki.eclipse.org/Lazy_Start_Bundles.

I have tried : "Eclipse-LazyStart: true". The error remains.

Unless Thunderbird is flawed, it seems there is no message except yours
in the newsgroup eclipse.tools.emf with ClassCircularityError in its
title. What other messages are your referring to ?

Thanks for your help.

Loïc



Christian W. Damus a écrit :
> Hi, Loïc,
>
> This is an EMF Validation Framework question, so I have replied to that
> newsgroup.
>
> Are you trying to re-use the client-context defined by the example?
>
> This problem has come up a few times before in the EMF newsgroup, so you
> might search for possible solutions (or is that what you meant by "what
> [you] have read so far?")
>
> One work-around that I recall having some success is to exclude the package
> in which the client-context selector is defined from the lazy-start header
> in the bundle manifest.
>
> HTH,
>
> Christian
>
>
> Loïc Quéran wrote:
>
>> When EMF Validation examples are not loaded, the exception occurs. When
>> EMF Validation examples are loaded, the exception does not occur.
>>
>> Any idea on the reason for this would be appreciated.
>>
>> Eclipse Version: 3.3.0 Build id: I20070621-1340
>> Sun JRE 1.6.02
>>
>> EMF Validation 1.1.1 200708161445
>>
>> What I have read so far on ClassCircularityError seems irrelevant (given
>> the previously mentionned version numbers).
>>
>>
>> Loïc
>
> -----8<-----
Re: [Validation] Re: java.lang.ClassCircularityError: myPackage/ValidationDelegateClientSelector [message #415288 is a reply to message #415287] Mon, 10 December 2007 14:20 Go to previous messageGo to next message
LoÃ?¯c QuÃ?©ran is currently offline LoÃ?¯c QuÃ?©ranFriend
Messages: 45
Registered: July 2009
Member
Hi Christian,

org.eclipse.emf.validation.examples.adapter is necessary if I want to
avoid the problem.

I have looked at this plugin, but I can't understand how it interferes
with my plugins. Maybe

<extension point="org.eclipse.ui.startup">
<startup
class="org.eclipse.emf.validation.examples.adapter.Startup"/ >
</extension>

is responsible for this.

Loïc

Loïc Quéran a écrit :
> Hi Christian,
>
> I define a context of my own.
>
> <extension
> point="org.eclipse.emf.validation.constraintBindings">
> <clientContext default="false"
> id="com.aaa.bbb.model.validation.clientContext1">
> <selector
> class=" com.aaa.bbb.validation.constraints.ValidationDelegateClientS elector "/>
>
> </clientContext>
> <binding
> context="com.aaa.bbb.model.validation.clientContext1">
> <category
> ref="com.aaa.bbb.model.validation">
> </category>
> <!--<category
> ref="com.aaa.bbb.model.validation.ocl">
> </category>-->
> </binding>
> </extension>
>
>
> What I have read so far is the result of a search "Eclipse
> ClassCircularityError" with Google ... It seems there were problems
> before Eclipse 3.3, but that these were overcome. I have also found a
> wiki page http://wiki.eclipse.org/Lazy_Start_Bundles.
>
> I have tried : "Eclipse-LazyStart: true". The error remains.
>
> Unless Thunderbird is flawed, it seems there is no message except yours
> in the newsgroup eclipse.tools.emf with ClassCircularityError in its
> title. What other messages are your referring to ?
>
> Thanks for your help.
>
> Loïc
>
>
>
> Christian W. Damus a écrit :
>> Hi, Loïc,
>>
>> This is an EMF Validation Framework question, so I have replied to that
>> newsgroup.
>>
>> Are you trying to re-use the client-context defined by the example?
>>
>> This problem has come up a few times before in the EMF newsgroup, so you
>> might search for possible solutions (or is that what you meant by "what
>> [you] have read so far?")
>>
>> One work-around that I recall having some success is to exclude the
>> package
>> in which the client-context selector is defined from the lazy-start
>> header
>> in the bundle manifest.
>>
>> HTH,
>>
>> Christian
>>
>>
>> Loïc Quéran wrote:
>>
>>> When EMF Validation examples are not loaded, the exception occurs. When
>>> EMF Validation examples are loaded, the exception does not occur.
>>>
>>> Any idea on the reason for this would be appreciated.
>>>
>>> Eclipse Version: 3.3.0 Build id: I20070621-1340
>>> Sun JRE 1.6.02
>>>
>>> EMF Validation 1.1.1 200708161445
>>>
>>> What I have read so far on ClassCircularityError seems irrelevant (given
>>> the previously mentionned version numbers).
>>>
>>>
>>> Loïc
>>
>> -----8<-----
Re: [Validation] Re: java.lang.ClassCircularityError: myPackage/ValidationDelegateClientSelector [message #415289 is a reply to message #415287] Mon, 10 December 2007 16:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cdamus.ca.ibm.com

Hi, Loïc,

Sorry, I forgot to mention that there is a history of postings relevant to
the EMF Validation component in the EMFT newsgroup (Validation, Query, and
Transaction having incubated in EMFT). One search hit that may be of some
help is:

http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg00272.html

The problem will occur precisely when Eclipse-LazyStart is true. When the
EMF Validation Framework core plug-in starts, it loads the client-context
selector extension registry. In doing so, your selector implementation is
instantiated, which requires loading its class which, because it is in a
package that triggers lazy-start of your bundle, starts your bundle. Your
bundle has a dependency on EMF Validation Framework, and so tries to start
it, but it is already starting, so we have a circularity.

I think that the framework can be improved. It doesn't have to load the
client-context selectors on start-up. It only needs to do this when it
actually attempts to use them.

Would you mind raising an enhancement request for EMF Validation to lazily
initialize the client-context selector registry instead of doing it on
start-up? It would be very helpful, then, if you can offer to test a patch
when it is ready.

Thanks,

Christian


Loïc Quéran wrote:

> Hi Christian,
>
> I define a context of my own.
>
> <extension
> point="org.eclipse.emf.validation.constraintBindings">
> <clientContext default="false"
> id="com.aaa.bbb.model.validation.clientContext1">
> <selector
>
class=" com.aaa.bbb.validation.constraints.ValidationDelegateClientS elector "/>
> </clientContext>
> <binding
> context="com.aaa.bbb.model.validation.clientContext1">
> <category
> ref="com.aaa.bbb.model.validation">
> </category>
> <!--<category
> ref="com.aaa.bbb.model.validation.ocl">
> </category>-->
> </binding>
> </extension>
>
>
> What I have read so far is the result of a search "Eclipse
> ClassCircularityError" with Google ... It seems there were problems
> before Eclipse 3.3, but that these were overcome. I have also found a
> wiki page http://wiki.eclipse.org/Lazy_Start_Bundles.
>
> I have tried : "Eclipse-LazyStart: true". The error remains.
>
> Unless Thunderbird is flawed, it seems there is no message except yours
> in the newsgroup eclipse.tools.emf with ClassCircularityError in its
> title. What other messages are your referring to ?
>
> Thanks for your help.
>
> Loïc
>
>
>
> Christian W. Damus a écrit :
>> Hi, Loïc,
>>
>> This is an EMF Validation Framework question, so I have replied to that
>> newsgroup.
>>
>> Are you trying to re-use the client-context defined by the example?
>>
>> This problem has come up a few times before in the EMF newsgroup, so you
>> might search for possible solutions (or is that what you meant by "what
>> [you] have read so far?")
>>
>> One work-around that I recall having some success is to exclude the
>> package in which the client-context selector is defined from the
>> lazy-start header in the bundle manifest.
>>
>> HTH,
>>
>> Christian
>>
>>
>> Loïc Quéran wrote:
>>
>>> When EMF Validation examples are not loaded, the exception occurs. When
>>> EMF Validation examples are loaded, the exception does not occur.
>>>
>>> Any idea on the reason for this would be appreciated.
>>>
>>> Eclipse Version: 3.3.0 Build id: I20070621-1340
>>> Sun JRE 1.6.02
>>>
>>> EMF Validation 1.1.1 200708161445
>>>
>>> What I have read so far on ClassCircularityError seems irrelevant (given
>>> the previously mentionned version numbers).
>>>
>>>
>>> Loïc
>>
>> -----8<-----
Re: [Validation] Re: java.lang.ClassCircularityError: myPackage/ValidationDelegateClientSelector [message #415291 is a reply to message #415289] Mon, 10 December 2007 16:43 Go to previous message
LoÃ?¯c QuÃ?©ran is currently offline LoÃ?¯c QuÃ?©ranFriend
Messages: 45
Registered: July 2009
Member
Hi Christian,

I am afraid the problem also occurs even if Eclipse-LazyStart is false
if org.eclipse.emf.validation.examples.adapter is missing. At least,
this is what I can see.

Lazily initializing the client context selector is probably a good thing
for performance, so I agree to raise an enhancement request and test a
patch when it is ready.

However, I am a bit skeptical on the fact this would solve my problem.

Let's try.

Thanks for your help.

Loïc

Christian W. Damus a écrit :
> Hi, Loïc,
>
> Sorry, I forgot to mention that there is a history of postings relevant to
> the EMF Validation component in the EMFT newsgroup (Validation, Query, and
> Transaction having incubated in EMFT). One search hit that may be of some
> help is:
>
> http://dev.eclipse.org/newslists/news.eclipse.technology.emf t/msg00272.html
>
> The problem will occur precisely when Eclipse-LazyStart is true. When the
> EMF Validation Framework core plug-in starts, it loads the client-context
> selector extension registry. In doing so, your selector implementation is
> instantiated, which requires loading its class which, because it is in a
> package that triggers lazy-start of your bundle, starts your bundle. Your
> bundle has a dependency on EMF Validation Framework, and so tries to start
> it, but it is already starting, so we have a circularity.
>
> I think that the framework can be improved. It doesn't have to load the
> client-context selectors on start-up. It only needs to do this when it
> actually attempts to use them.
>
> Would you mind raising an enhancement request for EMF Validation to lazily
> initialize the client-context selector registry instead of doing it on
> start-up? It would be very helpful, then, if you can offer to test a patch
> when it is ready.
>
> Thanks,
>
> Christian
>
>
> Loïc Quéran wrote:
>
>> Hi Christian,
>>
>> I define a context of my own.
>>
>> <extension
>> point="org.eclipse.emf.validation.constraintBindings">
>> <clientContext default="false"
>> id="com.aaa.bbb.model.validation.clientContext1">
>> <selector
>>
> class=" com.aaa.bbb.validation.constraints.ValidationDelegateClientS elector "/>
>> </clientContext>
>> <binding
>> context="com.aaa.bbb.model.validation.clientContext1">
>> <category
>> ref="com.aaa.bbb.model.validation">
>> </category>
>> <!--<category
>> ref="com.aaa.bbb.model.validation.ocl">
>> </category>-->
>> </binding>
>> </extension>
>>
>>
>> What I have read so far is the result of a search "Eclipse
>> ClassCircularityError" with Google ... It seems there were problems
>> before Eclipse 3.3, but that these were overcome. I have also found a
>> wiki page http://wiki.eclipse.org/Lazy_Start_Bundles.
>>
>> I have tried : "Eclipse-LazyStart: true". The error remains.
>>
>> Unless Thunderbird is flawed, it seems there is no message except yours
>> in the newsgroup eclipse.tools.emf with ClassCircularityError in its
>> title. What other messages are your referring to ?
>>
>> Thanks for your help.
>>
>> Loïc
>>
>>
>>
>> Christian W. Damus a écrit :
>>> Hi, Loïc,
>>>
>>> This is an EMF Validation Framework question, so I have replied to that
>>> newsgroup.
>>>
>>> Are you trying to re-use the client-context defined by the example?
>>>
>>> This problem has come up a few times before in the EMF newsgroup, so you
>>> might search for possible solutions (or is that what you meant by "what
>>> [you] have read so far?")
>>>
>>> One work-around that I recall having some success is to exclude the
>>> package in which the client-context selector is defined from the
>>> lazy-start header in the bundle manifest.
>>>
>>> HTH,
>>>
>>> Christian
>>>
>>>
>>> Loïc Quéran wrote:
>>>
>>>> When EMF Validation examples are not loaded, the exception occurs. When
>>>> EMF Validation examples are loaded, the exception does not occur.
>>>>
>>>> Any idea on the reason for this would be appreciated.
>>>>
>>>> Eclipse Version: 3.3.0 Build id: I20070621-1340
>>>> Sun JRE 1.6.02
>>>>
>>>> EMF Validation 1.1.1 200708161445
>>>>
>>>> What I have read so far on ClassCircularityError seems irrelevant (given
>>>> the previously mentionned version numbers).
>>>>
>>>>
>>>> Loïc
>>> -----8<-----
>
Previous Topic:Ecore2UMLProfile
Next Topic:Finding cross-document references by name
Goto Forum:
  


Current Time: Fri Apr 26 17:10:09 GMT 2024

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

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

Back to the top