Sporadic Exception when installing features

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Sporadic Exception when installing features

iocanel
Hi,

I am trying to identify an issue I am having with the latest karaf release.
On a fresh installation I do the following:

karaf@root> features:install spring
karaf@root> features:install webconsole
karaf@root> features:install war

At this point I get an exception:

Error executing command: Could not start bundle
mvn:org.ops4j.pax.web/pax-web-jsp/0.7.2 in feature(s) : Unresolved
constraint in bundle org.ops4j.pax.web.pax-web-jsp [53]: Unable to acquire
global lock for resolve.

I retry the command:

ERROR: JarContent: Unable to read bytes. (java.lang.IllegalStateException:
zip file closed)

With the third attempt everything seems fine

The behavior described above is deterministic (it happens everytime).

The behavior I will describe below is somehow random (sometimes it happens
and sometimes not).

karaf@root> features:addUrl file:/<location to a home made feature xml>
karaf@root> features:install <home made feature name (its a webapp)>

Sometimes I get a ClassNotFoundException: org/osgi/service/http/HttpService
(its only solved with restarting karaf), while sometimes it works with no
problems.


--
Ioannis D. Canellos
Ioannis Canellos
http://iocanel.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: Sporadic Exception when installing features

Guillaume Nodet
A first test would be to try the same commands with Equinox and see
what happen.  It looks like a bug in the OSGi framework to me.

On Wed, Aug 25, 2010 at 18:25, Ioannis Canellos <[hidden email]> wrote:

> Hi,
>
> I am trying to identify an issue I am having with the latest karaf release.
> On a fresh installation I do the following:
>
> karaf@root> features:install spring
> karaf@root> features:install webconsole
> karaf@root> features:install war
>
> At this point I get an exception:
>
> Error executing command: Could not start bundle
> mvn:org.ops4j.pax.web/pax-web-jsp/0.7.2 in feature(s) : Unresolved
> constraint in bundle org.ops4j.pax.web.pax-web-jsp [53]: Unable to acquire
> global lock for resolve.
>
> I retry the command:
>
> ERROR: JarContent: Unable to read bytes. (java.lang.IllegalStateException:
> zip file closed)
>
> With the third attempt everything seems fine
>
> The behavior described above is deterministic (it happens everytime).
>
> The behavior I will describe below is somehow random (sometimes it happens
> and sometimes not).
>
> karaf@root> features:addUrl file:/<location to a home made feature xml>
> karaf@root> features:install <home made feature name (its a webapp)>
>
> Sometimes I get a ClassNotFoundException: org/osgi/service/http/HttpService
> (its only solved with restarting karaf), while sometimes it works with no
> problems.
>
>
> --
> Ioannis D. Canellos
>



--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com
Reply | Threaded
Open this post in threaded view
|

Re: Sporadic Exception when installing features

jbonofre
In reply to this post by iocanel
Hi Ioannis,

looks like a bug in the OSGi framework.

I guess that you use Apache Felix, maybe we can dig into Felix.

Regards
JB

On 08/25/2010 06:25 PM, Ioannis Canellos wrote:

> Hi,
>
> I am trying to identify an issue I am having with the latest karaf release.
> On a fresh installation I do the following:
>
> karaf@root>  features:install spring
> karaf@root>  features:install webconsole
> karaf@root>  features:install war
>
> At this point I get an exception:
>
> Error executing command: Could not start bundle
> mvn:org.ops4j.pax.web/pax-web-jsp/0.7.2 in feature(s) : Unresolved
> constraint in bundle org.ops4j.pax.web.pax-web-jsp [53]: Unable to acquire
> global lock for resolve.
>
> I retry the command:
>
> ERROR: JarContent: Unable to read bytes. (java.lang.IllegalStateException:
> zip file closed)
>
> With the third attempt everything seems fine
>
> The behavior described above is deterministic (it happens everytime).
>
> The behavior I will describe below is somehow random (sometimes it happens
> and sometimes not).
>
> karaf@root>  features:addUrl file:/<location to a home made feature xml>
> karaf@root>  features:install<home made feature name (its a webapp)>
>
> Sometimes I get a ClassNotFoundException: org/osgi/service/http/HttpService
> (its only solved with restarting karaf), while sometimes it works with no
> problems.
>
>

--
Jean-Baptiste Onofré
---------------------------------
  HomePage
http://www.nanthrax.net
---------------------------------
  Contacts
[hidden email]
[hidden email]
---------------------------------
  OpenSource
BuildProcess/AutoDeploy
http://buildprocess.sourceforge.net
Apache ServiceMix
http://servicemix.apache.org
-----------------------------------
PGP : 17D4F086
Reply | Threaded
Open this post in threaded view
|

Re: Sporadic Exception when installing features

iocanel
I will try to see if I can reproduce it with Equinox.

On Wed, Aug 25, 2010 at 8:39 PM, Jean-Baptiste Onofré <[hidden email]>wrote:

> Hi Ioannis,
>
> looks like a bug in the OSGi framework.
>
> I guess that you use Apache Felix, maybe we can dig into Felix.
>
> Regards
> JB
>
>
> On 08/25/2010 06:25 PM, Ioannis Canellos wrote:
>
>> Hi,
>>
>> I am trying to identify an issue I am having with the latest karaf
>> release.
>> On a fresh installation I do the following:
>>
>> karaf@root>  features:install spring
>> karaf@root>  features:install webconsole
>> karaf@root>  features:install war
>>
>> At this point I get an exception:
>>
>> Error executing command: Could not start bundle
>> mvn:org.ops4j.pax.web/pax-web-jsp/0.7.2 in feature(s) : Unresolved
>> constraint in bundle org.ops4j.pax.web.pax-web-jsp [53]: Unable to acquire
>> global lock for resolve.
>>
>> I retry the command:
>>
>> ERROR: JarContent: Unable to read bytes. (java.lang.IllegalStateException:
>> zip file closed)
>>
>> With the third attempt everything seems fine
>>
>> The behavior described above is deterministic (it happens everytime).
>>
>> The behavior I will describe below is somehow random (sometimes it happens
>> and sometimes not).
>>
>> karaf@root>  features:addUrl file:/<location to a home made feature xml>
>> karaf@root>  features:install<home made feature name (its a webapp)>
>>
>> Sometimes I get a ClassNotFoundException:
>> org/osgi/service/http/HttpService
>> (its only solved with restarting karaf), while sometimes it works with no
>> problems.
>>
>>
>>
> --
> Jean-Baptiste Onofré
> ---------------------------------
>  HomePage
> http://www.nanthrax.net
> ---------------------------------
>  Contacts
> [hidden email]
> [hidden email]
> ---------------------------------
>  OpenSource
> BuildProcess/AutoDeploy
> http://buildprocess.sourceforge.net
> Apache ServiceMix
> http://servicemix.apache.org
> -----------------------------------
> PGP : 17D4F086
>



--
Ioannis D. Canellos
Ioannis Canellos
http://iocanel.blogspot.com