Two Laptop Bag*
The moose likes Object Relational Mapping and the fly likes Web app JSF+Facelets+Hibernate error: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Web app JSF+Facelets+Hibernate error: "No Persistence provider for EntityManager named"" Watch "Web app JSF+Facelets+Hibernate error: "No Persistence provider for EntityManager named"" New topic
Author

Web app JSF+Facelets+Hibernate error: "No Persistence provider for EntityManager named"

Rogerio Kioshi
Ranch Hand

Joined: Apr 12, 2005
Posts: 689
Hi,

I've download the code:
http://www.globalcode.com.br/download/projetos/mc31_projeto_eclipse.zip
(It's an application code using JSF+Facelets+Hibernate)

But when I tried the link http://localhost:8080/FaceletsKickStart/associados.jsf

it shows the error:


javax.faces.FacesException: Cant instantiate class: br.com.globalcode.mc31.controlador.AssociadoController.. No Persistence provider for EntityManager named persunit: Provider named org.hibernate.ejb.HibernatePersistence threw unexpected exception at create EntityManagerFactory: java.lang.IncompatibleClassChangeError java.lang.IncompatibleClassChangeError: class org.hibernate.cfg.ExtendedMappings has interface org.hibernate.cfg.Mappings as super class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:983) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1503) at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(AnnotationConfiguration.java:175) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:263) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1206) at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1269) at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:888) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186) at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:246) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:120) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83) at br.com.globalcode.mc31.controlador.AssociadoController.<init>(AssociadoController.java:36) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at com.sun.faces.config.ManagedBeanFactoryImpl.newInstance(ManagedBeanFactoryImpl.java:277) at com.sun.faces.application.ApplicationAssociate.createAndMaybeStoreManagedBeans(ApplicationAssociate.java:527) at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:82) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64) at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:86) at com.sun.el.parser.AstValue.getValue(AstValue.java:127) at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206) at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71) at javax.faces.component.UIData.getValue(UIData.java:582) at org.ajax4jsf.component.SequenceDataAdaptor.getDataModel(SequenceDataAdaptor.java:70) at org.ajax4jsf.component.SequenceDataAdaptor.createDataModel(SequenceDataAdaptor.java:64) at org.ajax4jsf.component.UIDataAdaptor.getExtendedDataModel(UIDataAdaptor.java:566) at org.ajax4jsf.component.UIDataAdaptor.getRowCount(UIDataAdaptor.java:233) at org.richfaces.component.UIDatascroller.getRowCount(UIDatascroller.java:365) at org.richfaces.component.UIDatascroller.getPageCount(UIDatascroller.java:344) at org.richfaces.renderkit.html.DataScrollerRenderer.isRenderedOnSinglePage(DataScrollerRenderer.java:47) at org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeEnd(DatascrollerTemplate.java:181) at org.richfaces.renderkit.html.DatascrollerTemplate.doEncodeEnd(DatascrollerTemplate.java:639) at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:135) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:833) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:896) at javax.faces.render.Renderer.encodeChildren(Renderer.java:137) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809) at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282) at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262) at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:284) at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262) at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:199) at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:194) at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271) at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:117) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809) at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:271) at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:242) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:809) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592) at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) 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.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141) at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281) 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:1093) 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:1093) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:382) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) The following providers: oracle.toplink.essentials.PersistenceProvider oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider Returned null to createEntityManagerFactory.


Does anyone know what it could be the reason and the solution for this problem?


SCEA 5 (part 1), SCBCD, SCWCD, SCJP, CLP, CLS
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web app JSF+Facelets+Hibernate error: "No Persistence provider for EntityManager named"
 
Similar Threads
javax.el.PropertyNotFoundException
javax.el.PropertyNotFoundException: Property 'logoutUser' not found on type org.ssc.webapp.UserLogin
ClassCastException thrown using @Inheritance and List
Error reading "member"
adding tabs dynamically to rich:tabPanel