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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:53:19+00:00 2026-06-09T13:53:19+00:00

We have a project which uses the standalone Hibernate Tools Ant task to build

  • 0

We have a project which uses the standalone Hibernate Tools Ant task to build the hbm.xml files and POJOs. We only run the Ant task, which has its own build.xml file, when we need to add or update POJOs, not every time we build the project.

Someone else updated the project and now the Ant task (which hasn’t changed) can’t parse the build file (which also hasn’t changed). I have no way of knowing what the change was or how long this hasn’t been working, so I’m asking the community to help me diagnose it. Here’s the message:

build.xml:34: org.hibernate.HibernateException: Could not parse configuration: src\main\config\hibernate\datawhse.reveng.cfg.xml
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1494)
        at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
        at org.hibernate.tool.ant.ConfigurationTask.doConfiguration(ConfigurationTask.java:96)
        at org.hibernate.tool.ant.JDBCConfigurationTask.doConfiguration(JDBCConfigurationTask.java:50)
        at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
        at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302)
        at org.hibernate.tool.ant.HibernateToolTask.getProperties(HibernateToolTask.java:318)
        at org.hibernate.tool.ant.ExporterTask.configureExporter(ExporterTask.java:94)
        at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
        at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:392)
        at org.apache.tools.ant.Target.performTasks(Target.java:413)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:811)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: org.dom4j.DocumentException: Connection refused: connect Nested exception: Connection refused: connect
        at org.dom4j.io.SAXReader.read(SAXReader.java:484)
        at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1484)
        ... 26 more

Here’s the configuration file that it can’t parse:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
    PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
    <property name="show_sql">false</property>
    <property name="hibernate.connection.pool_size">0</property>
    <property name="connection.url">jdbc:as400://system;libraries=XXX YYY ZZZ;dateformat=iso;timeformat=iso;prompt=false;naming=system;transaction isolation=none</property>
    <property name="connection.driver_class">com.ibm.as400.access.AS400JDBCDriver</property>
    <property name="connection.username">username</property>
    <property name="connection.password">password</property>
    <property name="dialect">org.hibernate.dialect.DB2Dialect</property>
</session-factory>
</hibernate-configuration>
  • 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-09T13:53:20+00:00Added an answer on June 9, 2026 at 1:53 pm

    This seems to be the answer: The reveng.xml and reveng.cfg.xml files were updated by one of our resident geniuses, replacing the working XML DTD definition with one that was mis-matched with the Hibernate jars installed in the project. Here is the one that was working for the reveng.cfg.xml file:

    <!DOCTYPE hibernate-configuration
    PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

    Here is the one that was working for the reveng.xml file:

    <!DOCTYPE hibernate-reverse-engineering SYSTEM
    "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd">

    Here are the ones that were broken and did not work:

    <!DOCTYPE hibernate-configuration
    PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

    <!DOCTYPE hibernate-reverse-engineering SYSTEM
    "http://www.hibernate.org/dtd/hibernate-reverse-engineering-3.0.dtd">

    This was for Hibernate reverse engineering 3.3.1 jars.

    I hope this helps somebody!

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

Sidebar

Related Questions

I have a maven project A which uses jar files of another project B
I have a project which I am building with Maven which uses Hibernate (and
I have downloaded a project which uses sbt as its build system and I
We have project which uses gcc and make files. Project also contains of one
I have a project which uses groovy 1.7.5 and grails 1.3.4. but my new
I have a project which uses php's mt_rand() to generate different random integers but
I have a project which uses a large library residing in its own repository.
I have a C# project A which uses a .net wrapper DLL and a
I have a Visual Studio project which uses nmake to call a Python file
For my Java project which uses Maven I have added Twitters Bootstrap lately to

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.