Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some problem with examples in chapter2 #4

Closed
GoogleCodeExporter opened this issue Jun 21, 2015 · 12 comments
Closed

Some problem with examples in chapter2 #4

GoogleCodeExporter opened this issue Jun 21, 2015 · 12 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
When I was using the paint-modular example in chapter2,after typing in 
"ant"and"java -jar launcher.jar"

What is the expected output? What do you see instead?

Error starting framework: org.osgi.framework.BundleException: Unresolved constra
int in bundle org.foo.shape.circle [1]: Unable to resolve 1.0: missing requireme
nt [1.0] package; (package=javax.swing)
org.osgi.framework.BundleException: Unresolved constraint in bundle org.foo.shap
e.circle [1]: Unable to resolve 1.0: missing requirement [1.0] package; (package
=javax.swing)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1719)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:909)
        at launcher.Main.main(Main.java:92)

What version of the product are you using? On what operating system?
apache ant 1.8.4 , Win 7 

Please provide any additional information below.

Original issue reported on code.google.com by ADFXciph...@gmail.com on 7 Jun 2012 at 8:14

@GoogleCodeExporter
Copy link
Author

Do you have any OSGi related properties in your environment? The javax.swing 
package should be exported from the system bundle - this is typically 
controlled by the org.osgi.framework.system.packages property, when this is not 
set then the default system bundle exports should include javax.swing.

Original comment by mccu...@gmail.com on 11 Jul 2012 at 11:42

@GoogleCodeExporter
Copy link
Author

However, if you have the org.osgi.framework.system.packages property set then 
its value will replace the default list of exported packages from the system 
bundle, which could be why it's not finding javax.swing. Note to append rather 
than replace use the org.osgi.framework.system.packages.extra property.

Original comment by mccu...@gmail.com on 11 Jul 2012 at 11:45

@GoogleCodeExporter
Copy link
Author

Hi !
Exactly the same problem !!
I've just reduce the jdk version : jdk7 -> jdk6
It's ok now...

Original comment by onclezeb...@gmail.com on 21 Sep 2012 at 2:20

@GoogleCodeExporter
Copy link
Author

I also have the same problem. I don't have OSGi related properties in my 
environment. 

How can I fix this problem?

Original comment by hgoldfar...@gmail.com on 15 Nov 2012 at 9:35

@GoogleCodeExporter
Copy link
Author

#c4 ... are you using JDK7? can you try JDK6?

Original comment by mccu...@gmail.com on 15 Nov 2012 at 9:38

@GoogleCodeExporter
Copy link
Author

yes, and I can't reduce it to jdk6 due to another project.

Original comment by hgoldfar...@gmail.com on 15 Nov 2012 at 9:40

@GoogleCodeExporter
Copy link
Author

When we created the samples the Felix launcher (contained in the lib directory) 
did not contain a profile for JDK7 (see 
https://issues.apache.org/jira/browse/FELIX-2864) which is why this error 
occurs. I'll look into updating the launcher or updating the default.properties 
embedded in the launcher (which contain the profiles).

As a workaround you can use "java -Djava.specification.version=1.6 -jar 
launcher.jar bundles" to force it to use the Java6 system packages profile even 
when running JDK7.

Original comment by mccu...@gmail.com on 15 Nov 2012 at 9:55

@GoogleCodeExporter
Copy link
Author

Sweet! The workaround works! Thank you :-)

Will use it until you post the update.


Original comment by hgoldfar...@gmail.com on 15 Nov 2012 at 10:03

@GoogleCodeExporter
Copy link
Author

Fixed in http://code.google.com/p/osgi-in-action/source/detail?r=37 - you'll 
need to rebuild the launcher (and either copy it to the example or rebuild the 
example chapter code)

Original comment by mccu...@gmail.com on 15 Nov 2012 at 10:11

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Great! Thank you for the fast response.

Love the book so far.

Original comment by hgoldfar...@gmail.com on 15 Nov 2012 at 10:19

@GoogleCodeExporter
Copy link
Author

Great book, Loving it!!!. And thanks for the workarounds!!!

Original comment by navkkrn...@gmail.com on 28 Jun 2014 at 6:22

@GoogleCodeExporter
Copy link
Author

Issue 6 has been merged into this issue.

Original comment by mccu...@gmail.com on 13 Jul 2014 at 6:09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant