Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:Hibernate3.0
[b]Mapping documents:
[b]Code between sessionFactory.openSession() and session.close():
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
Configuration cfg=new Configuration();
cfg.configure(new File(System.getProperties().getProperty("sun.boot.library.path")+"\\hibernate.cfg.xml"));
SessionFactory sessionFactory=cfg.buildSessionFactory();
Tb_VoucherMain tb_vm=new Tb_VoucherMain(vMain.elementAt(0).toString(),formatter.parse(vMain.elementAt(1).toString()),vMain.elementAt(2).toString(),Double.parseDouble(vMain.elementAt(3).toString()),Double.parseDouble(vMain.elementAt(4).toString()),vMain.elementAt(5).toString());
Tb_VoucherDetail tb_vd=new Tb_VoucherDetail(vDetail.elementAt(4).toString(),vDetail.elementAt(0).toString(),Double.parseDouble(vDetail.elementAt(2).toString()),Double.parseDouble(vDetail.elementAt(3).toString()));
Session session=sessionFactory.openSession();
Transaction tx=session.beginTransaction();
session.save(tb_vm);
session.save(tb_vd);
tx.commit();
session.flush();
session.close();
Full stack trace of any exception that occurs:
No Exception.
Name and version of the database you are using:
MSSQLServer
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: