本文介绍了“java.lang.AbstractMethodError:org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager”与休眠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Hibernate,EJB和Restfull webservice。我有下面的异常,我不知道该怎么做。

 警告:EJB5184:系统异常发生在调用EJB PessoaResource,方法:public java.lang.String service.PessoaResource.findAll()
警告:javax.ejb.EJBException
在com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager。 java:748)
在com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
在com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
在com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4475)
在com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2009)
在com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1979)
在com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectIn vocationHandler.java:220)
在com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
在com.sun.proxy $ Proxy430.findAll(未知来源)
at service .__ EJB31_Generated__PessoaResource__Intf ____ Bean __。findAll(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在java.lang.reflect.Method.invoke(Method.java:606)
在com.sun.jersey.spi。 container.JavaMethodInvokerFactory $ 1.invoke(JavaMethodInvokerFactory.java:60)
在com.sun.jersey.server.impl.model.method.dispatch.Abs​​tractResourceMethodDispatchProvider $ TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
在com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispat cher.dispatch(ResourceJavaMethodDispatcher.java:75)
在com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
在com.sun.jersey。 server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
在com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
在com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
在com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule .java:84)
在com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
在com.sun.jersey.server.impl.application.WebApplicationImpl ._handleRequest(WebApplicationImpl.java:1400)
在com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
在com.sun.jersey.server.impl .application.WebApplicationImpl.handleRequest(WebAp plicationImpl.java:1339)
在com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
在com.sun.jersey.spi.container.servlet。 ServletContainer.service(ServletContainer.java:537)
在com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
在javax.servlet.http.HttpServlet。 service(HttpServlet.java:790)
在org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve。 java:318)
在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
在org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
在org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
在com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
在org.apache.catalina.core.StandardHostValve.invoke(StandardHost Valve.java:174)
在org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 260)
在com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
在org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler。 java:191)
在org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
在org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter。 java:189)
在org.glassfish.grizzly.filterchain.ExecutorResolver $ 9.execute(ExecutorResolver.java:119)
在org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288 )
在org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
在org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
在org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
在org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
在org.glassfish.grizzly .nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
在org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
在org.glassfish.grizzly.strategies .WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
在org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access $ 100(WorkerThreadIOStrategy.java:55)
在org.glassfish.grizzly.strategies.WorkerThreadIOStrategy $ WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.doWork(AbstractThreadPool.java:564)
在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:544)
在java.lang.Thread.run(Thread.java:724)
C由java.lang.AbstractMethodError:org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(Ljavax / persistence / SynchronizationType; Ljava / util / Map;)Ljavax / persistence / EntityManager;
在com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
在com.sun.enterprise.container.common.impl.EntityManagerWrapper.find(EntityManagerWrapper。 java中的
在.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在java.lang.reflect.Method.invoke(Method.java:606)
在org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
在org.glassfish .ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
在com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContai ner.java:4695)
在com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
在com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java: 822)
在com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
在org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在java.lang.reflect.Method.invoke(Method.java: 606)
在com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
在com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java: 822)
在com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
在com.sun.ejb.containers.interceptors.SystemInter ceptorProxy.doCall(SystemInterceptorProxy.java:163)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method )
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在java.lang.reflect。 Method.invoke(Method.java:606)
在com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
在com.sun.ejb.containers.interceptors。 AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
在com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
在com.sun.ejb.containers.BaseContainer。 __intercept(BaseContainer.java:4667)
在com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
at c om.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
... 50更多

SEVERE:异常mapper com.sun.jersey.server.impl.ejb .EJBExceptionMapper @ 33b1dd76 for Throwable javax.ejb.EJBException在尝试获取响应时抛出一个RuntimeException
SEVERE:映射到响应的异常:500(内部服务器错误)
java.lang.ClassCastException:java.lang .AbstractMethodError无法转换为java.lang.Exception
在javax.ejb.EJBException.getCausedByException(EJBException.java:91)
在com.sun.jersey.server.impl.ejb.EJBExceptionMapper.toResponse (EJBExceptionMapper.java:63)
在com.sun.jersey.server.impl.ejb.EJBExceptionMapper.toResponse(EJBExceptionMapper.java:54)
在com.sun.jersey.spi.container.ContainerResponse .mapException(ContainerResponse.java:452)
在com.sun.jersey.spi.container.ContainerResponse.mapMappableContainerException(ContainerResponse.java:400)
在com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1404)
在com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
在com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
在com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent。 java:416)
在com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
在com.sun.jersey.spi.container.servlet.ServletContainer。 service(ServletContainer.java:708)
在javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
在org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java: 1682)
在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
在或在.cache.catalina.core.StandardPipeline.doInvoke enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
在org.apache.catalina.connector。 CoyoteAdapter.doService(CoyoteAdapter.java:357)
在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
在com.sun.enterprise.v3.services.impl。 ContainerGroupler.service HttpHandler.doHandle(HttpHandler.java:168)
在org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
在org.glassfish.grizzly.filterchain.ExecutorResolver $ 9 .execute(ExecutorResolver.java:119)
在或g.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
在org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
在org.glassfish。 grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
在org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
在org.glassfish.grizzly.ProcessorExecutor。执行(ProcessorExecutor.java:77)
在org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
在org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent( AbstractIOStrategy.java:113)
在org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
在org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access $ 100(WorkerThreadIOStrategy.java :55)
在org.glassfish.grizzly.strategies.WorkerThreadIOStrategy $ WorkerThread Runnable.run(WorkerThreadIOStrategy.java:135)
在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.doWork(AbstractThreadPool.java:564)
在org.glassfish.grizzly.threadpool.AbstractThreadPool $ Worker.run(AbstractThreadPool.java:544)
在java.lang.Thread.run(Thread.java:724)


解决方案

通常是由不兼容的二进制文件引起的;对于这个具体错误,有一个,但有一些评论

检查您的jar文件版本不兼容。


I'm working with Hibernate, EJB and a Restfull webservice. I have this exception below, and i don't know what to do.

WARNING:   EJB5184:A system exception occurred during an invocation on EJB PessoaResource, method: public java.lang.String service.PessoaResource.findAll()
WARNING:   javax.ejb.EJBException
    at com.sun.ejb.containers.EJBContainerTransactionManager.processSystemException(EJBContainerTransactionManager.java:748)
    at com.sun.ejb.containers.EJBContainerTransactionManager.completeNewTx(EJBContainerTransactionManager.java:698)
    at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:503)
    at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4475)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2009)
    at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1979)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:220)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88)
    at com.sun.proxy.$Proxy430.findAll(Unknown Source)
    at service.__EJB31_Generated__PessoaResource__Intf____Bean__.findAll(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
    at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.AbstractMethodError: org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(Ljavax/persistence/SynchronizationType;Ljava/util/Map;)Ljavax/persistence/EntityManager;
    at com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:197)
    at com.sun.enterprise.container.common.impl.EntityManagerWrapper.find(EntityManagerWrapper.java:341)
    at TS.FrameWork.DAO.PessoaJpaController.findPessoa(PessoaJpaController.java:107)
    at service.PessoaResource.findAll(PessoaResource.java:110)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1081)
    at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1153)
    at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4695)
    at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:630)
    at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
    at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
    at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46)
    at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
    at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
    at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:582)
    at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCall(SystemInterceptorProxy.java:163)
    at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:140)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:883)
    at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:822)
    at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:369)
    at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:4667)
    at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4655)
    at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:212)
    ... 50 more

SEVERE:   Exception mapper com.sun.jersey.server.impl.ejb.EJBExceptionMapper@33b1dd76 for Throwable javax.ejb.EJBException threw a RuntimeException when attempting to obtain the response
SEVERE:   Mapped exception to response: 500 (Internal Server Error)
java.lang.ClassCastException: java.lang.AbstractMethodError cannot be cast to java.lang.Exception
    at javax.ejb.EJBException.getCausedByException(EJBException.java:91)
    at com.sun.jersey.server.impl.ejb.EJBExceptionMapper.toResponse(EJBExceptionMapper.java:63)
    at com.sun.jersey.server.impl.ejb.EJBExceptionMapper.toResponse(EJBExceptionMapper.java:54)
    at com.sun.jersey.spi.container.ContainerResponse.mapException(ContainerResponse.java:452)
    at com.sun.jersey.spi.container.ContainerResponse.mapMappableContainerException(ContainerResponse.java:400)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1404)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
    at java.lang.Thread.run(Thread.java:724)
解决方案

AbstractMethodError usually is caused by incompatible binaries; for this specific error there is an opened (unresolved) ticket but with some comments

Check your jar files version for incompatibilities.

这篇关于“java.lang.AbstractMethodError:org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager”与休眠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-11 15:28