After upgrading APM 9.60 unable to connect Oracle Database

Hi Experts,

Recently we have upgraded our QA APM from 9.51 to 9.60. Upgrade went fine but after upgrading when we run the upgrade_wizard_run_from951 and trying to connect to the Oracle Database it's giving us the below error. 

Kindly suggest.

Error: Caused by: java.sql.SQLException: No suitable driver found for jdbc:mercury:oracle:TNSNamesFile=D:\HPBSM\conf\tnsnames.ora;TNSServerName=name
at java.sql.DriverManager.getConnection(DriverManager.java:689) ~[?:1.8.0_372]
at java.sql.DriverManager.getConnection(DriverManager.java:208) ~[?:1.8.0_372]
at com.mercury.infra.utils.db.pools.ConnectionFactory.createConnection(ConnectionFactory.java:464) ~[connpool.jar:?]
at com.mercury.infra.utils.db.pools.ConnectionManager.getPrivateConnection(ConnectionManager.java:232) ~[connpool.jar:?]
at com.mercury.infra.db.operations.GenericDatabaseConnectorImpl.connectDatabase(GenericDatabaseConnectorImpl.java:22) ~[dbcore.jar:?]
at com.mercury.infra.configserver.fm.tasks.CheckDbConnectionTask.execute(CheckDbConnectionTask.java:32) ~[configserver.jar:?]
at com.mercury.infra.flowmngr.model.JavaTask.execute(JavaTask.java:80) ~[flowmanager.jar:?]
... 10 more

OS: Windows Server 2016

APM: 9.60

Regards,

Pranav R N

Parents
  • 0  

    I assume you are trying to connect to Oracle RAC.

    did you check the tnsnames.ora file? after upgrade you need to manually restore it....

  • 0 in reply to   

    Hi Asaf,

    Thanks for the reply.

    Yes we restored the tnsnames.ora file also we restored jdbc.properties file as well.

    Regards,

    Pranav R N

  • Verified Answer

    +1 in reply to 

    Hi Pravan,

    as you never posted that the issue has been resolved I thought I'll give it a shot:

    there was a change from APM 9.51 to APM 9.60

    9.5x
    ====
    <HPBSM>\conf\jdbc.drivers.properties

    ddoracle.class=com.mercury.jdbc.oracle.OracleDriver
    ddoracle.url=jdbc:mercury:oracle:TNSNamesFile=E:\\HPBSM\\conf\\bsm-tnsnames.ora;TNSServerName=${sid}

    <HPBSM>\conf\\bsm-tnsnames.ora
    TOPAZI =(DESCRIPTION =(ADDRESS =(PROTOCOL = TCP)(Host = myhost.mydomain.mycom)(Port = 1234))
    (CONNECT_DATA =(SERVICE_NAME = APM)(SERVER = DEDICATED)))

    <HPBSM>\odb\conf\jdbc.properties

    Oracle = ddoracle
    cmdb.url =jdbc:mercury:oracle:TNSNamesFile=E:\\HPBSM\\conf\\bsm-tnsnames.ora;TNSServerName=APM


    9.60
    ====
    - mcoracle.jar no longer exists in folder <HPBSM>\lib
    thus the path has to be changed
    from for example
    ddoracle.class=com.mercury.jdbc.oracle.OracleDriver
    to for example
    ddoracle.class=oracle.jdbc.driver.OracleDriver

    Also the file TNSNamesFile is no longer being used, the data is now passed directly via ddoracle.url

    OOTB
    <HPBSM>\conf\jdbc.drivers.properties

    old
    ddoracle.url=jdbc:oracle:thin:@${host}:${port}:${sid}

    new
    ddoracle.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost.mydomain.mycom)(PORT=1234))(LOAD_BALANCE=off)(FAILOVER=off))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=APM)))

    also you need to perform the similar steps for ODB / RTSM:

    <HPBSM>\odb\conf\jdbc.properties
    doesn't exist on a new APM 9.60 installation, you hopefully can copy if it from your still around 9.51 installation and then modify it:

    old

    Oracle = ddoracle
    cmdb.url =jdbc:mercury:oracle:TNSNamesFile=E:\\HPBSM\\conf\\bsm-tnsnames.ora;TNSServerName=APM

    new
    Oracle = ddoracle
    cmdb.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost.mydomain.mycom)(PORT=1234))(LOAD_BALANCE=off)(FAILOVER=off))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=APM)))

    Greetings
    Siggi

    P.S. The kudos go to ChristianD who disovered this ;-)-

Reply
  • Verified Answer

    +1 in reply to 

    Hi Pravan,

    as you never posted that the issue has been resolved I thought I'll give it a shot:

    there was a change from APM 9.51 to APM 9.60

    9.5x
    ====
    <HPBSM>\conf\jdbc.drivers.properties

    ddoracle.class=com.mercury.jdbc.oracle.OracleDriver
    ddoracle.url=jdbc:mercury:oracle:TNSNamesFile=E:\\HPBSM\\conf\\bsm-tnsnames.ora;TNSServerName=${sid}

    <HPBSM>\conf\\bsm-tnsnames.ora
    TOPAZI =(DESCRIPTION =(ADDRESS =(PROTOCOL = TCP)(Host = myhost.mydomain.mycom)(Port = 1234))
    (CONNECT_DATA =(SERVICE_NAME = APM)(SERVER = DEDICATED)))

    <HPBSM>\odb\conf\jdbc.properties

    Oracle = ddoracle
    cmdb.url =jdbc:mercury:oracle:TNSNamesFile=E:\\HPBSM\\conf\\bsm-tnsnames.ora;TNSServerName=APM


    9.60
    ====
    - mcoracle.jar no longer exists in folder <HPBSM>\lib
    thus the path has to be changed
    from for example
    ddoracle.class=com.mercury.jdbc.oracle.OracleDriver
    to for example
    ddoracle.class=oracle.jdbc.driver.OracleDriver

    Also the file TNSNamesFile is no longer being used, the data is now passed directly via ddoracle.url

    OOTB
    <HPBSM>\conf\jdbc.drivers.properties

    old
    ddoracle.url=jdbc:oracle:thin:@${host}:${port}:${sid}

    new
    ddoracle.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost.mydomain.mycom)(PORT=1234))(LOAD_BALANCE=off)(FAILOVER=off))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=APM)))

    also you need to perform the similar steps for ODB / RTSM:

    <HPBSM>\odb\conf\jdbc.properties
    doesn't exist on a new APM 9.60 installation, you hopefully can copy if it from your still around 9.51 installation and then modify it:

    old

    Oracle = ddoracle
    cmdb.url =jdbc:mercury:oracle:TNSNamesFile=E:\\HPBSM\\conf\\bsm-tnsnames.ora;TNSServerName=APM

    new
    Oracle = ddoracle
    cmdb.url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost.mydomain.mycom)(PORT=1234))(LOAD_BALANCE=off)(FAILOVER=off))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=APM)))

    Greetings
    Siggi

    P.S. The kudos go to ChristianD who disovered this ;-)-

Children
  • 0 in reply to 

    Hi Siggi,

    Sorry for the delay in the response as I was on vacation.

    Thanks a lot for the steps and It worked.

    But unfortunately after moved the database section steps and when we are in the password section step if I provide the correct admin, JMX and RTSM password it's not updating and giving the below error. Do you have any Idea

    com.mercury.infra.flowmngr.exceptions.JavaTaskInstantiationException: Failed to instantiate java task com.hp.bsm.platform.security.crypt.LoginSecurityTask
          at com.mercury.infra.flowmngr.model.JavaTask.execute(JavaTask.java:90)
          at com.mercury.infra.flowmngr.model.Step.executeStep(Step.java:83)
          at com.mercury.infra.flowmngr.FlowManager.run(FlowManager.java:206)
          at com.mercury.infra.wizard.WizardController$FlowManagerRunner.doInBackground(WizardController.java:87)
          at com.hp.acm.swing.executor.SwingJob$SwingJobWorker.doInBackground(SwingJob.java:319)
          at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at javax.swing.SwingWorker.run(SwingWorker.java:334)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:750)
    Caused by: java.lang.Exception: Failed to change the password for admin user
          at com.hp.bsm.platform.security.crypt.LoginSecurityTask.execute(LoginSecurityTask.java:28)
          at com.mercury.infra.flowmngr.model.JavaTask.execute(JavaTask.java:80)
          ... 10 more
    Regards,
    Pranav R N