Ich habe das gleiche Problem. Meine Konfiguration sieht folgender massen aus:
2006-08-07 13:55:11,506 INFO [org.hibernate.cfg.Configuration] configuring from resource: /hibernate.cfg.xml
2006-08-07 13:55:11,506 INFO [org.hibernate.cfg.Configuration] Configuration resource: /hibernate.cfg.xml
2006-08-07 13:55:11,587 DEBUG [org.hibernate.util.DTDEntityResolver] trying to locate
http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath under org/hibernate/
2006-08-07 13:55:11,587 DEBUG [org.hibernate.util.DTDEntityResolver] found
http://hibernate.sourceforge.net/hibern ... on-3.0.dtd in classpath
2006-08-07 13:55:11,589 DEBUG [org.hibernate.cfg.Configuration] dialect=org.hibernate.dialect.PostgreSQLDialect
2006-08-07 13:55:11,666 DEBUG [org.hibernate.cfg.Configuration] connection.driver_class=org.postgresql.Driver
2006-08-07 13:55:11,666 DEBUG [org.hibernate.cfg.Configuration] connection.username=someuser
2006-08-07 13:55:11,666 DEBUG [org.hibernate.cfg.Configuration] connection.password=someuserpassword
2006-08-07 13:55:11,666 DEBUG [org.hibernate.cfg.Configuration] connection.url=jdbc:postgresql://localhost/database
2006-08-07 13:55:11,666 INFO [org.hibernate.cfg.Configuration] Configured SessionFactory: null
2006-08-07 13:55:11,874 DEBUG [org.hibernate.cfg.Configuration] Preparing to build session factory with filters : {}
2006-08-07 13:55:12,098 INFO [org.hibernate.cfg.Configuration] processing extends queue
2006-08-07 13:55:12,099 INFO [org.hibernate.cfg.Configuration] processing collection mappings
2006-08-07 13:55:12,099 INFO [org.hibernate.cfg.Configuration] processing association property references
2006-08-07 13:55:12,099 INFO [org.hibernate.cfg.Configuration] processing foreign key constraints
2006-08-07 13:55:12,099 INFO [org.hibernate.connection.DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)
2006-08-07 13:55:12,099 INFO [org.hibernate.connection.DriverManagerConnectionProvider] Hibernate connection pool size: 20
2006-08-07 13:55:12,099 INFO [org.hibernate.connection.DriverManagerConnectionProvider] autocommit mode: false
2006-08-07 13:55:12,207 INFO [org.hibernate.connection.DriverManagerConnectionProvider] using driver: org.postgresql.Driver at URL: jdbc:postgresql://localhost/database
2006-08-07 13:55:12,207 INFO [org.hibernate.connection.DriverManagerConnectionProvider] connection properties: {user=someuser, password=someuserpassword}
2006-08-07 13:55:12,207 DEBUG [org.hibernate.connection.DriverManagerConnectionProvider] total checked-out connections: 0
2006-08-07 13:55:12,207 DEBUG [org.hibernate.connection.DriverManagerConnectionProvider] opening new JDBC connection
2006-08-07 13:55:12,208 WARN [org.hibernate.cfg.SettingsFactory] Could not obtain connection metadata
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1823)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1143)
at de.conpower.conweb.control.CRMController.getCustomers(CRMController.java:146)
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:585)
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:400)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:71)
at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at javax.faces.component.UIData.getValue(UIData.java:527)
at javax.faces.component.UIData.getDataModel(UIData.java:848)
at javax.faces.component.UIData.getRowCount(UIData.java:271)
at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:124)
at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:94)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:600)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:537)
at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
at org.apache.jsp.tests.dbaccesstest_jsp._jspx_meth_h_dataTable_0(org.apache.jsp.tests.dbaccesstest_jsp:198)
at org.apache.jsp.tests.dbaccesstest_jsp._jspx_meth_f_view_0(org.apache.jsp.tests.dbaccesstest_jsp:123)
at org.apache.jsp.tests.dbaccesstest_jsp._jspService(org.apache.jsp.tests.dbaccesstest_jsp:81)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
2006-08-07 13:55:12,379 INFO [org.hibernate.dialect.Dialect] Using dialect: org.hibernate.dialect.PostgreSQLDialect
2006-08-07 13:55:12,503 ERROR [de.conpower.conweb.control.CRMController] Could not instantiate dialect class
org.hibernate.HibernateException: Could not instantiate dialect class
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:84)
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:42)
at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:378)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1823)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1143)
at de.conpower.conweb.control.CRMController.getCustomers(CRMController.java:146)
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:585)
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:400)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:71)
at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at javax.faces.component.UIData.getValue(UIData.java:527)
at javax.faces.component.UIData.getDataModel(UIData.java:848)
at javax.faces.component.UIData.getRowCount(UIData.java:271)
at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:124)
at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:94)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:600)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:537)
at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
at org.apache.jsp.tests.dbaccesstest_jsp._jspx_meth_h_dataTable_0(org.apache.jsp.tests.dbaccesstest_jsp:198)
at org.apache.jsp.tests.dbaccesstest_jsp._jspx_meth_f_view_0(org.apache.jsp.tests.dbaccesstest_jsp:123)
at org.apache.jsp.tests.dbaccesstest_jsp._jspService(org.apache.jsp.tests.dbaccesstest_jsp:81)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassCastException: org.hibernate.dialect.PostgreSQLDialect
at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:78)
... 66 more
liegt das ganze daran, dass die SessionFactory null ist? Und wenn ja, warum ist die Factory null?
Danke für jede Antwort.