7 Replies Latest reply on Sep 3, 2014 12:26 PM by Olivier Dubois - Oscars

    Not able to use OEP defined datasources

    Olivier Dubois - Oscars

      Hi OEP Team,

       

      I migrated my project 11g in 12c SOA and JDev with success, but I can't connect database using my datasource

       

       

         <data-source>

       

              <name>DATASOURCE_GIPCORE</name>

              <data-source-params>

                  <jndi-names>

                      <element>DsGipCore</element>

                  </jndi-names>

                  <global-transactions-protocol>OnePhaseCommit</global-transactions-protocol>

              </data-source-params>

              <connection-pool-params>

                  <credential-mapping-enabled></credential-mapping-enabled>

                  <test-table-name>SQL SELECT 1 FROM DUAL</test-table-name>

                  <initial-capacity>5</initial-capacity>

                  <max-capacity>60</max-capacity>

                  <capacity-increment>1</capacity-increment>

              </connection-pool-params>

              <driver-params>

                  <use-xa-data-source-interface>true</use-xa-data-source-interface>

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

                  <url>jdbc:oracle:thin:@localhost:1521:CHITA</url>

                  <properties>

                      <element>

                          <value>gipcore</value>

                          <name>user</name>

                      </element>

                      <element>

                          <value>{AES}xklE7q1n6KMBzrOkVJtQTQ==</value>

                          <name>password</name>

                      </element>

                  </properties>

              </driver-params>

          </data-source>

       

      When using

       

       

          Context initialContext = new InitialContext ();       

       

                

                  Object obj  = initialContext.lookup ("DsGIPCore");                         

          //gets the data source from context

          DataSource ds = (javax.sql.DataSource)obj;

       

      I get this "javax.naming.NameNotFoundException; remaining name DsGIPCore"

      I also tried with @Resource like described in docs but nothing works. My datasource is valid and working rightly. It appears without any errors in my WLEVS/OEP dashboard.

      This code was working with OEP 11G, did you change anything to access OEP datasource? I need it.

      It seems that datasource is right when using standard bean/table cache.

       

      Regards,

      Olivier