I'm having a devil of a time connecting to SQLServer. I'm just running a simple example program and I'm still running into problems. Here's my config file:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="hibernate.connection.driver_class">
net.sourceforge.jtds.jdbc.Driver</property>
<property name="hibernate.connection.url">
jdbc:jtds:sqlserver://toba:1433/IPChecker;user=proggers;password=coleH#m3L
</property>
<!-- <property name="connection.username">proggers</property>
<property name="connection.password">coleH#m3L</property>-->
<property name="connection.username">wbatid</property>
<property name="connection.password">#arLos$eLtra7</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">
org.hibernate.dialect.SQLServerDialect</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<!--<property name="hbm2ddl.auto">create</property>-->
<mapping resource="Event.hbm.xml"/>
</session-factory>
</hibernate-configuration>
The error I am getting is:
[java] org.hibernate.exception.GenericJDBCException: Cannot open connection
[java] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
[java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
[java] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:301)
[java] at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:110)
[java] at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:137)
[java] at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:49)
[java] at org.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:24)
[java] at org.hibernate.jdbc.JDBCContext.beginTransaction(JDBCContext.java:271)
[java] at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1079)
[java] at EventManager.createAndStoreEvent(Unknown Source)
[java] at EventManager.main(Unknown Source)
[java] Caused by: java.sql.SQLException: Login failed for user 'proggers'.
[java] at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:364)
[java] at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2754)
[java] at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2195)
[java] at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:591)
[java] at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:335)
[java] at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
[java] at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:188)
[java] at java.sql.DriverManager.getConnection(Unknown Source)
[java] at java.sql.DriverManager.getConnection(Unknown Source)
[java] at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
[java] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:298)
[java] ... 8 more
[java] Exception in thread "main"
[java] Java Result: 1
It looks like I'm just having a problem with the userid of proggers, but I really don't think that is it because that user id works just fine for other applications.
I've been struggling with this for a while, so any help would be greatly appreciated.
thanks,
lisa
|