Hibernate 2.0
I tried to use hibernate to insert student record into Oracle9i.
Looking at the Log, it seems like it works okay right before excuting insert statement. When the insert statement is excuted, the error occured.
It is so weird.. somtimes, it inserted record, but it doesnt insert all the time.
Please help me, I was trying to find where the error was occured.
But my conclusion is that hibernateTemplate() has some bugs?
I dont know.
-------------------------------------------------------------------------------
public class StudentDAOHibernate extends HibernateDaoSupport implements StudentDAO {
public List getStudents() {
return getHibernateTemplate().find("from Student s where s.username is not null and s.password is not null and s.salutation is not null");
}
public Student getStudent(Long id) {
Student student = (Student) getHibernateTemplate().get(Student.class, id);
if (student == null) {
throw new ObjectRetrievalFailureException(Student.class, id);
}
return student;
}
public void saveUpdateStudent(Student student){
try {
HibernateTemplate ht = getHibernateTemplate();
ht.update(student);
ht.flush();
}
catch ( DataIntegrityViolationException e ) {
// Translate into our own exception
throw new UnhandledException("DataIntergrityViolationException", e);
}
// getHibernateTemplate().saveOrUpdate(student);
if (logger.isDebugEnabled()) {
logger.debug("studentId set to: " + student.getFirstName());
}
}
public void saveStudent(Student student) {
if (logger.isDebugEnabled()) {
logger.debug("studentId set to: " + student.getId()+student.getCampaigns()+student.getDayPhone()
+student.getEmail()+student.getFirstName()+student.getGender()
+student.getHowHear()+student.getLastName()+student.getNotes1()
+student.getPassword()+student.getSalutation()+student.getUniv()
+student.getUniv()+student.getUnivAssoc()+student.getUnivProvince()
+student.getCampaignAccess()+student.getCreationDate()
+student.getDemographics()+student.getEditDate()+student.getGrade()
+student.getProCtlno()+student.getYearBirth());
}
HibernateTemplate ht = getHibernateTemplate();
ht.save(student);
ht.flush();
if (logger.isDebugEnabled()) {
logger.debug("studentId set to: " + student.getId()+student.getCampaigns()+student.getDayPhone()
+student.getEmail()+student.getFirstName()+student.getGender()
+student.getHowHear()+student.getLastName()+student.getNotes1()
+student.getPassword()+student.getSalutation()+student.getUniv()
+student.getUniv()+student.getUnivAssoc()+student.getUnivProvince()
+student.getCampaignAccess()+student.getCreationDate()
+student.getDemographics()+student.getEditDate()+student.getGrade()
+student.getProCtlno()+student.getYearBirth());
}
}
public void removeStudent(Long id) {
getHibernateTemplate().delete(getStudent(id));
}
}
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1
http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->
<class
name="org.alllearn.model.Student"
table="STUDENT"
dynamic-insert="true"
dynamic-update="true"
>
<id
name="id"
type="java.lang.Long"
column="ID"
>
<generator class="sequence">
<param name="sequence">SEQ_STUDENT</param>
</generator>
</id>
<property
name="username"
type="java.lang.String"
column="USERNAME"
unique="true"
length="128"
/>
<property
name="password"
type="java.lang.String"
column="PASSWORD"
length="128"
/>
<property
name="salutation"
type="java.lang.String"
column="SALUTATION"
length="64"
/>
<property
name="firstName"
type="java.lang.String"
column="FIRST_NAME"
length="64"
/>
<property
name="lastName"
type="java.lang.String"
column="LAST_NAME"
length="64"
/>
<property
name="email"
type="java.lang.String"
column="EMAIL"
length="128"
/>
<property
name="univ"
type="java.lang.String"
column="UNIV"
length="40"
/>
<property
name="univAssoc"
type="java.lang.String"
column="UNIV_ASSOC"
length="16"
/>
<property
name="demographics"
type="java.lang.Long"
column="DEMOGRAPHICS"
length="10"
/>
<property
name="dayPhone"
type="java.lang.String"
column="DAY_PHONE"
length="64"
/>
<property
name="evePhone"
type="java.lang.String"
column="EVE_PHONE"
length="64"
/>
<property
name="creationDate"
type="java.sql.Date"
column="CREATION_DATE"
/>
<property
name="editDate"
type="java.sql.Date"
column="EDIT_DATE"
/>
<property
name="proCtlno"
type="java.lang.Long"
column="PRO_CTLNO"
length="10"
/>
<property
name="notes1"
type="java.lang.String"
column="NOTES1"
length="256"
/>
<property
name="campaignAccess"
type="java.lang.Long"
column="CAMPAIGN_ACCESS"
length="10"
/>
<property
name="campaigns"
type="java.lang.String"
column="CAMPAIGNS"
length="128"
/>
<property
name="grade"
type="java.lang.Long"
column="GRADE"
length="10"
/>
<property
name="univProvince"
type="java.lang.String"
column="UNIV_PROVINCE"
length="32"
/>
<property
name="yearBirth"
type="java.lang.Long"
column="YEAR_BIRTH"
length="10"
/>
<property
name="gender"
type="java.lang.String"
column="GENDER"
length="1"
/>
<property
name="howHear"
type="java.lang.String"
column="HOW_HEAR"
length="16"
/>
<!-- Associations -->
<!-- bi-directional many-to-one association to Address -->
<many-to-one
name="addressByBillingAddressId"
class="org.alllearn.model.Address"
not-null="true"
>
<column name="BILLING_ADDRESS_ID" />
</many-to-one>
<!-- bi-directional many-to-one association to Address -->
<many-to-one
name="addressByShippingAddressId"
class="org.alllearn.model.Address"
not-null="true"
>
<column name="SHIPPING_ADDRESS_ID" />
</many-to-one>
<!-- bi-directional many-to-one association to CreditCard -->
<many-to-one
name="creditCard"
class="org.alllearn.model.CreditCard"
not-null="true"
>
<column name="CREDIT_CARD_ID" />
</many-to-one>
<!-- bi-directional one-to-many association to Enrollment -->
<set
name="enrollments"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="STUDENT_ID" />
</key>
<one-to-many
class="org.alllearn.model.Enrollment"
/>
</set>
</class>
</hibernate-mapping>
public class Student extends BaseObject {
/**
* Comment for <code>serialVersionUID</code>
*/
private static final long serialVersionUID = 3257009839078061876L;
/** identifier field */
private Long id;
/** nullable persistent field */
private String username;
/** nullable persistent field */
private String password;
/** nullable persistent field */
private String salutation;
/** nullable persistent field */
private String firstName;
/** nullable persistent field */
private String lastName;
/** nullable persistent field */
private String email;
/** nullable persistent field */
private String univ;
/** nullable persistent field */
private String univAssoc;
/** nullable persistent field */
private Long demographics;
/** nullable persistent field */
private String dayPhone;
/** nullable persistent field */
private String evePhone;
/** nullable persistent field */
private Date creationDate;
/** nullable persistent field */
private Date editDate;
/** nullable persistent field */
private Long proCtlno;
/** nullable persistent field */
private String notes1;
/** nullable persistent field */
private Long campaignAccess;
/** nullable persistent field */
private String campaigns;
/** nullable persistent field */
private Long grade;
/** nullable persistent field */
private String univProvince;
/** nullable persistent field */
private Long yearBirth;
/** nullable persistent field */
private String gender;
/** nullable persistent field */
private String howHear;
/** persistent field */
private CreditCard creditCard;
/** persistent field */
private Address addressByBillingAddressId;
/** persistent field */
private Address addressByShippingAddressId;
/** persistent field */
private Set enrollments;
/** default constructor */
public Student() {
}
/** minimal constructor */
public Student(Long id,Address addressByBillingAddressId, Address addressByShippingAddressId, CreditCard creditCard, Set enrollments) {
this.id = id;
this.addressByBillingAddressId = addressByBillingAddressId;
this.addressByShippingAddressId = addressByShippingAddressId;
this.creditCard = creditCard;
this.enrollments = enrollments;
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public String getSalutation() {
return this.salutation;
}
public void setSalutation(String salutation) {
this.salutation = salutation;
}
public String getFirstName() {
return this.firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return this.lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
public String getUniv() {
return this.univ;
}
public void setUniv(String univ) {
this.univ = univ;
}
public String getUnivAssoc() {
return this.univAssoc;
}
public void setUnivAssoc(String univAssoc) {
this.univAssoc = univAssoc;
}
public Long getDemographics() {
return this.demographics;
}
public void setDemographics(Long demographics) {
this.demographics = demographics;
}
public String getDayPhone() {
return this.dayPhone;
}
public void setDayPhone(String dayPhone) {
this.dayPhone = dayPhone;
}
public String getEvePhone() {
return this.evePhone;
}
public void setEvePhone(String evePhone) {
this.evePhone = evePhone;
}
public Date getCreationDate() {
return this.creationDate;
}
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
public Date getEditDate() {
return this.editDate;
}
public void setEditDate(Date editDate) {
this.editDate = editDate;
}
public Long getProCtlno() {
return this.proCtlno;
}
public void setProCtlno(Long proCtlno) {
this.proCtlno = proCtlno;
}
public String getNotes1() {
return this.notes1;
}
public void setNotes1(String notes1) {
this.notes1 = notes1;
}
public Long getCampaignAccess() {
return this.campaignAccess;
}
public void setCampaignAccess(Long campaignAccess) {
this.campaignAccess = campaignAccess;
}
public String getCampaigns() {
return this.campaigns;
}
public void setCampaigns(String campaigns) {
this.campaigns = campaigns;
}
public Long getGrade() {
return this.grade;
}
public void setGrade(Long grade) {
this.grade = grade;
}
public String getUnivProvince() {
return this.univProvince;
}
public void setUnivProvince(String univProvince) {
this.univProvince = univProvince;
}
public Long getYearBirth() {
return this.yearBirth;
}
public void setYearBirth(Long yearBirth) {
this.yearBirth = yearBirth;
}
public String getGender() {
return this.gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getHowHear() {
return this.howHear;
}
public void setHowHear(String howHear) {
this.howHear = howHear;
}
public Address getAddressByBillingAddressId(){
return this.addressByBillingAddressId;
}
public void setAddressByBillingAddressId(Address addressByBillingAddressId){
this.addressByBillingAddressId = addressByBillingAddressId;
}
public Address getAddressByShippingAddressId(){
return this.addressByShippingAddressId;
}
public void setAddressByShippingAddressId(Address addressByShippingAddressId){
this.addressByShippingAddressId = addressByShippingAddressId;
}
public CreditCard getCreditCard(){
return this.creditCard;
}
public void setCreditCard(CreditCard creditCard){
this.creditCard = creditCard;
}
public Set getEnrollments() {
return this.enrollments;
}
public void setEnrollments(Set enrollments) {
this.enrollments = enrollments;
}
/**
* @see java.lang.Object#equals(Object)
*/
public boolean equals(Object object) {
if (!(object instanceof Student)) {
return false;
}
Student rhs = (Student) object;
return new EqualsBuilder().append(
this.proCtlno, rhs.proCtlno).append(
this.addressByBillingAddressId, rhs.addressByBillingAddressId)
.append(this.salutation, rhs.salutation).append(this.grade,
rhs.grade).append(this.creditCard, rhs.creditCard)
.append(this.univAssoc, rhs.univAssoc).append(this.firstName,
rhs.firstName).append(this.id, rhs.id).append(
this.campaignAccess, rhs.campaignAccess).append(
this.howHear, rhs.howHear).append(this.univ, rhs.univ)
.append(this.editDate, rhs.editDate).append(this.univProvince,
rhs.univProvince).append(this.demographics,
rhs.demographics).append(this.username, rhs.username)
.append(this.password, rhs.password).append(this.gender,
rhs.gender).append(this.campaigns, rhs.campaigns)
.append(this.creationDate, rhs.creationDate).append(
this.enrollments, rhs.enrollments).append(
this.addressByShippingAddressId,
rhs.addressByShippingAddressId).append(this.yearBirth,
rhs.yearBirth).append(this.lastName, rhs.lastName)
.append(this.notes1, rhs.notes1).append(this.email, rhs.email)
.append(this.dayPhone, rhs.dayPhone).append(this.evePhone,
rhs.evePhone).isEquals();
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return new HashCodeBuilder(1837034061, 2111140963).append(this.proCtlno).append(
this.addressByBillingAddressId).append(this.salutation).append(
this.grade).append(this.creditCard).append(this.univAssoc)
.append(this.firstName).append(this.id).append(
this.campaignAccess).append(this.howHear).append(
this.univ).append(this.editDate).append(
this.univProvince).append(this.demographics).append(
this.username).append(this.password)
.append(this.gender).append(this.campaigns).append(
this.creationDate).append(this.enrollments).append(
this.addressByShippingAddressId).append(this.yearBirth)
.append(this.lastName).append(this.notes1).append(this.email)
.append(this.dayPhone).append(this.evePhone).toHashCode();
}
/**
* @see java.lang.Object#toString()
*/
public String toString() {
return new ToStringBuilder(this).append("id", this.id).append(
"enrollments", this.enrollments).append("demographics",
this.demographics).append("yearBirth", this.yearBirth).append(
"univAssoc", this.univAssoc).append("evePhone", this.evePhone)
.append("username", this.username).append("univProvince",
this.univProvince).append("email", this.email).append(
"password", this.password)
.append("notes1", this.notes1).append(
"addressByBillingAddressId",
this.addressByBillingAddressId).append("dayPhone",
this.dayPhone).append("proCtlno", this.proCtlno)
.append("creditCard", this.creditCard).append("campaignAccess",
this.campaignAccess).append("howHear", this.howHear)
.append("editDate", this.editDate).append("salutation",
this.salutation).append("creationDate",
this.creationDate).append("firstName", this.firstName)
.append("gender", this.gender)
.append("lastName", this.lastName).append("univ", this.univ)
.append("campaigns", this.campaigns)
.append("grade", this.grade).append(
"addressByShippingAddressId",
this.addressByShippingAddressId).toString();
}
}
DEBUG - StudentAction.newStudent(110) | entering 'newStudent' method...
DEBUG - StudentAction.save(120) | entering 'save' method...
DEBUG - StudentAction.save(141) | studentTemp is not null...null
DEBUG - StudentDAOHibernate.saveStudent(53) | studentId set to:
nullnull123-456-7890Jeff@hotmail.comJongminMReferred by familyOhnullnullMrOxfordOxfordalumnullnullnullnullnullnullnull1955
Hibernate: select SEQ_STUDENT.nextval from dual
Hibernate: insert into STUDENT (SALUTATION, FIRST_NAME, LAST_NAME, EMAIL, UNIV, UNIV_ASSOC, DAY_PHONE, EVE_PHONE, YEAR_BIRTH, GENDER, HOW_HEAR, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
WARN - JDBCExceptionReporter.logExceptions(38) | SQL Error: 1401, SQLState: 23000
ERROR - JDBCExceptionReporter.logExceptions(46) | ORA-01401: inserted value too large for column
WARN - JDBCExceptionReporter.logExceptions(38) | SQL Error: 1401, SQLState: 23000
ERROR - JDBCExceptionReporter.logExceptions(46) | ORA-01401: inserted value too large for column
WARN - JDBCExceptionReporter.logExceptions(38) | SQL Error: 1401, SQLState: 23000
ERROR - JDBCExceptionReporter.logExceptions(46) | ORA-01401: inserted value too large for column
WARN - JDBCExceptionReporter.logExceptions(38) | SQL Error: 1401, SQLState: 23000
ERROR - JDBCExceptionReporter.logExceptions(46) | ORA-01401: inserted value too large for column
ERROR - JDBCException.<init>(38) | Could not execute JDBC batch update
java.sql.BatchUpdateException: ORA-01401: inserted value too large for column
at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:458)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:3907)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:126)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2421)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2371)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at org.springframework.orm.hibernate.HibernateTemplate$21.doInHibernate(HibernateTemplate.java:477)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:243)
at org.springframework.orm.hibernate.HibernateTemplate.flush(HibernateTemplate.java:475)
at org.alllearn.dao.hibernate.StudentDAOHibernate.saveStudent(StudentDAOHibernate.java:64)
at org.alllearn.service.impl.StudentManagerImpl.saveStudent(StudentManagerImpl.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy6.saveStudent(Unknown Source)
at org.alllearn.web.StudentAction.save(StudentAction.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:276)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:196)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:105)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alllearn.web.MessageFilter.doFilter(MessageFilter.java:36)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
ERROR - SessionImpl.execute(2379) | Could not synchronize database state with session
net.sf.hibernate.JDBCException: Could not execute JDBC batch update
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:133)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2421)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2371)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2240)
at org.springframework.orm.hibernate.HibernateTemplate$21.doInHibernate(HibernateTemplate.java:477)
at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:243)
at org.springframework.orm.hibernate.HibernateTemplate.flush(HibernateTemplate.java:475)
at org.alllearn.dao.hibernate.StudentDAOHibernate.saveStudent(StudentDAOHibernate.java:64)
at org.alllearn.service.impl.StudentManagerImpl.saveStudent(StudentManagerImpl.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:155)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:122)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
at $Proxy6.saveStudent(Unknown Source)
at org.alllearn.web.StudentAction.save(StudentAction.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:276)
at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:196)
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:105)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.alllearn.web.MessageFilter.doFilter(MessageFilter.java:36)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:738)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.BatchUpdateException: ORA-01401: inserted value too large for column
at oracle.jdbc.dbaccess.DBError.throwBatchUpdateException(DBError.java:458)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:3907)
at net.sf.hibernate.impl.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:54)
at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:126)
... 57 more
WARN - SQLErrorCodeSQLExceptionTranslator.translate(279) | Unable to translate SQLException with errorCode '1401', will now try the fallback translator
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: