In your bundle, did you define the import package ?
For instance, you should have something like:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>
org.apache.felix.service.command,
org.apache.felix.gogo.commands,
org.apache.karaf.shell.console,
*
</Import-Package>
<Private-Package>!*</Private-Package>
</instructions>
</configuration>
</plugin>
in your bundle POM.
As org.apache.felix.service.command is not explicitly used in the code,
maven-bundle-plugin/bnd doesn't import it automatically. That's why you
have to add the statement the maven bundle config.
Regards
JB
On 09/18/2012 04:07 PM, redfish wrote:
I loaded the Apache Felix Gogo Runtime (0.10.0) by droping
org.apache.felix.gogo.runtime-0.10.0.jar into my deploy folder. It loaded
and started. shows active when listed from osgi:list
I redeploy my bundle and get the same resolution issue:
2012-09-18 10:01:14,507 | WARN | -C:\Karaf/deploy | fileinstall
| 6 - org.apache.felix.fileinstall - 3.2.4 | Error while starting bundle:
file:/C:/Karaf/deploy/org.emory.adapter.
karaf.console_1.0.0.201209181000.jar
org.osgi.framework.BundleException: The bundle
"org.emory.adapter.karaf.console_1.0.0.201209181000 [101]" could not be
resolved. Reason: Missing Constraint: Import-Package:
org.apache.felix.service.co
mmand; version="0.10.0" at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1317)[osgi-3.6.2.R36x_v20110210.jar:]
.....
Any ideas what I'm doing wrong?
Is there an example that is already built that I can look?
It seems like there are some basics that I'm just not understanding.
Many thanks.
--
View this message in context:
http://karaf.922171.n3.nabble.com/Command-not-found-when-using-Equinox-tp2939669p4026067.html
Sent from the Karaf - User mailing list archive at Nabble.com.
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com