Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

saving clob data through hibernate

 
deepak adlakha
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have strange problem. I have one table with two columns as clob and inserting the data through hibernate. Records gets entered in the table through unit test. but in IDE, at the end of my test i get this error. Can anyone tell me why this is coming ? error says lack of priveileges...do i need to provide any special priveligies for this table ???



aused by: java.sql.BatchUpdateException: ORA-01031: insufficient privileges

at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
... 49 more



Sample code is as follows :-

try
{
getHibernateTemplate().save(employeeService);
getHibernateTemplate().flush();
getHibernateTemplate().refresh(employeeService,
LockMode.UPGRADE);

// Set the request template
Clob requestClob = employeeService.getRequestTemplate();
Writer requestDataWriter = requestClob.setCharacterStream(1);

requestDataWriter.write(requestTemplate);
requestDataWriter.close();

// Set the response template
Clob responseClob = employeeService.getResponseTemplate();
Writer responseDataWriter = responseClob.setCharacterStream(1);

responseDataWriter.write(requestTemplate);
responseDataWriter.close();

..............
.................... two more objects save through hibernate


return employeeService;
}
catch (Throwable t)
{
return null;
}

}
 
deepak adlakha
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is resolved. I firgured it out...one of the other table, i have to provide access. So this issues is resolved and closed.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic