1 Reply Latest reply on Jun 27, 2012 3:18 PM by Frank Langelage

    Help with SQL Server Database Error

    Joseph Fouts Novice

      I am trying to get SQL Server database working with JBoss 7 and keep getting the following errors:

       

      11:33:40,037 WARNING [com.microsoft.sqlserver.jdbc.internals.AuthenticationJNI] (EJB default - 1) InitializeSecurityContext failed with -2146892976{WINERR}.

      11:33:40,039 WARNING [com.microsoft.sqlserver.jdbc.internals.AuthenticationJNI] (EJB default - 1) com.microsoft.sqlserver.jdbc.AuthenticationJNI@5e5c4b3f Authentication failed code : -2146892976

       

       

      Here is my datasource definition that is defined in the standalone-full.xml configuration file:

       

                 <datasource jta="true" jndi-name="java:/admindatasource2" pool-name="admindatasource2" enabled="true" use-java-context="true" use-ccm="true">
                      <connection-url>jdbc:sqlserver://10.90.65.200:1433;databaseName=apdev70;integratedSecurity=true</connection-url>
                      <driver>sqljdbc</driver>
                      <pool>
                          <min-pool-size>1</min-pool-size>
                          <max-pool-size>20</max-pool-size>
                      </pool>
                      <security>
                          <user-name>apdev70</user-name>
                          <password>apdev7012</password>
                      </security>
                  </datasource>
                  <drivers>
                      <driver name="sqljdbc" module="com.microsoft.sqlserver.jdbc">
                          <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
                      </driver>              
                  </drivers>

       

      The error occurs on the connect.

      I am running Windows 7 64bit

       

      I can access the SQL Server database fine from a standalone java program outside of JBoss 7 fine with the following code:

       

          Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
           String connectionUrl = "jdbc:sqlserver://win2008;" + "database=APDEV70;" + "user=apdev70;"
                 + "password=apdev7012";
           Connection con = DriverManager.getConnection(connectionUrl);

       

       

      Any help with this issue is greatly appreciated.

       

      Thanks.