Boa tarde, pessoal to com um problemão.. depois de conseguir fazer o menu em rich faces veio outro problema.. bom tenhu uma entidade Empresa e outra Usuario... e fiz um pagina para InserirEmpresa e outra para ListarEmpresa.. o problema que quando eo clico em cadastrar ele abre a pagina de empresa de boa.. mais quando eo vo gravar os dados ele me da o seguinte erro
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: #{EmpresaManagedBean.inserir}: javax.persistence.PersistenceException: No Persistence provider for EntityManager named SUIPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory:
oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Local Exception Stack:
Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@789144
Internal Exception: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [SUIPU] failed.
Internal Exception: Exception [TOPLINK-7154] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [usuarios] in entity class [class negocio.entidade.Empresa] has a mappedBy value of [empresa] which does not exist in its owning entity class [class negocio.entidade.Usuario]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:144)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:168)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at persistencia.EmpresaDAO.conectar(EmpresaDAO.java:23)
at persistencia.EmpresaDAO.inserir(EmpresaDAO.java:52)
at negocio.fachada.EmpresaFachada.inserir(EmpresaFachada.java:27)
at apresentacao.managedbean.EmpresaManagedBean.inserir(EmpresaManagedBean.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.el.parser.AstValue.invoke(AstValue.java:172)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
at javax.faces.component.UICommand.broadcast(UICommand.java:383)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [SUIPU] failed.
Internal Exception: Exception [TOPLINK-7154] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [usuarios] in entity class [class negocio.entidade.Empresa] has a mappedBy value of [empresa] which does not exist in its owning entity class [class negocio.entidade.Usuario]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:644)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:172)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:240)
at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:256)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:154)
... 42 more
Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [SUIPU] failed.
Internal Exception: Exception [TOPLINK-7154] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [usuarios] in entity class [class negocio.entidade.Empresa] has a mappedBy value of [empresa] which does not exist in its owning entity class [class negocio.entidade.Usuario]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:228)
... 47 more
Caused by: Exception [TOPLINK-7154] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [usuarios] in entity class [class negocio.entidade.Empresa] has a mappedBy value of [empresa] which does not exist in its owning entity class [class negocio.entidade.Usuario]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at oracle.toplink.essentials.exceptions.ValidationException.noMappedByAttributeFound(ValidationException.java:1133)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataValidator.throwNoMappedByAttributeFound(MetadataValidator.java:312)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:142)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.OneToManyAccessor.process(OneToManyAccessor.java:157)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.processRelationship(RelationshipAccessor.java:290)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.processRelationshipDescriptors(MetadataProject.java:581)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process(MetadataProject.java:514)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:294)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:298)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:608)
... 46 more
The following providers:
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
Returned null to createEntityManagerFactory.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
root cause
javax.faces.FacesException: #{EmpresaManagedBean.inserir}: javax.persistence.PersistenceException: No Persistence provider for EntityManager named SUIPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory:
oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Local Exception Stack:
Exception [TOPLINK-30005] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@789144
Internal Exception: javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [SUIPU] failed.
Internal Exception: Exception [TOPLINK-7154] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [usuarios] in entity class [class negocio.entidade.Empresa] has a mappedBy value of [empresa] which does not exist in its owning entity class [class negocio.entidade.Usuario]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at oracle.toplink.essentials.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:144)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:168)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at persistencia.EmpresaDAO.conectar(EmpresaDAO.java:23)
at persistencia.EmpresaDAO.inserir(EmpresaDAO.java:52)
at negocio.fachada.EmpresaFachada.inserir(EmpresaFachada.java:27)
at apresentacao.managedbean.EmpresaManagedBean.inserir(EmpresaManagedBean.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
e quando eo clico em Listar para abrir a pagina de Listar Empresa ele me da esse erro
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: #{EmpresaManagedBean.listar}: javax.persistence.PersistenceException: No Persistence provider for EntityManager named SUIPU: Provider named oracle.toplink.essentials.PersistenceProvider threw unexpected exception at create EntityManagerFactory:
javax.persistence.PersistenceException
javax.persistence.PersistenceException: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [SUIPU] failed.
Internal Exception: Exception [TOPLINK-7154] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [usuarios] in entity class [class negocio.entidade.Empresa] has a mappedBy value of [empresa] which does not exist in its owning entity class [class negocio.entidade.Usuario]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:644)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:195)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:110)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at persistencia.EmpresaDAO.conectar(EmpresaDAO.java:23)
at persistencia.EmpresaDAO.recuperarTodos(EmpresaDAO.java:67)
at negocio.fachada.EmpresaFachada.listar(EmpresaFachada.java:31)
at apresentacao.managedbean.EmpresaManagedBean.recuperarEmpresas(EmpresaManagedBean.java:85)
at apresentacao.managedbean.EmpresaManagedBean.listar(EmpresaManagedBean.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.el.parser.AstValue.invoke(AstValue.java:172)
at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
at javax.faces.component.UICommand.broadcast(UICommand.java:383)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:253)
at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:466)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: Exception [TOPLINK-28018] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.EntityManagerSetupException
Exception Description: predeploy for PersistenceUnit [SUIPU] failed.
Internal Exception: Exception [TOPLINK-7154] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [usuarios] in entity class [class negocio.entidade.Empresa] has a mappedBy value of [empresa] which does not exist in its owning entity class [class negocio.entidade.Usuario]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at oracle.toplink.essentials.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:228)
... 45 more
Caused by: Exception [TOPLINK-7154] (Oracle TopLink Essentials - 2.1 (Build b22-fcs (02/21/2008))): oracle.toplink.essentials.exceptions.ValidationException
Exception Description: The attribute [usuarios] in entity class [class negocio.entidade.Empresa] has a mappedBy value of [empresa] which does not exist in its owning entity class [class negocio.entidade.Usuario]. If the owning entity class is a @MappedSuperclass, this is invalid, and your attribute should reference the correct subclass.
at oracle.toplink.essentials.exceptions.ValidationException.noMappedByAttributeFound(ValidationException.java:1133)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataValidator.throwNoMappedByAttributeFound(MetadataValidator.java:312)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.getOwningMapping(RelationshipAccessor.java:142)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.OneToManyAccessor.process(OneToManyAccessor.java:157)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.accessors.RelationshipAccessor.processRelationship(RelationshipAccessor.java:290)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.processRelationshipDescriptors(MetadataProject.java:581)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProject.process(MetadataProject.java:514)
at oracle.toplink.essentials.internal.ejb.cmp3.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:294)
at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:298)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:608)
... 44 more
The following providers:
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
Returned null to createEntityManagerFactory.
javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
root cause
sera que alguem pode me ajudar?
Obrigado
