Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JBoss MSSQL datasource connection

Status
Not open for further replies.

NuniPR

Programmer
Mar 3, 2005
55
0
0
PR
Hi Guys!

I haven't written in a while, but I guess I need your help on this. I've been working on this non-stop for the past 2 days and I am just about to give up.

I have to create a datasource in JBoss running on Windows 2k3. Of course, I have no idea how to do this, since there's no web-console installed. So, it has to be done manually.

I downloaded the SQL Server JDBC from Microsoft, and placed the sqljdbc.jar in jboss\server\default\lib. I then went to jboss\server\all\deploy and modified the existing ds.xml to reflect this:

Code:
<local-tx-datasource>
  <jndi-name>NuniPRDS</jndi-name>
  <connection-url>jdbc:sqlserver://servername:1433;DatabaseName=databasename</connection-url>
   <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
   <user-name>Username</user-name>
   <password>Password</password>
   <check-valid-connection-sql>SELECT 1 FROM sysobjects</check-valid-connection-sql>
   <metadata>
    <type-mapping>MS SQLSERVER2000</type-mapping>
    </metadata>
</local-tx-datasource>

I also made the same entry in the mssql-ds.xml file.

When I test, this is the error I get:

Code:
“Exception: NuniPRDS not bound. Cause: NuniPRDS not bound”

I don't know if I had to specify that .jar someplace else or what am I doing wrong. I've tried switching sqlserver.jdbc for jdbc.sqlserver as suggested on some sites. No luck. Can you help?

Thank you tons!


Nunina [gorgeous]
IT Manager
San Juan, PR
 
I'd go for the much more stable and performant free JDBC driver for MSSQL from jTDS at
Switched once, as the MS driver wasn't working and only throwing exceptions, and never looked back. Easy as pie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top