com.dotmarketing.exception.DotDataException: Unable to flush Hibernate Session

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

Check whether privilege has the "not null" restriction. If so it always has to have a value and can never be null.

A different reason could be a wrong implementation of a foreign key. Check whether you always correctly insert/update in both tables.

Solutions on the web

via Google Groups by Billy Bacon, 10 months ago
Unable to flush Hibernate Session
com.dotmarketing.exception.DotDataException: Unable to flush Hibernate Session
at sun.reflect.GeneratedConstructorAccessor138.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4120)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4052)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2503)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2664)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2794)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2375)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2359)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462)
at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
at com.dotmarketing.db.HibernateUtil.saveWithPrimaryKey(HibernateUtil.java:867)
at com.dotmarketing.business.IdentifierFactoryImpl.createNewIdentifier(IdentifierFactoryImpl.java:295)
at com.dotmarketing.business.IdentifierFactoryImpl.createNewIdentifier(IdentifierFactoryImpl.java:232)
at com.dotmarketing.business.IdentifierAPIImpl.createNew(IdentifierAPIImpl.java:136)
at com.dotmarketing.business.IdentifierAPIImpl.createNew(IdentifierAPIImpl.java:129)
at com.dotmarketing.portlets.files.business.FileFactoryImpl.saveFile(FileFactoryImpl.java:145)
at com.dotmarketing.portlets.files.business.FileAPIImpl.saveFile(FileAPIImpl.java:473)
at com.dotmarketing.portlets.files.business.FileAPIImpl.saveFile(FileAPIImpl.java:437)
at org.dotcms.plugins.XMLSitemap.thread.XMLSitemapThread.closeFileWriter(XMLSitemapThread.java:445)
at org.dotcms.plugins.XMLSitemap.thread.XMLSitemapThread.generateSitemapPerHost(XMLSitemapThread.java:277)
at org.dotcms.plugins.XMLSitemap.thread.XMLSitemapThread.(XMLSitemapThread.java:92)
at sun.reflect.GeneratedConstructorAccessor187.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:534)
at java.lang.Class.newInstance(Class.java:379)
at org.quartz.simpl.SimpleJobFactory.newJob(SimpleJobFactory.java:55)
at org.quartz.core.JobRunShell.initialize(JobRunShell.java:140)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:364)

Users with the same issue

Once, 1 week ago
Once, 4 months ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
69 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.