[ 
https://issues.apache.org/jira/browse/BVAL-145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15416699#comment-15416699
 ] 

Romain Manni-Bucau commented on BVAL-145:
-----------------------------------------

Well in ear I don't see it happening since the classloading is either flat or 
hierarchic so if wrong the classloading is not the main issue. I see another 
solution to that which can work in all modes: not using properties based 
resource bundle but java based ones (extending ResourceBundle and using the 
right java name). This would kind of force the loading mode for all deployments 
and avoid the need to hack classloaders in a way we are not really able to test 
(if I take CXF resource loading codebase as a reference it requires a lot of 
workarounds and I would like to avoid it for this simple bval need).

Would it make sense to go this path?

> 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)

Reply via email to