[SAK-18084] Can cause a DB error with a Glossary import if the short description is greater than 255 characters Created: 25-Feb-2010  Updated: 29-Jun-2010  Resolved: 06-May-2010

Status: CLOSED
Project: Sakai
Component/s: OSP: Glossary
Affects Version/s: 2.7.0
Fix Version/s: 2.7.0

Type: Bug Priority: Minor
Reporter: Alan Berg Assignee: Beth Kirschner
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

qa1-nl



 Description   

If you import a glossary with more than 255 characters for the short description. The data goes straight to the DB and generates an SQLExcpetion (shown next). Prefer the same checks infront and error message as used in the GUI when creating entries

. 2010-02-25 13:25:26,011 WARN TP-Processor8 org.hibernate.util.JDBCExceptionReporter - SQL Error: 1406, SQLState: 22001
2010-02-25 13:25:26,027 ERROR TP-Processor8 org.hibernate.util.JDBCExceptionReporter - Data truncation: Data too long for column 'term' at row 1
2010-02-25 13:25:26,027 ERROR TP-Processor8 org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.DataException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:254)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:88)
at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:223)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2219)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2655)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:60)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1001)
at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:339)
at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:655)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy49.importTermsResource(Unknown Source)
at org.theospi.portfolio.help.control.GlossaryImportController.handleRequest(GlossaryImportController.java:109)
at org.sakaiproject.metaobj.utils.mvc.impl.servlet.FormControllerImpl.onSubmit(FormControllerImpl.java:87)
at org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
at org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)



 Comments   
Comment by Beth Kirschner [ 06-May-2010 ]

Glossary term and description now trimmed to 255 characters upon import

Comment by Beth Kirschner [ 06-May-2010 ]

Merged to 2.7.x

Generated at Tue Sep 17 21:07:03 CDT 2019 using Jira 8.0.3#800011-sha1:073e8b433c2c0e389c609c14a045ffa7abaca10d.