2014-06-26 38 views
0

我試圖登錄我的應用程序,我在我的glassfish控制檯中得到下面的錯誤。java.lang.AbstractMethodError對於Java 7和Glassfish 4.0,但它在Glassfish 3.1.2中完美地工作在Java 6中

javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean: java.lang.AbstractMethodError at com.sun.ejb.containers.EJBContainerTransactionManager.checkExceptionClientTx(EJBContainerTransactionManager.java:665) 
at com.sun.ejb.containers.EJBContainerTransactionManager.postInvokeTx(EJBContainerTransactionManager.java:507) 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.$Proxy435.find(Unknown Source) 
at myservername.server.facade.__EJB31_Generated__UsersFacade__Intf____Bean__.find(Unknown Source) at myservername.server.rest.AuthenticatorResource.getAuthenticatedUser(AuthenticatorResource.java:89) 
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 myservername.server.rest.ResourceAuditor.audit(ResourceAuditor.java:37) 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.EjbInvocation.proceed(EjbInvocation.java:582) 
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46) 
at sun.reflect.GeneratedMethodAccessor549.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.GeneratedMethodAccessor552.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.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) 
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:88) 
at com.sun.proxy.$Proxy434.getAuthenticatedUser(Unknown Source) 
at myservername.server.rest.__EJB31_Generated__AuthenticatorResource__Intf____Bean__.getAuthenticatedUser(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$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) 
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.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) 
+1

給你的EJB代碼 –

回答

0

GlassFish v4是Java EE 7的一個實現,而v3是Java EE 6的實現,所以它們在API上有很大的不同。您獲得的錯誤很可能是由於這些API中的更改而產生的,其中一種方法現在是抽象的,而此時您的應用程序未處於編譯時。因此,您可能需要檢查遷移指南,例如this

並檢出this post,這可能是相同的情況。

+0

根據你的指導,我使用hibernate 4.3.4.final與jpa 2.1雖然我得到同樣的錯誤,請指導我,如果我錯過了任何錯誤。 –

+0

如果沒有你的代碼很難說,所以你應該發佈異常發生的部分。 –

+0

我在調用下面的facade方法時得到了異常,** bold **'public T find(Object id){return 0;}}返回getEntityManager()。find(entityClass,id); }' –

相關問題