loginfailedrequestconnect timed outout什么意思

Connection Reset Error Using JDBC
Jun 20, 2007
I see the following error randomly -
* SQLException during execution of sql-statement:
* sql statement was 'SELECT count(*) FROM PRODUCT_ATTRIBUTES A0 WHERE A0.PRODUCT_ID = ?'
* Exception message is [An exception occurred during the DBComms.receive method. Operation:Connection reset. Context1) [Thread[pool-2-thread-1,5,main],
IO:18563, Dbc:c67b9]. PktNum:0. TotalReceived:0. PktSize:4,096.]
* Vendor error code [0]
* SQL state code [08S01]
* The root stack trace is --&
* com.microsoft.sqlserver.jdbc.SQLServerException: An exception occurred during the DBComms.receive method. Operation:Connection reset. Context1)
[Thread[pool-2-thread-1,5,main], IO:18563, Dbc:c67b9]. PktNum:0. TotalReceived:0. PktSize:4,096.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.DBComms.receive(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)
at mons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at mons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(JdbcAccessImpl.java:293)
at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(RsQueryObject.java:72)
at org.apache.ojb.broker.accesslayer.RsIterator.&init&(RsIterator.java:189)
at org.apache.ojb.broker.accesslayer.ReportQueryRsIterator.&init&(ReportQueryRsIterator.java:45)
at org.apache.ojb.broker.core.ReportRsIteratorFactoryImpl.createRsIterator(ReportRsIteratorFactoryImpl.java:59)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQuery(PersistenceBrokerImpl.java:2217)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorFromQuery(PersistenceBrokerImpl.java:2252)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getReportQueryIteratorByQuery(PersistenceBrokerImpl.java:2177)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCount(PersistenceBrokerImpl.java:2148)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCount(DelegatingPersistenceBroker.java:383)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCount(DelegatingPersistenceBroker.java:383)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCount(DelegatingPersistenceBroker.java:383)
at org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl.loadSize(CollectionProxyDefaultImpl.java:154)
at org.apache.ojb.broker.core.proxy.CollectionProxyDefaultImpl.size(CollectionProxyDefaultImpl.java:268)
at mon.caching.FlyWeight.getCollection(FlyWeight.java:272)
at mon.caching.FlyWeight.intercept(FlyWeight.java:125)
at com.serus.dto.core.ProductDTO$$EnhancerByCGLIB$$52ef9193.getProductAttributes(&generated&)
at com.serus.manager.scm.ModelManager.getProductAttributeForProductIdAttributeName(ModelManager.java:1664)
at com.serus.inca.outbound.PNAdapter.processTemplate6_New(PNAdapter.java:910)
at com.serus.inca.outbound.PNAdapter.runChildAdapter(PNAdapter.java:144)
at com.serus.inca.outbound.WSBaseAdapter.runAdapter(WSBaseAdapter.java:114)
at com.serus.inca.outbound.WorkstreamProcessor.startProcessor(WorkstreamProcessor.java:375)
at com.serus.inca.outbound.WorkstreamProcessor.call(WorkstreamProcessor.java:152)
at com.serus.inca.outbound.WorkstreamProcessor.call(WorkstreamProcessor.java:78)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
My database and driver details are as below:
Database Product Version 9.00.1399
Driver Name Microsoft SQL Server 2005 JDBC Driver
Driver Version 1.1.
Driver Major Version 1
Driver Minor Version 1
It is a AMD 64 bit 2 dual core machine which is deployed with jdk 1.5 update 10.
Has anyone seen this before?
Similar Messages:
ADVERTISEMENT
Oct 12, 2007
Dear All,Using JDBC trying to connect MS SQL server 2005. Getting the following error:mons.dbcp.DbcpException: java.sql.SQLException: Network error IOException: Connection refused: connectjava.sql.SQLException: Network error IOException: Connection refused: connectjava.net.ConnectException: Connection refused: connectmons.dbcp.DbcpException: java.sql.SQLException: Network error IOException: Connection refused: connectjava.sql.SQLException: Network error IOException: Connection refused: connectjava.net.ConnectException: Connection refused: connectHere is the TCP/IP setting in our SQL server 2005:I disable the Windows 2003 R2 firewall, but that didn’t help.In SQL server 2005
for Remote connections:Enabled “Local and Remote connections: Using both TCP/IP and Named PipesIn TCP/IP Prosperities:IP Addresses:IP1: Active: YesEnabled: YesIP address: the server IP address Example 192.168.0.1TCP Dynamic port: 0TCP Port: 1433///IP2: Active: YesEnabled: YesIP address: the server IP address Example 192.168.0.1TCP Dynamic port: 0TCP Port: 1433////IP3: Active: YesEnabled: YesIP address: the server IP address Example 192.168.0.1TCP Dynamic port: 0TCP Port: ///IP4: Active: YesTCP Dynamic ports: 1053TCP Port: For Protocols:Under general:Enable: YesKeep Alive: 30000Listen ALL: YesNo Delay: NoI think that should be enough info to start with.Please advice.Thanks for any help.Abrahim
Sep 16, 2015
I am using sqljdbc41.jar to connect with MSSQL database, it is working fine on my local machine.Where as on the remote server, same class giving me error Login failed for user '&domain&&windows loginID&'My connection string is URL...I am using sqljdbc41.jar
and on 64 bit processor , I am using following command which included path for sqljdbc_auth.dll java -Djava.library.path= C: sqljdbc_4.1enuauthx64 TestDao and error is Login failed for user '&domain&&windows loginID&' why it is not picking up username passed in connection string. I have 2 machines, one is local and other is remote. on both machine I login using my domain, it is working absolutely fine on local then why the error is coming on remote machine.Both the machines are identical.
Jul 10, 2007
When using jdbc with IntegratedSecurity, I run into this problem when the machine is not part of a domain & gets its IP address via dhcp.
Is this expected behavior or a bug in the jdbc driver. The SQLServer and client application are installed on the same machine and a local admin is logged in, running the client app. If I change one of the two parameters mentioned above, the connection can be established leading me to believe this may be intentional for security issues.
Am I correct?
Sep 28, 2007
I'm having trouble receiving a file via FTP.
I've done this before, so I'm surprised how much trouble I'm having.
I'm getting the error:[Connection manager &FTP Connection&] Error: An error occurred in the requested FTP operation. Detailed error description: The connection with the server was reset . I've tried to FTP via Internet Explorer 6, and it works fine.
I've tried going into the &FTP Connection& and putting in the password, and clicking &test connection&... works fine again.Any ideas for me to troubleshoot?
I've shut down the package and re-opened it, but to no avail.
Mar 26, 2008
Hi, I posted the long version of this over on the ADO.NET framework group:/group/microsoft.public.dotnet.framework.adonet/browse_thread/thread/f543/70edf829#70edf829 The short version is: In .NET 2.0 SP1, Microsoft have deprecated the &Reset Connection& connection string API which, when set to false, stops connection pooling from calling &sp_reset_connection& on connections drawn from the pool.
We need this for our DB security: we &EXECUTE AS& on connection open and since we cannot tell when it will close (passed to 3rd parties and there is no useful &closing& event), we must &REVERT& the connection next time it is drawn from pool e.g. OPENS.
We must do the revert before sp_reset_connection is called or SQL Server kills the connection (security violation) - we accomplish this by keeping track of connections' SPIDs.
We implemented this using EL DAAB + custom SQL provider which handled connection open event. Now it is entirely broken! This all worked fine in .NET 2.0 RTM when we could control when sp_reset_connection was called (could delay until after revert). Now I've run out of options and will have to rewrite the entire security infrastructure.
What I'd really like is a decent &closing& event on SqlConnection (statechanged will fire after close - too late!).
As I asked in the full post above.. how are we expected to build scalable apps with the features that Microsoft tell us to use when they don't work together?How can I REVERT my connection before it is sent back to the pool?
If any of this isn't clear, please see above linked post. Many thanks, Simon
Mar 23, 2007
Hi allI have build an application on top of SQL Server 2005 and i am using microsoft driver. My application stops periodically becoz of Database Connection Loss and I get the following exceptioncom.microsoft.sqlserver.jdbc.SQLServerException: An exception occurred during the DBComms.transmit operation. Exception:Socket closed. Context:(5) [Thread[Thread-55,5,main], IO:7e2dc, Dbc:null].10:06:14:703 AM
at com.microsoft.sqlserver.jdbc.SQLServerException.ma
keFromDriverError(Unknown Source)10:06:14:703 AM
at com.microsoft.sqlserver.jdbc.DBComms.transmit(Unkn
own Source)10:06:14:703 AM
at com.microsoft.sqlserver.jdbc.IOBuffer.sendCommand(
Unknown Source)10:06:14:703 AM
at com.microsoft.sqlserver.jdbc.SQLServerStatement.se
ndExecute(Unknown Source)10:06:14:703 AM
at com.microsoft.sqlserver.jdbc.SQLServerStatement.do
ExecuteQuery(Unknown Source)10:06:14:703 AM
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStat
ement.executeQuery(Unknown Source)Unable to find the exact reason for the above problem. Pl adviceThanks & RgdsRoshini
Mar 31, 2006
Hi All,I am trying to import data from flat file to sql server 2005 DB table using SSIS. There are 4 different text files in the input folder. I am using for loop to iterate reading and importing 4 times.
In order to do this I have set &Connection String& property of a connection manager to a package level variable using expression. There is a script which supplies the source file name and assigns to this variable. The package works fine. The data gets imported successfully into the destination table.
However, when I close the package, reopen it and then run, the Data Flow task fails with the error &Can not open the source file&. If I enter a valid file name in the Flat File Source task and run the package it works again. As soon as I close the file/package, reopen and then run, the data flow task fails with the same error.
How do I make this working. I am planning to schedule a job which will execute the package programatically. In that case no user intevention is possible. I would appreciate your help on this. I can provide further details if required.-SGK
Apr 5, 2006
this url is having problem while making connection to SQL Serverjdbc:XXX:sqlserver://&host&:1433;DatabaseName=&name&error:"The requested instance is either invalid or not running."
May 14, 2007
Hi guys, Im desperately hoping someone here can help me. Ive been trying to set up merge replication between 2 servers all weekend and it keeps failing. Im setting this up as followsThe Publisher/Distributor is a SQL Server 2005 machine, the database being replicated is 4gb, and the only subscriber is a SQL Server 2000 SP4 machine. I set up my publication normally, and set up the push subscription, adn set it to initialize immediately. It weill then start bulk copying and go on for about 3-4 hours before it fails and gives me the errors:Error messages:The merge process was unable to deliver the snapshot to the Subscriber. If using Web synchronization, the merge process may have been unable to create or write to the message file. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write. (Source: MSSQL_REPL, Error number: MSSQL_REPL-)Get help: http://help/MSSQL_REPL-The process could not bulk copy into table '&dbo&.&CONTENT&'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20037)Get help: http://help/MSSQL_REPL20037An existing connection was forcibly closed by the remote host. (Source: MSSQLServer, Error number: 0)Get help: http://help/0One or more BLOB columns could not be sent to the server, attempt to recover from the problem failed. (Source: MSSQLServer, Error number: 0)Get help: http://help/0Communication link failure (Source: MSSQLServer, Error number: 0)Get help: http://help/0Unspecified error (Source: MSSQLServer, Error number: 0)Get help: http://help/0Failed to send batch after max errors (Source: MSSQLServer, Error number: 0)This is driving me crazy as I havent slept in ages trying to get this fixed. Anyone have any idea whats going on? Its always one of 2 tables so far that keep failing, ContactLog and Content, what can I do?
Aug 5, 2015
We are facing issue on one of our databases on Availability Group replica. FYI, please refer the below messages we are receiving. Moreover, the errors don't happen consistently for the specified user.The client was unable to reuse a session with SPID 420, which had been reset for connection pooling. The failure ID is 46. This error may have been caused by an earlier operation failing. Check the error logs for failed operations immediately before this error message.Error: 18456, Severity: 14, State: 46.Error: 18056, Severity: 20, State: 46. Login failed for user 'XXXX'. Reason: Failed to open the database 'YYYY' configured in the login object while revalidating the login on the connection. [CLIENT: aa.bb.cc.nn]
Aug 22, 2006
I am using sqljdbc_1.1 and am able to connect / query to my SQLServer 2000 database when I pass the &sa& userID and password in the connect URL.
String connectionUrl = &jdbc:sqlserver://&hostName&;databasename=user=password=********&;
However when I pass my username and password instead of the &sa& userID I get the following error (I edited out my userID from the error message):com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user '&userID&'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.processLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(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:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at sqlCall.main(sqlCall.java:19)I have tried passing the domain name with the userID and get the same error.
I don't understand why the login would fail as I used my userID in a systemDSN on my laptop and had no problem connecting.
I also used &SQL Server Enterprise Manager& configured to use my DOMAIN login information when I built the database. Does anyone know what I could be doing wrong or what configuration I have overlooked? Thanks,RNG
Jun 30, 2005
Environment - I am using Tomcat as my servlet engine and IIS as the Server. Additionally, I am using MS SQL 2000 as my DB. The DB resides on a seperate machine, and have created an ODBC JDBC connection on the local machine to access it. Additionally, the authentication for the DB is set to &Windows Authentication&.Problem - Everything works fine if I simply run tomcat and access the databse. Also, things run fine when I run tomcat via IIS too. However, when I try accessing the database, I get the error Login failed for user '&username&'Now, the funny part is, this username is actually the username of the local machine on which the application has been placed. It is not the username that I am providing in con=DriverManager.getConnection(&jdbc : odbc : DBName&,&username&,&password&); /* had to add in extra spaces to stop this site from substituting :+D.etc to smiles*/ Can someone please help me figure it out?? Why is it working when I run the tomcat (Apache) and run the application from there, but ones I run it via IIS, it fails. Also, why is it taking the username from the local machine and not the one that I am providing out there?
Nov 1, 2004
Hello all,Please may I have your assistance?I need to be able to connect(JDBC?) to my MS OLAP database from my Web based Java application. Can this be done? if so how.Your comments would be greatly appreciated
Jul 20, 2005
HiI using Java and JDBC to connect to MS SQL server 2000 (using the MSdrivers msbase,msutil and mssqlserver.jars).Sometimes it takes a long time for statement.executeQueryto return and start returning the resultset(full DB scan can take 30-40 minutes).Does anyone know if it's possible to interupt/halt the query beforeit eventually comes back. The setQueryTimeout works OK but this has to beset quite high to allow real queries to run correctly. What I'm tryingto do is allow users to halt their query if they've realised theywant to alter it or its taking too long. The query is running in aseparate thread and I've tried using the main thread to close theconnection or stop the query but this still waits until the resultsetis returned.Maybe it's a driver issue or .....ThanksMike
Apr 21, 2008
Hi there, i am working on SQL JDBC 2005 version 1.1. I have a liferay portal database located at server 1, wsrp portlets' database located at server 2 (with instance name instance1). The producer (liferay) have to create a connection with server 2 (use connection string) to authenticate the consumer. If the registration properties is valid, then the consumer are able to consume the wsrp portlet. (Note that i use tomcat as web container)But when the producer connect to server 2, tomcat throws error:com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host
has failed. java.net.ConnectException: Connection timed out: connect
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(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:193)
com.mypackage.utils.DBUtils.getDBConnection(DBUtils.java:45)My connection string pattern is : &jdbcqlserver://{0}:{1};User={2};Password={3};DatabaseName={4}&Which {0}: server name{1}: port,......for ex:
jdbcqlserver://server2instance1,;User=Password=Sa;DatabaseName=mydbIs my string correct ?Note that the error occur intermittent, not everytime.If any one there who have got or experienced with this error, please help me. Thanks you very much
Feb 8, 2004
Hi..I want to find out the List of users created in SQL Server.Im using type 4 Driver to Connect SQL Server.Regardsmaruthi.
Sep 5, 2006
Hi,I have noticed that Connection.setTypeMap
is not supported on the SQL Server 2005 JDBC driver.The consequence is that it is impossible to use UDTs via JDBC. Is there any plan to implement this in the future ?Thanks,Ben
Feb 5, 2008
I'd recently upgraded SQL Server2000 to SQL server2005. I've been using Tibco DX to connect to the database. While working with SQL Server2000 things were going fine. I could access the databases from the repository through TibcoDX and could deploy my tasks which involved migrating data from source to target databases. But when I had installed SQL server 2005 an error cropped up while deploying tasks
Exception occurred while initializing the JDBCTransformer: The TCP/IP connection to the host has failed. java.net.UnknownHostException: I'd checked the port numbers and they were matching, the TCP protocols were also enabled. But I'm not able to fix this problem. Any help would be highly appreciated. Thank You.
Jun 25, 2007
Hello,I've been developing a web application with a Java backend that connects to a SQL Server database with the JDBC driver 1.1 for a while now. Until now, everything was working fine. Now I had to add Windows authentication to the application.After reading through the JDBC online help, I added the propertyintegratedSecurity=true to the connection string and copied the sqljdbc_auth.dll to the windowssystem32 directory of the system with the backend.Logging in works fine, but the problem is that SQL statements that work on views throw SQLServerException errors, the message isInvalid object name '(name of the view)'It doesn't matter if a user is configured to log in via windows authentication or via SQL server authentication.I need to access those views instead of the real tables because this is part of my security concept, the database creates views for each user based on his role.Is this a known problem with the JDBC driver or a configuration issue?Thanks for the help.
May 10, 2008
Hello. I have recently installed MS SQL SERVER 2005 and when I was installing it, it asked me for the username and password, and there I had 2 options: either write my own, either select &Use Windows Authentification&. I selected the &Windows Authenthification& ( I guess that means that it uses my username and password from Windows ).Now, Im trying to connect to the Server using Java and JDBC, but I have a problem: I have to specify the username and the password of the connection! My windows' only account is &Vlad& and I have no password. I tried these options, but it didn't work. I also tried with empty string &&, and with &sa&, &sa& but it didn't work either. I get an error saying that &Login failed for user 'Vlad'. The user is not associated with a trusted SQL Server Connection.&Any ideea of what the username/passwords are or how to get them?.Thank you for your time.
Apr 3, 2007
We see an unusual case where a query seems to be taking a long time (more than 30 minutes) as shown by the Java thread dump (below) - however the SQL server DB does'nt show any corresponding Connection for the query at the lower layer. The JDBC layer seems to be &in progress& as far as processing the results of the query are concerned. If the Connection was dropped or had a failure we should have seen a corresponding SQLException in the JDBC layer - which is also not the case.
Any tips on how to debug this? Is there a timeout set on the JDBC Connection which causes it to wait before it detects any failures?
&JMS Session Delivery Thread& daemon prio=6 tid=0x4780 nid=0x868 runnable [0xd6e000..0xd6f860]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.microsoft.sqlserver.jdbc.DBComms.receive(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)
- locked &0x74e0& (a com.microsoft.sqlserver.jdbc.TDSWriter)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
at mons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at mons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:213)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:2021)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:977)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1014)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:884)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeAndLinkOneToOne(PersistenceBrokerImpl.java:1074)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeReferences(PersistenceBrokerImpl.java:1050)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:1981)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:977)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1014)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:884)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:220)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:220)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:220)
at com.serus.db.ojbutils.SerusPersistenceBrokerHandle.store(SerusPersistenceBrokerHandle.java:178)
at mon.OJBDAOUtil.store(OJBDAOUtil.java:636)
at com.serus.dao.wip.AbsWipDAO.saveDTO(AbsWipDAO.java:251)
at com.serus.dao.wip.tx.LotTXDAO.saveLotTx(LotTXDAO.java:56)
at com.serus.manager.wip.txprocessing.AbstractTxProcessorImp.storeLotTx(AbstractTxProcessorImp.java:1380)
at com.serus.manager.wip.txprocessing.LotTxProcessingMoveStage.storeLotTx(LotTxProcessingMoveStage.java:802)
at com.serus.manager.wip.tx.LotTxManager.saveLotTx(LotTxManager.java:248)
at com.serus.manager.wip.tx.LotTxXMLProcessor.parseMessageOriginal(LotTxXMLProcessor.java:137)
at com.serus.manager.wip.tx.LotTxXMLProcessor.parseMessage(LotTxXMLProcessor.java:78)
at com.serus.events.listener.SerusJMSListener.onSerusMessage(SerusJMSListener.java:197)
at com.serus.events.listener.AbstractEventListener.onMessage(AbstractEventListener.java:53)
at progress.message.jimpl.Session.deliver(Unknown Source)
at progress.message.jimpl.Session.run(Unknown Source)
at progress.message.jimpl.Session$SessionThread.run(Unknown Source)
Aug 6, 2007
Hi, I am facing problem in configuring and using connection pooling on tomcat 5.0. I am using JDBC Driver v.1.1 for SQL Server 2005.
Can anybody point me to appropriate samle code or guideline? Thanks & Regards, Bhavin P Panchal
Apr 3, 2007
In testing new patches, I tried Windows 2003 Server SP2 and our JDBC connections stopped working.
I uninstalled SP2 and they started working again.
Anyone know where the problem is? I have already read pages of documentation, but I will keep looking.
Please let me know if you know the setting that needs to be changed.
I'm assuming it is a new &security enhancement& but I'm just not sure exactly where. Thanks in advance.Hugh
Apr 27, 2008
Hi!I'm writing a java application that queries sqlserver 2005 (and 2000). In case the sql browser service is stopped I need to use the named pipe property or the port property, right?But how could the program know at runtime what is the port and what is the pipe name? And how should a connection string to sqlserver 2005 (and 2000) that includes named pipe, look like? Thanks!
May 21, 2007
I am trying to connect to SQL Server 2005 Express with JDBC.
I am getting the following exception:Code SnippetString connectionUrl = &jdbc:sqlserver://localhost:1433;& +
&databaseName=IFC3;&;
// Declare the JDBC objects.
Connection con =
Statement stmt =
ResultSet rs =
// Establish the connection.
Class.forName(&com.microsoft.sqlserver.jdbc.SQLServerDriver&);
con = DriverManager.getConnection(connectionUrl,&ifc2&,&password&);com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host
has failed. java.net.ConnectException: Connection refused: connect
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(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:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at connectURL.main(connectURL.java:43)I am using the code example that came from Microsoft for making a JDBC connection.
I looked at my configuration of SQL Server and change to use a static port 1433.
I shut off Windows firewall to make sure it was not blocking communication. When I try to telnet to port 1433 it saysConnecting To 1433...Could not open connection to the host, on port 23: ConnectfailedAny suggestions?Thanks,Tom
Apr 18, 2008
I am having MSSQLServer2000 on Win2k and Win2k3 server.i have to connect these servers from a application using JDBC driver and AD Authentication.I have programmed all the things needed for AD authentication in my application(changed url , using integratedSecurity=true), and it is working fine when my application connects to MSSQLServer2k5 on WinXP(which is added to same domain of my application).But
when i try to connect MSSQL2000 server on Win2000 server it failes and gives error as follows.Apr 18, :51 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI SNISecGenClientContextINFO: Failed to get the SPNcom.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSChannel.read(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSReader.readPacket(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSReader.readResponse(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithoutFailover(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
at ChangePassword.process(ChangePassword.java:33)
at ChangePassword.main(ChangePassword.java:14)I am using following code for connection --
String url = &jdbcqlserver://172.16.1.243\portNumber=1034;integratedSecurity=true&;
Class dbDriverClass = Class.forName(&com.microsoft.sqlserver.jdbc.SQLServerDriver&);
Driver driver = (Driver) dbDriverClass.newInstance();
Properties props = new Properties();
conn=driver.connect(url, props);
Apr 14, 2008
I have read similar posts to this, but I am still having problems.I am trying to use connection pooling to connect to a local SQL Server 2005 database. I am running my application using MyEclipse Enterprise Workbench. I have verified that sqljdbc.jar resides in &WebRoot/WEB-INF/lib/&&WebRoot/WEB-INF/web.xml&:&?xml version=&1.0& encoding=&UTF-8&?&&web-app version=&2.4& xmlns=&/xml/ns/j2ee&
xmlns:xsi=&http://www.w3.org/2001/XMLSchema-instance&
xsichemaLocation=&/xml/ns/j2ee
/xml/ns/j2ee/web-app_2_4.xsd&&
&resource-ref&
&res-ref-name&jdbc/DefaultDS&/res-ref-name&
&res-type&javax.sql.DataSource&/res-type&
&res-auth&Container&/res-auth&
&/resource-ref&&/web-app&&WebRoot/META-INFcontext.xml&:&?xml version=&1.0& encoding=&UTF-8&?&&Context&
&Resource name=&jdbc/DefaultDS&
auth=&Container&
type=&javax.sql.DataSource&
username=&tec&
password=&tec&
driverClassName=&com.microsoft.sqlserver.jdbc.SQLServerDrive&
url=&jdbcqlserver://localhost:1433/databaseName=user=password=&
validationQuery=&select 1&
maxActive=&10&
maxIdle=&2&/&&/Context&Classpath:&?xml version=&1.0& encoding=&UTF-8&?&&classpath&
&classpathentry kind=&src& path=&src&/&
&classpathentry kind=&con& path=&org.eclipse.jdt.launching.JRE_CONTAINER&/&
&classpathentry kind=&con& path=&com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/dom.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/jaxen-full.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/jaxp-api.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/sqljdbc.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/jstl.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/mail.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/sax.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/saxpath.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/standard.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/xalan.jar&/&
&classpathentry kind=&lib& path=&WebRoot/WEB-INF/lib/xercesImpl.jar&/&
&classpathentry kind=&output& path=&WebRoot/WEB-INF/classes&/&&/classpath&Code to connect:import java.io.Simport java.sql.*;import javax.sql.*;import javax.naming.*;
public int testConnect(){
Connection conn =
InitialContext ctx =
java.sql.Statement stmt =
ctx = new InitialContext();
Context envCtx = (Context) ctx.lookup(&java:comp/env&);
DataSource ds = (DataSource) envCtx.lookup(&jdbc/DefaultDS&);/*This is generating the Cannot load JDBC driver class... error*/
conn = ds.getConnection();
stmt = conn.createStatement();
return CONSTANT.SUCCESS;
} catch (Exception e) {
return CONSTANT.FAILURE;
}finally {
if (stmt != null)
stmt.close();
if (conn != null)
conn.close();
if (ctx != null)
ctx.close();
} catch (Exception ex) {
// do nothing
return CONSTANT.FAILURE;
}Any ideas would be greatly appreciated.
Jul 19, 2007
Hi there, This is probably a really obvious question but I have been struggling with answering it for about two days now. (I may even be in the wrong forum) I work in a company with an internal network set up. I have been trying to connect to our website via FTP and it has worked ... well it did in the beginning. I think the server that our website is hosted on is a Unix server - this is a guess from reading the FTP transcripts of the various programs I've downloaded and tried out in an attempt to connect to it. What happened:I was working on an .ASP page in Dreamweaver, hit save without thinking, realised I wanted to make a few additional changes before uploading it onto the server, cancelled the transaction and voila. I haven't been able to connect to the remote server since. Depending on the FTP program that I am using, I get a connection error along these lines:- &Connection to the server was reset& &The server may temporarily be down or unavailable or not accepting connections& I am a big newbie at this. I have turned off the windows firewall and tried turning on and off passive IP. I can connect from home but not from inside the building which has me think this has to do with a stray setting somewhere. My housemate suggested I try using the &telnet& command from DOS and see can I get any sort of connection from work. If I can't, he said, it's probably a firewall on the internal network itself. Any other suggestions? Help would be welcome! Thanks. Quizzy
Mar 31, 2008
hi, i am using sqljdbc.jar in a java applet and i am using Netbeans for development. i am able to connect with the SQL Server from the IDE. however, when i try to debug the SQL part of the code, i am getting an exception at : DriverManager.registerDriver(new com.microsoft.sqlserver.jdbc.SQLServerDriver());Class.forName(&com.microsoft.sqlserver.jdbc.SQLServerDriver&);String connectionUrl=&jdbcqlserver://localhost:49182;databaseName=NanoB&;Connection con = java.sql.DriverManager.getConnection(connectionUrl, &test&, &Walt787sop289&); where it says that it cannot find the class. i am also putting down the exception information.
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.javaws.Launcher.executeApplication(Launcher.java:1273) at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1219) at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1066) at com.sun.javaws.Launcher.run(Launcher.java:105) at java.lang.Thread.run(Thread.java:619)Caused by: java.lang.NoClassDefFoundError: com/microsoft/sqlserver/jdbc/SQLServerDriver at VncViewer.performSql(VncViewer.java:115) at VncViewer.readParameters(VncViewer.java:743) at VncViewer.init(VncViewer.java:152) at VncViewer.main(VncViewer.java:53) ... 9 moreCaused by: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:256) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) i am currently using java web start to debug the application. earlier, the application was running smoothly during debug (when not being run through java web start), but was failing to run when started externally say within a html file as an applet. however, when i used java web start, the exception is being pointed to the line in bold. i have added sqljdbc.jar to the list of libraries and have added it under the compile as well as the run time configuration. i would appreciate if this exception could be resolved. if i have to configure anything in the classpath, pls suggest how i can configure it under netbeans. regards,anant
Aug 8, 2006
We've just stumbled on a 1.0 version incompatibility with the JDBC specs.
Problem: A table with SMALLINT column. According to JDBC specs version 3.0
(p.B-179) and 4.0 (p.221)), the value should be converted to Integer type.
Unfortunatelly we get a Short object :(
Now, I remember, this case was also affecting old JSQLConnect driver from
DataDirect. Could that problem sneak to new MS driver too?
Please let me know any resolution to this problem if exists. The issue has not been fixed in CTP 1.1 version. Any ideas if it can be fixed?? Cheers, Piotr
Sep 18, 2007
Hi I am using JDBC driver version &1.0.809.102&. In the ms sqlserver 2000 database I am acessing there is a table named as &CDR_DATA_&. When I run the following query &select * from CDR_DATA_& i get the following exception. Please help me out to solve this problem.com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: Incorrect syntax near '-'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeQuery(Unknown Source)
at Test.mssqldb(Test.java:80)
at Test.main(Test.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)Thanks,Gavin
Aug 22, 2006
While i try to download jdbc for sql 2005 in english, the file that i downloaded was in italian. i've tried all version but he always download italian version. Anyone notice that?
Copyrights 2005-15 , All rights reserved

我要回帖

更多关于 connection timed out 的文章

 

随机推荐