5 Replies Latest reply on Jun 8, 2005 12:19 PM by safrye

    [Microsoft][SQLServer 2000 Driver for JDBC]Error establishin

    gregs

      Hi,

      For two days I have been trying to itegrate my application (deployed to JBoss) with MS SQLSERVER 2000.

      I have completed the following steps:

      1) set properties in ms-sqlservice.xml (server/default/deploy).
      I have set the JNDI name (in every applicable place) and I have the correct Connection URL and properties.

      2) I put the 3 jars for the MS SQL SERVER 2000 DRIVER for JDBC in the appropriate /lib dir (/server/default/conf and /server/all/conf).

      3) I have updated all the standardjaws.xml and standardjbosscmp-jdbc.xml (with <type-mapping>MS SQLSERVER2000</type-mapping> and <datasource-mapping>MS SQLSERVER2000</datasource-mapping> respectively).

      I have checked my MSSQLServer for settings (The port is set to 1433 which I have specified in the ConnectionURL and TCP/IP is enabled on that port).

      I'm actually not running it over the network at this stage and just trying to get this to work on localhost.

      I keep getting the following error message:

      "uk.police.scottish.common.ejb.modelcache.ModelCacheException: Can't create a connection to the data-tier.
      nested:
      uk.police.scottish.common.util.UtilityException: Failed to get a DB connection
      nested:
      org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.); - nested throwable: (org.jboss.resource.ResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.))"

      I really cant think (or just dont know) what else I should be doing.

      Please help!!

      Thanks :)

        • 1. Re: [Microsoft][SQLServer 2000 Driver for JDBC]Error establi
          gregs

          I have since found a solution to my problem....and this will be specific to all drivers for JDBC with MS SQLSERVER 2000.

          The MS Driver (Recommended) will give a SOCKET EXCEPTION. Others may give a NetworkIO Exception or something similar.

          The bottom line is that using JBoss App server with JDBC Driver to connect to a DB on MS SQL SERVER2000 will NOT WORK unless the MS SQL SERVER2000 is running on a Server thats running a MS Server Operating System.

          In my case I was trying to connect to a network desktop (XP) that was running MS SQL SERVER2000.

          This to me is crazy!! and I'm not going to buy it being a "security reason" why this is in place. This is purely for licensing and MS trying to keep everyone using MS products.

          I may have been foolish in all of this...but after days of digging I found only one document that described a setup like this and it worked. There may be some config guidelines along these lines on the MS website but I couldnt find any.

          • 2. Re: [Microsoft][SQLServer 2000 Driver for JDBC]Error establi

            I'm also having problems getting jboss to understand MS SqlServer2000. What was the reference you found? Seems like the "Getting Started" article leaves out critical information.
            Cheers.

            Tom

            • 3. Re: [Microsoft][SQLServer 2000 Driver for JDBC]Error establi
              gregs

              Hi Tom,

              My setup was fine...my SQL Server setting were ok and my xml files and jar files for JBoss were all fine.

              The only thing I didnt know what that SQL Server had to be running on a server running a MS Operating System.

              There's a little scenario in this link that describes it.

              http://www.akadia.com/services/sqlsrv_jdbc.html

              There's plenty of details on the web (and in these forums) that are great for making sure you have the right driver etc... and connection properties set correctly..... but I didnt find anything about the fact you need to run SQL Server on a MS Server.

              I hope this helps a bit.

              • 4. Re: [Microsoft][SQLServer 2000 Driver for JDBC]Error establi
                booney

                hi gregs:
                i m also meet this problem before
                After i setup the sqlserver2000 sp3 it works ok.
                Wish will help u

                • 5. Re: [Microsoft][SQLServer 2000 Driver for JDBC]Error establi
                  safrye

                  With SP3 on Xp Pro, this works fine - though I had to tweak SQl Server a little.