ok
I am trying to restrict the field selection using data-transfer JavaBean objects (
http://www.javalobby.org/articles/hiber ... /#advanced). But getting error. Below are the details.
Thanks
gajini
--------------------------------$-----------Hibernate version:
3.1 -------
TblEvent
-------
id
title
date
titleDTO.java : temp Java Bean
-----------
title : String
Between Trans:
------------------
String qry1 = "select
new titleDTO(evt.title) from Event evt";
List result = session.createQuery("qry1").list();
Object evt = (Object)result.get(1);
S.o.p( evt.toString() );
Error
-------
Initial SessionFactory creation failed.org.hibernate.HibernateException: Errors in named queries: eventQry
java.lang.ExceptionInInitializerError
at util.HibernateUtil.<clinit>(HibernateUtil.java:17)
at events.EventManager.main(EventManager.java:22)
Caused by: org.hibernate.HibernateException: Errors in named queries: eventQry
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:339)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
at util.HibernateUtil.<clinit>(HibernateUtil.java:13)
... 1 more
Exception in thread "main"
--------------------------------$------------------------------------