Hi,
Did you check that your bundle is correctly installed, resolved, and
started ?
Regards
JB
On 09/08/2014 10:09 AM, Milan Tomic wrote:
Hello,
Is this a right place to ask questions about PaxExam with Karaf usage?
I have this:
<blueprint ...>
<bean id="AppProfile" class="myPackage.impl.AppProfileImpl" />
<service ref="AppProfile" interface="myPackage.api.AppProfile" />
</blueprint>
and this:
@Configuration
public Option[] config() {
MavenArtifactUrlReference karafUrl =
maven().groupId("org.apache.karaf").artifactId("apache-karaf")
.version("3.0.1").type("tar.gz");
MavenUrlReference karafStandardRepo =
maven().groupId("org.apache.karaf.features").artifactId("standard")
.classifier("features").type("xml").version("3.0.1");
return new Option[] {
karafDistributionConfiguration().frameworkUrl(karafUrl).unpackDirectory(new
File("target/exam"))
.useDeployFolder(false),
keepRuntimeFolder(),
KarafDistributionOption.features(karafStandardRepo, "scr"),
CoreOptions.mavenBundle().groupId("css").artifactId("commonTemp").version("0.0.1-SNAPSHOT").start(),
CoreOptions.mavenBundle().groupId("myGroupId")
.artifactId("myArtifactId1").version("0.0.1-SNAPSHOT").start(),
CoreOptions.mavenBundle().groupId("myGroupId")
.artifactId("myArtifactId2").version("0.0.1-SNAPSHOT").start(),
};
}
but:
BundleContext bc = b.getBundleContext();
ServiceTracker st = new ServiceTracker(bc, AppProfile.class.getName(),
null);
st.open();
Object service = st.waitForService(90 * 1000);
returns service == null
Is there anything else I should do? Should I somehow add blueprint
support in PaxExam configuration (config() function?), because it seems
that AppProfile service is not registered?
Thank you in advance,
Milan
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com