10 Replies Latest reply on Oct 9, 2009 1:01 PM by Vicky Kak

    Cannot create a datasource named GMTV_PACK_NOTX

    Martin Denham Newbie

      Hi,

      I am new to JBoss 5.1. For some reason I can't create a datasource with jndi name GMTV_PACK_NOTX no matter what I try. I can successfully create a datasource if I name it something else e.g. AMTV_PACK_NOTX or AAAA_BBBB_CCCC but if I name it GMTV_PACK_NOTX the status in the admin console after creation is always Down.

      I thought that maybe on my first attempt I may have used incorrect connection strings which were somehow cached by jboss so I deleted the whole jboss-5.1.0.GA dir and re-installed jboss but to no avail.

      Has anybody got any suggestions? Obviously I could just rename the datasource in the application but I would like to know what the problem is.

      Thanks
      Martin

        • 1. Re: Cannot create a datasource named GMTV_PACK_NOTX
          Martin Denham Newbie

          Something is really odd here. Either that or I am going crazy or doing something stupid.

          I just tried the same thing on my laptop. A clean install of JBoss 5.1 and JDK 1.5.0-21. Then I can successfully create an Oracle datasource called anything except GMTV_PACK_NOTX.

          • 2. Re: Cannot create a datasource named GMTV_PACK_NOTX
            Peter Johnson Master

            According you your post you appear to be doing this through the admin console, is that correct? If so, let's find out if this is an issue with the admin console or with the data source itself. To do this, try the following:

            Stop the app server. Datasources are defined in a *-ds.xml file - locate the once created for your data source and move it to a temporary location outside the JBoss AS directories. Start the app server. After you see the ""started in xxx seconds" message in the console log move the *-ds.xml file back into the server/xxx/deploy directory. Wait a few seconds for the hot deployer to notice the change. If you get an error, post the console log starting from the "started in xxx seconds" message, and post the content of the *-ds.xml file.

            When posting XML or source code text, enclose the text in [ code ] tags. To do this, select the text and click the Code button above the editor window. Use the Preview button to verify the formatting before submitting.

            • 3. Re: Cannot create a datasource named GMTV_PACK_NOTX
              Martin Denham Newbie

              Hi Peter,

              Yes I am using the Seam based admin console.

              I tried what you suggested and don't get any error messages in the console log but neither is the GMTV_PACK_NOTX auto-deployed because it does not appear in the admin console.

              However, if I try auto-deploying AMTV_PACK_NOTX (slightly different name) then it successfully auto-deploys and appears in the admin consule with the status UP.

              Here is the contents of GMTV_PACK_NOTX-ds.xml after a minor alteration of the password and connection-url tags for security reasons. I did a diff with AMTV_PACK_NOTX-ds.xml and the only difference is the jndi name:

              <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
              <datasources>
               <no-tx-datasource>
               <jndi-name>GMTV_PACK_NOTX</jndi-name>
               <rar-name>jboss-local-jdbc.rar</rar-name>
               <use-java-context>true</use-java-context>
               <connection-definition>javax.sql.DataSource</connection-definition>
               <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
               <min-pool-size>0</min-pool-size>
               <max-pool-size>10</max-pool-size>
               <blocking-timeout-millis>30000</blocking-timeout-millis>
               <idle-timeout-minutes>30</idle-timeout-minutes>
               <prefill>false</prefill>
               <background-validation>false</background-validation>
               <background-validation-millis>0</background-validation-millis>
               <validate-on-match>true</validate-on-match>
               <statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
               <isSameRM-override-value>false</isSameRM-override-value>
               <allocation-retry>0</allocation-retry>
               <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
               <application-managed-security xsi:type="securityMetaData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
               <metadata>
               <type-mapping>Oracle9i</type-mapping>
               </metadata>
               <type-mapping>Oracle9i</type-mapping>
               <user-name>MI_PACK</user-name>
               <password>secret</password>
               <check-valid-connection-sql>SELECT * FROM DUAL</check-valid-connection-sql>
               <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
               <prepared-statement-cache-size>0</prepared-statement-cache-size>
               <share-prepared-statements>false</share-prepared-statements>
               <set-tx-query-timeout>false</set-tx-query-timeout>
               <query-timeout>0</query-timeout>
               <use-try-lock>60000</use-try-lock>
               <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
               <connection-url>jdbc:oracle:thin:@myserver:1234:mydb</connection-url>
               </no-tx-datasource>
              </datasources>
              


              Thanks
              Martin

              • 4. Re: Cannot create a datasource named GMTV_PACK_NOTX
                Vicky Kak Master

                Why do you need these configurations?

                1) <rar-name>jboss-local-jdbc.rar</rar-name>
                2) <connection-definition>javax.sql.DataSource</connection-definition>
                3) <jmx-invoker-name>jboss:service=invoker,type=jrmp</jmx-invoker-name>
                4) <use-try-lock>60000</use-try-lock>

                Who had created -ds.xml file?


                • 5. Re: Cannot create a datasource named GMTV_PACK_NOTX
                  Martin Denham Newbie

                  Hi Vicky,

                  It was created by the admin console.

                  Thanks
                  Martin

                  • 6. Re: Cannot create a datasource named GMTV_PACK_NOTX
                    Martin Denham Newbie

                    Hi Vicky,

                    Further to your question I tried to create my own GMTV_PACK_NOTX-ds.xml file based on oracle-ds.xml in the jboss distribution.

                    After dropping it in the deploy dir I get the following message but the status in the console is still DOWN:

                    13:12:41,977 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=GMTV_PACK_NOTX' to JNDI name 'java:GMTV_PACK_NOTX'
                    


                    Amazingly I then edited the filename and jndi name to BMTV_PACK_NOTX and the status in the console immediately changed to UP!

                    Kind regards
                    Martin

                    • 7. Re: Cannot create a datasource named GMTV_PACK_NOTX
                      Vicky Kak Master

                       

                      "mjdenham" wrote:

                      It was created by the admin console.

                      I was too thinking about the same, have never tried admin console since I prefer directly modifying the xmls ;)
                      My guess right now would be that the -ds.xml created by the admin console is creating the wrong xml entries which is breaking the xml validations in JCA code.
                      I need to check/test it myself, will do it sometime later.



                      • 8. Re: Cannot create a datasource named GMTV_PACK_NOTX
                        jaikiran pai Master

                        Martin,

                        There have been other users who too have reported similar issues with the datasource status in the admin-console. Even though there are no exceptions reported, the status still shows as DOWN. I once had seen this even with the "DefaultDS", but couldn't get the relevant details to file the JIRA.

                        Could you please create a JIRA here https://jira.jboss.org/jira/browse/EMBJOPR and if possible attach the file which causes this issue?

                        In the meantime, you can either ignore that status in admin console or use manual deployment of the -ds.xml file

                        • 9. Re: Cannot create a datasource named GMTV_PACK_NOTX
                          Martin Denham Newbie

                          Is there an mbean property that will confirm whether the datasource is actually UP or DOWN? I have checked the following mbean properties using the JMX Management Console which all seem positive:

                          DataSourceMetaData.StateString = Started
                          WrapperDataSourceService.StateString = Started
                          NoTxConnectionManager = Started

                          ... meanwhile just to frustrate me the admin console still says DOWN

                          • 10. Re: Cannot create a datasource named GMTV_PACK_NOTX
                            Vicky Kak Master

                            Hello Martin,

                            "mjdenham" wrote:
                            Is there an mbean property that will confirm whether the datasource is actually UP or DOWN? I have checked the following mbean properties using the JMX Management Console which all seem positive:

                            DataSourceMetaData.StateString = Started
                            WrapperDataSourceService.StateString = Started
                            NoTxConnectionManager = Started

                            ... meanwhile just to frustrate me the admin console still says DOWN


                            Yes looks fine, for a specific datasource all the specific set of MBeans can be found by searching this pattern in jmx-console
                            jboss.jca:name=<jndiName>

                            You will see 4 Mbeans.