Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-5085

JGroups is not able to find oracle.jdbc.OracleDriver on EAP 6.4.5.GA

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 6.4.0.GA
    • Modules
    • None
    • Hide

      1. Configure your standalone.xml with the following:
      {{<stack name="tcp-sso">
      <transport type="TCP" socket-binding="jgroups-tcp-sso"/>
      <protocol type="JDBC_PING">
      <property name="connection_driver">oracle.jdbc.OracleDriver</property>
      <property name="connection_url">jdbc:oracle:thin:@//ORACLEHOST:1521/SUPPORT</property>
      <property name="connection_username">USERNAME</property>
      <property name="connection_password">PASSWORD</property>
      <property name="initialize_sql">CREATE TABLE JGROUPSPING_SSO (own_addr varchar(200) NOT NULL, cluster_name varchar(200) NOT NULL, ping_data blob, constraint PK_JGROUPSPING_SSO PRIMARY KEY (own_addr, cluster_name))</property>
      <property name="insert_single_sql">INSERT INTO JGROUPSPING_SSO (own_addr, cluster_name, ping_data) values (?, ?, ?)</property>
      <property name="delete_single_sql">DELETE FROM JGROUPSPING_SSO WHERE own_addr=? AND cluster_name=?</property>
      <property name="select_all_pingdata_sql">SELECT ping_data FROM JGROUPSPING_SSO WHERE cluster_name=?</property>
      </protocol>
      <protocol type="MERGE2"/>
      <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd-sso"/>
      <protocol type="FD"/>
      <protocol type="VERIFY_SUSPECT"/>
      <protocol type="BARRIER"/>
      <protocol type="pbcast.NAKACK"/>
      <protocol type="UNICAST2"/>
      <protocol type="pbcast.STABLE"/>
      <protocol type="pbcast.GMS"/>
      <protocol type="UFC"/>
      <protocol type="MFC"/>
      <protocol type="FRAG2"/>
      <protocol type="RSVP"/>
      </stack>}}
      2. Install the Oracle ojdbc6 driver jar as
      $JBOSS_HOME/modules/system/layers/base/com/oracle/jdbc/main/ojdbc6-11.2.0.3.0.jar
      3. Add the following module.xml
      $JBOSS_HOME/modules/system/layers/base/com/oracle/jdbc/main/module.xml
      <module xmlns="urn:jboss:module:1.1" name="com.oracle.jdbc">
      <resources>
      <resource-root path="ojdbc6-11.2.0.3.0.jar"/>
      </resources>
      <dependencies>
      <module name="javax.api"/>
      <module name="javax.transaction.api"/>
      </dependencies>
      </module>
      4. Update the jgroups module to depend on the oracle jdbc driver as
      $JBOSS_HOME/modules/system/layers/base/org/jgroups/main/module.xml
      {{<module xmlns="urn:jboss:module:1.1" name="org.jgroups">
      <properties>
      <property name="jboss.api" value="unsupported"/>
      </properties>
      <resources>
      <resource-root path="jgroups-3.2.13.Final-redhat-1.jar"/>
      <!-- Insert resources here -->
      </resources>
      <dependencies>
      <module name="javax.api"/>
      <module name="org.jboss.as.clustering.jgroups"/>
      <module name="com.oracle.jbdc"/>
      </dependencies>
      </module>}}
      5. Start JBoss.

      Show
      1. Configure your standalone.xml with the following: {{<stack name="tcp-sso"> <transport type="TCP" socket-binding="jgroups-tcp-sso"/> <protocol type="JDBC_PING"> <property name="connection_driver">oracle.jdbc.OracleDriver</property> <property name="connection_url">jdbc:oracle:thin:@//ORACLEHOST:1521/SUPPORT</property> <property name="connection_username">USERNAME</property> <property name="connection_password">PASSWORD</property> <property name="initialize_sql">CREATE TABLE JGROUPSPING_SSO (own_addr varchar(200) NOT NULL, cluster_name varchar(200) NOT NULL, ping_data blob, constraint PK_JGROUPSPING_SSO PRIMARY KEY (own_addr, cluster_name))</property> <property name="insert_single_sql">INSERT INTO JGROUPSPING_SSO (own_addr, cluster_name, ping_data) values (?, ?, ?)</property> <property name="delete_single_sql">DELETE FROM JGROUPSPING_SSO WHERE own_addr=? AND cluster_name=?</property> <property name="select_all_pingdata_sql">SELECT ping_data FROM JGROUPSPING_SSO WHERE cluster_name=?</property> </protocol> <protocol type="MERGE2"/> <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd-sso"/> <protocol type="FD"/> <protocol type="VERIFY_SUSPECT"/> <protocol type="BARRIER"/> <protocol type="pbcast.NAKACK"/> <protocol type="UNICAST2"/> <protocol type="pbcast.STABLE"/> <protocol type="pbcast.GMS"/> <protocol type="UFC"/> <protocol type="MFC"/> <protocol type="FRAG2"/> <protocol type="RSVP"/> </stack>}} 2. Install the Oracle ojdbc6 driver jar as $JBOSS_HOME/modules/system/layers/base/com/oracle/jdbc/main/ojdbc6-11.2.0.3.0.jar 3. Add the following module.xml $JBOSS_HOME/modules/system/layers/base/com/oracle/jdbc/main/module.xml <module xmlns="urn:jboss:module:1.1" name="com.oracle.jdbc"> <resources> <resource-root path="ojdbc6-11.2.0.3.0.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module> 4. Update the jgroups module to depend on the oracle jdbc driver as $JBOSS_HOME/modules/system/layers/base/org/jgroups/main/module.xml {{<module xmlns="urn:jboss:module:1.1" name="org.jgroups"> <properties> <property name="jboss.api" value="unsupported"/> </properties> <resources> <resource-root path="jgroups-3.2.13.Final-redhat-1.jar"/> <!-- Insert resources here --> </resources> <dependencies> <module name="javax.api"/> <module name="org.jboss.as.clustering.jgroups"/> <module name="com.oracle.jbdc"/> </dependencies> </module>}} 5. Start JBoss.

      Trying to configure JDBC_PING with JGroups & Oracle and we are getting the following exception:
      {{2016-06-14 14:22:37,610 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool – 68) MSC000001: Failed to start service jboss.jgroups.channel.web: org.jboss.msc.service.StartException in service jboss.jgroups.channel.web: java.lang.IllegalArgumentException: JDBC Driver required for JDBC_PING Discoveryprotocol could not be loaded: 'oracle.jdbc.OracleDriver'
      at org.jboss.as.clustering.jgroups.subsystem.ChannelService.start(ChannelService.java:75)
      at org.jboss.as.clustering.msc.AsynchronousService$1.run(AsynchronousService.java:86) [jboss-as-clustering-common-7.5.5.Final-redhat-3.jar:7.5.5.Final-redhat-3]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
      at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.2.Final-redhat-1.jar:2.1.2.Final-redhat-1]
      Caused by: java.lang.IllegalArgumentException: JDBC Driver required for JDBC_PING Discoveryprotocol could not be loaded: 'oracle.jdbc.OracleDriver'
      at org.jgroups.protocols.JDBC_PING.loadDriver(JDBC_PING.java:149)
      at org.jgroups.protocols.JDBC_PING.init(JDBC_PING.java:88)
      at org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:857)
      at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:469)
      at org.jgroups.JChannel.init(JChannel.java:786)
      at org.jgroups.JChannel.<init>(JChannel.java:162)
      at org.jboss.as.clustering.jgroups.MuxChannel.<init>(MuxChannel.java:37)
      at org.jboss.as.clustering.jgroups.JChannelFactory.createChannel(JChannelFactory.java:77)
      at org.jboss.as.clustering.jgroups.subsystem.ChannelService.start(ChannelService.java:70)
      ... 5 more}}

        1. jdbc_ping-snippet-standalone.xml
          1 kB
          Mike Nau
        2. jgroups-module.xml
          0.5 kB
          Mike Nau
        3. oracle-jdbc-module.xml
          0.3 kB
          Mike Nau

              rjanik@redhat.com Richard Janik
              mike_nau_jira Mike Nau (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: