Hi all,
I am using Hibernate 3, weblogic 8.1
my transaction code is
Session session = instance.sessionFactory.openSession();
Transaction tx = session.beginTransaction();
String newName="Jhon";
String oldName="Peter";
String hqlUpdate = "update Emp set ename = :newName where ename = :oldName and dept_id=8002";
int updatedEntities = session.createQuery( hqlUpdate )
.setString( "newName", newName )
.setString( "oldName", oldName )
.executeUpdate();
tx.commit();
session.close();
When i am using this from main() function it is working fine.
I am throwing an error when i use this code in weblogic server
My error is
Hibernate Exceptionorg.hibernate.QueryException: query must begin with SELECT or FROM:
|