我有使用Jersey REST的.war,它在tomCat中工作。但是我需要在JBoss 6.4.0中运行.war,这会导致异常
java.lang.RuntimeException: java.lang.NoSuchMethodError: javax.validation.spi.ConfigurationState.getParameterNameProvider()
因为JBoss使用旧版本的javax.validation,并且我需要从JBoss部署中排除javax.validation。
我在.war的WEB-INF中创建jboss-deployment-structure.xml:
这帮助我排除了javax.ws.rs,但是如何排除javax.validation?请帮帮我
好,所以您不仅需要排除
itself, but also modules that are dependent on javax.validation.api module. The easiest way to see which modules are dependent on javax.validation.api and force it to be included, even though it was excluded, is to search your .xml files in JBOSS_DIRECTORY/modules for javax.validation.api, the modules that are dependent have something like that in module.xml:
> ...
And those modules need to be excluded as well. For me - I also needed to exclude:
And then, javax validation eclusion was working :)