5 Replies Latest reply on Oct 29, 2010 1:46 AM by Mayur B

    Local Tx Datasource is DOWN

    Mayur B Newbie

      Hi , I just restarted second instance on jboss server , wihtout different port settings (1299 for JNDI)   In the Datasource section of Admin console it showing my local Tx Datasource is DOWN .   There was no exception thrown in server startup log.   How to turn it on ...I tried to FLush it ..it says it is "successful" after sometime ...but status is same --->        Name     Type     Status     Actions  DefaultDS     Local Tx Datasource     UP      jdbc/mysql     Local Tx Datasource     DOWN            My mysql-ds.xml --->  plz tell me how to turn it UP ?....  ==============================================================================            jdbc/mysql     false    jdbc:mysql://:3306/database_name?zeroDateTimeBehavior=convertToNull     com.mysql.jdbc.Driver     root     password          org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker               mySQL        

        • 1. Re: Local Tx Datasource is DOWN
          Mayur B Newbie

          Problem with putting proper XMl , so will give information what it contains :

           

          <?xml version="1.0" encoding="UTF-8"?>
          <datasources>
              <local-tx-datasource>
              <jndi-name>jdbc/mysql</jndi-name>
          <use-java-context>false</use-java-context>
              <connection-url>jdbc:mysql://<my.own.server.ip>:3306/database_name?zeroDateTimeBehavior=convertToNull</connection-url>
              <driver-class>com.mysql.jdbc.Driver</driver-class>
              <user-name>root</user-name>
              <password>password</password>
              <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
              <metadata>
              <type-mapping>mySQL</type-mapping>
              </metadata>
              </local-tx-datasource>
          </datasources>

           

           

          datasources

           

              local-tx-datasource

           

              jndi-name>----mysql---/jndi-name.

          use-java-context :    false    use-java-contex   .

                   connection-url :    jdbc:mysql://my.own.server.i>:3306/database_name?zeroDateTimeBehavior=convertToNull.

           

                 driver-class:  com.mysql.jdbc.Driver.

           

              user-name   root   user-name 

           

                 passworpassword    password

           

              valid-connection-checker-class-name     org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker    valid-connection-checker-class-name

           

              metadata

           

              type-mapping    mySQL    type-mapping>

           

              metadata

           

              local-tx-datasource

           

          datasources

          • 2. Re: Local Tx Datasource is DOWN
            Iván Pazmiño Novice

            I have similar problem with a jbossas 5.1

            Even when at start-up tje server says it has bound the jndi name, in the administration console the datasource is down.

            When trying to deploy a single ejb-jar with the administration console the follwing error id thrown

             

            Deployment  "vfszip:/usr/local/java/jboss/jboss-5.1.0.GA/server/test-field/deploy/lunch-ejb-1.0.0-SNAPSHOT.jar/"  is in error due to the following reason(s): java.lang.RuntimeException:  mapped-name is required for lunchDS of deployment EmployeeService

             

            the same error is thrown if the ejb-jar is already in the deploy folder at start-up http://jbossas.pastebin.com/MZ5M9qgT

            • 3. Re: Local Tx Datasource is DOWN
              Iván Pazmiño Novice

              I've found is a known bug for war files and it has been solved, https://jira.jboss.org/browse/JBAS-8398, but the patched version hasn't been released yet. So, while that happens, how can we apply the patch?

              • 4. Re: Local Tx Datasource is DOWN
                Iván Pazmiño Novice

                It fixes changing the injection of the resource with mappedName instead of name

                 

                @Resource(mappedName = "lunchDS")

                private DataSource dataSource;

                • 5. Re: Local Tx Datasource is DOWN
                  Mayur B Newbie

                  I did not solved my problem . I deleted node2 . created node3 . deleted all port definitions in bindings xml except port3 .

                   

                  And its running .. :-/

                   

                  Jboss was not adding 200 to ports numbers even if proper arguments were set in run command...in my case.