Notifications

17 views

Symptoms


After previewing a Virtual Agent Topic via "Preview" UI Action in Designer, below error displayed while navigating to different page on the platform.

Error -- java.sql.BatchUpdateException: Duplicate entry 'xxxxxxxxxxxxxxxxxxxxxxx' for key 'cb_topic_id'

Below is the complete stack trace,

log08:09:49.72: GlideSession message was modified by sanitization. [message=java.sql.BatchUpdateException: Duplicate entry 
'xxxxxxxxxxxxxxxxxxxxxxx' for key 'cb_topic_id'][sanitized=java.sql.BatchUpdateException: Duplicate entry
'xxxxxxxxxxxxxxxxxxxxxxx' for key 'cb_topic_id']

log08:09:49.75: FAILED TRYING TO EXECUTE ON CONNECTION 7: INSERT INTO sys_cs_topic (`definition`,`is_system_topic`,`key_phrases`,
`metaphone`,`active`,`published`,`title`,`cb_topic_id`,`sys_id`,`vendor`,`sys_domain`,`name`,`applicability`) VALUES(?,0,'create
case new case case creation case create','KS KRT N KRXN',1,0,'...','xxxxxxxxxxxxxxxxxxxxxxx',...: java.sql.SQLException:
java.sql.BatchUpdateException: Duplicate entry 'xxxxxxxxxxxxxxxxxxxxxxx' for key 'cb_topic_id':
com.glide.db.StatementBatcher.getSQLException(StatementBatcher.java:494)
com.glide.db.StatementBatcher.commitBatch(StatementBatcher.java:449) com.glide.db.StatementBatcher.commitAllOrNothing(StatementBatcher.java:330)
com.glide.db.DBCompositeAction.executeAsBatch(DBCompositeAction.java:193) com.glide.db.DBCompositeAction.executeChunk(DBCompositeAction.java:136)
com.glide.db.DBCompositeAction.executeAsResultSet0(DBCompositeAction.java:100) com.glide.db.DBAction.executeAndReturnTable(DBAction.java:244)
com.glide.db.DBAction.executeNormal(DBAction.java:233) com.glide.db.DBAction.executeAndReturnException(DBAction.java:187)
com.glide.script.GlideRecordITable.insert(GlideRecordITable.java:137) com.glide.script.GlideRecord.insert(GlideRecord.java:4798)
com.glide.script.GlideRecord.insert(GlideRecord.java:4715) com.glide.cs.qlue.entities.dao.DaoImplBase.insert(DaoImplBase.java:25)
com.glide.cs.qlue.module.designtime.dao.TopicTypeDaoImpl.insertTopicType(TopicTypeDaoImpl.java:65)
com.glide.cs.qlue.module.designtime.TopicTypeServiceImpl.createTopicType(TopicTypeServiceImpl.java:361)
com.glide.cs.qlue.module.designtime.publish.VirtualAgentDesignDAO.saveCompiledTopic(VirtualAgentDesignDAO.java:289)
com.glide.cs.qlue.module.designtime.publish.VirtualAgentDesignDAO.save(VirtualAgentDesignDAO.java:184)
com.glide.cs.qlue.module.designtime.compiler.VirtualAgentDesignCompiler.save(VirtualAgentDesignCompiler.java:78)
com.glide.cs.qlue.module.designtime.compiler.VirtualAgentDesignCompiler.compileAndSave(VirtualAgentDesignCompiler.java:54)
com.glide.cs.qlue.module.designtime.VirtualAgentDesignResource.compileAndSaveTopic(VirtualAgentDesignResource.java:159)
com.glide.cs.qlue.module.designtime.VirtualAgentDesignResource.previewTopic(VirtualAgentDesignResource.java:51)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:498)
com.glide.rest.handler.impl.ServiceHandlerImpl.invokeService(ServiceHandlerImpl.java:43) com.glide.rest.processors.RESTAPIProcessor.process(RESTAPIProcessor.java:286)
com.glide.processors.AProcessor.runProcessor(AProcessor.java:532) com.glide.processors.AProcessor.processTransaction(AProcessor.java:230)
com.glide.processors.ProcessorRegistry.process0(ProcessorRegistry.java:178) com.glide.processors.ProcessorRegistry.process(ProcessorRegistry.java:167)
com.glide.ui.GlideServletTransaction.process(GlideServletTransaction.java:31) com.glide.sys.Transaction.run(Transaction.java:2092)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

Release


London release.

Cause


On the "sys_cs_topic" table, "cb_topic_id" field is set as unique in affected instance and hence duplicate key error is thrown.

Resolution


On out the box instance, "cb_topic_id" field is set as unique=false, following the same definition should resolve the issue.

Additional Information


Virtual Agent

Virtual Agent Designer

 

Article Information

Last Updated:2018-11-14 16:16:00
Published:2018-11-01