[hibernate-dev] Invoking hbm2java without using Ant

Lakshmana Pamarthy pamarthy at yahoo.com
Wed May 14 02:17:19 EDT 2008


Hi,

Wondering if you can help me here.

I have a hibernate.reveng.xml file which contains some tables. I want to
generate mappings and POJOs for those tables that are in the reveng.xml file
without using Ant.

Here is how my code looks like:

String fileName = "hibernate.reveng.xml";
JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration();
cfg.configure();
OverrideRepository or = new OverrideRepository();
or.addResource(fileName);
cfg.setReverseEngineeringStrategy(or.getReverseEngineeringStrategy(new
DefaultReverseEngineeringStrategy()));

But I am getting java.lang.ExceptionInInitializerError at
JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration();

Any idea why I am getting an error there ?

Thanks





      



More information about the hibernate-dev mailing list