> I'm not sure why you are getting a CNFE for java.lang.System...that seems
really odd.

This would occur if you are using felix < 3.0 (e.g. 2.0.5) with gogo > 0.6
(i.e. compiled from SVN HEAD).

This was because felix < 3.0.0 did not correctly boot delegate to allow
loading of java.lang.System from bundle 0 (
https://issues.apache.org/jira/browse/FELIX-2335)

gogo 0.6 worked around this by loading java.lang.System from bundle 1, but
the SVN HEAD was fixed to load from bundle 0 (
https://issues.apache.org/jira/browse/FELIX-2445).

If you download the main felix 3.0.2 distribution, this problem should go
away.

Derek



On 22 September 2010 17:11, Richard S. Hall <[email protected]> wrote:

>  I'm not sure why you are getting a CNFE for java.lang.System...that seems
> really odd.
>
> However, the fact that you cannot resolve your bundle may be legitimate,
> since you are creating a command for the old Felix Shell service, but it
> looks like you are running the 3.0.x framework distribution that now uses
> Gogo.
>
> Gogo doesn't have a lot of documentation yet, but we do have some
> rudimentary documentation on how to create commands for it. It is actually
> easier than the old approach:
>
>    http://felix.apache.org/site/rfc-147-overview.html
>
> You can also look at the source code for the Gogo Command bundle, which
> provides the best example:
>
>    http://svn.apache.org/repos/asf/felix/trunk/gogo/command/
>
> -> richard
>
>
> On 9/22/10 11:50, [email protected] wrote:
>
>> I am in the process of learning OSGI and I am attempting to write a simple
>> felix shell command which tells me if a word is spelled correctly or not
>> (using the examples as a starting point) but I'm running into problems. My
>> manifest looks like this,
>>
>> Manifest-Version: 1.0
>>
>> Archiver-Version: Plexus Archiver
>>
>> Created-By: Apache Maven
>>
>> Built-By: jddunlap
>>
>> Build-Jdk: 1.6.0_13
>>
>> Bundle-Activator: tutorial.example2.Activator
>>
>> Bundle-Classpath: .
>>
>> Bundle-Description: A bundle that displays messages at startup and whe
>>
>>  n service events occur
>>
>> Bundle-Name: Service listener example
>>
>> Bundle-Vendor: Apache Felix
>>
>> Bundle-Version: 1.0
>>
>> Import-Package: org.apache.felix.shell;version="1.4.2",org.osgi.framew
>>
>>  ork
>>
>>
>>
>> I've tried tweaking the version numbers in the manifest in every way I can
>> think of but I continue to get the following error,
>>
>> ERROR: Error starting
>> file:/home/jddunlap/apache-felix/felix-framework-3.0.2/bundle/dictionary-service-1.0-SNAPSHOT.jar
>> (org.osgi.framework.BundleException: Unresolved constraint in bundle [1]:
>> Unable to resolve 1.0: missing requirement [1.0] package;
>> (&(package=org.apache.felix.shell)(version>=1.4.2)))
>> org.osgi.framework.BundleException: Unresolved constraint in bundle [1]:
>> Unable to resolve 1.0: missing requirement [1.0] package;
>> (&(package=org.apache.felix.shell)(version>=1.4.2))
>>    at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
>>    at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
>>    at
>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1143)
>>    at
>> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>    at java.lang.Thread.run(Thread.java:619)
>> bundle://5.0:1/gosh_profile:15.20: ClassNotFoundException:
>> java.lang.System
>> java.lang.ClassNotFoundException: java.lang.System
>>    at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1591)
>>    at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:887)
>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>    at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>    at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>    at java.lang.reflect.Method.invoke(Method.java:597)
>>    at org.apache.felix.gogo.runtime.Reflective.method(Reflective.java:136)
>>    at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:465)
>>    at
>> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:335)
>>    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.Closure.eval(Closure.java:265)
>>    at
>> org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:307)
>>    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(CommandSessionImpl.java:78)
>>    at org.apache.felix.gogo.shell.Shell.source(Shell.java:186)
>>    at org.apache.felix.gogo.shell.Shell.gosh(Shell.java:106)
>>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>    at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>    at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>    at java.lang.reflect.Method.invoke(Method.java:597)
>>    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:335)
>>    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(CommandSessionImpl.java:78)
>>    at org.apache.felix.gogo.shell.Activator.run(Activator.java:72)
>>    at java.lang.Thread.run(Thread.java:619)
>> Caused by: org.osgi.framework.BundleException: Unresolved constraint in
>> bundle [1]: Unable to resolve 1.0: missing requirement [1.0] package;
>> (&(package=org.apache.felix.shell)(version>=1.4.2))
>>    at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
>>    at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1584)
>>    ... 33 more
>>
>> What am I doing wrong?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to