File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes tomcat hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "tomcat hibernate" Watch "tomcat hibernate" New topic

tomcat hibernate

alec stewart stewart
Ranch Hand

Joined: Dec 23, 2003
Posts: 71
hi everyone
i am using the combination of tomcat5.5.4 hibernate 2.a and ms sql server 2000
i have placed jsqlconnect.jar in the common /lib directory
my entry in the server.xml file is as follows:
<Context path="/hibernate" docBase="hibernate">
<Resource name="jdbc/quickstart" scope="Shareable" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/quickstart">

<!-- DBCP database connection settings -->
<value> </value>

<!-- DBCP connection pooling options -->

my hibernate.cfg.xml is as follows:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"



<property name="connection.datasource">java:comp/env/jdbc/quickstart</property>
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>

<!-- Mapping files -->
<mapping resource="Cat.hbm.xml"/>



why am i getting the following error"
cannot open connection
no suitable driver

please reply me as soon thanks in advance to all
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Check your connection URL (jdbc:JSQLConnect://sanjay:1433//quickstart) is correct as per your driver documentation and that your driver is in your classpath.

Also, why are you trying to user the Oracle dialect with MSSQL? Shouldn't you be using the Sybase dialect?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: tomcat hibernate
It's not a secret anymore!