12 Replies Latest reply on Oct 15, 2012 5:39 AM by jaikiran pai

    Oracle 11g Data source set up

    Chandra Shekhar Newbie

      I am getting xml parsing exception during data source set up. I need 3rd eye to see settngs

       

       

              at org.jboss.as.server.ServerService.boot(ServerService.java:266) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

              at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

              at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_14]

      Caused by: javax.xml.stream.XMLStreamException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[105,5]

      Message: "JBAS010471: Jndi name have to start with java:/ or java:jboss/"

              at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:784)

              at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:333)

      ---------------

      standalone.xml

      --------------

       

      <datasource jndi-name="MigDS" pool-name="OracleDS" enabled="true" use-java-context="true" jta="true">

           <connection-url>XXXX</connection-url>

           <driver>oracle</driver>

           <pool>

            <prefill>true</prefill>

            <use-strict-min>false</use-strict-min>

           </pool>

           <security>

            <user-name>XX</user-name>

            <password>XXX</password>

           </security>

           <validation>

            <validate-on-match>false</validate-on-match>

            <background-validation>false</background-validation>

            <useFastFail>false</useFastFail>

           </validation>

           <statement />

          </datasource>

         

         

              <driver name="oracle" module="com.oracle.ojdbc6">

            <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>

           </driver>

       

       

      -----------------

      module.xml

      -----------------

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

      <module xmlns="urn:jboss:module:1.0" name="oracle.jdbc">

          <resources>

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

          </resources>

          <dependencies>

              <module name="javax.api"/>

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

          </dependencies>

      </module>

       

       

      I follow below blog

       

      https://community.jboss.org/blogs/mukeshghildiyal/2012/01/09/jboss7-oracle-data-source-and-test

        • 1. Re: Oracle 11g Data source set up
          Xin Zhang Novice

          Chandra Shekhar 编写:

           

          I am getting xml parsing exception during data source set up. I need 3rd eye to see settngs

           

           

                  at org.jboss.as.server.ServerService.boot(ServerService.java:266) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

                  at org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

                  at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_14]

          Caused by: javax.xml.stream.XMLStreamException: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[105,5]

          Message: "JBAS010471: Jndi name have to start with java:/ or java:jboss/"

                  at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:784)

                  at org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.readElement(DataSourcesExtension.java:333)

          ---------------

          standalone.xml

          --------------

          // you can modify jndi-name to java:/MigDs

          <datasource jndi-name="MigDS" pool-name="OracleDS" enabled="true" use-java-context="true" jta="true">

               <connection-url>XXXX</connection-url>

               <driver>oracle</driver>

               <pool>

                <prefill>true</prefill>

                <use-strict-min>false</use-strict-min>

               </pool>

               <security>

                <user-name>XX</user-name>

                <password>XXX</password>

               </security>

               <validation>

                <validate-on-match>false</validate-on-match>

                <background-validation>false</background-validation>

                <useFastFail>false</useFastFail>

               </validation>

               <statement />

              </datasource>

             

             

                  <driver name="oracle" module="com.oracle.ojdbc6">

                <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>

               </driver>

           

          • 3. Re: Oracle 11g Data source set up
            Chandra Shekhar Newbie

            I am getting exception after removing some sub elements from datasource element but I can see below message

             

            JBAS014775:    New missing/unsatisfied dependencies:
                  service jboss.jdbc-driver.oracle (missing) dependents: [service jboss.data-source.java:jboss/datasources/MigDS]

             

             

            <datasource jta="true" jndi-name="java:/MigDS" pool-name="OracleDS" enabled="true" use-java-context="true">
                                <connection-url>XXX</connection-url>
                                <driver>oracle</driver>
                                <security>
                                    <user-name>XXX</user-name>
                                    <password>XXXX</password>
                                </security>
                            </datasource>

             

            Do I add some extra information in xml file or adding jars into sever?

             

            • 4. Re: Oracle 11g Data source set up
              Xin Zhang Novice

              It works for me , and  I don't know what mean about "It wont help me" ?

              • 5. Re: Oracle 11g Data source set up
                Chandra Shekhar Newbie

                It not worked after modify jndi-name.

                 

                So I removed some sub elements in datasource element then I did not get exception but I can see  JBAS014775 message in console.

                JBAS014775:    New missing/unsatisfied dependencies:

                • 6. Re: Oracle 11g Data source set up
                  Xin Zhang Novice

                  Sorry for my careless

                   

                   

                  ---------------

                  standalone.xml

                  --------------

                   

                  <datasource jndi-name="MigDS" pool-name="OracleDS" enabled="true" use-java-context="true" jta="true">

                       <connection-url>XXXX</connection-url>

                       <driver>oracle</driver>

                       <pool>

                        <prefill>true</prefill>

                        <use-strict-min>false</use-strict-min>

                       </pool>

                       <security>

                        <user-name>XX</user-name>

                        <password>XXX</password>

                       </security>

                       <validation>

                        <validate-on-match>false</validate-on-match>

                        <background-validation>false</background-validation>

                        <useFastFail>false</useFastFail>

                       </validation>

                       <statement />

                      </datasource>

                   

                   

                          <driver name="oracle" module="com.oracle.ojdbc6">

                        <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>

                       </driver>

                   

                   

                  -----------------

                  module.xml

                  -----------------

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

                  <module xmlns="urn:jboss:module:1.0" name="oracle.jdbc">

                      <resources>

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

                      </resources>

                      <dependencies>

                          <module name="javax.api"/>

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

                      </dependencies>

                  </module>

                   

                  two to be the same name.

                  • 7. Re: Oracle 11g Data source set up
                    Nicklas Karlsson Master

                    BAS014775:    New missing/unsatisfied dependencies:

                          service jboss.jdbc-driver.oracle (missing) dependents: [service jboss.data-source.java:jboss/datasources/MigDS]

                     


                     

                     

                    You should also take care that the jndi names used in the persistence.xml match the one in the datasources section of standalone.xml

                    • 8. Re: Oracle 11g Data source set up
                      Chandra Shekhar Newbie

                      I could not find persistence.xml file in server.

                       

                      Kindly provide me location.

                      • 9. Re: Oracle 11g Data source set up
                        Nicklas Karlsson Master

                        persistence.xml is deployed with the application if you're using JPA. If not, you are getting your datasource from somewhere else (resource injection, manual jndi lookup etc). Any any cases, the reference to the datasource has to match the definition (surprise, surprise).

                        • 10. Re: Oracle 11g Data source set up
                          jaikiran pai Master

                          We actually should report the module load failures a bit better. I've filed https://issues.jboss.org/browse/AS7-5751 to fix that.

                          • 11. Re: Oracle 11g Data source set up
                            Chandra Shekhar Newbie

                            Just I am doing data source configuration setting in server. JPA is not required in my application.

                             

                            Can you give me some more information?

                            • 12. Re: Oracle 11g Data source set up
                              jaikiran pai Master

                              Chandra Shekhar wrote:

                               

                              Just I am doing data source configuration setting in server. JPA is not required in my application.

                               

                               

                              Did you read Xin's post above? It already tells you what the problem is and what needs to be fixed.