[
https://issues.apache.org/jira/browse/BVAL-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15416660#comment-15416660
]
Łukasz Dywicki commented on BVAL-145:
-------------------------------------
You are right, this is purely related to OSGi environment, however I can easily
imagine situation when TCCL is wrong, this may happen also in EAR deployment,
that's why I introduced lookup in both classloaders.
I can override ConstraintDefaults in bundle module so it won't change primary
codebase, in this way it will stay cleaner with just small code duplication.
> BVal bundle fails to load resources under OSGi
> ----------------------------------------------
>
> Key: BVAL-145
> URL: https://issues.apache.org/jira/browse/BVAL-145
> Project: BVal
> Issue Type: Bug
> Components: jsr303
> Affects Versions: 1.1.1
> Environment: Karaf 4.0.5
> Reporter: Łukasz Dywicki
>
> Current logic of resource lookups in bval rely on context class loader and
> when it is not present it fallbacks to classloader which loaded bval. This
> works perfectly fine for most of cases, but fails under OSGi because TCCL in
> many cases is set to boot loader which contains no information about running
> modules. For this reason bval fails to load jsr303 mappings and always
> returns empty validation result.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)