Open glassfishrobot opened 8 years ago
@mtau11 Commented You're correct, at this point it should not be needed. OSGi does present some issues around the use of ServiceLoader which will need to be addressed when GlassFish consumes this new version. Created #34
@mulderbaba Commented Thanks @mtau11, I guess this will fix the NoClassDefFoundError that we get on WriteableView class under payara codebase.
@mtau11 Commented Yes, the static initializer in WriteableView was assuming javax.validation and hibernate-validator were using the same classloader, which will not longer be the case.
@mulderbaba Commented @mtau11 while consuming this hk2 version within glassfish, the ServiceLoader class cannot load org.hibernate.validator.internal.cdi.ValidationExtension class and gives a NoClassDefFoundError. Did you experience the same problems while handling #34 ?
@mtau11 Commented The ServiceLoader is delegating to an OSGi classloader. The portable extension jar does not have the OSGi manifest entries that are needed for GlassFish's classloader to load it. I believe they were looking at adding the appropriate OSGi manifest entries as a step in the GlassFish build.
@mulderbaba Commented @mtau11 I OSGI'fied hibernate-validator-cdi.jar and added necessary manifest entries inside it with bnd but that didn't help, probably need more investigation.
bean-validator bundles hibernate-validator v5.1.2.Final within itself by extracting its source. hibernate-validator is already OSGI'ed, so if the motivation behind this is having an OSGI'ed bundle, why do you need this process? It has downsides like: