hmm ... to me this artifact:

org.hibernate:hibernate-validator-osgi-karaf-features

doesn't sound like a bundle but more like a feature.

and according to this[1], it is a feature file.
So make sure you reference the "hibernate-validator" feature in your own
feature file.

if you want to define a dependency to another feature file from your own.
make sure to have a repo definition:

<repository>mvn:org.hibernate/hibernate-validator-osgi-karaf-features/5.4.1.Final/xml/features</repository>


regards, Achim

[1] -
http://search.maven.org/#artifactdetails%7Corg.hibernate%7Chibernate-validator-osgi-karaf-features%7C5.4.1.Final%7Cpom
[2] -
https://repo1.maven.org/maven2/org/hibernate/hibernate-validator-osgi-karaf-features/5.4.1.Final/hibernate-validator-osgi-karaf-features-5.4.1.Final-features.xml

2017-06-05 17:37 GMT+02:00 KARR, DAVID <dk0...@att.com>:

> I'm working on a codebase that builds a bunch of OSGi modules, and deploys
> to karaf.
>
> I'm attempting to implement javax.validation using Hibernate Validator.  I
> was able to get the correct Maven artifacts in order for my plain unit
> tests to work.
>
> However, when I ran my PaxExam integration test, it fails with:
>
> "Unable to create a Configuration, because no Bean Validation provider
> could be found. Add a provider like Hibernate Validator (RI) to your
> classpath."
>
> After some research, I determined that I needed to use the
> "hibernate-validator-osgi-karaf-features" artifact.  However, this just
> gives me a new error:
>
> "Could not find artifact org.hibernate:hibernate-
> validator-osgi-karaf-features:jar:5.4.1.Final in central (
> http://repo1.maven.org/maven2/)"
>
> Here is an excerpt of a "features.xml" file inside the definition of a
> feature that is dependent feature of the main feature in the module where
> my integration test is:
> ----------------
>         <bundle start-level="100">wrap:mvn:javax.validation/validation-
> api/1.1.0.Final$Bundle-Name=javax.validation&amp;Bundle-
> SymbolicName=javax.validation&amp;Bundle-Version=1.1.0.Final</bundle>
>         <bundle>mvn:org.hibernate/hibernate-validator/5.4.1.Final</bundle>
>         <bundle>wrap:mvn:org.hibernate/hibernate-validator-
> osgi-karaf-features/5.4.1.Final$Bundle-Name=hibernate-
> validator-osgi-karaf-features&amp;Bundle-SymbolicName=
> hibernate-validator-osgi-karaf-features&amp;Bundle-
> Version=5.4.1.Final</bundle>
> ----------------
>
> I'm guessing that part of my problem is that this is a POM artifact, not a
> JAR artifact, but I don't know what to do here.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Reply via email to