felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mailinglist <mailingl...@august.de>
Subject Re: ipojo 10 minutes tutorial failed on my computer
Date Tue, 31 Jul 2012 15:51:14 GMT
Am 2012-07-31 15:43, schrieb Richard S. Hall:
> On 7/30/12 03:08 , mailinglist wrote:
>> Am 2012-07-30 01:26, schrieb Richard S. Hall:
>>> On 7/29/12 2:06 PM, mailinglist wrote:
>>>> Dear felix professionals.
>>>>
>>>> New to felix and iPojo. Debian Linux, openjdk.
>>>> Tried the 10 minutes tutorial 
>>>> http://felix.apache.org/site/ipojo-in-10-minutes.html aiming to 
>>>> learn OSGi while I am developing Java utilities.
>>>>
>>>> This error happened and I was not able to google a solution:
>>>>
>>>> Welcome to Felix
>>>> ================
>>>>
>>>> ERROR: Error starting 
>>>> file:../spell.checker.gui/output/spell.checker.gui.jar 
>>>> (org.osgi.framework.BundleException: Unresolved constraint in bundle 
>>>> spell.checker.gui [9]: package; (package=javax.swing))
>>>> org.osgi.framework.BundleException: Unresolved constraint in 
>>>> bundle spell.checker.gui [9]: package; (package=javax.swing)
>>>>         at 
>>>> org.apache.felix.framework.Felix.resolveBundle(Felix.java:3299)
>>>>         at 
>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1657)
>>>>         at 
>>>> org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1128)
>>>>         at 
>>>> org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
>>>>         at java.lang.Thread.run(Thread.java:722)
>>>> -> [WARNING] IPOJO-Extender : Type of component not available: 
>>>> comonent
>>>> [WARNING] IPOJO-Extender : Type of component not available: 
>>>> comonent
>>>> [ERROR] IPOJO-Extender : A parse exception occurs during the 
>>>> parsing of the bundle 8
>>>> org.apache.felix.ipojo.parser.ParseException: An instance does not 
>>>> have the 'component' attribute
>>>>         at 
>>>> org.apache.felix.ipojo.parser.ManifestMetadataParser.parseInstance(ManifestMetadataParser.java:98)
>>>>         at 
>>>> org.apache.felix.ipojo.parser.ManifestMetadataParser.getInstances(ManifestMetadataParser.java:74)
>>>>         at 
>>>> org.apache.felix.ipojo.Extender.parse(Extender.java:267)
>>>>         at 
>>>> org.apache.felix.ipojo.Extender.startManagementFor(Extender.java:208)
>>>>         at 
>>>> org.apache.felix.ipojo.Extender.access$600(Extender.java:52)
>>>>         at 
>>>> org.apache.felix.ipojo.Extender$CreatorThread.run(Extender.java:682)
>>>>         at java.lang.Thread.run(Thread.java:722)
>>>>
>>>>
>>>> Could you see my failure?
>>>
>>> How are you starting the framework?
>>>
>>> Which version of the framework are you running? You should be able 
>>> to
>>> find out by typing "ps" in the Felix framework shell.
>>>
>>> If you are using a really old version of the framework, my guess is
>>> that you are starting it from some directory other than its
>>> installation directory and as a result it cannot find its config 
>>> file.
>>>
>>> -> richard
>>>
>>
>> Hi, Richard
>>
>> Thank you for the answer. Here is the requested information:
>>
>> 1. I start the framework by cd into the felix folder that comes with 
>> the tutorial and enter "java -jar bin/felix.jar".
>> 2. When I type "ps" I get
>>
>> START LEVEL 1
>>    ID   State         Level  Name
>> [   0] [Active     ] [    0] System Bundle (2.0.5)
>> [   1] [Active     ] [    1] Apache Felix Bundle Repository (1.4.3)
>> [   2] [Active     ] [    1] Apache Felix iPOJO (1.6.0)
>> [   3] [Active     ] [    1] Apache Felix iPOJO Arch Command (1.6.0)
>> [   4] [Active     ] [    1] Apache Felix Shell Service (1.4.2)
>> [   5] [Active     ] [    1] Apache Felix Shell TUI (1.4.1)
>> [   6] [Active     ] [    1] spell.services (0)
>> [   7] [Active     ] [    1] spell.english (0)
>> [   8] [Active     ] [    1] spell.checker (0)
>> [   9] [Installed  ] [    1] spell.checker.gui (0)
>>
>> 2a. when I enter "version" I get 2.0.5.
>>
>> Ok, the 10-minutes tutorial comes with 2.0.5 and is pre-configured. 
>> The newest version seems to be 4.0.3 but is not pre-configured for 
>> iPojo.
>> As the example must have worked on some other computer I am looking 
>> for a failure on my site, not a version problem.
>>
>> Could it be that the iPojo example using javax.swing works with 
>> Oracle jvm but not with openjdk?
>
> Which version of Java are you running? If it is Java 7, then I think
> this will fail since older frameworks didn't export the correct
> package set for newer JREs.
>
> -> richard
>

Yes, thank you Richard

that is the cause.

When issuing "java -version" I get

java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1) (7~u3-2.1.1-3)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)


Then I transfered the iPojo-Tutorial to another Debian computer where

java -version led to

java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)

(Though this is not openjdk.)

First I got a failure

-> [ERROR] IPOJO-Extender : An error occurs when analyzing the content 
or starting the management of 60
java.lang.UnsupportedClassVersionError: 
spell/services/DictionaryService : Unsupported major.minor version 51.0

Then I did a "ant clear; ant" for every component (starting with 
spell.services, does not work otherwise).

... and it worked.

I am a bit concerned about this Java version problems:

Is it a failure in concept of Java, Felix, OSGi, or javax.swing?
But this is a question to another mailing thread.

Thank you very much, Richard and


Kind Regards


Rolf




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message