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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:33:34+00:00 2026-05-26T01:33:34+00:00

Problem: 12:03:10,126 ERROR org.hibernate.tool.hbm2ddl.SchemaExport – schema export unsuccessful org.hibernate.HibernateException: JDBC Driver class not found:

  • 0

Problem:
12:03:10,126 ERROR org.hibernate.tool.hbm2ddl.SchemaExport – schema export unsuccessful org.hibernate.HibernateException: JDBC Driver class not found: com.mysql.jdbc.Driver

I have a project divided into modules: ParentProject and ChildModule. When I try to compile pom.xml of ChildModule everything works fine, maven successfully connects to the database an creates the tables. However, when compiling from ParentProject I got error mentioned above (while executing hbm2ddl). Any ideas what is the problem?

Here are my pom.xml files:

ParentProject pom.xml:

<project ... >
<build>
        <plugins>

            <plugin>
                <!-- JDK version used to compile project -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>
                <version>2.2</version>
            </plugin>

        </plugins>
    </build>

    <repositories>
        <repository>
            <id>JBOSS</id>
            <name>JBoss Repository</name>
            <url>http://repository.jboss.org/maven2/</url>
        </repository>
        <repository>
            <id>Codehaus Snapshots</id>
            <url>http://snapshots.repository.codehaus.org/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>Codehaus Snapshots</id>
            <url>http://snapshots.repository.codehaus.org/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    <dependencyManagement>
        <dependencies>
        ...
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>../ChildModule</module>
    </modules>  
</project>

ChildModule pom.xml:

<project ... >

    <parent>
        <groupId>com.somepackage</groupId>
        <artifactId>ChildModule</artifactId>
        <version>0.1</version>
        <relativePath>../ParentProject/pom.xml</relativePath>
    </parent>

    ...

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>                
                <executions>

                    <execution>
                        <id>generate-entities</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>hbm2java</goal>
                        </goals>
                        <configuration>
                            <components>
                                <component>
                                    <name>hbm2java</name>
                                    <implementation>configuration</implementation>
                                    <outputDirectory>${generated-source-dir}</outputDirectory>
                                </component>
                            </components>
                            <componentProperties>                               
                                <configurationFile>src/main/resources/hibernate.cfg.xml</configurationFile>
                                <jdk5>true</jdk5>
                            </componentProperties>
                        </configuration>
                    </execution>

                    <execution>
                        <id>generate-schema</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>hbm2ddl</goal>
                        </goals>

                        <configuration>
                            <componentProperties>
                                <outputfilename>schema.ddl</outputfilename>
                                <drop>true</drop>
                                <ejb3>false</ejb3>
                            </componentProperties>
                        </configuration>

                    </execution>

                </executions>               
                <dependencies>
                    <dependency>
                        <groupId>mysql</groupId>
                        <artifactId>mysql-connector-java</artifactId>
                        <version>5.1.17</version>
                    </dependency>
                    <dependency>
                        <groupId>cglib</groupId>
                        <artifactId>cglib-nodep</artifactId>
                        <version>2.2.2</version>
                    </dependency>
                </dependencies>
            </plugin>

        </plugins>
    </build>


    <dependencies>

    ...

    </dependencies>

    <properties>
        <generated-source-dir>generated-sources/hibernate3</generated-source-dir>
        <generated-resource-dir>generated-resources/hibernate3</generated-resource-dir>
    </properties>

</project>
  • 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-26T01:33:34+00:00Added an answer on May 26, 2026 at 1:33 am

    Your parent’s plugin doesn’t have dependencies to mysql-connector-java, which child has. I suggest to add (or even move) this dependencies to parent’s plugin.

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

Sidebar

Related Questions

Not able to solve this problem Error : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: javax.xml.parsers.FactoryConfigurationError: Provider
I'm new in Spring Framework (2.5.6) and I have Hibernate integration problem on Glassfish
I have following problem with using cucumber and jRuby under windows: load error: bundler/definition
I have the following error but cannot workout the problem, i am READING MP3
Problem: I am having trouble implementing a recursive image lazy load in all relevant
problem I'm using LilyPond to typeset sheet music for a church choir to perform.
Problem: I am using Windows as a guest operating system in a Virtual Machine
Problem 1: my Vim makes backups with the extension ~ to my root I
Problem: to see when computer makes approximation in mathematical calculations when I use Python
Problem When working with MasterPages, a common irritation I run into is that script

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.