You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by gharbi jjjj <el...@yahoo.fr> on 2010/08/11 15:53:11 UTC
Installing a bundle
Good morning,
I am trying to install for the first time a bundle using the OSGi technology.
I have followed step by step the URL
http://felix.apache.org/site/apache-felix-tutorial-example-1.html
At the begin, I created a folder named first containing the Activator.java and
manifest.mf files.
Secondly, I change the directory using this command
Cd C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1
Thirdly, I compile the java file using this command
javac -d c:\classes -classpath lib\osgi.jar first\*.java
Then, I change the directory again (cd .\first).
I write the command to create a jar file :
jar cfm example1.jar manifest.mf -C c:\classes tutorial\example1
I change the directory (cd .. )
I launch the felix environment ( java -jar .\bin\felix.jar )
Finally, I try to install this new jar by this command
start file:/c:/tutorial/example1.jar
But, only at this step, it does not work. Some errors are written such as
org.osgi.framework.BundleException: Unable to cache bundle: file:c:/classes/tuto
rial/example1.jar
at org.apache.felix.framework.Felix.installBundle(Felix.java:2485)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2441)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
extImpl.java:129)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
extImpl.java:107)
at org.apache.felix.gogo.command.Basic.start(Basic.java:753)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
82)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:421)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:3
35)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:184)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:121)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
onImpl.java:78)
at org.apache.felix.gogo.shell.Console.run(Console.java:62)
at org.apache.felix.gogo.shell.Shell.console(Shell.java:197)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
NB the jar file is not created (I search it but I did not find).
What do you think the error source ?
With my best regards,
Atef Gharbi.
Re: Re : Installing a bundle
Posted by Marcel Offermans <ma...@luminis.nl>.
On 11 Aug 2010, at 16:08 , gharbi jjjj wrote:
> Yes, it is in the folder \first. I have tried to install this bundle using this
> command but it does not work
>
> install
> C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1\first\example1.jar
Last time I looked, install only takes URLs as arguments, so I would try what Richard replied earlier:
install file:first/example1.jar
Greetings, Marcel
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re : Installing a bundle
Posted by gharbi jjjj <el...@yahoo.fr>.
Yes, it is in the folder \first. I have tried to install this bundle using this
command but it does not work
install
C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1\first\example1.jar
but we find the following message
org.osgi.framework.BundleException: Unable to cache bundle: C:Usersateforg.apach
e.felix.main.distribution-3.0.1felix-framework-3.0.1firstexample1.jar
at org.apache.felix.framework.Felix.installBundle(Felix.java:2485)
at org.apache.felix.framework.Felix.installBundle(Felix.java:2441)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
extImpl.java:129)
at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
extImpl.java:107)
at org.apache.felix.gogo.command.Basic.start(Basic.java:753)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
82)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:421)
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:3
35)
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:184)
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:121)
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
onImpl.java:78)
at org.apache.felix.gogo.shell.Console.run(Console.java:62)
at org.apache.felix.gogo.shell.Shell.console(Shell.java:197)
at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:123)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
I do not understand why ???
Atef Gharbi
________________________________
De : Richard S. Hall <he...@ungoverned.org>
À : users@felix.apache.org
Envoyé le : Mer 11 août 2010, 15h 02min 27s
Objet : Re: Installing a bundle
On 8/11/10 10:00, Richard S. Hall wrote:
> You created bundle should be in
>C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1\first,
> no?
"YOUR created bundle should be in..."
-> richard
>
> -> richard
>
> On 8/11/10 9:53, gharbi jjjj wrote:
>> Good morning,
>>
>> I am trying to install for the first time a bundle using the OSGi technology.
>>
>> I have followed step by step the URL
>> http://felix.apache.org/site/apache-felix-tutorial-example-1.html
>>
>> At the begin, I created a folder named first containing the Activator.java
and
>> manifest.mf files.
>>
>> Secondly, I change the directory using this command
>> Cd
>C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1
>>
>> Thirdly, I compile the java file using this command
>> javac -d c:\classes -classpath lib\osgi.jar first\*.java
>>
>> Then, I change the directory again (cd .\first).
>>
>> I write the command to create a jar file :
>> jar cfm example1.jar manifest.mf -C c:\classes tutorial\example1
>>
>> I change the directory (cd .. )
>>
>> I launch the felix environment ( java -jar .\bin\felix.jar )
>>
>> Finally, I try to install this new jar by this command
>>
>> start file:/c:/tutorial/example1.jar
>>
>> But, only at this step, it does not work. Some errors are written such as
>>
>>
>> org.osgi.framework.BundleException: Unable to cache bundle:
>>file:c:/classes/tuto
>> rial/example1.jar
>> at org.apache.felix.framework.Felix.installBundle(Felix.java:2485)
>> at org.apache.felix.framework.Felix.installBundle(Felix.java:2441)
>> at
>>org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
>> extImpl.java:129)
>> at
>>org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
>> extImpl.java:107)
>> at org.apache.felix.gogo.command.Basic.start(Basic.java:753)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at
>>org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
>> at
>>org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
>> 82)
>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:421)
>> at
>>org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:3
>> 35)
>> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:184)
>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:121)
>> at
>>org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
>> onImpl.java:78)
>> at org.apache.felix.gogo.shell.Console.run(Console.java:62)
>> at org.apache.felix.gogo.shell.Shell.console(Shell.java:197)
>> at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:123)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>>
>>
>>
>> NB the jar file is not created (I search it but I did not find).
>>
>>
>> What do you think the error source ?
>>
>> With my best regards,
>>
>> Atef Gharbi.
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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: Installing a bundle
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 8/11/10 10:00, Richard S. Hall wrote:
> You created bundle should be in
> C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1\first,
> no?
"YOUR created bundle should be in..."
-> richard
>
> -> richard
>
> On 8/11/10 9:53, gharbi jjjj wrote:
>> Good morning,
>>
>> I am trying to install for the first time a bundle using the OSGi
>> technology.
>>
>> I have followed step by step the URL
>> http://felix.apache.org/site/apache-felix-tutorial-example-1.html
>>
>> At the begin, I created a folder named first containing the
>> Activator.java and
>> manifest.mf files.
>>
>> Secondly, I change the directory using this command
>> Cd
>> C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1
>>
>> Thirdly, I compile the java file using this command
>> javac -d c:\classes -classpath lib\osgi.jar first\*.java
>>
>> Then, I change the directory again (cd .\first).
>>
>> I write the command to create a jar file :
>> jar cfm example1.jar manifest.mf -C c:\classes tutorial\example1
>>
>> I change the directory (cd .. )
>>
>> I launch the felix environment ( java -jar .\bin\felix.jar )
>>
>> Finally, I try to install this new jar by this command
>>
>> start file:/c:/tutorial/example1.jar
>>
>> But, only at this step, it does not work. Some errors are written
>> such as
>>
>>
>> org.osgi.framework.BundleException: Unable to cache bundle:
>> file:c:/classes/tuto
>> rial/example1.jar
>> at
>> org.apache.felix.framework.Felix.installBundle(Felix.java:2485)
>> at
>> org.apache.felix.framework.Felix.installBundle(Felix.java:2441)
>> at
>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
>> extImpl.java:129)
>> at
>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
>> extImpl.java:107)
>> at org.apache.felix.gogo.command.Basic.start(Basic.java:753)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>> Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at
>> org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
>> at
>> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
>> 82)
>> at
>> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:421)
>> at
>> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:3
>> 35)
>> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>> at
>> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:184)
>> at
>> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:121)
>> at
>> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
>> onImpl.java:78)
>> at org.apache.felix.gogo.shell.Console.run(Console.java:62)
>> at org.apache.felix.gogo.shell.Shell.console(Shell.java:197)
>> at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:123)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>> Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>>
>>
>>
>> NB the jar file is not created (I search it but I did not find).
>>
>>
>> What do you think the error source ?
>>
>> With my best regards,
>>
>> Atef Gharbi.
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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: Re : Installing a bundle
Posted by Steven Siebert <sm...@gmail.com>.
Great link, thanks!
On Thu, Aug 12, 2010 at 3:40 AM, Petr Jiricka <Pe...@sun.com> wrote:
> On Aug 11, 2010, at 5:56 PM, Steven Siebert wrote:
>
> Netbeans also has some OSGi support (it uses Ant in the back end). I
>> haven't yet tested the limits, as I am just starting out myself...but you
>> might find this helpful/interesting:
>>
>
> There are actually several ways to work with OSGi in NetBeans. Besides the
> wiki page mentioned below, one can also develop OSGi bundles using Maven:
> http://netbeans.org/kb/docs/javaee/maven-osgi-declarativeservices.html
>
> This approach uses the Maven bundle plugin mentioned in this thread.
>
>
>
>> http://wiki.netbeans.org/OSGiAndNetBeans
>>
>
> This approach is also useful, but specifically targets development of Swing
> applications based on the NetBeans RCP. So if you are specifically
> interested in client-side applications based on the NetBeans platform, then
> this wiki page is appropriate (and there is more documentation in the
> NetBeans Platform Learning Trail:
> http://netbeans.org/kb/trails/platform.html).
> But if you'd like to develop general OSGi bundles not tied to the NetBeans
> RCP, then the approach based on the "Maven OSGi Bundle" project type
> described in this document:
> http://netbeans.org/kb/docs/javaee/maven-osgi-declarativeservices.html is
> more appropriate.
>
> Petr
>
>
>
>
>>
>>
>>
>> On Wed, Aug 11, 2010 at 10:38 AM, Marcel Offermans <
>> marcel.offermans@luminis.nl> wrote:
>>
>>
>>> On 11 Aug 2010, at 16:33 , gharbi jjjj wrote:
>>>
>>> It is the right command that I try
>>>>
>>>> start file:first/example1.jar
>>>>
>>>>
>>>> I have two questions :
>>>>
>>>> 1. Is there any graphical interface to handle bundles in felix as it is
>>>>
>>> the case
>>>
>>>> with Oscar ?
>>>>
>>>
>>> There is a very nice web console available, but no Swing based GUI.
>>>
>>> 2. Is there any tool that simplifies the task for creating and
>>>> generating
>>>> bundles (I have found two interesting tools Maven and especially
>>>>
>>> Pax-construct
>>>
>>>> but unfortunately I did not arrive to obtain a bundle using these tools
>>>> )
>>>>
>>> ?
>>>
>>> There are many tools available, depending on your preferences and build
>>> system. The ones you mention should work just fine, and the Maven bundle
>>> plugin is extensively documented and used here at Felix. For
>>> Pax-Construct
>>> questions, you should probably go to the OPS4J site/mailinglist.
>>>
>>> Greetings, Marcel
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: Re : Installing a bundle
Posted by Petr Jiricka <Pe...@Sun.COM>.
On Aug 11, 2010, at 5:56 PM, Steven Siebert wrote:
> Netbeans also has some OSGi support (it uses Ant in the back end). I
> haven't yet tested the limits, as I am just starting out
> myself...but you
> might find this helpful/interesting:
There are actually several ways to work with OSGi in NetBeans. Besides
the wiki page mentioned below, one can also develop OSGi bundles using
Maven:
http://netbeans.org/kb/docs/javaee/maven-osgi-declarativeservices.html
This approach uses the Maven bundle plugin mentioned in this thread.
>
> http://wiki.netbeans.org/OSGiAndNetBeans
This approach is also useful, but specifically targets development of
Swing applications based on the NetBeans RCP. So if you are
specifically interested in client-side applications based on the
NetBeans platform, then this wiki page is appropriate (and there is
more documentation in the NetBeans Platform Learning Trail: http://netbeans.org/kb/trails/platform.html)
.
But if you'd like to develop general OSGi bundles not tied to the
NetBeans RCP, then the approach based on the "Maven OSGi Bundle"
project type described in this document: http://netbeans.org/kb/docs/javaee/maven-osgi-declarativeservices.html
is more appropriate.
Petr
>
>
>
>
> On Wed, Aug 11, 2010 at 10:38 AM, Marcel Offermans <
> marcel.offermans@luminis.nl> wrote:
>
>>
>> On 11 Aug 2010, at 16:33 , gharbi jjjj wrote:
>>
>>> It is the right command that I try
>>>
>>> start file:first/example1.jar
>>>
>>>
>>> I have two questions :
>>>
>>> 1. Is there any graphical interface to handle bundles in felix as
>>> it is
>> the case
>>> with Oscar ?
>>
>> There is a very nice web console available, but no Swing based GUI.
>>
>>> 2. Is there any tool that simplifies the task for creating and
>>> generating
>>> bundles (I have found two interesting tools Maven and especially
>> Pax-construct
>>> but unfortunately I did not arrive to obtain a bundle using these
>>> tools )
>> ?
>>
>> There are many tools available, depending on your preferences and
>> build
>> system. The ones you mention should work just fine, and the Maven
>> bundle
>> plugin is extensively documented and used here at Felix. For Pax-
>> Construct
>> questions, you should probably go to the OPS4J site/mailinglist.
>>
>> Greetings, Marcel
>>
>>
>> ---------------------------------------------------------------------
>> 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: Re : Installing a bundle
Posted by Steven Siebert <sm...@gmail.com>.
Netbeans also has some OSGi support (it uses Ant in the back end). I
haven't yet tested the limits, as I am just starting out myself...but you
might find this helpful/interesting:
http://wiki.netbeans.org/OSGiAndNetBeans
On Wed, Aug 11, 2010 at 10:38 AM, Marcel Offermans <
marcel.offermans@luminis.nl> wrote:
>
> On 11 Aug 2010, at 16:33 , gharbi jjjj wrote:
>
> > It is the right command that I try
> >
> > start file:first/example1.jar
> >
> >
> > I have two questions :
> >
> > 1. Is there any graphical interface to handle bundles in felix as it is
> the case
> > with Oscar ?
>
> There is a very nice web console available, but no Swing based GUI.
>
> > 2. Is there any tool that simplifies the task for creating and generating
> > bundles (I have found two interesting tools Maven and especially
> Pax-construct
> > but unfortunately I did not arrive to obtain a bundle using these tools )
> ?
>
> There are many tools available, depending on your preferences and build
> system. The ones you mention should work just fine, and the Maven bundle
> plugin is extensively documented and used here at Felix. For Pax-Construct
> questions, you should probably go to the OPS4J site/mailinglist.
>
> Greetings, Marcel
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: Re : Installing a bundle
Posted by Charles Moulliard <cm...@gmail.com>.
Consider using this, you will simplify your life :
http://karaf.apache.org/46-provisioning.html
It use also the PAX url project of OPS4J.
Kind regards,
Charles Moulliard
Senior Enterprise Architect (J2EE, .NET, SOA)
Apache Camel - Karaf - ServiceMix Committer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blog : http://cmoulliard.blogspot.com | Twitter :
http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard
On Wed, Aug 11, 2010 at 9:53 PM, Rémon. Sinnema <rs...@yahoo.com> wrote:
> ----- Original Message ----
>
> From: Marcel Offermans <ma...@luminis.nl>
> To: users@felix.apache.org
> Sent: Wed, August 11, 2010 4:38:56 PM
> Subject: Re: Re : Installing a bundle
>
> > There is a very nice web console available, but no Swing based GUI.
>
> See [1], download from [2].
>
>
> > There are many tools available, depending on your preferences and build
> system.
> >
>
> I've had good experiences with Gradle [3].
>
>
> [1] http://felix.apache.org/site/apache-felix-web-console.html
> [2] http://felix.apache.org/site/downloads.cgi
> [3] http://gradle.org/
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
Re: Re : Installing a bundle
Posted by "Rémon. Sinnema" <rs...@yahoo.com>.
----- Original Message ----
From: Marcel Offermans <ma...@luminis.nl>
To: users@felix.apache.org
Sent: Wed, August 11, 2010 4:38:56 PM
Subject: Re: Re : Installing a bundle
> There is a very nice web console available, but no Swing based GUI.
See [1], download from [2].
> There are many tools available, depending on your preferences and build system.
>
I've had good experiences with Gradle [3].
[1] http://felix.apache.org/site/apache-felix-web-console.html
[2] http://felix.apache.org/site/downloads.cgi
[3] http://gradle.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Re : Installing a bundle
Posted by Marcel Offermans <ma...@luminis.nl>.
On 11 Aug 2010, at 16:33 , gharbi jjjj wrote:
> It is the right command that I try
>
> start file:first/example1.jar
>
>
> I have two questions :
>
> 1. Is there any graphical interface to handle bundles in felix as it is the case
> with Oscar ?
There is a very nice web console available, but no Swing based GUI.
> 2. Is there any tool that simplifies the task for creating and generating
> bundles (I have found two interesting tools Maven and especially Pax-construct
> but unfortunately I did not arrive to obtain a bundle using these tools ) ?
There are many tools available, depending on your preferences and build system. The ones you mention should work just fine, and the Maven bundle plugin is extensively documented and used here at Felix. For Pax-Construct questions, you should probably go to the OPS4J site/mailinglist.
Greetings, Marcel
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re : Installing a bundle
Posted by gharbi jjjj <el...@yahoo.fr>.
It is the right command that I try
start file:first/example1.jar
I have two questions :
1. Is there any graphical interface to handle bundles in felix as it is the case
with Oscar ?
2. Is there any tool that simplifies the task for creating and generating
bundles (I have found two interesting tools Maven and especially Pax-construct
but unfortunately I did not arrive to obtain a bundle using these tools ) ?
Yours sincerly,
Atef Gharbi.
________________________________
De : Richard S. Hall <he...@ungoverned.org>
À : users@felix.apache.org
Envoyé le : Mer 11 août 2010, 15h 04min 28s
Objet : Re: Installing a bundle
On 8/11/10 10:00, Richard S. Hall wrote:
> You created bundle should be in
>C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1\first,
> no?
Responding to myself yet again, if you did correctly create it in first/, then
you should be able to install and start it with:
start file:first/example1.jar
-> richard
>
> -> richard
>
> On 8/11/10 9:53, gharbi jjjj wrote:
>> Good morning,
>>
>> I am trying to install for the first time a bundle using the OSGi technology.
>>
>> I have followed step by step the URL
>> http://felix.apache.org/site/apache-felix-tutorial-example-1.html
>>
>> At the begin, I created a folder named first containing the Activator.java
and
>> manifest.mf files.
>>
>> Secondly, I change the directory using this command
>> Cd
>C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1
>>
>> Thirdly, I compile the java file using this command
>> javac -d c:\classes -classpath lib\osgi.jar first\*.java
>>
>> Then, I change the directory again (cd .\first).
>>
>> I write the command to create a jar file :
>> jar cfm example1.jar manifest.mf -C c:\classes tutorial\example1
>>
>> I change the directory (cd .. )
>>
>> I launch the felix environment ( java -jar .\bin\felix.jar )
>>
>> Finally, I try to install this new jar by this command
>>
>> start file:/c:/tutorial/example1.jar
>>
>> But, only at this step, it does not work. Some errors are written such as
>>
>>
>> org.osgi.framework.BundleException: Unable to cache bundle:
>>file:c:/classes/tuto
>> rial/example1.jar
>> at org.apache.felix.framework.Felix.installBundle(Felix.java:2485)
>> at org.apache.felix.framework.Felix.installBundle(Felix.java:2441)
>> at
>>org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
>> extImpl.java:129)
>> at
>>org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
>> extImpl.java:107)
>> at org.apache.felix.gogo.command.Basic.start(Basic.java:753)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at
>>org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
>> at
>>org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
>> 82)
>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:421)
>> at
>>org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:3
>> 35)
>> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:184)
>> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:121)
>> at
>>org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
>> onImpl.java:78)
>> at org.apache.felix.gogo.shell.Console.run(Console.java:62)
>> at org.apache.felix.gogo.shell.Shell.console(Shell.java:197)
>> at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:123)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>>
>>
>>
>> NB the jar file is not created (I search it but I did not find).
>>
>>
>> What do you think the error source ?
>>
>> With my best regards,
>>
>> Atef Gharbi.
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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: Installing a bundle
Posted by "Richard S. Hall" <he...@ungoverned.org>.
On 8/11/10 10:00, Richard S. Hall wrote:
> You created bundle should be in
> C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1\first,
> no?
Responding to myself yet again, if you did correctly create it in
first/, then you should be able to install and start it with:
start file:first/example1.jar
-> richard
>
> -> richard
>
> On 8/11/10 9:53, gharbi jjjj wrote:
>> Good morning,
>>
>> I am trying to install for the first time a bundle using the OSGi
>> technology.
>>
>> I have followed step by step the URL
>> http://felix.apache.org/site/apache-felix-tutorial-example-1.html
>>
>> At the begin, I created a folder named first containing the
>> Activator.java and
>> manifest.mf files.
>>
>> Secondly, I change the directory using this command
>> Cd
>> C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1
>>
>> Thirdly, I compile the java file using this command
>> javac -d c:\classes -classpath lib\osgi.jar first\*.java
>>
>> Then, I change the directory again (cd .\first).
>>
>> I write the command to create a jar file :
>> jar cfm example1.jar manifest.mf -C c:\classes tutorial\example1
>>
>> I change the directory (cd .. )
>>
>> I launch the felix environment ( java -jar .\bin\felix.jar )
>>
>> Finally, I try to install this new jar by this command
>>
>> start file:/c:/tutorial/example1.jar
>>
>> But, only at this step, it does not work. Some errors are written
>> such as
>>
>>
>> org.osgi.framework.BundleException: Unable to cache bundle:
>> file:c:/classes/tuto
>> rial/example1.jar
>> at
>> org.apache.felix.framework.Felix.installBundle(Felix.java:2485)
>> at
>> org.apache.felix.framework.Felix.installBundle(Felix.java:2441)
>> at
>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
>> extImpl.java:129)
>> at
>> org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
>> extImpl.java:107)
>> at org.apache.felix.gogo.command.Basic.start(Basic.java:753)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>> Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at
>> org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
>> at
>> org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
>> 82)
>> at
>> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:421)
>> at
>> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:3
>> 35)
>> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
>> at
>> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:184)
>> at
>> org.apache.felix.gogo.runtime.Closure.execute(Closure.java:121)
>> at
>> org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
>> onImpl.java:78)
>> at org.apache.felix.gogo.shell.Console.run(Console.java:62)
>> at org.apache.felix.gogo.shell.Shell.console(Shell.java:197)
>> at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:123)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
>> Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>>
>>
>>
>> NB the jar file is not created (I search it but I did not find).
>>
>>
>> What do you think the error source ?
>>
>> With my best regards,
>>
>> Atef Gharbi.
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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: Installing a bundle
Posted by "Richard S. Hall" <he...@ungoverned.org>.
You created bundle should be in
C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1\first,
no?
-> richard
On 8/11/10 9:53, gharbi jjjj wrote:
> Good morning,
>
> I am trying to install for the first time a bundle using the OSGi technology.
>
> I have followed step by step the URL
> http://felix.apache.org/site/apache-felix-tutorial-example-1.html
>
> At the begin, I created a folder named first containing the Activator.java and
> manifest.mf files.
>
> Secondly, I change the directory using this command
> Cd C:\Users\atef\org.apache.felix.main.distribution-3.0.1\felix-framework-3.0.1
>
> Thirdly, I compile the java file using this command
> javac -d c:\classes -classpath lib\osgi.jar first\*.java
>
> Then, I change the directory again (cd .\first).
>
> I write the command to create a jar file :
> jar cfm example1.jar manifest.mf -C c:\classes tutorial\example1
>
> I change the directory (cd .. )
>
> I launch the felix environment ( java -jar .\bin\felix.jar )
>
> Finally, I try to install this new jar by this command
>
> start file:/c:/tutorial/example1.jar
>
> But, only at this step, it does not work. Some errors are written such as
>
>
> org.osgi.framework.BundleException: Unable to cache bundle: file:c:/classes/tuto
> rial/example1.jar
> at org.apache.felix.framework.Felix.installBundle(Felix.java:2485)
> at org.apache.felix.framework.Felix.installBundle(Felix.java:2441)
> at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
> extImpl.java:129)
> at org.apache.felix.framework.BundleContextImpl.installBundle(BundleCont
> extImpl.java:107)
> at org.apache.felix.gogo.command.Basic.start(Basic.java:753)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
> at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:
> 82)
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:421)
> at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:3
> 35)
> at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:184)
> at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:121)
> at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessi
> onImpl.java:78)
> at org.apache.felix.gogo.shell.Console.run(Console.java:62)
> at org.apache.felix.gogo.shell.Shell.console(Shell.java:197)
> at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:123)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
>
>
>
> NB the jar file is not created (I search it but I did not find).
>
>
> What do you think the error source ?
>
> With my best regards,
>
> Atef Gharbi.
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org