ProgrammerJ


i get this error when i try to connect to sql server 2005 developer edition with the latest JDBC.

sql string =>> jdbc:sqlserver://localhost:1434;databaseName=c1 Elvis elvis
SQL STATE: 08S01
ERROR CODE: 0
MESSAGE: An I/O error occurred while receiving the TDS prelogin response.

And the stacktrace is:

com.microsoft.sqlserver.jdbc.SQLServerException: An I/O error occurred while receiving the TDS prelogin response.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.DBComms.Prelogin(Unknown Source)
at com.microsoft.sqlserver.jdbc.DBComms.<init>(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)

and is called :connection=DriverManager.getConnection(con, user, password);

Please tell me what is wrong Because in other part of the code it works fine !

What is this "I/O error occurred while receiving the TDS prelogin response"





Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

ElvisAsaftei


There is a limitation about the number of simultaneous connections to the database in the SQL Server 2005 Developer Edition DVD

Can be that error because of that What is TDS prelogin response Any ideea Microsoft guys Pls ...







Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

saavyone

I'm also getting the same error! Did you ever find anything out, Elvis Somebody please respond. Anything will help.

Thanks,







Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

saavyone

Hi all,

I fixed it! Well I don't know if this fixes it, but it's working now by some intervention. I changed the url from 127.0.0.1 to my intranet ip 172.22.x.x (not my external 64.72.x.x). I then telneted 172.22.x.x port 1434 (which works for 127.0.0.1) and it didn't work. Then I tried 172.22.x.x 1433 and it did (even though the server logs say it's listening on 1434 like 127.0.0.1). Again, this may just be a coincedense, but at least I'm up and running now.

Thanks,





Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

David Olix - MSFT

Yes, the error message could stand to be more useful. I will make sure we address that.

But it looks like you've solved the problem though. By default, SQL Server listens for TCP connections on port 1433. Port 1434 is normally used by SQL Browser to respond to UDP queries to map a SQL Server instance name to IP address & port number.

Thank you for your feedback,

--David Olix

JDBC Development





Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

ProgrammerJ

The problem was posted on 23 Jan 2006 . It took 7 moths for anyone from mirosoft to figure it out. I've foud the problem the day before but you in an increddible time of 7 moths.

You are the best, with "your messages" and "increddible fast work" :))






Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

ProgrammerJ

The problem was posted on 23 Jan 2006 . It took 7 moths for anyone from mirosoft to figure it out. I've found the problem the day after i've posted the problem, but you in an increddible time of 7 months.

You are the best, with "your messages" and "increddible fast work" :))






Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

David Olix - MSFT

ProgrammerJ,

I sincerely apologize for not responding to your question sooner. We do try our best to respond to all questions posted on this forum within two business days. In this case we did not. Indeed, the only reason I saw your post at all is that someone else followed up to it with a post about the same problem, which brought the thread back to the top of the list. However, I hope this has not dissuaded you from using the Microsoft SQL Server 2005 JDBC driver.

Again, my apologies, and thank you for your feedback,

--David Olix

JDBC Development





Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

wesclark

http://msdn.microsoft.com/newsgroups/default.aspx &guid=&sloc=en-us&dg=microsoft.public.sqlserver.jdbcdriver&p=1&tid=f0f1c794-a805-4370-aca7-4f633c460104&mid=f0f1c794-a805-4370-aca7-4f633c460104

I have posted a similar problem on the jdbc discussion newsgroup. We are using the production 1.1 version of the JDBC driver. To repeat that post:

The stack trace is

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown
Source)
at com.microsoft.sqlserver.jdbc.TDSWriter.flush(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSWriter.endRequest(Unknown Source)
at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PreparedStatementExecutionRequest.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown
Source)
at
com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown
Source)

This is happening during a performance stress test, and only happens very
sporadically: two or three times during a multi-hour test of several
simultaneous users pounding on the database. There are no events on the DB
server, and nothing in the SQL Server 2005 log. The Tomcat server is running
on Linux. We are using a commons-DBCP connection pool that validates the
connection on borrow with "select 1", so we know the connection is good when
we get it for the pool. The network error happens right after a prepare
statement, so the connection is working, and then breaks on the execute of
the prepared statement. The query is not a long running query. We've also
checked the network health and it looks fine. We start some background batch
jobs against the server before the errors start to occur.

We are pretty much out of ideas. There are some relevant threads we can see
by Googling this, but neither IE nor Firefox can get the msdn.forums,
complaining the URL will never complete or something, which can be caused by
not accepting cookies, but that's not the problem.





Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

evepokua

I am having exactly the same problem:

#|2007-11-05T15:10:57.039+0000|INFO|sun-appserver-pe9.0|javax.enterprise.system.stream.out|_ThreadID=12;_ThreadName=Thread-30;|[TopLink Config]: 2007.11.05 03:10:57.039--ServerSession(22369727)--The alias name for the entity class [class lightingspecreimp.Lampfittingent] is being defaulted to: Lampfittingent.
|#]

[#|2007-11-05T15:10:57.039+0000|INFO|sun-appserver-pe9.0|javax.enterprise.system.stream.out|_ThreadID=12;_ThreadName=Thread-30;|[TopLink Config]: 2007.11.05 03:10:57.039--ServerSession(22369727)--The column name for element [private int lightingspecreimp.Lampfittingent.id] is being defaulted to: ID.
|#]

[#|2007-11-05T15:10:57.086+0000|INFO|sun-appserver-pe9.0|javax.enterprise.system.stream.out|_ThreadID=12;_ThreadName=Thread-30;|[TopLink Info]: 2007.11.05 03:10:57.086--ServerSession(22369727)--TopLink, version: Oracle TopLink Essentials - 2006.8 (Build 060830)
|#]

[#|2007-11-05T15:10:57.211+0000|WARNING|sun-appserver-pe9.0|javax.enterprise.resource.resourceadapter|_ThreadID=12;_ThreadName=Thread-30;Connection could not be allocated because: The TDS prelogin response is incomplete. The target server must be SQL Server 2000 or later.;_RequestID=3d34fb65-275a-4bfb-b8f9-0ecbc5219f4c;|RAR5038:Unexpected exception while creating resource|#]

[#|2007-11-05T15:10:57.211+0000|WARNING|sun-appserver-pe9.0|javax.enterprise.resource.resourceadapter|_ThreadID=12;_ThreadName=Thread-30;Connection could not be allocated because: The TDS prelogin response is incomplete. The target server must be SQL Server 2000 or later.;_RequestID=3d34fb65-275a-4bfb-b8f9-0ecbc5219f4c;|RAR5117 : Failed to obtain/create connection. Reason : Connection could not be allocated because: The TDS prelogin response is incomplete. The target server must be SQL Server 2000 or later.|#]

[#|2007-11-05T15:10:57.226+0000|WARNING|sun-appserver-pe9.0|javax.enterprise.resource.resourceadapter|_ThreadID=12;_ThreadName=Thread-30;Error in allocating a connection. Cause: Connection could not be allocated because: The TDS prelogin response is incomplete. The target server must be SQL Server 2000 or later.;_RequestID=3d34fb65-275a-4bfb-b8f9-0ecbc5219f4c;|RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Connection could not be allocated because: The TDS prelogin response is incomplete. The target server must be SQL Server 2000 or later.]|#]

[#|2007-11-05T15:10:57.570+0000|SEVERE|sun-appserver-pe9.0|javax.enterprise.system.tools.deployment|_ThreadID=12;_ThreadName=Thread-30;_RequestID=3d34fb65-275a-4bfb-b8f9-0ecbc5219f4c;|Exception occured in J2EEC Phase
com.sun.enterprise.deployment.backend.IASDeploymentException:
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: The TDS prelogin response is incomplete. The target server must be SQL Server 2000 or later.Error Code: 0
at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:289)
at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:135)
at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:170)
at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:537)
at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:180)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:230)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:78)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:113)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:107)
at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:76)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.loadPersistenceUnitBundle(PersistenceProcessor.java:468)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.createTablesInDB(PersistenceProcessor.java:325)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processAppBundle(PersistenceProcessor.java:190)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.PersistenceProcessor.processApplication(PersistenceProcessor.java:125)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processApplication(DeploymentEventListenerImpl.java:193)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.processEvent(DeploymentEventListenerImpl.java:152)
at com.sun.jdo.spi.persistence.support.ejb.ejbc.DeploymentEventListenerImpl.notifyDeploymentEvent(DeploymentEventListenerImpl.java:109)
at com.sun.enterprise.deployment.backend.DeploymentEventManager.notifyDeploymentEvent(DeploymentEventManager.java:66)
at com.sun.enterprise.deployment.backend.AppDeployer.postDeploy(AppDeployer.java:429)
at com.sun.enterprise.deployment.backend.AppDeployer.deploy(AppDeployer.java:225)
at com.sun.enterprise.deployment.backend.AppDeployer.doRequestFinish(AppDeployer.java:129)
at com.sun.enterprise.deployment.phasing.J2EECPhase.runPhase(J2EECPhase.java:169)
at com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:95)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:871)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:266)
at com.sun.enterprise.deployment.phasing.PEDeploymentService.deploy(PEDeploymentService.java:739)
at com.sun.enterprise.management.deploy.DeployThread.deploy(DeployThread.java:174)
at com.sun.enterprise.management.deploy.DeployThread.run(DeployThread.java:210)
|#]



I can ping into the DB from my jee 5 application server 9, and it pings successfully. The error occures when I try to deploy my applications which is suppose to communicate with the DB and create some table and so forth.

anymore suggestions I have tried changing the port number from 1433 to 1434.

eve




Re: Plase HELP ! SQL ERROR =>> An I/O error occurred while receiving the TDS prelogin response.

evepokua

Hello,

I have tested exactly the same application on another PC with SQL server 2000 installed
using the old JDBC driver:

msutil.jar
msbase.jar
mssqlserver.jar

everything works well. It does not however, work with SQL server 2005 with the latest update JDBC driver.