-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: MS SQL Connection problem!!!!
PostPosted: Wed Sep 21, 2005 2:40 pm 
Newbie

Joined: Wed Sep 21, 2005 2:19 pm
Posts: 2
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

My code:

import java.sql.*;

public class DBMain {

public static void main(String[] args) {
try {
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://E70F8DAF84124E3:1433" , "RECEP",
"reco");

} catch (Exception e) {
e.printStackTrace();
}
}
}


Console Output:
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(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at DBMain.main(DBMain.java:22)

Help please...[/u]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 4:14 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
does this even relate to hibernate??

a personal firewall can prevent your program from binding to a socket if your firewall has it shut off

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 7:59 am 
Newbie

Joined: Wed Sep 21, 2005 2:19 pm
Posts: 2
kochcp wrote:
does this even relate to hibernate??

a personal firewall can prevent your program from binding to a socket if your firewall has it shut off



Thank you for reply but I have shut down my firewall. I tried it. on the other hand, my operatig system is windows xp service pack 2. It may be cause that problem but I couldnt found anyway....


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 9:03 am 
Regular
Regular

Joined: Tue May 24, 2005 10:19 am
Posts: 65
try:

1)enable all protocols in client(cliconfg.exe) and server(svrnetcn.exe)
2)update SQlSERVER to last sp.
3)use jtds driver http://jtds.sourceforge.net/


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 11:58 am 
Newbie

Joined: Tue May 10, 2005 2:22 pm
Posts: 10
One of the simplest tests for connection issues is to trying a telnet to port 1433. If you don't get a connection, either there's a firewall of some sort in the way blocking you or the service is not currently running on the target host.

BTW, I used the jTDS driver with Hibernate v3.0 on a recent project without any connection issues to SQL Server. I worked with someone who had tried using the MS JDBC driver and did not recommend them due to performance issues and bugs. Your mileage may vary of course.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.