When I start Karaf 3.0.2 using PAX-EXAM/JUnit and connect as admin using
./client shell script then I got:
Command not found: osgi:list
and
Command not found: bundle:list
and "list" command produces (shorted):
----------------------------------------------------------------
Pid: org.apache.karaf.webconsole
BundleLocation:
mvn:org.apache.karaf.webconsole/org.apache.karaf.webconsole.console/3.0.2
Properties:
felix.fileinstall.filename =
file:/home/me/myproj/target/exam/9e823192-7525-4591-8041-7baf91a92bac/etc/org.apache.karaf.webconsole.cfg
realm = karaf
role = webconsole
service.pid = org.apache.karaf.webconsole
----------------------------------------------------------------
but when I start the same Karaf 3.0.2 from command line then list command
produces output (shorted) like:
155 | Active | 70 | 1.3.176 | H2 Database Engine
156 | Active | 70 | 2.0.1
| javax.ws.rs-api
157 | Active | 70 | 3.2.1 | Commons Collections
158 | Active | 70 | 2.4 | Commons Lang
Am I missing something in my config:
public static Option[] getConfiguration() {
MavenUrlReference karafUrl =
maven().groupId("myruntime").artifactId("my-runtime-kit")
.version("1.0.5").type("tar.gz");
MavenUrlReference featureUrl =
maven().groupId("myengine").artifactId("my-engine-feature")
.version("1.0.3-SNAPSHOT").type("xml").classifier("features");
MavenUrlReference karafStandardRepo =
maven().groupId("org.apache.karaf.features").artifactId("standard")
.classifier("features").type("xml").version("3.0.2");
return options(
configureConsole().startLocalConsole(),
cleanCaches(true),
junitBundles(),
KarafDistributionOption.editConfigurationFilePut("etc/protection.pgdb.cfg",
"protection.db.host", "my"),
karafDistributionConfiguration().frameworkUrl(karafUrl).unpackDirectory(new
File("target/exam"))
.useDeployFolder(false),
keepRuntimeFolder(),
KarafDistributionOption.features(karafStandardRepo, "scr"),
KarafDistributionOption.features(featureUrl,
"my-engine-feature")
);
}
Thank you in advance,Milan