0

I am deploying a application in weblogic12c.It is spring4.1.3 build rest service. Earlier all jars were inside war file and I set

<prefer-web-inf-classes>true</prefer-web-inf-classes>

Now we removed the supporting jars from war file and deploying the application in weblogic 12c. But now it's throwing below exception. I don't understand how SpringMVC calls the hibernate validator. I see hibernate.validator_4_0_1.jar is available in the wlserver/modules folder of weblogic.

 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.OptionalValidatorFactoryBean#0': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.validator.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        Truncated. see log file for complete stacktrace
Caused By: java.lang.AbstractMethodError: org.hibernate.validator.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
upadhyayRakes
  • 152
  • 1
  • 2
  • 9
  • This is possible duplicated question; there is a similar question for Tomcat: https://stackoverflow.com/questions/21950607/abstractmethoderror-on-deploying-spring-4-0-in-tomcat-6 – devwebcl Jul 07 '17 at 19:07

1 Answers1

0

I fixed this. I got that weblogic has a weblogic.server.merged.jar which is inside weblogic/12c/wlserver/modules/features and It has javax.validation and hibernate.validator packages and causing the mess. I just updated these packages here manually by latest validation-api.jar and hibernate-validator-5.2.2.jar. It worked. Weblogic does not really cares jars under wlserver/modules but It has combined all these jars to weblogic.server.merged.jar and I needed to update the packages of the same.

upadhyayRakes
  • 152
  • 1
  • 2
  • 9