Erro estranho ! jar entry meta-inf/services/javax.persistence.spi.PersistenceProvider not found

Galera, apos adicionar um modulo no projeto (jsp…mysql…hibernate…

Na hora da execucao esta aparecendo direto este erro:

JAR entry META-INF/services/javax.persistence.spi.PersistenceProvider not found in C:\gerencia2010\build\web\WEB-INF\lib\hibernate-entitymanager.jar

StackTrace


Caused by: javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: org.ajax4jsf.framework.ajax.AjaxViewRoot,ViewId: /mercado_dados_add.jsp][Class: javax.faces.component.html.HtmlOutputText,Id: _idJsp0]}
	at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:227)
	at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:69)
	at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:57)
	at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:539)
	at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:498)
	at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:366)
	at org.apache.jsp.mercado_005fdados_005fadd_jsp._jspx_meth_h_005foutputText_005f0(mercado_005fdados_005fadd_jsp.java:141)
	at org.apache.jsp.mercado_005fdados_005fadd_jsp._jspx_meth_f_005fview_005f0(mercado_005fdados_005fadd_jsp.java:110)
	at org.apache.jsp.mercado_005fdados_005fadd_jsp._jspService(mercado_005fdados_005fadd_jsp.java:72)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
	... 41 more
Caused by: javax.faces.el.EvaluationException: Cannot get value for expression '#{compraBean.adicionarProduto}'
	at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:405)
	at javax.faces.component.UIOutput.getValue(UIOutput.java:80)
	at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:223)
	... 52 more
Caused by: javax.faces.el.EvaluationException: Exception getting value of property adicionarProduto of base of type : br.com.filial.ecommerce.bb.compraBean
	at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99)
	at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:535)
	at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
	at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:386)
	... 54 more
Caused by: javax.faces.el.EvaluationException: Bean: br.com.filial.ecommerce.bb.compraBean, property: adicionarProduto
	at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:461)
	at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:85)
	... 57 more
Caused by: java.lang.reflect.InvocationTargetException
	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.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:457)
	... 58 more
Caused by: javax.persistence.PersistenceException: java.io.FileNotFoundException: JAR entry META-INF/services/javax.persistence.spi.PersistenceProvider not found in C:\gerencia2010\build\web\WEB-INF\lib\hibernate-entitymanager.jar
	at javax.persistence.Persistence.findAllProviders(Persistence.java:84)
	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:49)
	at br.com.filial.ecommerce.jpa.JPAResourceBean.getEMF(JPAResourceBean.java:26)
	at br.com.filial.ecommerce.bo.compra.criaPedido(compra.java:85)
	at br.com.filial.ecommerce.bb.compraBean.addProduto(compraBean.java:129)
	at br.com.filial.ecommerce.bb.compraBean.getAdicionarProduto(compraBean.java:307)
	... 63 more
Caused by: java.io.FileNotFoundException: JAR entry META-INF/services/javax.persistence.spi.PersistenceProvider not found in C:\gerencia2010\build\web\WEB-INF\lib\hibernate-entitymanager.jar
	at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
	at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:132)
	at java.net.URL.openStream(URL.java:1009)
	at javax.persistence.Persistence.findAllProviders(Persistence.java:70)

Os jars estao tudo no lugar…! Alguem ja viu isso?

valeu !!

os jars do hibernate estao no path? qual versao? (se for antes do 3.5, lembre-se que voce tambem precisa do jar do hibernate-entity-manager)

como esta seu persistence.xml?

Valeu Paulo,

Era o persistence que estava em local errado…!(em varios locais pra falar a real…)

Corrigi esse erro, agora acontece algo intermitente…as vezes a tela de venda vai ate o final e roda blz…

Em alguns momentos…acontece este erro:

No suitable driver found for jdbc:mysql://localhost:3306

Eu sei que a primeira vista parece que ele nao esta achando os drivers…mas esta tudo configurado blz nisso…tanto é que roda ate o final…mas vez ou outra da esse erro…

stacktrace

[code]
Stacktrace:
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
… 34 more
Caused by: org.apache.jasper.JasperException: An exception occurred processing JSP page /vendas/formapagto_boleto.jsp at line 45

45: Connection conn = DriverManager.getConnection(“jdbc:mysql://localhost:3306/gerencia”, “bancoger”, “123456”);

48: Statement stmt = conn.createStatement();

Stacktrace:
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:968)
at org.apache.jsp.vendas.finalizacaoBoleto_jsp._jspx_meth_t_005fdiv_005f0(finalizacaoBoleto_jsp.java:462)
at org.apache.jsp.vendas.finalizacaoBoleto_jsp._jspx_meth_f_005fview_005f0(finalizacaoBoleto_jsp.java:394)
at org.apache.jsp.vendas.finalizacaoBoleto_jsp._jspService(finalizacaoBoleto_jsp.java:220)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
… 47 more
Caused by: javax.servlet.ServletException: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/gerencia
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
at org.apache.jsp.vendas.formapagto_005fboleto_jsp._jspService(formapagto_005fboleto_jsp.java:181)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
… 65 more
Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/gerencia
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at org.apache.jsp.vendas.formapagto_005fboleto_jsp._jspService(formapagto_005fboleto_jsp.java:108)

[/code]