karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amichai Rothman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-3973) Bundles refresh doesn't work (bundles not resolved)
Date Wed, 18 Nov 2015 10:21:10 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15010680#comment-15010680

Amichai Rothman commented on KARAF-3973:

Still there on 4.0.3.

I haven't yet been able to create a standalone test project to recreate this, still trying
to pinpoint the issue from our rather complex proprietary project.

I have, however, narrowed it down: I can now put a single bundle in deploy folder, along with
some boot features (one of which is custom and contains various project dependencies), and
start karaf (after deleting the data dir), and the bundle is activated. However, if I refresh
the bundle using the shell command, it stays on installed state rather than being active again.
Trying to see why it won't resolve, it says that it's missing a package which is actually
exported by the system (0) bundle (although diag doesn't show it). I suspect (not sure) that
this is the root cause of the reported issue - something is going wrong with the resolver.
Any suggestions on how to proceed?

>>la | grep myapp
 11 | Active   |  80 | 0.1.0.SNAPSHOT                     | myapp common [com.myapp.common]
>>refresh 11
>>la | grep myapp
 11 | Installed |  80 | 0.1.0.SNAPSHOT                     | myapp common [com.myapp.common]
>>restart 11
Error executing command: Error restarting bundles:
        Unable to start bundle 11: Could not resolve module: com.myapp.common [11]
  Unresolved requirement: Import-Package: javax.xml.bind.annotation

>>diag 11
myapp common [com.myapp.common] (11)
Status: Installed
Unsatisfied Requirements:

>>exports | grep javax.xml.bind.annotation
javax.xml.bind.annotation.adapters                        | 2.2.1                        
     | 0   | org.eclipse.osgi
javax.xml.bind.annotation                                 | 2.2.1                        
     | 0   | org.eclipse.osgi

> Bundles refresh doesn't work (bundles not resolved)
> ---------------------------------------------------
>                 Key: KARAF-3973
>                 URL: https://issues.apache.org/jira/browse/KARAF-3973
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-core
>    Affects Versions: 4.0.1
>            Reporter: Amichai Rothman
>            Priority: Critical
> I have a bunch of bundles copied into the deploy folder of a fresh karaf 4.0.1 installation.
The first time karaf runs, the bundles are not properly resolved, and apparently this has
to do with the order in which they are loaded, i.e. if A depends on B and A is loaded first,
then when B is loaded it is properly resolved but A never gets resolved. running the refresh
command from console does not help either. However, if karaf itself is restarted, then everything
is resolved and activated with no problem.
> In Karaf up to 3.0.3 this was not an issue - the moment B was loaded, even on the first
time Karaf is run, A would automatically get resolved/activated as well. on 3.0.4 I get a
deadlock on startup, so can't really tell if it works (see KARAF-3941). on 4.0.0 I haven't
tried. 4.0.1 is the current reported issue.

This message was sent by Atlassian JIRA

View raw message