String Index Out of Range

Issue:

The “String index out of range” error message was logged in NexOSS-Archive-RatedCDR-Table.log.

Log message:

2017-06-16 15:00:11|ToArchivedRatedCDR.TableArchive|INFO   |Connecting to the External Billing Database
2017-06-16 15:00:11|ToArchivedRatedCDR.TableArchive|INFO   |Connecting to jdbc:oracle:thin:@10.102.35.216:3306:rndcdr as nexoss
2017-06-16 15:00:12|ToArchivedRatedCDR.TableArchive|ERROR  |String index out of range: 29740
java.lang.StringIndexOutOfBoundsException: String index out of range: 29740
        at java.lang.String.checkBounds(String.java:385)
        at java.lang.String.<init>(String.java:324)
        at oracle.net.ns.Packet.extractData(Packet.java:447)
        at oracle.net.ns.RefusePacket.<init>(RefusePacket.java:70)
        at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:239)
        at oracle.net.ns.NSProtocol.connect(NSProtocol.java:264)
        at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
        at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at com.transnexus.Mediation.getConnection(Mediation.java:749)
        at com.transnexus.Mediation.goMediate(Mediation.java:329)
        at com.transnexus.TableArchiveApplication.main(TableArchiveApplication.java:22)

Troubleshoot:

This is the ERROR that get generated if the ExternalBilling section of NexOSS.etc is setup for Oracle when the database is actually MySQL.

  • Incorrect:
   InternalBillingTableName=RATEDCDR
   ExternalBillingTableName=ARCHIVEDRATEDCDR
   ExternalBillingJDBCDriver=oracle.jdbc.driver.OracleDriver
   ExternalBillingDBConnectURL=jdbc:oracle:thin:@10.102.32.216:3306:rndcdr
   ExternalBillingDBUser=nexoss
   ExternalBillingDBPassword=ark0ss
  • Correct:
   InternalBillingTableName=RATEDCDR
   ExternalBillingTableName=ARCHIVEDRATEDCDR
   ExternalBillingJDBCDriver=com.mysql.jdbc.Driver
   ExternalBillingDBConnectURL=jdbc:mysql://10.102.35.216/rndcdr
   ExternalBillingDBUser=nexoss
   ExternalBillingDBPassword=ark0ss