You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Mark Derricutt <ma...@talios.com> on 2008/06/19 06:12:06 UTC

Dealing with bundle updates - constraint violations

Hey all,

I've having some weird issues when updating my bundles:

DEBUG: Constraint violation for 23.2 detected; module can see
org.restlet.service from [23.2] and org.restlet.service from [23.1]
DEBUG: Constraint violation for 23.2 detected; module can see
org.restlet.service from [23.2] and org.restlet.service from [23.1]
DEBUG: Constraint violation for 23.2 detected; module can see
org.restlet.service from [23.2] and org.restlet.service from [23.0]
DEBUG: Constraint violation for 23.2 detected; module can see
org.restlet.service from [23.2] and org.restlet.service from [23.0]

Bundle 23 both exports, and imports org.restlet.* in its bnd configuration.
Each time I update the bundle, the list of constraint violations just grows
with references to the previous versions of the bundle.

What would cause this?  Would this likely be something from another bundle
holding onto class references/instances from my bundle 23?  If I call
'refresh' on the package things seem to clear up ok.

The bundle operates as an extender style thing, watching for other bundles
matching a certain condition (header), and pulling class's from it, which
should be GC'd and no longer used/referenced after bundle 23 is updated.

Any thoughts of what I'm missing, or possibly not doing right?

mark


-- 
"It is easier to optimize correct code than to correct optimized code." --
Bill Harlan

Re: Dealing with bundle updates - constraint violations

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Please try to boil it down in some way, then you can perhaps send me the 
boiled down bundles and the steps to repeat so I can try to look into it 
more deeply.

-> richard

Mark Derricutt wrote:
> I'm finding the above problem with two of my bundles, and they seemingly
> don't resolve ever.  Felix was just locking solid and it wasn't until I
> increased the logging that I saw the conflict mentioned.
>
> In the above instance, bundle 23 is my restlet bundle, which has a
> BundleListener which pulls in a Class[] from other bundles using the
> following pattern:
>
> String restActivatorClassname = (String)
> bundle.getHeaders().get(SMX3_RESTLET_PROVIDER);
> try {
>   Class restActivatorClass = bundle.loadClass(restActivatorClassname);
>   if (MountProvider.class.isAssignableFrom(restActivatorClass)) {
>     MountProvider mountRequestEvent = (MountProvider)
> restActivatorClass.newInstance();
>     // do something on the class
>     .....
>
>
> Bundle 23 isn't importing anything else that imports restlet.  The other
> bundle (hibernate wraper) that exhibits such problems has a
> DynamicImport-Package=* which I'm not happy with having there, but without
> it hibernate wanted to know too much about my other bundles.
>
> If I can boil the problem down to anything specific I'll report back.
>
>
>
>
>
> In the above instance
>
> On Fri, Jun 20, 2008 at 12:56 AM, Richard S. Hall <he...@ungoverned.org>
> wrote:
>
>   
>> Sounds odd.
>>
>> Does it eventually resolve correctly?
>>
>> Is 23 importing from other bundles that also import org.restlet.service?
>>
>> Is this something you can boil down to one or two bundles? If so, please
>> post their manifests.
>>
>> -> richard
>>
>>
>> Mark Derricutt wrote:
>>
>>     
>>> Hey all,
>>>
>>> I've having some weird issues when updating my bundles:
>>>
>>> DEBUG: Constraint violation for 23.2 detected; module can see
>>> org.restlet.service from [23.2] and org.restlet.service from [23.1]
>>> DEBUG: Constraint violation for 23.2 detected; module can see
>>> org.restlet.service from [23.2] and org.restlet.service from [23.1]
>>> DEBUG: Constraint violation for 23.2 detected; module can see
>>> org.restlet.service from [23.2] and org.restlet.service from [23.0]
>>> DEBUG: Constraint violation for 23.2 detected; module can see
>>> org.restlet.service from [23.2] and org.restlet.service from [23.0]
>>>
>>> Bundle 23 both exports, and imports org.restlet.* in its bnd
>>> configuration.
>>> Each time I update the bundle, the list of constraint violations just
>>> grows
>>> with references to the previous versions of the bundle.
>>>
>>> What would cause this?  Would this likely be something from another bundle
>>> holding onto class references/instances from my bundle 23?  If I call
>>> 'refresh' on the package things seem to clear up ok.
>>>
>>> The bundle operates as an extender style thing, watching for other bundles
>>> matching a certain condition (header), and pulling class's from it, which
>>> should be GC'd and no longer used/referenced after bundle 23 is updated.
>>>
>>> Any thoughts of what I'm missing, or possibly not doing right?
>>>
>>> mark
>>>
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>>     
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Dealing with bundle updates - constraint violations

Posted by Mark Derricutt <ma...@talios.com>.
I'm finding the above problem with two of my bundles, and they seemingly
don't resolve ever.  Felix was just locking solid and it wasn't until I
increased the logging that I saw the conflict mentioned.

In the above instance, bundle 23 is my restlet bundle, which has a
BundleListener which pulls in a Class[] from other bundles using the
following pattern:

String restActivatorClassname = (String)
bundle.getHeaders().get(SMX3_RESTLET_PROVIDER);
try {
  Class restActivatorClass = bundle.loadClass(restActivatorClassname);
  if (MountProvider.class.isAssignableFrom(restActivatorClass)) {
    MountProvider mountRequestEvent = (MountProvider)
restActivatorClass.newInstance();
    // do something on the class
    .....


Bundle 23 isn't importing anything else that imports restlet.  The other
bundle (hibernate wraper) that exhibits such problems has a
DynamicImport-Package=* which I'm not happy with having there, but without
it hibernate wanted to know too much about my other bundles.

If I can boil the problem down to anything specific I'll report back.





In the above instance

On Fri, Jun 20, 2008 at 12:56 AM, Richard S. Hall <he...@ungoverned.org>
wrote:

> Sounds odd.
>
> Does it eventually resolve correctly?
>
> Is 23 importing from other bundles that also import org.restlet.service?
>
> Is this something you can boil down to one or two bundles? If so, please
> post their manifests.
>
> -> richard
>
>
> Mark Derricutt wrote:
>
>> Hey all,
>>
>> I've having some weird issues when updating my bundles:
>>
>> DEBUG: Constraint violation for 23.2 detected; module can see
>> org.restlet.service from [23.2] and org.restlet.service from [23.1]
>> DEBUG: Constraint violation for 23.2 detected; module can see
>> org.restlet.service from [23.2] and org.restlet.service from [23.1]
>> DEBUG: Constraint violation for 23.2 detected; module can see
>> org.restlet.service from [23.2] and org.restlet.service from [23.0]
>> DEBUG: Constraint violation for 23.2 detected; module can see
>> org.restlet.service from [23.2] and org.restlet.service from [23.0]
>>
>> Bundle 23 both exports, and imports org.restlet.* in its bnd
>> configuration.
>> Each time I update the bundle, the list of constraint violations just
>> grows
>> with references to the previous versions of the bundle.
>>
>> What would cause this?  Would this likely be something from another bundle
>> holding onto class references/instances from my bundle 23?  If I call
>> 'refresh' on the package things seem to clear up ok.
>>
>> The bundle operates as an extender style thing, watching for other bundles
>> matching a certain condition (header), and pulling class's from it, which
>> should be GC'd and no longer used/referenced after bundle 23 is updated.
>>
>> Any thoughts of what I'm missing, or possibly not doing right?
>>
>> mark
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
"It is easier to optimize correct code than to correct optimized code." --
Bill Harlan

Re: Dealing with bundle updates - constraint violations

Posted by "Richard S. Hall" <he...@ungoverned.org>.
Sounds odd.

Does it eventually resolve correctly?

Is 23 importing from other bundles that also import org.restlet.service?

Is this something you can boil down to one or two bundles? If so, please 
post their manifests.

-> richard

Mark Derricutt wrote:
> Hey all,
>
> I've having some weird issues when updating my bundles:
>
> DEBUG: Constraint violation for 23.2 detected; module can see
> org.restlet.service from [23.2] and org.restlet.service from [23.1]
> DEBUG: Constraint violation for 23.2 detected; module can see
> org.restlet.service from [23.2] and org.restlet.service from [23.1]
> DEBUG: Constraint violation for 23.2 detected; module can see
> org.restlet.service from [23.2] and org.restlet.service from [23.0]
> DEBUG: Constraint violation for 23.2 detected; module can see
> org.restlet.service from [23.2] and org.restlet.service from [23.0]
>
> Bundle 23 both exports, and imports org.restlet.* in its bnd configuration.
> Each time I update the bundle, the list of constraint violations just grows
> with references to the previous versions of the bundle.
>
> What would cause this?  Would this likely be something from another bundle
> holding onto class references/instances from my bundle 23?  If I call
> 'refresh' on the package things seem to clear up ok.
>
> The bundle operates as an extender style thing, watching for other bundles
> matching a certain condition (header), and pulling class's from it, which
> should be GC'd and no longer used/referenced after bundle 23 is updated.
>
> Any thoughts of what I'm missing, or possibly not doing right?
>
> mark
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org