Home > Archive > SQL Server JDBC > July 2005 > Receiving JDBC error when executing program - Login failed for user 'sa'









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Receiving JDBC error when executing program - Login failed for user 'sa'
war_wheelan@yahoo.com

2005-07-13, 11:23 am

I am receiving the following error when attempting to run my database
application. The batch file that runs this program uses a different
username and password than 'sa'. I tried to login the 'sa' account
with Query Manager and received the 18456 error msg. I reset the 'sa'
account's password and I can now login to Query Manager, but still
receive the same error. The server is in mixed mode authentication so
I don't know what's the problem. I have an identically configured
server that uses this batch file and it runs properly.

Can anyone help me?

ERROR
Testing database retrieval
conn.createStatement failed: java.sql.SQLException:
[Microsoft][SQLServer 2000 Driver for JDBC][SQLS
erver]Login failed for user 'sa'.

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
JDBC][SQLServer]Login failed for user '
sa'.
at
com.microsoft.jdbc.base.BaseExceptions. createException(Unkn
own Source)
at com.microsoft.jdbc.base.BaseExceptions. getException(Unknown

Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest. processErrorToken(Un
known
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest. processReplyToken(Un
known
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest. processReplyToken(Un
known
Source)
at
com.microsoft.jdbc.sqlserver.tds.TDSRequest. processReply(Unknown

Source)
at
com.microsoft.jdbc.sqlserver. SQLServerImplStateme
nt. getNextResultType(Un
known
Source)
at
com.microsoft.jdbc.base.BaseStatement. commonTransitionToSt
ate(Unknown
Source)
at
com.microsoft.jdbc.base.BaseStatement. postImplExecute(Unkn
own Source)
at
com.microsoft.jdbc.base. BasePreparedStatemen
t. postImplExecute(Unkn
own
Source)
at com.microsoft.jdbc.base.BaseStatement. commonExecute(Unknow
n
Source)
at
com.microsoft.jdbc.base.BaseStatement. executeUpdateInterna
l(Unknown
Source)
at
com.microsoft.jdbc.base. BasePreparedStatemen
t. executeUpdate(Unknow
n
Source)
at db.IndiiDBNode.initDB(IndiiDBNode.java:235)
at db.IndiiDBInit.pstat(IndiiDBInit.java:52)
at sun.reflect. NativeMethodAccessor
Impl.invoke0(Native Method)
at sun.reflect. NativeMethodAccessor
Impl.invoke(Unknown Source)
at sun.reflect. DelegatingMethodAcce
ssorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at OSBean.ObjectSwitch. pstat(SourceFile:168
)
at OSBean.aa. processClosure(Sourc
eFile:416)
at OSBean.OS_Process.run(SourceFile:302)
at java.lang.Thread.run(Unknown Source)
Connected to database
Uplink Poller Started
Could not load application properties. app.properties is not specified
ERROR

Kamil Sykora [MSFT]

2005-07-25, 1:26 pm

Hello,

Are you positive you are using a uid/pwd other than sa? The error message
says we're using 'sa' so I would think that's the username being passed in.
The JDBC driver cannot connect using integrated authentication, it only
uses SQL authentication.

Can you test with a simple console application that you can indeed connect
with the right credentials?

Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection con =

DriverManager.getConnection(" jdbc:microsoft:sqlse
rver://myserver;","uid","pw
d");

Thanks,
Kamil

Kamil Sykora
Microsoft Developer Support - Web Data

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.


Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/secur_ity.



--------------------
| From: war_wheelan@yahoo.com
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| Subject: Receiving JDBC error when executing program - Login failed for
user 'sa'
| Date: 13 Jul 2005 08:23:16 -0700
| Organization: http://groups.google.com
| Lines: 71
| Message-ID: <1121268196.842292.232280@f14g2000cwb.googlegroups.com>
|
| I am receiving the following error when attempting to run my database
| application. The batch file that runs this program uses a different
| username and password than 'sa'. I tried to login the 'sa' account
| with Query Manager and received the 18456 error msg. I reset the 'sa'
| account's password and I can now login to Query Manager, but still
| receive the same error. The server is in mixed mode authentication so
| I don't know what's the problem. I have an identically configured
| server that uses this batch file and it runs properly.
|
| Can anyone help me?
|
| ERROR
| Testing database retrieval
| conn.createStatement failed: java.sql.SQLException:
| [Microsoft][SQLServer 2000 Driver for JDBC][SQLS
| erver]Login failed for user 'sa'.
|
| java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
| JDBC][SQLServer]Login failed for user '
| sa'.
| at
| com.microsoft.jdbc.base.BaseExceptions. createException(Unkn
own Source)
| at com.microsoft.jdbc.base.BaseExceptions. getException(Unknown

| Source)
| at
| com.microsoft.jdbc.sqlserver.tds.TDSRequest. processErrorToken(Un
known
| Source)
| at
| com.microsoft.jdbc.sqlserver.tds.TDSRequest. processReplyToken(Un
known
| Source)
| at
|
com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest. processReplyToken(Un
known
| Source)
| at
| com.microsoft.jdbc.sqlserver.tds.TDSRequest. processReply(Unknown

| Source)
| at
|
com.microsoft.jdbc.sqlserver. SQLServerImplStateme
nt. getNextResultType(Un
know
n
| Source)
| at
| com.microsoft.jdbc.base.BaseStatement. commonTransitionToSt
ate(Unknown
| Source)
| at
| com.microsoft.jdbc.base.BaseStatement. postImplExecute(Unkn
own Source)
| at
| com.microsoft.jdbc.base. BasePreparedStatemen
t. postImplExecute(Unkn
own
| Source)
| at com.microsoft.jdbc.base.BaseStatement. commonExecute(Unknow
n
| Source)
| at
| com.microsoft.jdbc.base.BaseStatement. executeUpdateInterna
l(Unknown
| Source)
| at
| com.microsoft.jdbc.base. BasePreparedStatemen
t. executeUpdate(Unknow
n
| Source)
| at db.IndiiDBNode.initDB(IndiiDBNode.java:235)
| at db.IndiiDBInit.pstat(IndiiDBInit.java:52)
| at sun.reflect. NativeMethodAccessor
Impl.invoke0(Native Method)
| at sun.reflect. NativeMethodAccessor
Impl.invoke(Unknown Source)
| at sun.reflect. DelegatingMethodAcce
ssorImpl.invoke(Unknown
| Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at OSBean.ObjectSwitch. pstat(SourceFile:168
)
| at OSBean.aa. processClosure(Sourc
eFile:416)
| at OSBean.OS_Process.run(SourceFile:302)
| at java.lang.Thread.run(Unknown Source)
| Connected to database
| Uplink Poller Started
| Could not load application properties. app.properties is not specified
| ERROR
|
|

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com