2 Replies Latest reply on Jul 29, 2003 8:09 PM by thudacko

    MSSQL datasource problem (JBoss 3.2.1)

    trainjet

      Hi,

      I am trying to configure JBoss to use MS SQL as database engine. I have copied all the jars to the deploy folder. I also modified the the mssql-ds.xml file as follows,

      -----------mssql-ds.xml --------

      <local-tx-datasource>
      <jndi-name>MSSQLDS</jndi-name>
      <connection-url>jdbc:microsoft:sqlserver://MyServerName:1433;DatabaseName=Testdb;User=sa;Password=aaa;SelectMethod=Cursor</connection-url>
      <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
      Testdb
      <user-name>sa</user-name>
      aaa
      <min-pool-size>100</min-pool-size>
      <max-pool-size>1000</max-pool-size>
      <blocking-timeout-millis>5000</blocking-timeout-millis>
      </local-tx-datasource>

      ---------------------end of xml----------------

      I got the following error message when trying to access the data source from a session bean,

      --------------error message ------------------
      Caugth exception: sql problem Could not create connection; - nested throwable: (java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The requested instance is either invalid or not running.); - nested throwable: (org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The requested instance is either invalid or not running.))
      ---------------------end of error message----------

      My qustions are

      1. Is the port 1433 the right port? How do you tell?
      2. Do I have to create an ODBC connection and use it somehow (JDBC-ODBC)?
      3. Any hint to debug this thing?

      Any help is appreciated.

      Thanks

        • 1. Re: MSSQL datasource problem (JBoss 3.2.1)
          mlivingston

          You should place the .jar files in the default/lib directory, not the deploy directory. Try this and see if it helps.

          • 2. Re: MSSQL datasource problem (JBoss 3.2.1)
            thudacko

            Some answers:

            1. 1433 is the default port used by MSSQL Server. To check, use the "Enterprise Manager". In the console window, right-click on your server and select "Properties" -> "Network Configuration" . In the enabled protocols window, select TCP/IP.

            2. You need to install Microsoft SQL Server 2000 Driver for JDBC on your db server. (Assuming this is your version). And the msutil.jar, msbase.jar and mssqlserver.jar files must be in your jboss-3.2.1/server/default/lib directory. This will handle the JDBC/ODBC translation.

            3. No.