Thiago Falsetta commented on Bug HHH-8308

Same error here: Caused by: java.lang.AbstractMethodError: org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(Ljavax/persistence/SynchronizationType;Ljava/util/Map;)Ljavax/persistence/EntityManager;

Updates?

My Code :

persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
	version="2.0">
	
	<persistence-unit name="glassfish4_migration_teste">
		<provider>org.hibernate.ejb.HibernatePersistence</provider>
		<jta-data-source>jdbc/glassfish4migration</jta-data-source>
		<properties>
			<property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />										     		
      		<property name="javax.persistence.jdbc.hbm2ddl.auto" value="update" />					
		</properties>
	</persistence-unit>
</persistence>

UserFacade.java
package com.falsetta.glassfish4teste.ejb.bean.interfaces;

import java.util.List;

import javax.ejb.Local;

import com.falsetta.glassfish4teste.entity.User;

@Local
public interface UserFacade {
	
	public static final String LOCAL = "UserFacade";	
	public void create(User user);
	public List<User> findAll();
	public void update(User user);
	public void delete(User user);
}
UserFacadeBean.java
package com.falsetta.glassfish4teste.ejb.bean.impl;

import java.util.List;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;

import com.falsetta.glassfish4teste.ejb.bean.interfaces.UserFacade;
import com.falsetta.glassfish4teste.entity.User;

@Stateless(name = UserFacade.LOCAL)
public class UserFacadeBean implements UserFacade {

	@PersistenceContext(name = "glassfish4_migration_teste")
	private EntityManager entityManager;

	public void create(User user) {
		entityManager.persist(user);
	}

	public List<User> findAll() {
		Query query = entityManager.createNamedQuery("user.find.all");

		List<User> users = (List<User>) query.getResultList();

		return users;
	}

}
UserManagerBean.java
package com.falsetta.glassfish4teste.manager;

import java.io.Serializable;
import java.util.List;

import javax.ejb.EJB;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;

import com.falsetta.glassfish4teste.ejb.bean.interfaces.UserFacade;
import com.falsetta.glassfish4teste.entity.User;

@Named
@SessionScoped
public class UserManagerBean  implements Serializable{
	
	@EJB
	private UserFacade userFacade;

	public List<User> findAllUsers() {
		return userFacade.findAll();
	}
}
Stacktrace
FATAL: JSF1073: javax.el.ELException caught during processing of RENDER_RESPONSE 6 : UIComponent-ClientId=, Message=/users.xhtml @20,99 value="#{userManagerBean.findAllUsers()}": javax.ejb.EJBException
FATAL: /users.xhtml @20,99 value="#{userManagerBean.findAllUsers()}": javax.ejb.EJBException
javax.el.ELException: /users.xhtml @20,99 value="#{userManagerBean.findAllUsers()}": javax.ejb.EJBException
	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
	at javax.faces.component.UIData.getValue(UIData.java:732)
	at org.primefaces.component.datatable.DataTable.getValue(DataTable.java:867)
	at org.primefaces.component.api.UIData.getDataModel(UIData.java:579)
	at javax.faces.component.UIData.getRowCount(UIData.java:356)
	at org.primefaces.component.datatable.DataTableRenderer.encodeTbody(DataTableRenderer.java:629)
	at org.primefaces.component.datatable.DataTableRenderer.encodeRegularTable(DataTableRenderer.java:234)
	at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:196)
	at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:82)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:924)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:894)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:443)
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
	at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
	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: javax.el.ELException: javax.ejb.EJBException
	at javax.el.ELUtil.invokeMethod(ELUtil.java:330)
	at javax.el.BeanELResolver.invoke(BeanELResolver.java:536)
	at javax.el.CompositeELResolver.invoke(CompositeELResolver.java:256)
	at com.sun.el.parser.AstValue.getValue(AstValue.java:136)
	at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
	at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50)
	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
	... 51 more
Caused by: 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.$Proxy321.findAll(Unknown Source)
	at com.falsetta.glassfish4teste.manager.UserManagerBean.findAllUsers(UserManagerBean.java:21)
	at com.falsetta.glassfish4teste.manager.UserManagerBean$Proxy$_$$_WeldClientProxy.findAllUsers(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 javax.el.ELUtil.invokeMethod(ELUtil.java:326)
	... 58 more
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.createNamedQuery(EntityManagerWrapper.java:521)
	at com.falsetta.glassfish4teste.ejb.bean.impl.UserFacadeBean.findAll(UserFacadeBean.java:24)
	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.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 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)
	... 67 more

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira