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 16:08:24 UTC

Re : Installing a bundle

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: 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