Unresolved requirement: Import-Package: org.apache.commons.codec.language in bndtools/osgi
up vote
1
down vote
favorite
I'm currently working at a project where I need to transfer PDE style plugins to bnd style plugins.
I ran into the problem with external jars so I build up bundles for every jar and included them to the build path. For most of the jars this worked fine but I got one which don't behave as expected.
The org.apache.commons.codec.language. This package comes from the jar org.apache.commons.codec and it resolves fine (at least for bndtools) but when I run the bundle I get the following error:
! could not resolve the bundles: [test-0.0.0 org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
]
! Failed to start bundle test-0.0.0, exception Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:447)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:431)
at aQute.launcher.Launcher.startBundles(Launcher.java:519)
at aQute.launcher.Launcher.activate(Launcher.java:425)
at aQute.launcher.Launcher.run(Launcher.java:303)
at aQute.launcher.Launcher.main(Launcher.java:149)
In this github repo I extracted one that produces an error as a reference: https://github.com/MaPhil/osgi-externals-test
I googled quite a lot about this topic but the most answers seems to be around liferay or other specific libraries. I hope anyone of you can give me a hint.
java osgi bnd bndtools
add a comment |
up vote
1
down vote
favorite
I'm currently working at a project where I need to transfer PDE style plugins to bnd style plugins.
I ran into the problem with external jars so I build up bundles for every jar and included them to the build path. For most of the jars this worked fine but I got one which don't behave as expected.
The org.apache.commons.codec.language. This package comes from the jar org.apache.commons.codec and it resolves fine (at least for bndtools) but when I run the bundle I get the following error:
! could not resolve the bundles: [test-0.0.0 org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
]
! Failed to start bundle test-0.0.0, exception Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:447)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:431)
at aQute.launcher.Launcher.startBundles(Launcher.java:519)
at aQute.launcher.Launcher.activate(Launcher.java:425)
at aQute.launcher.Launcher.run(Launcher.java:303)
at aQute.launcher.Launcher.main(Launcher.java:149)
In this github repo I extracted one that produces an error as a reference: https://github.com/MaPhil/osgi-externals-test
I googled quite a lot about this topic but the most answers seems to be around liferay or other specific libraries. I hope anyone of you can give me a hint.
java osgi bnd bndtools
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm currently working at a project where I need to transfer PDE style plugins to bnd style plugins.
I ran into the problem with external jars so I build up bundles for every jar and included them to the build path. For most of the jars this worked fine but I got one which don't behave as expected.
The org.apache.commons.codec.language. This package comes from the jar org.apache.commons.codec and it resolves fine (at least for bndtools) but when I run the bundle I get the following error:
! could not resolve the bundles: [test-0.0.0 org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
]
! Failed to start bundle test-0.0.0, exception Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:447)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:431)
at aQute.launcher.Launcher.startBundles(Launcher.java:519)
at aQute.launcher.Launcher.activate(Launcher.java:425)
at aQute.launcher.Launcher.run(Launcher.java:303)
at aQute.launcher.Launcher.main(Launcher.java:149)
In this github repo I extracted one that produces an error as a reference: https://github.com/MaPhil/osgi-externals-test
I googled quite a lot about this topic but the most answers seems to be around liferay or other specific libraries. I hope anyone of you can give me a hint.
java osgi bnd bndtools
I'm currently working at a project where I need to transfer PDE style plugins to bnd style plugins.
I ran into the problem with external jars so I build up bundles for every jar and included them to the build path. For most of the jars this worked fine but I got one which don't behave as expected.
The org.apache.commons.codec.language. This package comes from the jar org.apache.commons.codec and it resolves fine (at least for bndtools) but when I run the bundle I get the following error:
! could not resolve the bundles: [test-0.0.0 org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
]
! Failed to start bundle test-0.0.0, exception Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
org.osgi.framework.BundleException: Could not resolve module: test [1]
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:447)
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:431)
at aQute.launcher.Launcher.startBundles(Launcher.java:519)
at aQute.launcher.Launcher.activate(Launcher.java:425)
at aQute.launcher.Launcher.run(Launcher.java:303)
at aQute.launcher.Launcher.main(Launcher.java:149)
In this github repo I extracted one that produces an error as a reference: https://github.com/MaPhil/osgi-externals-test
I googled quite a lot about this topic but the most answers seems to be around liferay or other specific libraries. I hope anyone of you can give me a hint.
java osgi bnd bndtools
java osgi bnd bndtools
asked Nov 8 at 17:10
Philipp Mainz
225
225
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
Some good news to start with:
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
This indicates that your OSGi bundle has an import for org.apache.commons.codec.language
, and the fact that it has a version range (1.9 up to but not including 2.0) is a good indication that your build path isn't completely messed up.
Looking at your example workspace I see that you have a project which you're using to wrap the Apache Commons Codec library. I'm somewhat confused as to why you're doing this, as Apache Commons Codec is already natively available as an OSGi bundle. If you want to depend on it in your workspace you can simply add it to one of your existing repositories. For example in /cnf/central.maven
you could add:
commons-codec:commons-codec:1.9
Which would reference the official release from Maven Central. You can then reference this bundle in your bnd file's build path using:
-buildpath: org.apache.commons.codec
To run your application you should really create a bndrun
file which you can use to declare your requirements (in this case a requirement on your test project) and then use a Resolve
operation (either a button in Bndtools or a Gradle task). This will take your list of -runrequirements
and create a list of -runbundles
. It will end up looking something like this:
-runrequirements: osgi.identity;filter:='(osgi.identity=test)'
-runfw: org.eclipse.osgi;version='[3.13.100.v20180827-1536,3.13.100.v20180827-1536]'
-runbundles: test;version="[0.0.0,0.0.1)",
org.apache.commons.codec;version="[1.9.0,1.9.1)"
You can then run directly from that bndrun file. It will start the framework and deploy all of the runbundles for you. If you use Bndtools then it will even keep the deployed bundles in sync with your Eclipse Workspace so that you always have the latest code deployed.
You can see some more information about how to do this sort of thing in the Bndtools documentation or related details in OSGi enRoute
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Some good news to start with:
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
This indicates that your OSGi bundle has an import for org.apache.commons.codec.language
, and the fact that it has a version range (1.9 up to but not including 2.0) is a good indication that your build path isn't completely messed up.
Looking at your example workspace I see that you have a project which you're using to wrap the Apache Commons Codec library. I'm somewhat confused as to why you're doing this, as Apache Commons Codec is already natively available as an OSGi bundle. If you want to depend on it in your workspace you can simply add it to one of your existing repositories. For example in /cnf/central.maven
you could add:
commons-codec:commons-codec:1.9
Which would reference the official release from Maven Central. You can then reference this bundle in your bnd file's build path using:
-buildpath: org.apache.commons.codec
To run your application you should really create a bndrun
file which you can use to declare your requirements (in this case a requirement on your test project) and then use a Resolve
operation (either a button in Bndtools or a Gradle task). This will take your list of -runrequirements
and create a list of -runbundles
. It will end up looking something like this:
-runrequirements: osgi.identity;filter:='(osgi.identity=test)'
-runfw: org.eclipse.osgi;version='[3.13.100.v20180827-1536,3.13.100.v20180827-1536]'
-runbundles: test;version="[0.0.0,0.0.1)",
org.apache.commons.codec;version="[1.9.0,1.9.1)"
You can then run directly from that bndrun file. It will start the framework and deploy all of the runbundles for you. If you use Bndtools then it will even keep the deployed bundles in sync with your Eclipse Workspace so that you always have the latest code deployed.
You can see some more information about how to do this sort of thing in the Bndtools documentation or related details in OSGi enRoute
add a comment |
up vote
2
down vote
accepted
Some good news to start with:
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
This indicates that your OSGi bundle has an import for org.apache.commons.codec.language
, and the fact that it has a version range (1.9 up to but not including 2.0) is a good indication that your build path isn't completely messed up.
Looking at your example workspace I see that you have a project which you're using to wrap the Apache Commons Codec library. I'm somewhat confused as to why you're doing this, as Apache Commons Codec is already natively available as an OSGi bundle. If you want to depend on it in your workspace you can simply add it to one of your existing repositories. For example in /cnf/central.maven
you could add:
commons-codec:commons-codec:1.9
Which would reference the official release from Maven Central. You can then reference this bundle in your bnd file's build path using:
-buildpath: org.apache.commons.codec
To run your application you should really create a bndrun
file which you can use to declare your requirements (in this case a requirement on your test project) and then use a Resolve
operation (either a button in Bndtools or a Gradle task). This will take your list of -runrequirements
and create a list of -runbundles
. It will end up looking something like this:
-runrequirements: osgi.identity;filter:='(osgi.identity=test)'
-runfw: org.eclipse.osgi;version='[3.13.100.v20180827-1536,3.13.100.v20180827-1536]'
-runbundles: test;version="[0.0.0,0.0.1)",
org.apache.commons.codec;version="[1.9.0,1.9.1)"
You can then run directly from that bndrun file. It will start the framework and deploy all of the runbundles for you. If you use Bndtools then it will even keep the deployed bundles in sync with your Eclipse Workspace so that you always have the latest code deployed.
You can see some more information about how to do this sort of thing in the Bndtools documentation or related details in OSGi enRoute
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Some good news to start with:
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
This indicates that your OSGi bundle has an import for org.apache.commons.codec.language
, and the fact that it has a version range (1.9 up to but not including 2.0) is a good indication that your build path isn't completely messed up.
Looking at your example workspace I see that you have a project which you're using to wrap the Apache Commons Codec library. I'm somewhat confused as to why you're doing this, as Apache Commons Codec is already natively available as an OSGi bundle. If you want to depend on it in your workspace you can simply add it to one of your existing repositories. For example in /cnf/central.maven
you could add:
commons-codec:commons-codec:1.9
Which would reference the official release from Maven Central. You can then reference this bundle in your bnd file's build path using:
-buildpath: org.apache.commons.codec
To run your application you should really create a bndrun
file which you can use to declare your requirements (in this case a requirement on your test project) and then use a Resolve
operation (either a button in Bndtools or a Gradle task). This will take your list of -runrequirements
and create a list of -runbundles
. It will end up looking something like this:
-runrequirements: osgi.identity;filter:='(osgi.identity=test)'
-runfw: org.eclipse.osgi;version='[3.13.100.v20180827-1536,3.13.100.v20180827-1536]'
-runbundles: test;version="[0.0.0,0.0.1)",
org.apache.commons.codec;version="[1.9.0,1.9.1)"
You can then run directly from that bndrun file. It will start the framework and deploy all of the runbundles for you. If you use Bndtools then it will even keep the deployed bundles in sync with your Eclipse Workspace so that you always have the latest code deployed.
You can see some more information about how to do this sort of thing in the Bndtools documentation or related details in OSGi enRoute
Some good news to start with:
Unresolved requirement: Import-Package: org.apache.commons.codec.language; version="[1.9.0,2.0.0)"
This indicates that your OSGi bundle has an import for org.apache.commons.codec.language
, and the fact that it has a version range (1.9 up to but not including 2.0) is a good indication that your build path isn't completely messed up.
Looking at your example workspace I see that you have a project which you're using to wrap the Apache Commons Codec library. I'm somewhat confused as to why you're doing this, as Apache Commons Codec is already natively available as an OSGi bundle. If you want to depend on it in your workspace you can simply add it to one of your existing repositories. For example in /cnf/central.maven
you could add:
commons-codec:commons-codec:1.9
Which would reference the official release from Maven Central. You can then reference this bundle in your bnd file's build path using:
-buildpath: org.apache.commons.codec
To run your application you should really create a bndrun
file which you can use to declare your requirements (in this case a requirement on your test project) and then use a Resolve
operation (either a button in Bndtools or a Gradle task). This will take your list of -runrequirements
and create a list of -runbundles
. It will end up looking something like this:
-runrequirements: osgi.identity;filter:='(osgi.identity=test)'
-runfw: org.eclipse.osgi;version='[3.13.100.v20180827-1536,3.13.100.v20180827-1536]'
-runbundles: test;version="[0.0.0,0.0.1)",
org.apache.commons.codec;version="[1.9.0,1.9.1)"
You can then run directly from that bndrun file. It will start the framework and deploy all of the runbundles for you. If you use Bndtools then it will even keep the deployed bundles in sync with your Eclipse Workspace so that you always have the latest code deployed.
You can see some more information about how to do this sort of thing in the Bndtools documentation or related details in OSGi enRoute
answered Nov 8 at 17:54
Tim Ward
87458
87458
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53212839%2funresolved-requirement-import-package-org-apache-commons-codec-language-in-bnd%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown