I created a simple pax-exam test of the hibernate-validator feature, and I get:
javax.validation.ValidationException: Unable to create a
Configuration, because no Bean Validation provider could be found. Add
a provider like Hibernate Validator (RI) to your classpath.
Any suggestions?
@ProbeBuilder
public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
probe.setHeader(Constants.DYNAMICIMPORT_PACKAGE, "*");
return probe;
}
@Configuration
public Option[] configure() throws Exception {
loadProps();
karafDebug = false;
return options(karafDistributionConfiguration()
.frameworkUrl(
maven()
.groupId("org.apache.karaf")
.artifactId("apache-karaf")
.type("zip")
.version(karafVersion))
.karafVersion(karafVersion).name("Apache Karaf")
.unpackDirectory(new File("target/pax"))
.useDeployFolder(false),
keepRuntimeFolder(),
configureConsole().ignoreLocalConsole(),
logLevel(LogLevelOption.LogLevel.INFO),
features(maven().groupId("org.apache.karaf.features")
.artifactId("enterprise")
.version(karafVersion)
.classifier("features")
.type("xml"),
"hibernate-validator"),
when(karafDebug).useOptions(debugConfiguration()),
junitBundles(),
systemProperty("pax.exam.osgi.unresolved.fail").value("true"),
systemProperty("org.ops4j.pax.exam.rbc.rmi.host").value("localhost")
);
}