I am able to get further, now I can't create a connection to the database.
again, I have added the following in my server.xml of Tomcat:
<Context path="quickstart" docBase="/quickstart">
<Resource name="jdbc/quickstart" scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/quickstart">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- DBCP database connection settings -->
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/mysql</value>
</parameter>
<parameter>
<name>driverClassName</name><value>org.gjt.mm.mysql.Driver</value>
</parameter>
<parameter>
<name>username</name>
<value>remote</value>
</parameter>
<parameter>
<name>password</name>
<value>remote</value>
</parameter>
<!-- DBCP connection pooling options -->
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>4</value>
</parameter>
</ResourceParams>
</Context>
<< from the Tomcat console >>
20:56:49,010 INFO DatasourceConnectionProvider:51 - Using datasource: java:comp/env/jdbc/quickstart
20:56:49,010 INFO SessionFactoryImpl:155 - Use outer join fetching: true
20:56:49,057 WARN JDBCExceptionReporter:36 - SQL Error: 0, SQLState: null
20:56:49,057 ERROR JDBCExceptionReporter:44 - Cannot load JDBC driver class 'null'
20:56:49,072 WARN SessionFactoryImpl:171 - Could not obtain connection metadata
java.sql.SQLException: Cannot load JDBC driver class 'null'
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:60)
at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:160)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:594)
at net.sf.hibernate.examples.quickstart.TestHibernateServlet.initHibernate(TestHibernateServlet.java:109)
at net.sf.hibernate.examples.quickstart.TestHibernateServlet.doGet(TestHibernateServlet.java:26)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
|