exception - Grails java.sql.BatchUpdateException error using Hibernate/GORM -


i'm using gorm create domain classes plugin use across multiple grails 2.2.3 applications. reason, when add getter student domain class batchupdateexception telling me don't have sufficient privileges update.

edit: note using ojdbc6-11.2.0.1.0 driver oracle 11g database.

here student class:

class student {      string sid     string firstname     string lastname     string middleinitial     string email     string ssn      static mapping = {         // mappings , such     } } 

i adding getter "sanitize" middle initial value receive database on chance null:

string getmiddleinitial() {     return this.middleinitial ?: "" } 

after adding line, navigate /$app_name/student/list url , following error/stack trace:

error 500: internal server error  uri /appname/employee/list class java.sql.batchupdateexception message ora-01031: insufficient privileges trace     line | method ->> 895 | runtask in java.util.concurrent.threadpoolexecutor$worker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  |   918 | run     in     '' ^   680 | run . . in java.lang.thread  caused sqlgrammarexception: not execute jdbc batch update ->> 895 | runtask in java.util.concurrent.threadpoolexecutor$worker - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  |   918 | run     in     '' ^   680 | run . . in java.lang.thread  caused batchupdateexception: ora-01031: insufficient privileges  ->> 10070 | executebatch in oracle.jdbc.driver.oraclepreparedstatement - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  |   213 | executebatch in oracle.jdbc.driver.oraclestatementwrapper |   297 | executebatch in org.apache.commons.dbcp.delegatingstatement |   895 | runtask in java.util.concurrent.threadpoolexecutor$worker |   918 | run . . in     '' ^   680 | run     in java.lang.thread 

after removing getter, listing of students in database works fine. doesn't make sense me, because isn't i'm trying update or save object database. can explain going on , how can fix it?

check if have dbcreate set update or create in datasource.groovy?

if present, remove or comment out entry.

//dbcreate = 'update' //or use below dbcreate = 'none' 

Comments