Home > Archive > SQL Server JDBC > February 2006 > Connection to SQL Server 2005 from Jboss 4.03









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 Connection to SQL Server 2005 from Jboss 4.03
leslie_tighe@yahoo.com

2006-02-28, 8:24 pm

Hello,

I am trying to setup a datasource in Jboss 4.03 with Sql server 2005
using the new Sql server 2005 jdbc driver.

I have the following parameters in the mssql_ds.xml file:

<connection-url>jdbc:sqlserver:// localhost;databaseNa
me=DIAMELLE;selectMe
thod=cursor</connection-url>

<driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>

However, keep getting the following error, which indicates that the
login failed, but the user id and password are correct.


2006-02-27 18:43:55,953 DEBUG
[org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory]
Checking driver for URL:
jdbc:sqlserver:// localhost:1433;datab
aseName=DIAMELLE;sel
ectMethod=cursor
2006-02-27 18:43:55,953 DEBUG
[org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory]
Driver not yet registered for url:
jdbc:sqlserver:// localhost:1433;datab
aseName=DIAMELLE;sel
ectMethod=cursor
2006-02-27 18:43:56,015 DEBUG
[org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory]
Driver already registered for url:
jdbc:sqlserver:// localhost:1433;datab
aseName=DIAMELLE;sel
ectMethod=cursor
2006-02-27 18:43:56,062 WARN
[org.jboss.resource.connectionmanager. JBossManagedConnecti
onPool]
Throwable while attempting to get a new connection: null
org.jboss.resource. JBossResourceExcepti
on: Could not create connection;
- nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException:
Login failed for user 'idmuser'.)
at
org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory. createManagedConnect
ion(LocalManagedConn
ectionFactory.java:164)
at
org.jboss.resource.connectionmanager. InternalManagedConne
ctionPool. createConnectionEven
tListener(InternalMa
nagedConnectionPool.java:519)
at
org.jboss.resource.connectionmanager. InternalManagedConne
ctionPool. getConnection(Intern
alManagedConnectionP
ool.java:208)
at
org.jboss.resource.connectionmanager. JBossManagedConnecti
onPool$BasePool. getConnection(JBossM
anagedConnectionPool
.java:529)

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login
failed for user 'idmuser'.
at
com.microsoft.sqlserver.jdbc.SQLServerException. makeFromDatabaseErro
r(Unknown
Source)
at com.microsoft.sqlserver.jdbc.IOBuffer. processPackets(Unkno
wn
Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown
Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown
Source)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown
Source)
at
org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory. createManagedConnect
ion(LocalManagedConn
ectionFactory.java:154)



Any thoughts on how I can resolve this?

Thanks
Leslie

Evan T. Basalik

2006-02-28, 8:24 pm

It looks like your class name and URL are correct, so I would suggest checking:

1) ensure that your SQL Server is setup to access SQL authentication
2) ensure you SQL Server is listening on TCP/IP

The easiest way to test this is to create a UDL and then try to connect to your SQL Server using a connection string of the form:

tcp:servername

and using SQL Authentication

Evan

--------------------
>From: "leslie_tighe@yahoo.com" <leslie_tighe@yahoo.com>
>Subject: Connection to SQL Server 2005 from Jboss 4.03
>
>Hello,
>
>I am trying to setup a datasource in Jboss 4.03 with Sql server 2005
>using the new Sql server 2005 jdbc driver.
>
>I have the following parameters in the mssql_ds.xml file:
>
><connection-url>jdbc:sqlserver:// localhost;databaseNa
me=DIAMELLE;selectMe
thod=cursor</connection-url>
>
><driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
>
>However, keep getting the following error, which indicates that the
>login failed, but the user id and password are correct.
>
>
>2006-02-27 18:43:55,953 DEBUG
>[org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory]
>Checking driver for URL:
>jdbc:sqlserver:// localhost:1433;datab
aseName=DIAMELLE;sel
ectMethod=cursor
>2006-02-27 18:43:55,953 DEBUG
>[org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory]
>Driver not yet registered for url:
>jdbc:sqlserver:// localhost:1433;datab
aseName=DIAMELLE;sel
ectMethod=cursor
>2006-02-27 18:43:56,015 DEBUG
>[org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory]
>Driver already registered for url:
>jdbc:sqlserver:// localhost:1433;datab
aseName=DIAMELLE;sel
ectMethod=cursor
>2006-02-27 18:43:56,062 WARN
>[org.jboss.resource.connectionmanager. JBossManagedConnecti
onPool]
>Throwable while attempting to get a new connection: null
>org.jboss.resource. JBossResourceExcepti
on: Could not create connection;
>- nested throwable: (com.microsoft.sqlserver.jdbc.SQLServerException:
>Login failed for user 'idmuser'.)
> at
>org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory. createManagedConnect
ion(LocalManagedConn
ectionFactory.java:164)
> at
>org.jboss.resource.connectionmanager. InternalManagedConne
ctionPool. createConnectionEven
tListener(InternalMa
nagedConnectionPool.java:519)
> at
>org.jboss.resource.connectionmanager. InternalManagedConne
ctionPool. getConnection(Intern
alManagedConnectionP
ool.java:208)
> at
>org.jboss.resource.connectionmanager. JBossManagedConnecti
onPool$BasePool. getConnection(JBossM
anagedConnectionPool
.java:529)
>
>Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login
>failed for user 'idmuser'.
> at
>com.microsoft.sqlserver.jdbc.SQLServerException. makeFromDatabaseErro
r(Unknown
>Source)
> at com.microsoft.sqlserver.jdbc.IOBuffer. processPackets(Unkno
wn
>Source)
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown
>Source)
> at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown
>Source)
> at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown
>Source)
> at
>org.jboss.resource.adapter.jdbc.local. LocalManagedConnecti
onFactory. createManagedConnect
ion(LocalManagedConn
ectionFactory.java:154)
>
>
>
>Any thoughts on how I can resolve this?
>
>Thanks
>Leslie
>
>



--

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.

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