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 6038665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:15:18+00:00 2026-05-23T06:15:18+00:00

I have a really strange issue when using hibernate to connect to a MySQLDB

  • 0

I have a really strange issue when using hibernate to connect to a MySQLDB and add data.

This is the error I get:

JDBC Driver class not found:
com.mysql.jdbc.Driver

This is how my hibernate.cfg.xml looks like

<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
    <session-factory>
        <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/fpa-webapp</property>
        <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
        <property name="hibernate.connection.username">root</property>
        <property name="hibernate.connection.password"></property>
        <property name="hbm2ddl.auto">update</property>
        <property name="hibernate.show_sql">true</property>
        <property name="hibernate.format_sql">true</property>
    </session-factory>
</hibernate-configuration>

I dont understand why I see a 500 Error when I navigate to the application; it says that the driver is not found.

HTTP ERROR 500

Problem accessing /fpa-webapp/.
Reason:

Exception constructing service 'ValueEncoderSource': Error invoking

service builder method
org.apache.tapestry5.services.TapestryModule.buildValueEncoderSource(Map,
InvalidationEventHub) (at
TapestryModule.java:2287) (for service
‘ValueEncoderSource’): Error invoking
service contribution method
org.apache.tapestry5.hibernate.HibernateModule.contributeValueEncoderSource(MappedConfiguration,
boolean, HibernateSessionSource,
Session, TypeCoercer, PropertyAccess,
LoggerSource): Exception constructing
service ‘HibernateSessionSource’:
Error invoking service builder method
org.apache.tapestry5.hibernate.HibernateCoreModule.buildHibernateSessionSource(Logger,
List, RegistryShutdownHub) (at
HibernateCoreModule.java:123) (for
service ‘HibernateSessionSource’):
JDBC Driver class not found:
com.mysql.jdbc.Driver

I’m sure the driver is in the class path.

What it could be?

  • 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-05-23T06:15:19+00:00Added an answer on May 23, 2026 at 6:15 am

    Your driver is not on the classpath.

    There are two ways to ensure it’s on the classpath:

    1. Add it to the global lib directory. For Tomcat this is TOMCAT_HOME/lib.
    2. Include it in the war.

    It depends on your requirements which you use.

    If you’re going to use Tomcat to manage the connection pool, you’ll need to add it to the TOMCAT_HOME/lib and instead of defining your datasource directly in the hibernate configuration, you’ll reference it via jndi.

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

Sidebar

Related Questions

This is a really strange issue. When using WebClient.DownloadFile in Debug configuration, it appears
This is a really strange issue. I have developed a small MVC application and
I have a really strange issue. I am working on a Java SWING application
This is a really strange issue, I am trying to use the Recaptcha on
I have a really strange issue in my project. I have a facebook app
I have a really strange issue. If I insert a flash video from YouTube,
I have a really strange orientation issue. I have a sequence of view controllers
I have a really strange issue relating to how I handle navigation in an
I'm having a really strange issue, I have a flowplayer video, and next to
I am currently struggling with a really really strange issue. I have a telephone

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.