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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:30:06+00:00 2026-06-04T18:30:06+00:00

I try to generate a schema.ddl from the entity-pojos using Hibernate 4.1 . Hibernate-Libraries

  • 0

I try to generate a schema.ddl from the entity-pojos using Hibernate 4.1.
Hibernate-Libraries including javaee-api-6.0.jar are in WEB-INF/lib. (Project runs on JBoss 7.1.1).
I dont want to use hibernate.hbm2ddl.auto for automatic schema generation.
So I have the following ant-target:

<!-- language: xml -->

<target name="ddl-generation"
    description="Export schema to DDL file">

    <taskdef name="schemaexport" 
            classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
        <classpath>
            <fileset dir="WebContent/WEB-INF/lib">
                <include name="*.jar" />
            </fileset>
        </classpath>
    </taskdef>

    <schemaexport
        properties="${basedir}/src/META-INF/hibernate.properties" 
        quiet="no"
        text="no"
        drop="no"
        delimiter=";"
        output="${basedir}/schema-export.sql" />

</target>

But when I execute it, it fails with following error:

java.lang.ClassNotFoundException: org.jboss.logging.BasicLogger
    at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1361)
    at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1311)
    at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1064)

I can copy jboss-logging-3.1.0.GA.jar to the classpath of the ant-target, but then it fails, because javaee-api-6.0.jar is only for compiling:

java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/transaction/SystemException
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

What can I do to solve this?
Copy all Jboss-Jars?!
How does anyone generate a DDL from JPA-Pojos with Hibernate 4?
It seems to work better with Hibernate3.

  • 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-04T18:30:07+00:00Added an answer on June 4, 2026 at 6:30 pm

    You may find this blog post useful http://doingenterprise.blogspot.com/2012/05/schema-generation-with-hibernate-4-jpa.html It describes the process of generating ddl script from JPA 2.0 entities. Though it uses Maven as an example it can be easily adopted to Ant as it just runs a class with a main method. You just need to get the right dependencies. This list should hopefully cover all of them:

    • hibernate-entitymanager-4.1.3.Final.jar
    • jboss-logging-3.1.0.GA.jar
    • jboss-transaction-api_1.1_spec-1.0.0.Final.jar
    • dom4j-1.6.1.jar
    • hibernate-jpa-2.0-api-1.0.1.Final.jar
    • javassist-3.15.0-GA.jar
    • hibernate-core-4.1.3.Final.jar
    • antlr-2.7.7.jar
    • hibernate-commons-annotations-4.0.1.Final.jar
    • persistence-api-1.0.jar
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to debug a javascript function called from Generate Thumbnails plugin in Wordpress.
I am trying to reverse engineer pojos (using hibernate tools plugin v3.2.4x in eclipse
Using Xerces C++ I generated the typical C++ code from the below schema. Upon
So I parsed a bunch of XMLs to generate a giant schema file using
I can invoke and test web service but when i try to generate proxy
I can invoke and test web service but when i try to generate proxy
I have created a repository that is returning data from my database using Entity
I use JAXB to generate Java classes from XML schema. Now I want to
I try to generate a csv file through a lot of functions like that
I try to generate title in all levels of the officers but I get

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.