1 Reply Latest reply on Jan 6, 2014 7:36 AM by Kaustubh Morankar

    how to set up oracle advanced security in jboss eap6.1 for xa data source

    Srini S Newbie

      Hi All,

       

      I tried to enable a oracle advanced security features in JBoss eap 6.1 for getting xa db connection.

       

      The same setup works for normal db connection. But failing to take it for xa db connection.(: java.lang.NoSuchMethodException: Method setOracle.net.crypto_checksum_types_client not found)

       

      Below the setup for <xa-datasource>.  If we pass the below set of params( in bold) for normal <data-source> jboss server accepting while trying to test the connection object.

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

      <xa-datasource jndi-name="java:jboss/datasources/XAOracleDS" pool-name="XAOracleDS" enabled="true" use-java-context="true" use-ccm="false">

         <xa-datasource-property name="URL">  jdbc:oracle:thin:@localhost:1521:abc          </xa-datasource-property>

        <security>

         <user-name>user1</user-name>

         <password>pass1</password>

        </security>                 

                          <xa-datasource-property name="oracle.net.encryption_types_client">       RC4_256          </xa-datasource-property>

                         <xa-datasource-property name="oracle.net.encryption_client">                 REQUIRED            </xa-datasource-property>

                          <xa-datasource-property name="oracle.net.crypto_checksum_client">           REQUIRED             </xa-datasource-property>

                          <xa-datasource-property name="oracle.net.crypto_checksum_types_client">      MD5                 </xa-datasource-property> 

        <validation>

                           <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"></valid-connection-checker>

                           <stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"></stale-connection-checker>

                           <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"></exception-sorter>

                        </validation>

                          <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

                          <driver>oraclexa</driver>

           </xa-datasource>

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

       

      Below is the server console error log.

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

      10:19:54,633 WARN  [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (HttpManagementService-threads - 4) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: Could not create connection

        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:460) [ironjacamar-jdbc-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:397) [ironjacamar-jdbc-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.createConnectionEventListener(SemaphoreArrayListManagedConnectionPool.java:781) [ironjacamar-core-impl-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.getConnection(SemaphoreArrayListManagedConnectionPool.java:344) [ironjacamar-core-impl-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getSimpleConnection(AbstractPool.java:397) [ironjacamar-core-impl-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:365) [ironjacamar-core-impl-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.core.connectionmanager.pool.AbstractPool.internalTestConnection(AbstractPool.java:627) [ironjacamar-core-impl-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.core.connectionmanager.pool.strategy.OnePool.testConnection(OnePool.java:89) [ironjacamar-core-impl-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.as.connector.subsystems.common.pool.PoolOperations$TestConnectionInPool.invokeCommandOn(PoolOperations.java:143) [jboss-as-connector-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.connector.subsystems.common.pool.PoolOperations$1.execute(PoolOperations.java:82) [jboss-as-connector-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:440) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.controller.AbstractOperationContext.completeStepInternal(AbstractOperationContext.java:229) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:224) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:194) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:115) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.controller.ModelControllerImpl$3.execute(ModelControllerImpl.java:398) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.controller.ModelControllerImpl$3.execute(ModelControllerImpl.java:388) [jboss-as-controller-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]

        at org.jboss.as.domain.http.server.DomainApiHandler.processRequest(DomainApiHandler.java:320)

        at org.jboss.as.domain.http.server.DomainApiHandler.doHandle(DomainApiHandler.java:226)

        at org.jboss.as.domain.http.server.DomainApiHandler.handle(DomainApiHandler.java:233)

        at org.jboss.as.domain.http.server.security.SubjectAssociationHandler.handle(SubjectAssociationHandler.java:51)

        at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)

        at org.jboss.sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:69)

        at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)

        at org.jboss.sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:710)

        at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)

        at org.jboss.as.domain.http.server.RealmReadinessFilter.doFilter(RealmReadinessFilter.java:47)

        at org.jboss.as.domain.http.server.DmrFailureReadinessFilter.doFilter(DmrFailureReadinessFilter.java:45)

        at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)

        at org.jboss.sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:682)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]

        at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]

        at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]

      Caused by: javax.resource.ResourceException: Could not find accessor on XADataSource:

        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:601) [ironjacamar-jdbc-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:443) [ironjacamar-jdbc-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        ... 34 more

      Caused by: java.lang.NoSuchMethodException: Method setOracle.net.crypto_checksum_types_client not found

        at org.jboss.jca.adapters.jdbc.util.Injection.inject(Injection.java:138) [ironjacamar-jdbc-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.adapters.jdbc.util.Injection.inject(Injection.java:67) [ironjacamar-jdbc-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:576) [ironjacamar-jdbc-1.0.17.Final-redhat-1.jar:1.0.17.Final-redhat-1]

        ... 35 more

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

       

      Please let me know if any has setup this. Appreciate your help.

       

      Thanks,

       

      Sri