Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9186149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:27:12+00:00 2026-06-17T19:27:12+00:00

I want to connect to the oracle DB using Play Framework 1.2.5. FOr this

  • 0

I want to connect to the oracle DB using Play Framework 1.2.5. FOr this I have modified the application.conf file as follows:

 db.url=jdbc:oracle:thin:@localhost:1521/orcl
 db.driver=oracle.jdbc.OracleDriver
 db.user=system
 db.pass=tiger

Then I tried to add the driver i.e. classes12.jar/odbc5.jar but everytime when i try to run it, I am getting the exception:

Cannot connect to the database, Driver not found

For adding the jar file in Eclipse IDE, below are the steps I tried:

1) Added it in the lib folder (present under the root directory of my new application) and then added it to the java build path

2) Added it in the framework/lib folder (inside the downloaded framework folder) and then added it to the java build path

In both the cases, I am getting the above mentioned exception.

Also, Please list down the steps for connection to an oracle db, I am not able to find it anywhere in the documentation

EDIT

I am able to add the jar in the classpath, everything was fine except that I did not restarted the server once it failed to connect the jar.

I did this code for fetching some data from the database:

Connection conn = DB.getConnection();
    PreparedStatement  stmt = null;
    System.out.println(conn);
    try {
        stmt = conn.prepareStatement("select dept_id from emp where emp_id = 11");
        ResultSet rs = stmt.executeQuery();
        while (rs.next()) {
            System.out.println("Dept Id: " + rs.getInt("dept_id"));
        }
    } catch (SQLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

This approach is working but I am having a confusion:

If I comment the entire block of code and run the application then I can see the message in the console stating the connection is made to the DB. Hence :

1) Is the above block of code the right approach to fetch the data from Oracle DB or something better than this is present?

2) Is it like for the entire application lifetime, the connection with tht DB will persist?

I am a newbie in this, hence struggling 🙁

Please let me know hoe to proceed with this.

Regards

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:27:13+00:00Added an answer on June 17, 2026 at 7:27 pm

    Oracle db driver class name is oracle.jdbc.driver.OracleDriver

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed Oracle 10G XE. I want to connect to it using JDBC
I have an application that's using Oracle.DataAccess to connect. I've already discovered that the
I want to connect my rails 3 application to firebird database. I have followed
Well, the problem is as follows: I have a WPF Application built using the
I am doing multimedia application. my issue is i want to connect oracle database
I need to connect to oracle from my .Net application. I'm thinking of using
I am using SSIS to connect to ORACLE database and i want to view
Im using sun.jdbc.odbc.JdbcOdbcDriver to connect to an oracle database.I know I would be probably
I want to connect to oracle database using C language in Windows OS. But
I have an SQL file which I want to parse and execute in oracle

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.