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

  • Home
  • SEARCH
  • 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 68685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:27:18+00:00 2026-05-10T19:27:18+00:00

I am new to creating Java web applications and came across this problem when

  • 0

I am new to creating Java web applications and came across this problem when trying to interact with my database (called ccdb) through my application:

java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/ccdb/

My application runs on JBoss and uses Hibernate to interact with the MySQL database. I have the MySQL Driver in lib\mysql-connector-java-5.1.6-bin.jar of my project and I have the .jar configured in Eclipse as a ‘Java EE Module Dependency’ so that it gets copied over to web-inf\lib\ when I deploy it to JBoss through Eclipse. I double checked and the driver is definitely in the .war file with the project, so it should be findable, right?

My hibernate.cfg.xml contains this line which should point hibernate to the driver.

<property name='hibernate.connection.driver_class'>com.mysql.jdbc.Driver</property>

Does anyone know what I need to do to get this to work? Do I have to configure the MySQL database as a JBoss datasource for it to work?

Thanks in advance.

Edit: kauppi’s solution works, but I would prefer to have it in lib\ with the other jars, and I’m really curious as to why it won’t work that way. Any ideas…?

  • 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. 2026-05-10T19:27:19+00:00Added an answer on May 10, 2026 at 7:27 pm

    There might be a better way to do it but I have usually copied the MySQL connector JAR to jboss\server\default\lib (assuming that you are using the default config).

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

Sidebar

Ask A Question

Stats

  • Questions 70k
  • Answers 70k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer There's no practical difference in terms of what you can… May 11, 2026 at 12:57 pm
  • added an answer Okay, my first question is 'good God, why?' How can… May 11, 2026 at 12:57 pm
  • added an answer Perhaps the simplest way to refactor this is to change… May 11, 2026 at 12:57 pm

Related Questions

I am new to Documentum. I am creating a stand alone java application that
Call me a 'n00b', but I am new to creating Script Controls. I want
I am very new to creating webservers - and I have had several goes
I am creating a new build process for a DotNet project which is to
What is the best way to manage a database connection in a Java servlet?
I've been using the Java Service wrapper in a custom application for quite a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.