java.lang.AbstractMethodError

Spring JIRA | Ilinca Vintila Hallberg | 5 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The following error occurs when using hibernate-validator with a @Valid annotation in a Controller. The spring bean sent as the requestbody isn't a Dao-class, but the application has a DAO-layer that uses jpa2. The same code works just fine without the DAO-layer. Removing the @Valid annotation also solves the problem. Something seems to be happening when using the @Valid annotation together with hibernate-validator annotations in a Controller while having dependencies to hibernate entitymanager and spring-orm. [#|2012-02-27T11:20:24.334+0100|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=29;_ThreadName=httpWorkerThread-8080-1;_RequestID=ad491357-922d-424e-84c6-9906992aff29;|StandardWrapperValve[Spring MVC Dispatcher Servlet]: PWC1406: Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception java.lang.AbstractMethodError at javax.persistence.Persistence$1.isLoaded(Persistence.java:93) at org.hibernate.validator.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:61) at org.hibernate.validator.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:131) at org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:46) at org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1242) at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:448) at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:397) at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:361) at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:313) at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:139) at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:101) at org.springframework.validation.DataBinder.validate(DataBinder.java:722) at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:78) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:74) at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:155) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:117) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) ... The error occurs when calling the controller and the application deploys perfectly on glassfish 2 and 3. Removing the @Valid annotation fixes the error. Attaching a test application that reproduces the error. The error only occurs when using annotations from the hibernate-validator javax.validation annotations still work.

    Spring JIRA | 5 years ago | Ilinca Vintila Hallberg
    java.lang.AbstractMethodError
  2. 0

    The following error occurs when using hibernate-validator with a @Valid annotation in a Controller. The spring bean sent as the requestbody isn't a Dao-class, but the application has a DAO-layer that uses jpa2. The same code works just fine without the DAO-layer. Removing the @Valid annotation also solves the problem. Something seems to be happening when using the @Valid annotation together with hibernate-validator annotations in a Controller while having dependencies to hibernate entitymanager and spring-orm. [#|2012-02-27T11:20:24.334+0100|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=29;_ThreadName=httpWorkerThread-8080-1;_RequestID=ad491357-922d-424e-84c6-9906992aff29;|StandardWrapperValve[Spring MVC Dispatcher Servlet]: PWC1406: Servlet.service() for servlet Spring MVC Dispatcher Servlet threw exception java.lang.AbstractMethodError at javax.persistence.Persistence$1.isLoaded(Persistence.java:93) at org.hibernate.validator.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:61) at org.hibernate.validator.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:131) at org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:46) at org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1242) at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:448) at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:397) at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:361) at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:313) at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:139) at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:101) at org.springframework.validation.DataBinder.validate(DataBinder.java:722) at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:78) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:74) at org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:155) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:117) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096) ... The error occurs when calling the controller and the application deploys perfectly on glassfish 2 and 3. Removing the @Valid annotation fixes the error. Attaching a test application that reproduces the error. The error only occurs when using annotations from the hibernate-validator javax.validation annotations still work.

    Spring JIRA | 5 years ago | Ilinca Vintila Hallberg
    java.lang.AbstractMethodError
  3. 0

    Random Thoughts ยป JSR 303 Bean Validation Using Spring 3

    inflinx.com | 8 months ago
    org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.AbstractMethodError
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Can't run java validation (JSR 303)

    Stack Overflow | 5 years ago | Chailie
    java.lang.AbstractMethodError: org.hibernate.ejb.HibernatePersistence.getProviderUtil()Ljavax/persistence/spi/ProviderUtil;
  6. 0

    Unit testing JSR-303 validation in Spring

    Stack Overflow | 6 years ago | Daniel
    java.lang.AbstractMethodError: javax/persistence/spi/PersistenceProvider.getProviderUtil()Ljavax/persistence/spi/ProviderUtil;

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.AbstractMethodError

      No message provided

      at javax.persistence.Persistence$1.isLoaded()
    2. JavaEE 7
      Persistence$1.isLoaded
      1. javax.persistence.Persistence$1.isLoaded(Persistence.java:93)
      1 frame
    3. Embedded GlassFish Web
      SingleThreadCachedTraversableResolver.isReachable
      1. org.hibernate.validator.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:61)
      2. org.hibernate.validator.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:131)
      3. org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:46)
      3 frames
    4. Vaadin
      ValidatorImpl.validate
      1. org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:1242)
      2. org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:448)
      3. org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:397)
      4. org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:361)
      5. org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:313)
      6. org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:139)
      6 frames
    5. Spring Context
      DataBinder.validate
      1. org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:101)
      2. org.springframework.validation.DataBinder.validate(DataBinder.java:722)
      2 frames
    6. Spring MVC
      RequestResponseBodyMethodProcessor.resolveArgument
      1. org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:78)
      1 frame
    7. Spring
      InvocableHandlerMethod.invokeForRequest
      1. org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:74)
      2. org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:155)
      3. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:117)
      3 frames
    8. Spring MVC
      FrameworkServlet.doPost
      1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
      2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
      3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
      4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
      5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
      6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
      7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
      8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
      8 frames
    9. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
      2 frames
    10. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
      2. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
      3. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
      3 frames
    11. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      2 frames
    12. Glassfish Core
      StandardPipeline.doInvoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
      4. org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
      5. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
      6. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
      7. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
      7 frames
    13. Glassfish
      PESessionLockingStandardPipeline.invoke
      1. com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
      2. com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
      2 frames
    14. Glassfish Core
      ContainerBase.invoke
      1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
      2. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
      3. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
      4. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
      5. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
      6. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
      7. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
      8. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
      9. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
      10. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
      10 frames