9 Replies Latest reply on Nov 13, 2011 10:30 PM by johncenapsna

    -ds.xml file changes not reflect at runtime

    johncenapsna

           When I try to modify the -ds.xml file while JBoss server running. The following exception came. Seems hot-deployable services not working.        

      org.jboss.util.NestedSQLException: You are trying to use a connection factory that

      has been shut down: ManagedConnectionFactory is null.; - nested throwable: (javax.r

      esource.ResourceException: You are trying to use a connection factory that has been

      shut down: ManagedConnectionFactory is null.)

              at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperD

      ataSource.java:95)

              at com.ibsplc.ilogistics.ibase.integration.dao.sql.AbstractSqlDAO.getConnec

      tion(AbstractSqlDAO.java:84)

              at com.ibsplc.ilogistics.system.jobscheduler.timer.dao.sql.TimerSqlDAO.crea

      teConnection(TimerSqlDAO.java:61)

              at com.ibsplc.ilogistics.system.jobscheduler.timer.dao.sql.TimerSqlDAO.filt

      erNextInvokeSchedule(TimerSqlDAO.java:74)

              at com.ibsplc.ilogistics.system.jobscheduler.timer.Timer.handleSystemTimern

      otification(Timer.java:172)

              at com.ibsplc.ilogistics.system.jobscheduler.schedulefacade.ejb.JobSchedule

      rManagerEJB.handleScheduleNotification(JobSchedulerManagerEJB.java:541)

       

       

      The exception came after rebounding data source.

      8:21:17,198 INFO  [ConnectionFactoryBindingService] Unbound ConnectionManager 'jbo
      ss.jca:service=DataSourceBinding,name=SAGDataSource' from JNDI name 'SAGDataSource'

      18:21:18,057 INFO  [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:se
      rvice=DataSourceBinding,name=SAGDataSource' to JNDI name 'SAGDataSource'

       

       

      Currently we need to redeploy the server every time we changes the -ds.xml file

       

      Please suggest a way forward.

        • 1. Re: -ds.xml file changes not reflect at runtime
          wdfink

          What database you use? Could you attach the ds.xml?

          Does the Exception is only a moment if you change the ds-xml or does it constant after you change it?

          Do you have ERROR messages in the log when change happen?

          Also what version do you use?

          • 2. Re: -ds.xml file changes not reflect at runtime
            johncenapsna

            @ Wolf-Dieter Fink Thanks for your reply. Using Oracle 9i. JBoss 5.1. Error messages what i have were i pasted in the question

            • 3. Re: -ds.xml file changes not reflect at runtime
              johncenapsna

              @ Wolf-Dieter Fink <?xml version="1.0" encoding="UTF-8"?>

               

               

              <!-- ===================================================================== -->

              <!--                                                                       -->

              <!--  JBoss Server Configuration                                           -->

              <!--                                                                       -->

              <!-- ===================================================================== -->

               

               

              <!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->

              <!-- $Id: oracle-ds.xml 88948 2009-05-15 14:09:08Z jesper.pedersen $ -->

              <!-- ==================================================================== -->

              <!--  Datasource config for Oracle originally from Steven Coy             -->

              <!-- ==================================================================== -->

               

               

               

               

              <datasources>

                <local-tx-datasource>

                  <jndi-name>SAGDataSource</jndi-name>

                  <use-java-context>false</use-java-context>

                  <connection-url>jdbc:oracle:thin:@192.168.17.19:1524:ILOG</connection-url>

                        <!--

               

               

                                  Here are a couple of the possible OCI configurations.

                                  For more information, see http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/java.920/a96654/toc.htm

               

               

                        <connection-url>jdbc:oracle:oci:@youroracle-tns-name</connection-url>

                                  or

                        <connection-url>jdbc:oracle:oci:@(description=(address=(host=youroraclehost)(protocol=tcp)(port=1521))(connect_data=(SERVICE_NAME=yourservicename)))</connection-url>

               

               

                                  Clearly, its better to have TNS set up properly.

                         -->

                  <driver-class>oracle.jdbc.OracleDriver</driver-class>

                  <user-name>CTEP_DEV</user-name>

                  <password>CTEP_DEV</password>

                  <min-pool-size>1</min-pool-size>

                  <max-pool-size>50</max-pool-size>

                  <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->

                  <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->

                  <!-- Checks the Oracle error codes and messages for fatal errors -->

                  <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>

                      <!-- sql to call when connection is created

                      <new-connection-sql>some arbitrary sql</new-connection-sql>

                      -->

               

               

                      <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered

                      <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>

                      -->

               

               

                    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

               

                    <check-valid-connection-sql>SELECT 1 FROM DUAL</check-valid-connection-sql>

                    <idle-timeout-minutes>0</idle-timeout-minutes>

                    <background-validation>true</background-validation>

                    <background-validation-minutes>10</background-validation-minutes>

               

                    <metadata>

                       <type-mapping>Oracle9i</type-mapping>

                    </metadata>

                </local-tx-datasource>

               

               

              </datasources>

              • 4. Re: -ds.xml file changes not reflect at runtime
                johncenapsna

                @ Wolf-Dieter Fink If i switched to another DB schema then that exception occurs.

                • 5. Re: -ds.xml file changes not reflect at runtime
                  johncenapsna

                  @Wolf-Dieter Fink Do u need any other details to trace?

                  • 6. Re: -ds.xml file changes not reflect at runtime
                    johncenapsna

                    @Wolf-Dieter Fink   hot deployment service is active.hdscanner-jboss-beans.xml is there in place. It is unbounding the old data source. and bounding the new data source. at that time only above mentioned exception came

                    • 7. Re: -ds.xml file changes not reflect at runtime
                      jesper.pedersen

                      STOP CROSS POSTING !

                       

                      People will answer if they want - upgrade to latest AS 7 release if you are looking for help - or buy a subscription (http://www.jboss.com/products/platforms/application/)

                      • 8. Re: -ds.xml file changes not reflect at runtime
                        wdfink

                        at that time the connection pool is down and it's normal!

                        But I ask what about after a few seconds, does the connection work?

                        • 9. Re: -ds.xml file changes not reflect at runtime
                          johncenapsna

                          @Wolf-Dieter Fink    No its continuing to show exception whenever i tried to get a connection after that.