java.sql.SQLIntegrityConstraintViolationException: ORA-01400: impossible d'insérer NULL dans ("WPR_PINT2_XWIKI"."XWIKIATTACHMENT_CONTENT"."XWA_CONTENT") ]]

XWiki.org JIRA | Thomas Mortagne | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When importing a document containing an attachment with en empty content the document is partially imported: everything is imported but the content of all the following attachments. Even if it's rare it's still a valid use case. Here is the exception we get in the log: {noformat} ERROR c.x.x.p.p.Package - Failed to save document Guide Utilisateur Pharaon.WebHome com.xpn.xwiki.XWikiException: Error number 3232 in 3: Exception while saving attachment Triptyque.jpg of document Guide Utilisateur Pharaon.WebHome Wrapped Exception: Failed to commit or rollback transaction. Root cause [ SQL next exception = [java.sql.SQLIntegrityConstraintViolationException: ORA-01400: impossible d'insérer NULL dans ("WPR_PINT2_XWIKI"."XWIKIATTACHMENT_CONTENT"."XWA_CONTENT") ]] at com.xpn.xwiki.store.XWikiHibernateAttachmentStore.saveAttachmentContent(XWikiHibernateAttachmentStore.java:146) ~[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.doc.XWikiDocument.saveAttachmentContent(XWikiDocument.java:4318) ~[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.doc.XWikiDocument.saveAllAttachments(XWikiDocument.java:4275) ~[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.plugin.packaging.Package.installDocument(Package.java:746) ~[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.plugin.packaging.Package.install(Package.java:603) ~[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.plugin.packaging.PackageAPI.install(PackageAPI.java:316) [xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.web.ImportAction.render(ImportAction.java:137) [xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:231) [xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) [xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) [struts-1.2.9.jar:1.2.9] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) [struts-1.2.9.jar:1.2.9] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) [struts-1.2.9.jar:1.2.9] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) [struts-1.2.9.jar:1.2.9] at javax.servlet.http.HttpServlet.service(HttpServlet.java:738) [javax.j2ee.servlet.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) [javax.j2ee.servlet.jar:na] at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131) [com.ibm.ws.webcontainer.jar:na] at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:128) [xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) [com.ibm.ws.webcontainer.jar:na] at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) [xwiki-platform-wysiwyg-server-portlet-3.5-SNAPSHOT.jar:na] at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) [com.ibm.ws.webcontainer.jar:na] at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) [xwiki-platform-webdav-server-portlet-3.5-20121219.103612-72.jar:na] at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) [com.ibm.ws.webcontainer.jar:na] at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:217) [xwiki-platform-container-servlet-portlet-3.5-20130121.200021-86.jar:na] at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) [com.ibm.ws.webcontainer.jar:na] at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) [xwiki-platform-container-servlet-portlet-3.5-20130121.200021-86.jar:na] at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186) [com.ibm.ws.webcontainer.jar:na] at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452) [com.ibm.ws.runtime.jar:na] at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511) [com.ibm.ws.runtime.jar:na] at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305) [com.ibm.ws.runtime.jar:na] at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83) [com.ibm.ws.runtime.jar:na] at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) [com.ibm.ws.runtime.jar:na] at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) [com.ibm.ws.runtime.jar:na] at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) [com.ibm.ws.runtime.jar:na] at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) [com.ibm.ws.runtime.jar:na] at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) [com.ibm.ws.runtime.jar:na] at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) [com.ibm.ws.runtime.jar:na] at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) [com.ibm.ws.runtime.jar:na] at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604) [com.ibm.ws.runtime.jar:na] Caused by: org.hibernate.HibernateException: Failed to commit or rollback transaction. Root cause [ SQL next exception = [java.sql.SQLIntegrityConstraintViolationException: ORA-01400: impossible d'insérer NULL dans ("WPR_PINT2_XWIKI"."XWIKIATTACHMENT_CONTENT"."XWA_CONTENT") ]] at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:876) ~[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:840) ~[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] at com.xpn.xwiki.store.XWikiHibernateAttachmentStore.saveAttachmentContent(XWikiHibernateAttachmentStore.java:142) ~[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] ... 53 common frames omitted Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2411) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2874) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:869) ~[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na] ... 55 common frames omitted Caused by: java.sql.BatchUpdateException: ORA-01400: impossible d'insérer NULL dans ("WPR_PINT2_XWIKI"."XWIKIATTACHMENT_CONTENT"."XWA_CONTENT") at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:629) ~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"] at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9409) ~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"] at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211) ~[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"] at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteBatch(WSJdbcPreparedStatement.java:1012) ~[com.ibm.ws.runtime.jar:na] at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:822) ~[com.ibm.ws.runtime.jar:na] at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final] ... 70 common frames omitted {noformat} Note: "impossible d'insérer NULL" means "impossible to insert NULL" ;) Sounds like the classical Oracle empty string vs null issue. Can probably be reproduced by attaching an empty file to a document. Note: I did not tested in more recent version of XWiki.

    XWiki.org JIRA | 4 years ago | Thomas Mortagne
    java.sql.SQLIntegrityConstraintViolationException: ORA-01400: impossible d'insérer NULL dans ("WPR_PINT2_XWIKI"."XWIKIATTACHMENT_CONTENT"."XWA_CONTENT") ]]
  2. 0

    Oracle errors with Hibernate after Refactoring a EJB -ORA-0094

    Stack Overflow | 5 years ago | user898465
    org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
  3. 0

    GitHub comment 143#135364849

    GitHub | 2 years ago | davinciagf
    org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [insert into metawal4.Requests (autogenerated, hits, ip, lang, requestdate, service, simple, sortby, id, query, type, spatialfilter) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [METAWAL4.SYS_C00165154]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 1545#147175808

    GitHub | 2 years ago | timowest
    java.sql.SQLException: ORA-01000: maximum open cursors exceeded
  6. 0

    Error with default Number datatype

    Oracle Community | 7 years ago | 745723
    java.sql.BatchUpdateException: ORA-01438: value larger than specified precision allowed for this column

  1. treefolk 2 times, last 4 months ago
  2. r1chjames 10 times, last 11 months ago
12 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.BatchUpdateException

    ORA-01400: impossible d'insérer NULL dans ("WPR_PINT2_XWIKI"."XWIKIATTACHMENT_CONTENT"."XWA_CONTENT")

    at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException()
  2. Oracle jdbc
    OracleStatementWrapper.executeBatch
    1. oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:629)[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
    2. oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:9409)[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
    3. oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:211)[ojdbc6.jar:Oracle JDBC Driver version - "11.1.0.7.0-Production"]
    3 frames
  3. com.ibm.ws
    WSJdbcStatement.executeBatch
    1. com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteBatch(WSJdbcPreparedStatement.java:1012)[com.ibm.ws.runtime.jar:na]
    2. com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:822)[com.ibm.ws.runtime.jar:na]
    2 frames
  4. Hibernate
    AbstractEntityPersister.insert
    1. org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    2. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    3. org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    4. org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    5. org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    6. org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:114)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    7. org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:109)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    8. org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:244)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    9. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2411)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    10. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2874)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    10 frames
  5. Hibernate
    EntityInsertAction.execute
    1. org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    1 frame
  6. Hibernate
    ActionQueue.executeActions
    1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    2. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    3. org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    3 frames
  7. Hibernate
    SessionImpl.managedFlush
    1. org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    2. org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    3. org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    4. org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    4 frames
  8. Hibernate
    JDBCTransaction.commit
    1. org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
    1 frame
  9. com.xpn.xwiki
    XWikiHibernateAttachmentStore.saveAttachmentContent
    1. com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:869)[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na]
    2. com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:876)[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na]
    3. com.xpn.xwiki.store.XWikiHibernateBaseStore.endTransaction(XWikiHibernateBaseStore.java:840)[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na]
    4. com.xpn.xwiki.store.XWikiHibernateAttachmentStore.saveAttachmentContent(XWikiHibernateAttachmentStore.java:142)[xwiki-platform-legacy-oldcore-portlet-3.5-20121219.102940-75.jar:na]
    4 frames