1 Reply Latest reply on Oct 8, 2002 11:21 PM by jasonbrome

    Configuring JBoss For MSSqlServer2000

    inquizitive

      Hi Guys ,
      For the past 2 days i have been trying to configure JBoss3.0.3 to work with MSSQLServer2000.

      I have followed the following steps for configuring JBOSS with SQLServer2000,

      The following are the steps that i have done in JBoss3.0.3 to get it working with SQLServer2000,

      a) Copied mssqlservice.xml to {$JBOSS-HOME}/server/all/deploy/

      b) Copied the 3 jar files given with the driver to {$JBOSS-HOME}/server/all/lib

      c) Changed the standardjbosscmp-jdbc.xml to the following (i am pasting only the part which i have changed.)

      java:/MSSQLDS
      <datasource-mapping>MS SQLSERVER2000</datasource-mapping>

      d) Changed the standardjaws.xml (i am pasting only the part which i have changed.)

      java:/MSSQLDS
      <type-mapping>MS SQLSERVER2000</type-mapping>


      e) Changed the mssql-service.xml to the following ,

      PersonEntity



      <config-property name="ConnectionURL" type="java.lang.String"> jdbc:microsoft:sqlserver://localhost;DatabaseName=ContactInfo</config-property>
      <config-property name="DriverClass" type="java.lang.String">com.microsoft.jdbc.sqlserver.SQLServerDriver</config- property>
      <!--set these only if you want only default logins, not through JAAS-->
      <config-property name="UserName" type="java.lang.String">sa</config-property>
      <config-property name="Password" type="java.lang.String">sa</config-property>


      <depends optional-attribute-name="ManagedConnectionPool">
      <!--embedded mbean-->

      0
      50
      5000
      15-->
      <!--criteria indicates if Subject (from security domain) or app supplied
      parameters (such as from getConnection(user, pw)) are used to distinguish
      connections in the pool. Choices are
      ByContainerAndApplication (use both),
      ByContainer (use Subject),
      ByApplication (use app supplied params only),
      ByNothing (all connections are equivalent, usually if adapter supports
      reauthentication)
      ByContainerAndApplication





      For the above line if i give use the following options it gives me the following error

      a) ByContainerAndApplication - org.jboss.util.NestedSQLException: Need non-null subject for subject/cri based pooling; - nested throwable: (javax.resource.ResourceException:
      b) ByApplication Or ByContainer - Could not create connection; - nested throwable: (java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.); - nested throwable:


      I would be grateful if u could tell me the following ,
      - Whether i am following the right steps here.
      - How to fix this problem?

      Thank You very much

      Dhiraj Ramakrishnan



        • 1. Re: Configuring JBoss For MSSqlServer2000
          jasonbrome

          As far as the exception:

          java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket

          ... you might want to check out the following MS support article and see if it provides any answers:

          Q313178 - PRB: Error Establishing Socket with JDBC Driver
          http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q313178

          Also, you might want to explicitly specify the port in the connection - although I'm assuming that the SQL Server is running on the default port of 1433?

          i.e.

          <config-property name="ConnectionURL" type="java.lang.String"> jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=ContactInfo</config-property>

          Jason