Hi,
I am trying to use Hibernate 3 to get the list of users from a database table called USER but it seems that DBCP is not working with me. I am currently using MySQL under Slackware Linux 10.1 with Exadel Studio Pro 3.0.3, jakarta-tomcat-5.5.9 and JDK 5.0(1.5.0_02).
Please read the first comment under hibernate.cfg.xml
Code:
hibernate.cfg.xml:
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<!-- Every thing works fine if I uncomment the following four lines and comment the three lines in the middle -->
<!--
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/webappdb</property>
<property name="connection.username">myusername</property>
<property name="connection.password">mypassword</property>
-->
<property name="connection.datasource">java:comp/env/jdbc/webapp</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- JDBC connection pool (use the built-in) -->
<!--
<property name="connection.pool_size">1</property>
-->
<!-- SQL dialect -->
<!--
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
-->
<mapping resource="User.hbm.xml"/>
</session-factory>
</hibernate-configuration>
User.hbm.xml:
Code:
<hibernate-mapping>
<class name="webapp.web.User" table="USER">
<id name="userId" column="USER_ID" type="long">
<generator class="increment"/>
</id>
<!--
<property name="date" type="timestamp" column="CREATION_DATE"/>
-->
<property name="firstName" column="FIRST_NAME"/>
<property name="lastName" column="LAST_NAME"/>
<property name="loginId" column="LOGIN_ID"/>
<property name="password" column="PASSWORD_HASH"/>
<property name="email" column="EMAIL"/>
</class>
</hibernate-mapping>
I have placed hibernate.cfg.xml and User.hbm.xml under MY_WEB_APP_DIR/WEB-INF/classes
TOMCAT_DIR/conf/server.xml:
Code:
<Context docBase="/home/basel/workspace_3.1_gtk/web_app_01/.deployables/web_app_01" path="/web_app_01" reloadable="true" source="com.ibm.wtp.web.server:web_app_01">
<!-- Hibernate DBCP Configuration - BEGINS -->
<Resource name="jdbc/webapp" scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/webapp">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- DBCP Connection settings -->
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/webappdb</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>myusername</value>
</parameter>
<parameter>
<name>password</name>
<value>mypassword</value>
</parameter>
<!-- DBCP Options -->
<parameter>
<name>maxWait</name>
<value>3000</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>100</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>10</value>
</parameter>
</ResourceParams>
</Context>
Under WEB-INF/lib I have the following files:
asm.jar
cglib-2.1.jar
commons-beanutils.jar <-- added by Exadel as part of the project
commons-collections.jar <-- added by Exadel as part of the project
commons-digest.jar <-- added by Exadel as part of the project
commons-logging.jar <-- added by Exadel as part of the project
dom4j-1.6.jar
ehcache-1.1.jar
hibernate3.jar
jsf-api.jar <-- added by Exadel as part of the project
jsf-impl.jar <-- added by Exadel as part of the project
jstl.jar <-- added by Exadel as part of the project
jta.jar
standard.jar <-- added by Exadel as part of the project
I have mysql-connector-java-3.1.7-bin.jar under TOMCAT_DIR/common/lib
UserListManager.java:
Code:
public List getUsers() {
List users = new ArrayList();
try{
// I have not made any changes to HibernateUtil.java from Chapter 1. Quickstart with Tomcat
// sessionFactory = new Configuration().configure().buildSessionFactory(); // Line 12 from HibernateUtil.java
Session session = HibernateUtil.currentSession(); // Line 16
Transaction tx = session.beginTransaction();
Criteria criteria = session.createCriteria(User.class);
criteria.setFirstResult(0);
//criteria.setMaxResults(3);
users = criteria.list();
System.err.println("Is the list empty? " + users.isEmpty());
Iterator i = users.iterator();
while(i.hasNext()){
User u = (User)i.next();
System.out.println(u.getUserId());
}
tx.commit();
HibernateUtil.closeSession();
}
catch(Exception e){
e.printStackTrace();
}
return users;
}
Code:
-----
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.0.5
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Environment <clinit>
INFO: using CGLIB reflection optimizer
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Configuration addResource
INFO: Mapping resource: User.hbm.xml
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
INFO: Mapping class: webapp.web.User -> USER
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Configuration doConfigure
INFO: Configured SessionFactory: null
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing extends queue
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing collection mappings
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing association property references
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.Configuration secondPassCompile
INFO: processing foreign key constraints
Aug 7, 2005 10:33:01 PM org.hibernate.util.NamingHelper getInitialContext
INFO: JNDI InitialContext properties:{}
Aug 7, 2005 10:33:01 PM org.hibernate.connection.DatasourceConnectionProvider configure
INFO: Using datasource: java:comp/env/jdbc/webapp
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
WARNING: Could not obtain connection metadata
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
at webapp.web.HibernateUtil.<clinit>(HibernateUtil.java:12)
at webapp.web.UserListManager.getUsers(UserListManager.java:16)
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 com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
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:856)
at javax.faces.component.UIData.setRowIndex(UIData.java:379)
at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:65)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
at javax.faces.component.UIData.encodeBegin(UIData.java:681)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:433)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:607)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:544)
at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
at org.apache.jsp.home_jsp._jspx_meth_h_panelGrid_0(org.apache.jsp.home_jsp:192)
at org.apache.jsp.home_jsp._jspx_meth_h_form_0(org.apache.jsp.home_jsp:153)
at org.apache.jsp.home_jsp._jspx_meth_f_view_0(org.apache.jsp.home_jsp:123)
at org.apache.jsp.home_jsp._jspService(org.apache.jsp.home_jsp:88)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
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:130)
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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
... 68 more
Aug 7, 2005 10:33:01 PM org.hibernate.dialect.Dialect <init>
INFO: Using dialect: org.hibernate.dialect.MySQLDialect
Aug 7, 2005 10:33:01 PM org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory
INFO: Using default transaction strategy (direct JDBC transactions)
Aug 7, 2005 10:33:01 PM org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup
INFO: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic flush during beforeCompletion(): disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Automatic session close at end of transaction: disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Scrollable result sets: disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: JDBC3 getGeneratedKeys(): disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Connection release mode: null
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Maximum outer join fetch depth: 2
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default batch fetch size: 1
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Generate SQL with comments: disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Order SQL updates by primary key: disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory
INFO: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
Aug 7, 2005 10:33:01 PM org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>
INFO: Using ASTQueryTranslatorFactory
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query language substitutions: {}
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Second-level cache: enabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Query cache: disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory createCacheProvider
INFO: Cache provider: org.hibernate.cache.EhCacheProvider
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Optimize cache for minimal puts: disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Structured second-level cache entries: disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Echoing all SQL to stdout
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Statistics: disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Deleted entity synthetic identifier rollback: disabled
Aug 7, 2005 10:33:01 PM org.hibernate.cfg.SettingsFactory buildSettings
INFO: Default entity-mode: pojo
Aug 7, 2005 10:33:02 PM org.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Aug 7, 2005 10:33:02 PM net.sf.ehcache.config.Configurator configure
WARNING: No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/home/basel/workspace_3.1_gtk/web_app_01/.deployables/web_app_01/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
Aug 7, 2005 10:33:02 PM org.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
Aug 7, 2005 10:33:02 PM org.hibernate.impl.SessionFactoryImpl checkNamedQueries
INFO: Checking 0 named queries
Aug 7, 2005 10:33:02 PM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: null
Aug 7, 2005 10:33:02 PM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Cannot create JDBC driver of class '' for connect URL 'null'
org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:301)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110)
at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:49)
at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:24)
at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:271)
at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1079)
at webapp.web.UserListManager.getUsers(UserListManager.java:17)
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 com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
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:856)
at javax.faces.component.UIData.setRowIndex(UIData.java:379)
at com.sun.faces.renderkit.html_basic.TableRenderer.encodeBegin(TableRenderer.java:65)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:683)
at javax.faces.component.UIData.encodeBegin(UIData.java:681)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:433)
at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:130)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:435)
at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:233)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:701)
at javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:607)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:544)
at com.sun.faces.taglib.html_basic.PanelGridTag.doEndTag(PanelGridTag.java:460)
at org.apache.jsp.home_jsp._jspx_meth_h_panelGrid_0(org.apache.jsp.home_jsp:192)
at org.apache.jsp.home_jsp._jspx_meth_h_form_0(org.apache.jsp.home_jsp:153)
at org.apache.jsp.home_jsp._jspx_meth_f_view_0(org.apache.jsp.home_jsp:123)
at org.apache.jsp.home_jsp._jspService(org.apache.jsp.home_jsp:88)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
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:130)
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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
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.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:59)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
... 68 more
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)
... 71 more
-----
[/quote]