I try to connectt sqlserver2000 with jdbc driver and hibernate.
i have not any firewall and my URL is valid.i set username and
password in sqlserver2000.
my hibernate.cfg.xml:
<property
name="connection.driver_class">com.microsoft.jdbc.sqlserver.SQLServer
Driver</property>
<property
name="connection.url">jdbc:microsoft:sqlserver://127.0.0.1:1433;Datab
aseName=FireTool</property>
<property name="connection.username">data</property>
<property name="connection.password">pass</property>
<!-- SQL dialect -->
<property
name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop
erty>
I believe my username and password is not correctly create in
sqlserver2000
Errors:
org.hibernate.exception.JDBCConnectionException: Cannot open
connection
at org.hibernate.exception.SQLStateConverter.convert
(SQLStateConverter.java:72)
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:318)
at org.hibernate.jdbc.ConnectionManager.getConnection
(ConnectionManager.java:109)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement
(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement
(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections
(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
at org.hibernate.loader.Loader.listIgnoreQueryCache
(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.criteria.CriteriaLoader.list
(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1492)
at org.hibernate.impl.CriteriaImpl.list
(CriteriaImpl.java:298)
at firetool.Connector.getSubProductWithC1(Connector.java:208)
at firetool.Frame1.<init>(Frame1.java:39)
at firetool.FireToolP.<init>(FireToolP.java:27)
at firetool.FireToolP$1.run(FireToolP.java:65)
at java.awt.event.InvocationEvent.dispatch
(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run
(EventDispatchThread.java:110)
Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver
for JDBC]Error establishing socket.
at com.microsoft.jdbc.base.BaseExceptions.createException
(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException
(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException
(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>
(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open
(Unknown Source)
at
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
Source)
at com.microsoft.jdbc.base.BaseConnection.open(Unknown
Source)
at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection
(DriverManager.java:525)
at java.sql.DriverManager.getConnection
(DriverManager.java:140)
at
org.hibernate.connection.DriverManagerConnectionProvider.getConnectio
n(DriverManagerConnectionProvider.java:110)
at org.hibernate.jdbc.ConnectionManager.openConnection
(ConnectionManager.java:315)