db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Yu <Benjam...@InformativeResearch.com>
Subject RE: SQLException and TorqueException when getting a Connection.
Date Tue, 01 Jun 2004 17:14:51 GMT
It sounds like you have a configuration issue somewhere in ms sql server or
the jdbc url that you've created.

That is.. a jdbc URL of the the format:
jdbc:microsoft:sqlserver://localhost\\instancename:1433;DatabaseName=mydb
vs
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb

If you want named instances, then sql server needs to be set up properly to
handle it. The exception isn't a problem with torque itself.

-Ben

-----Original Message-----
From: John Boyko [mailto:john_boyko@hotmail.com]
Sent: Tuesday, June 01, 2004 9:37 AM
To: torque-user@db.apache.org
Subject: SQLException and TorqueException when getting a Connection.


All,

 

I am getting the following exceptions when trying running my application. My
configuration file contains:

 

torque.dsfactory.clientsite.connection.driver =
com.microsoft.jdbc.sqlserver.SQLServerDriver

torque.dsfactory.clientsite.connection.url =
jdbc:microsoft:sqlserver<server>:<port>;DatabaseName=<databasename>;SelectMe
thod=cursor

 

and the JAR containing the SQL driver is in the lib directory. 

 

Has anyone come across this exception?

 

 

Regards,

 

John Boyko

Raymond James Ltd.

604.654.7285

 

 

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The
requested instance is either invalid or not running.

            at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)

            at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)

            at
com.microsoft.jdbc.sqlserver.tds.TDSConnection.mapInstanceNameToPort(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:512)

            at java.sql.DriverManager.getConnection(DriverManager.java:171)

            at
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(Dr
iverAdapterCPDS.java:180)

            at
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(Dr
iverAdapterCPDS.java:146)

            at
org.apache.torque.pool.ConnectionPool.getNewConnection(ConnectionPool.java:2
54)

            at
org.apache.torque.pool.ConnectionPool.getConnection(ConnectionPool.java:223)

            at
org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDa
taSource.java:488)

            at
org.apache.torque.pool.TorqueClassicDataSource.getConnection(TorqueClassicDa
taSource.java:458)

            at
org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:743)

            at org.apache.torque.Torque.getConnection(Torque.java:306)

            at
org.apache.torque.util.Transaction.beginOptional(Transaction.java:118)

            at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1365)

            .

 

rethrown as org.apache.torque.TorqueException: [Microsoft][SQLServer 2000
Driver for JDBC]The requested instance is either invalid or not running.

            at
org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:755)

            at org.apache.torque.Torque.getConnection(Torque.java:306)

            .

 

Caused by: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC]The requested instance is either invalid or not running.

            at
com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)

            at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
Source)

            at
com.microsoft.jdbc.sqlserver.tds.TDSConnection.mapInstanceNameToPort(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:512)

            at java.sql.DriverManager.getConnection(DriverManager.java:171)

            at
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(Dr
iverAdapterCPDS.java:180)

            at
org.apache.commons.dbcp.cpdsadapter.DriverAdapterCPDS.getPooledConnection(Dr
iverAdapterCPDS.java:146)

            at
org.apache.torque.pool.ConnectionPool.getNewConnection(ConnectionPool.java:2
54)

            at
org.apache.torque.pool.ConnectionPool.getConnection(ConnectionPool.java:223)


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message