9 Replies Latest reply on Jan 20, 2014 7:57 PM by xiang yingbing

    Disable warning errors in server.log

    Navanath Walunj Newbie

      Hello Team,

      I am using JBoss eap 611 in which we have configured datasource with XA transaction and used to connect MSSQL Database version ( Microsoft SQL Server 2008 (SP3) - 10.0.5788.0 (X64)   Jun 29 2012 21:00:35   Copyright (c) 1988-2008 Microsoft Corporation  Standard Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2) ).

      We are using JDBC4 driver for  connecting to database and enable XaJdbcOdbc role to the database user and still we are getting below errors repeatedly in server.log

       

       


      01:36:46,828 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc.SQLServerException: The EXECUTE permission was denied on the object 'xp_sqljdbc_xa_recover', database 'master', schema 'dbo'.
      at com.microsoft.sqlserver.jdbc.SQLServerXAResource.DTC_XA_Interface(SQLServerXAResource.java:647)
      at com.microsoft.sqlserver.jdbc.SQLServerXAResource.recover(SQLServerXAResource.java:728)
      at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.recover(XAManagedConnection.java:358)
      at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.recover(XAResourceWrapperImpl.java:177)
      at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass(XARecoveryModule.java:692) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]
      at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:417) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]
      at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:194) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]
      at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]
      at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]

      01:36:46,830 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016008: Local XARecoveryModule.xaRecovery - caught exception: java.lang.NullPointerException
      at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass(XARecoveryModule.java:602) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]
      at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.bottomUpRecovery(XARecoveryModule.java:417) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]
      at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass(XARecoveryModule.java:194) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]
      at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:789) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]
      at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371) [jbossjts-jacorb-4.17.7.Final-redhat-4-bz-1023562.jar:4.17.7.Final-redhat-1]

      01:36:46,832 WARN  [com.arjuna.ats.jta] (Periodic Recovery) ARJUNA016027: Local XARecoveryModule.xaRecovery got XA exception XAException.XAER_RMERR: javax.transaction.xa.XAException: com.microsoft.sqlserver.jdbc.SQLServerException: The EXECUTE permission was denied on the object 'xp_sqljdbc_xa_recover', database 'master', schema 'dbo'.

       

      The required permission is provided

        • 1. Re: Disable warning errors in server.log
          xiang yingbing Master

          please try to set logger lever in standalone.xml like this:

           

                  <logger category="com.arjuna.ats.jta">
                      <level name="ERROR"/>
                  </logger>
          • 2. Re: Disable warning errors in server.log
            xiang yingbing Master

            You had better solve the problem instead of hiding the WARN message.

            • 3. Re: Disable warning errors in server.log
              Navanath Walunj Newbie

              Could you please help me to get the correct solution for this.

              • 4. Re: Disable warning errors in server.log
                xiang yingbing Master

                The EXECUTE permission was denied on the object 'xp_sqljdbc_xa_recover', database 'master', schema 'dbo'.

                ~~~~~~This is root cause.

                 

                The required permission is provided

                ~~~~~~Are you sure? Do you mean everything works well except the tedious warning message?

                • 5. Re: Disable warning errors in server.log
                  Tomaz Cerar Master

                  You have configured app server to use XA transactions but didn't configure them on SQL server.

                   

                  This is problem with database configuration, talk to you DBA about enabling support for XA.

                   

                   

                  --

                  tomaz

                  • 6. Re: Disable warning errors in server.log
                    Navanath Walunj Newbie

                    Yes Sorry I might not updated all information we have done the same with DBA as well and DBA informed that he followed the steps below

                     

                    the solution is to do the following in the SQL Server 2008 server

                    1. 1. Download the latest
                      version of the MS SQL Server JDBC Driver
                      2. Unzip the content in a temporary directory
                      3. Drop the sqljdbc4.jar in <JBOSS_HOME>\bin\server\all\lib
                      4. Inside the unzipped content from step #2 there's a directory called
                      "xa" under <Microsoft JDBC Driver 4.0 for SQL Server>\sqljdbc_4.0\enu\
                      navigate to that directory
                      5. In the directory you will find a file called "xa_install.sql" with
                      the instructions on how to enable this feature in your SQL server which
                      basically consist on:

                      ----> 5.1 Identifying if you are running SQL Server 2008 64 or 32bits

                      ----> 5.2 Depending on the answer from step 5.1 copy the sqljdbc_xa.dll from
                      the unzipped folder <Microsoft JDBC Driver 4.0 for SQL
                      Server>\sqljdbc_4.0\enu\xa\x64 for 64 bits or <Microsoft JDBC Driver 4.0
                      for SQL Server>\sqljdbc_4.0\enu\xa\x86 for 32bits

                      ----> 5.3 Paste the sqljdbc_xa.dll you copied from step 5.2 into
                      <SQL_SERVER_2008_HOME>\Tools\Binn and
                      SQL_SERVER_2008_HOME>\localDB\Binn

                      ----> 5.4 Execute the xa_install.sql script mentioned on step #5

                      If after fixing this, you get this other warning:


                      18:10:17,905 WARN [loggerI18N]
                      [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local
                      XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException:
                      The function RECfailed. The status is: -3. Error: "*** SQLJDBC_XA DTC_ERROR
                      Context: xa_recover, state=1, StatusCode:-3 (0xFFFFFFFD) ***",
                      XAException.XAER_RMERR


                      the solution is to do the following in the SQL Server 2008 server

                      1) Open:

                      Control Panel | Administrative Tools | Component Services

                      2) Open the Distributed Transaction Services item for the necessary computer(s)
                      3) Right click the "Local DTC" option
                      4) Select the security tab
                      5) Check "Enable XA Transactions", forcing the MS DTC service to
                      restart.
                      6) Restart SQL Server to make sure it picks up the MS DTC changes.
                      7) Restart JBoss .

                     

                     

                    We have Windows server 2003 x64 OS on database server still we are getting below warning .  So come to conclusion to disable the warning but I would rather prefer to resolve it.

                    • 7. Re: Disable warning errors in server.log
                      xiang yingbing Master

                      3. Drop the sqljdbc4.jar in <JBOSS_HOME>\bin\server\all\lib

                      ~~~~~~~~~Which article told you to do so? Would you please post it here?


                      I think you should install jdbc driver as an module of jboss as 7/wildfly: Data Source Configuration in AS 7,

                      I did not try sql server, but I think you can try this article: How to set a datasource connection to  MSSQL Server

                      If you have more questions, why not send message to the author of this article through jboss community/forum message system, or just post your questions in this article?

                      • 8. Re: Disable warning errors in server.log
                        Navanath Walunj Newbie

                        Thank you Xinag,

                        I think "Drop the sqljdbc4.jar in <JBOSS_HOME>\bin\server\all\lib " means need to paste to that location but it is based on Jboss5.1 directory structure.

                        Below are my details for Jboss6.1.0

                        <JBOSS_HOME>\modules\com\Microsoft\sqlserver\jdbc\main\ modules.xml is as follows

                        <module xmlns="urn:jboss:module:1.0" name="com.microsoft.sqlserver.jdbc">

                          <resources>

                            <resource-root path="sqljdbc4.jar"/>

                          </resources>

                          <dependencies>

                            <module name="javax.api"/>

                            <module name="javax.transaction.api"/>

                          </dependencies>

                        </module>

                        and sqljdbc4.jar is present in current directory.

                         

                        and <JBOSS_HOME>\standalone\deployments\apian-ds.xml is as follows

                         

                        <?xml version="1.0" encoding="UTF-8"?>

                        <datasources

                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                            xsi:noNamespaceSchemaLocation="http://www.jboss.org/ironjacamar/schema/datasources_1_0.xsd">

                          <xa-datasource

                              jndi-name="jdbc/AppianPrimaryDS"

                              pool-name="SqlServerDS"

                              use-java-context="false">

                            <xa-datasource-property name="ServerName">itkrsql016d</xa-datasource-property>

                            <xa-datasource-property name="PortNumber">1433</xa-datasource-property>

                            <xa-datasource-property name="DatabaseName">Appian_Patch_DEV</xa-datasource-property>

                            <driver>com.microsoft.sqlserver.jdbc</driver>

                            <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>

                           <security>

                          <user-name>Appian_patch</user-name>

                          <password>!pp1an_p</password>

                        </security>

                            <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>

                            <xa-pool>

                              <min-pool-size>5</min-pool-size>

                              <max-pool-size>100</max-pool-size>

                            </xa-pool>

                            <timeout>

                              <blocking-timeout-millis>5000</blocking-timeout-millis>

                              <idle-timeout-minutes>5</idle-timeout-minutes>

                            </timeout>

                          </xa-datasource>

                        </datasources>

                         

                        Still we are getting an error of warning .

                        • 9. Re: Disable warning errors in server.log
                          xiang yingbing Master

                          Your JDBC module configuration is right. I think this problem has nothing to do with jboss AS.

                           

                          You can google it, and find many useful articles.

                          For example:http://stackoverflow.com/questions/7710868/the-execute-permission-was-denied-on-the-object-aspnet-checkschemaversion-dat

                          Your problem is described.