Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to oracle database

manohar chunchu February 21, 2024

i am using to connect to my oracle db. , i downloaded ojdbc jar and placed in my lib path C:\Program Files\Atlassian\Jira\lib and restarted server in script runner console

i written a script like

def oracleDataSource = [
        url: connectionString,
        user: username,
        password: password,
        driver: driver
    ]
assume driver is 
 def driver = 'oracle.jdbc.driver.OracleDriver'
  
   def connectionString = "jdbc:oracle:thin:@${hostname}:${port}:${service_name}"
    log.warn(oracleDataSource.toString())
    try {
        // Initialize the Sql object with the Oracle connection parameters
         def sql = Sql.newInstance(oracleDataSource.url.toString(),
                                    oracleDataSource.user.toString(),
                                     oracleDataSource.password.toString(),
                                     oracleDataSource.driver.toString())

i am getting error Failed to connect to Oracle database: oracle.jdbc.driver.OracleDriver not found by com.onresolve.jira.groovy.groovyrunner [189]

 

What i am missing?

1 answer

0 votes
Pramodh M
Community Champion
February 21, 2024

Hi @manohar chunchu 

Ensure you have provided the proper schema name in the connection string and also to download the driver and place it the lib directory in installation folder.

https://confluence.atlassian.com/adminjiraserver/connecting-jira-applications-to-oracle-938846856.html

Thanks 

manohar chunchu February 21, 2024

i don't want to change default db. , i just want to connect to external db for a specific task using script runner

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.14
TAGS
AUG Leaders

Atlassian Community Events