You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Jürgen Kindler <jk...@talend.com> on 2011/01/06 13:09:53 UTC

Problems with Karaf hotdeploy

Hi,

I'm experiencing a problem with deploying a bundle into Karaf 2.1.2 by copying it into the <karaf_home>/deploy folder.
Basically I copy three bundles: commons-cli-1.2.jar, groovy-all-1.7.5.jar and easyb-0.9.8.jar

I turned the default log level of karaf to debug, but I don't see any hints about why it fails.
In the logs I see that commons-cli-1.2.jar &  groovy-all-1.7.5.jar are installed and started successfully:
12:34:20,897 | DEBUG | Event Dispatcher | cli                              | ?                                   ? | 32 - org.apache.commons.cli - 1.2 | BundleEvent INSTALLED
12:34:20,899 | DEBUG | Event Dispatcher | cli                              | ?                                   ? | 32 - org.apache.commons.cli - 1.2 | BundleEvent RESOLVED
12:34:20,900 | DEBUG | raf-2.1.2/deploy | BlueprintExtender                | rint.container.BlueprintExtender  210 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Scanning bundle org.apache.commons.cli for blueprint application
12:34:20,900 | DEBUG | raf-2.1.2/deploy | BlueprintExtender                | rint.container.BlueprintExtender  276 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | No blueprint application found in bundle org.apache.commons.cli
12:34:20,900 | DEBUG | Event Dispatcher | cli                              | ?                                   ? | 32 - org.apache.commons.cli - 1.2 | BundleEvent STARTED
12:34:31,155 | DEBUG | Event Dispatcher | groovy-all                       | ?                                   ? | 33 - groovy-all - 1.7.5 | BundleEvent INSTALLED
12:34:31,189 | DEBUG | Event Dispatcher | groovy-all                       | ?                                   ? | 33 - groovy-all - 1.7.5 | BundleEvent RESOLVED
12:34:31,208 | DEBUG | raf-2.1.2/deploy | BlueprintExtender                | rint.container.BlueprintExtender  210 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | Scanning bundle groovy-all for blueprint application
12:34:31,214 | DEBUG | raf-2.1.2/deploy | BlueprintExtender                | rint.container.BlueprintExtender  276 | 7 - org.apache.aries.blueprint - 0.2.0.incubating | No blueprint application found in bundle groovy-all
12:34:31,214 | DEBUG | Event Dispatcher | groovy-all                       | ?                                   ? | 33 - groovy-all - 1.7.5 | BundleEvent STARTED

However, there is nothing for the third bundle easyb-0.9.8.jar

Note that this really is a bundle and it is possible to explicitly install it using:
osgi:install file:/tmp/jki/apache-karaf-2.1.2/deploy/easyb-0.9.8.jar
Also starting it with its then assigned bundle id and using it works fine.

Somehow it seems like it is ignored by the process that watches the <karaf_home>/deploy folder :-(

Any ideas what the problem is or how I can figure out the root cause.

Cheers
  Juergen
--
Jürgen Kindler

Re: Problems with Karaf hotdeploy

Posted by Jürgen Kindler <jk...@talend.com>.
I've checked the jar now as well:
> jar -tf easyb-0.9.8.jar
META-INF/
META-INF/MANIFEST.MF
META-INF/services/
META-INF/services/org.easyb.plugin.SyntaxExtension
org/
org/easyb/
org/easyb/ant/
org/easyb/ant/AbstractJavaTask.class
org/easyb/ant/AbstractStoryTask.class
org/easyb/ant/BehaviorRunnerTask.class
org/easyb/ant/CommandRunner.class
org/easyb/ant/CommandRunnerImpl.class
org/easyb/ant/Report.class

Looks ok for me ... %-|

--
Jürgen Kindler

Re: Problems with Karaf hotdeploy

Posted by Jürgen Kindler <jk...@talend.com>.
JB, no... I guess in my case the problem is called "muCommander" :-(
I added the metadata manually by replacing the manifest directly inside muCommander.
Usually this works fine

On 1/6/11 14:54, "Jean-Baptiste Onofré" <jb...@nanthrax.net> wrote:

Hi Jürgen,

I got the same issue:
- the jar resulting to felix maven plugin was fine
- the maven assembly plugin corrupt the jar during copy goal

I have updated to the latest assembly plugin version. Maybe you have the
same behavior ?

--
Jürgen Kindler

Re: Problems with Karaf hotdeploy

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Jürgen,

I got the same issue:
- the jar resulting to felix maven plugin was fine
- the maven assembly plugin corrupt the jar during copy goal

I have updated to the latest assembly plugin version. Maybe you have the 
same behavior ?

Regards
JB

On 01/06/2011 02:52 PM, Jürgen Kindler wrote:
> X’-(
>
> Seems like the archive was broken anyway ... I re-jar’d it and now it
> works ‘:-) (phew)
>
> --
> *Jürgen Kindler
> *

Re: Problems with Karaf hotdeploy

Posted by Jürgen Kindler <jk...@talend.com>.
X'-(

Seems like the archive was broken anyway ... I re-jar'd it and now it works ':-) (phew)

--
Jürgen Kindler

Re: Problems with Karaf hotdeploy

Posted by Jürgen Kindler <jk...@talend.com>.
Hi Guillaume,

I'm currently checking the consistency of the jar.

Anyway after installing, it looks like this (so the jar cannot be completely broken):
karaf@root> list
START LEVEL 100 , List Threshold: 50
   ID   State         Blueprint      Level  Name
[  32] [Active     ] [            ] [   60] Commons CLI (1.2)
[  33] [Active     ] [            ] [   60] Groovy Runtime (1.7.5)
[  35] [Installed  ] [            ] [   60] Easyb (0.9.8)
karaf@root> bundle 35
ClassLoader          null
RegisteredServices   null
ServicesInUse        null
Fragments            null
LoaderProxy          easyb; bundle-version="0.9.8"
ProtectionDomain     null
Key                  35
Location             file:/tmp/jki/apache-karaf-2.1.2/deploy/easyb-0.9.8.jar
State                2
Version              0.9.8
LastModified         1294318503212
Headers              [Manifest-Version=1.0, Bundle-RequiredExecutionEnvironment=J2SE-1.5, Bundle-Name=Easyb, Ant-Version=Apache Ant 1.8.1, Import-Package=groovy.lang;version="1.7.5",groovy.text;version="1.7.5",groovy.xml;version="1.7.5",org.codehaus.groovy.reflection;version="1.7.5",org.codehaus.groovy.runtime;version="1.7.5",org.codehaus.groovy.runtime.callsite;version="1.7.5",org.codehaus.groovy.runtime.typehandling;version="1.7.5",org.apache.commons.cli;version="1.2", Bundle-SymbolicName=easyb, Export-Package=org.easyb;version="0.9.8",org.easyb.ant;version="0.9.8",org.easyb.delegates;version="0.9.8",org.easyb.domain;version="0.9.8",org.easyb.exception;version="0.9.8",org.easyb.listener;version="0.9.8",org.easyb.plugin;version="0.9.8",org.easyb.report;version="0.9.8",org.easyb.result;version="0.9.8",org.easyb.util;version="0.9.8", Bundle-Version=0.9.8, Created-By=1.6.0_22-b04-307-9M3263 (Apple Inc.), Bundle-ManifestVersion=2]
Framework            org.eclipse.osgi.framework.internal.core.Framework@152d950
BundleContext        null
BundleId             35
SymbolicName         easyb
BundleData           easyb_0.9.8
BundleDescription    easyb_0.9.8
KeyHashCode          35
ResolutionFailureException org.osgi.framework.BundleException: The bundle "easyb_0.9.8 [35]" could not be resolved
StateChanging        null

karaf@root> osgi:headers 35

Easyb (35)
----------
Manifest-Version = 1.0
Ant-Version = Apache Ant 1.8.1
Created-By = 1.6.0_22-b04-307-9M3263 (Apple Inc.)

Bundle-RequiredExecutionEnvironment = J2SE-1.5
Bundle-Name = Easyb
Bundle-SymbolicName = easyb
Bundle-Version = 0.9.8
Bundle-ManifestVersion = 2

Import-Package =
    groovy.lang;version=1.7.5,
    groovy.text;version=1.7.5,
    groovy.xml;version=1.7.5,
    org.codehaus.groovy.reflection;version=1.7.5,
    org.codehaus.groovy.runtime;version=1.7.5,
    org.codehaus.groovy.runtime.callsite;version=1.7.5,
    org.codehaus.groovy.runtime.typehandling;version=1.7.5,
    org.apache.commons.cli;version=1.2
Export-Package =
    org.easyb;version=0.9.8,
    org.easyb.ant;version=0.9.8,
    org.easyb.delegates;version=0.9.8,
    org.easyb.domain;version=0.9.8,
    org.easyb.exception;version=0.9.8,
    org.easyb.listener;version=0.9.8,
    org.easyb.plugin;version=0.9.8,
    org.easyb.report;version=0.9.8,
    org.easyb.result;version=0.9.8,
    org.easyb.util;version=0.9.8


On 1/6/11 13:26, "Guillaume Nodet" <gn...@gmail.com> wrote:

Can you give the output of osgi:headers for the easyb bundle once
installed manually ?
FileInstall only installs correct jars and r4 compatible bundle.  This
means that the MANIFEST.MF
has to be the first or second entry in the jar (eventually after META-INF/ )


--
Jürgen Kindler

Re: Problems with Karaf hotdeploy

Posted by Guillaume Nodet <gn...@gmail.com>.
Can you give the output of osgi:headers for the easyb bundle once
installed manually ?
FileInstall only installs correct jars and r4 compatible bundle.  This
means that the MANIFEST.MF
has to be the first or second entry in the jar (eventually after META-INF/ )

On Thu, Jan 6, 2011 at 13:09, Jürgen Kindler <jk...@talend.com> wrote:
> Hi,
>
> I’m experiencing a problem with deploying a bundle into Karaf 2.1.2 by
> copying it into the <karaf_home>/deploy folder.
> Basically I copy three bundles: commons-cli-1.2.jar, groovy-all-1.7.5.jar
> and easyb-0.9.8.jar
>
> I turned the default log level of karaf to debug, but I don’t see any hints
> about why it fails.
> In the logs I see that commons-cli-1.2.jar &  groovy-all-1.7.5.jar are
> installed and started successfully:
> 12:34:20,897 | DEBUG | Event Dispatcher | cli                              |
> ?                                   ? | 32 - org.apache.commons.cli - 1.2 |
> BundleEvent INSTALLED
> 12:34:20,899 | DEBUG | Event Dispatcher | cli                              |
> ?                                   ? | 32 - org.apache.commons.cli - 1.2 |
> BundleEvent RESOLVED
> 12:34:20,900 | DEBUG | raf-2.1.2/deploy | BlueprintExtender                |
> rint.container.BlueprintExtender  210 | 7 - org.apache.aries.blueprint -
> 0.2.0.incubating | Scanning bundle org.apache.commons.cli for blueprint
> application
> 12:34:20,900 | DEBUG | raf-2.1.2/deploy | BlueprintExtender                |
> rint.container.BlueprintExtender  276 | 7 - org.apache.aries.blueprint -
> 0.2.0.incubating | No blueprint application found in bundle
> org.apache.commons.cli
> 12:34:20,900 | DEBUG | Event Dispatcher | cli                              |
> ?                                   ? | 32 - org.apache.commons.cli - 1.2 |
> BundleEvent STARTED
> 12:34:31,155 | DEBUG | Event Dispatcher | groovy-all                       |
> ?                                   ? | 33 - groovy-all - 1.7.5 |
> BundleEvent INSTALLED
> 12:34:31,189 | DEBUG | Event Dispatcher | groovy-all                       |
> ?                                   ? | 33 - groovy-all - 1.7.5 |
> BundleEvent RESOLVED
> 12:34:31,208 | DEBUG | raf-2.1.2/deploy | BlueprintExtender                |
> rint.container.BlueprintExtender  210 | 7 - org.apache.aries.blueprint -
> 0.2.0.incubating | Scanning bundle groovy-all for blueprint application
> 12:34:31,214 | DEBUG | raf-2.1.2/deploy | BlueprintExtender                |
> rint.container.BlueprintExtender  276 | 7 - org.apache.aries.blueprint -
> 0.2.0.incubating | No blueprint application found in bundle groovy-all
> 12:34:31,214 | DEBUG | Event Dispatcher | groovy-all                       |
> ?                                   ? | 33 - groovy-all - 1.7.5 |
> BundleEvent STARTED
>
> However, there is nothing for the third bundle easyb-0.9.8.jar
>
> Note that this really is a bundle and it is possible to explicitly install
> it using:
> osgi:install file:/tmp/jki/apache-karaf-2.1.2/deploy/easyb-0.9.8.jar
> Also starting it with its then assigned bundle id and using it works fine.
>
> Somehow it seems like it is ignored by the process that watches the
> <karaf_home>/deploy folder :-(
>
> Any ideas what the problem is or how I can figure out the root cause.
>
> Cheers
>   Juergen
> --
> Jürgen Kindler
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: Problems with Karaf hotdeploy

Posted by Jürgen Kindler <jk...@talend.com>.
P.S.: I've configured Karaf to use Equinox, not Felix.

Cheers
  Juergen

--
Jürgen Kindler