-
Bug
-
Resolution: Done
-
Major
-
2.8.0.Final, 2.8.1.Final
-
None
I am using Modeshape 2.8.0.Final within a WAR file which is being deployed to JBoss AS 7.1.1 Final. Modeshape is configured to use a JDBC connection retrieved by JNDI. On startup, the container does not log any errors or stacktraces but once I try to add new nodes to the repository, I get the following exception:
11:33:53,171 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (JCR testSource-3-thread-2) Could not synchronize database state with session: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1175) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1251) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:269) [hibernate-entitymanager-3.5.2-Final.jar:3.5.2-Final] at org.modeshape.connector.store.jpa.model.simple.SimpleJpaRepository$Workspace.getNode(SimpleJpaRepository.java:461) [modeshape-connector-store-jpa-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.connector.store.jpa.model.simple.SimpleJpaRepository$Workspace.getNode(SimpleJpaRepository.java:265) [modeshape-connector-store-jpa-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.connector.map.MapRequestProcessor.getTargetNode(MapRequestProcessor.java:616) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.connector.map.MapRequestProcessor.process(MapRequestProcessor.java:382) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:315) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:363) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:235) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.connector.store.jpa.model.simple.SimpleJpaConnection.execute(SimpleJpaConnection.java:133) [modeshape-connector-store-jpa-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.connector.RepositoryConnectionPool$ConnectionWrapper.execute(RepositoryConnectionPool.java:1124) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:213) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:202) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_29] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29] Caused by: java.sql.BatchUpdateException: Batch entry 0 /* insert org.modeshape.connector.store.jpa.model.simple.NodeEntity */ insert into MODE_SIMPLE_NODE (ALLOWS_SNS, CHILD_NAME_LOCAL, CHILD_NAME_NS_ID, COMPRESSED, DATA, CHILD_INDEX, NODE_UUID, PARENT_ID, NUM_PROPS, ENFORCEREFINTEG, SNS_INDEX, WORKSPACE_ID, ID) values ('0', 'patient', '5', NULL, '<stream of 260 bytes>', '0', '34aafcb4-d020-4923-9ffd-a3598bd86c7f', '2', '3', '0', '1', '1', '6') was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2619) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2752) at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeBatch(CachedPreparedStatement.java:708) at org.jboss.jca.adapters.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:1072) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] ... 24 more 11:33:53,191 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/JcrServer].[au.com.infomedix.jcrloadtest.jcrserver.restapi.JcrLoadTestApplication]] (http--127.0.0.1-8080-1) Servlet.service() for servlet au.com.infomedix.jcrloadtest.jcrserver.restapi.JcrLoadTestApplication threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not perform operation over the repository at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29] Caused by: java.lang.RuntimeException: Could not perform operation over the repository at au.com.infomedix.jcrloadtest.jcrserver.repo.JcrService.executeCommand(JcrService.java:92) [classes:] at au.com.infomedix.jcrloadtest.jcrserver.restapi.NodeCrudMethods.create(NodeCrudMethods.java:53) [classes:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_29] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_29] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_29] at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_29] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:] ... 19 more Caused by: javax.jcr.RepositoryException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.modeshape.jcr.SessionCache.save(SessionCache.java:482) [modeshape-jcr-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.jcr.JcrSession.save(JcrSession.java:1313) [modeshape-jcr-2.8.0.Final.jar:2.8.0.Final] at au.com.infomedix.jcrloadtest.jcrserver.operations.CreateNodeOperation.performOperation(CreateNodeOperation.java:55) [classes:] at au.com.infomedix.jcrloadtest.jcrserver.operations.CreateNodeOperation.performOperation(CreateNodeOperation.java:1) [classes:] at au.com.infomedix.jcrloadtest.jcrserver.repo.AbstractJcrOperation.execute(AbstractJcrOperation.java:44) [classes:] at au.com.infomedix.jcrloadtest.jcrserver.repo.JcrService.executeCommand(JcrService.java:84) [classes:] ... 29 more Caused by: org.modeshape.graph.connector.RepositorySourceException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.modeshape.graph.session.GraphSession.save(GraphSession.java:1052) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.jcr.SessionCache.save(SessionCache.java:476) [modeshape-jcr-2.8.0.Final.jar:2.8.0.Final] ... 34 more Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1235) [hibernate-entitymanager-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1168) [hibernate-entitymanager-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:302) [hibernate-entitymanager-3.5.2-Final.jar:3.5.2-Final] at org.modeshape.connector.store.jpa.model.simple.SimpleJpaRepository$Workspace.getNode(SimpleJpaRepository.java:461) [modeshape-connector-store-jpa-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.connector.store.jpa.model.simple.SimpleJpaRepository$Workspace.getNode(SimpleJpaRepository.java:265) [modeshape-connector-store-jpa-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.connector.map.MapRequestProcessor.getTargetNode(MapRequestProcessor.java:616) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.connector.map.MapRequestProcessor.process(MapRequestProcessor.java:382) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:315) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:363) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:235) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.connector.store.jpa.model.simple.SimpleJpaConnection.execute(SimpleJpaConnection.java:133) [modeshape-connector-store-jpa-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.connector.RepositoryConnectionPool$ConnectionWrapper.execute(RepositoryConnectionPool.java:1124) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:213) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:202) [modeshape-graph-2.8.0.Final.jar:2.8.0.Final] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_29] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29] ... 1 more Caused by: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1175) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1251) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:269) [hibernate-entitymanager-3.5.2-Final.jar:3.5.2-Final] ... 16 more Caused by: java.sql.BatchUpdateException: Batch entry 0 /* insert org.modeshape.connector.store.jpa.model.simple.NodeEntity */ insert into MODE_SIMPLE_NODE (ALLOWS_SNS, CHILD_NAME_LOCAL, CHILD_NAME_NS_ID, COMPRESSED, DATA, CHILD_INDEX, NODE_UUID, PARENT_ID, NUM_PROPS, ENFORCEREFINTEG, SNS_INDEX, WORKSPACE_ID, ID) values ('0', 'patient', '5', NULL, '<stream of 260 bytes>', '0', '34aafcb4-d020-4923-9ffd-a3598bd86c7f', '2', '3', '0', '1', '1', '6') was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2619) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2752) at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeBatch(CachedPreparedStatement.java:708) at org.jboss.jca.adapters.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:1072) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] ... 24 more
I have manually logged into the database to ensure that it was working and I have observed that Modeshape was able to create the database tables. I have tried updating to Modeshape 2.8.1 FINAL but still encountered the same problem.
The next thing I did was check out the source of Modeshape 2.8.1.FINAL and turn off bulk updates. In doing so, I no longer got the bulk update exception. Instead, I got the following when I tried saving nodes:
14:51:01,008 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/JcrServer].[au.com.infomedix.jcrloadtest.jcrserver.restapi.JcrLoadTestApplication]] (http--127.0.0.1-8080-1) Servlet.service() for servlet au.com.infomedix.jcrloadtest.jcrserver.restapi.JcrLoadTestApplication threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not perform operation over the repository at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.3.2.Final.jar:] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29] Caused by: java.lang.RuntimeException: Could not perform operation over the repository at au.com.infomedix.jcrloadtest.jcrserver.repo.JcrService.executeCommand(JcrService.java:92) [classes:] at au.com.infomedix.jcrloadtest.jcrserver.restapi.NodeCrudMethods.create(NodeCrudMethods.java:53) [classes:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_29] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_29] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_29] at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_29] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) [resteasy-jaxrs-2.3.2.Final.jar:] at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) [resteasy-jaxrs-2.3.2.Final.jar:] ... 19 more Caused by: javax.jcr.RepositoryException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not insert: [org.modeshape.connector.store.jpa.model.simple.NodeEntity] at org.modeshape.jcr.SessionCache.save(SessionCache.java:482) [modeshape-jcr-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.jcr.JcrSession.save(JcrSession.java:1312) [modeshape-jcr-2.8.1.Final.jar:2.8.1.Final] at au.com.infomedix.jcrloadtest.jcrserver.operations.CreateNodeOperation.performOperation(CreateNodeOperation.java:55) [classes:] at au.com.infomedix.jcrloadtest.jcrserver.operations.CreateNodeOperation.performOperation(CreateNodeOperation.java:23) [classes:] at au.com.infomedix.jcrloadtest.jcrserver.repo.AbstractJcrOperation.execute(AbstractJcrOperation.java:44) [classes:] at au.com.infomedix.jcrloadtest.jcrserver.repo.JcrService.executeCommand(JcrService.java:84) [classes:] ... 29 more Caused by: org.modeshape.graph.connector.RepositorySourceException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not insert: [org.modeshape.connector.store.jpa.model.simple.NodeEntity] at org.modeshape.graph.session.GraphSession.save(GraphSession.java:1052) [modeshape-graph-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.jcr.SessionCache.save(SessionCache.java:476) [modeshape-jcr-2.8.1.Final.jar:2.8.1.Final] ... 34 more Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not insert: [org.modeshape.connector.store.jpa.model.simple.NodeEntity] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1235) [hibernate-entitymanager-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1168) [hibernate-entitymanager-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:302) [hibernate-entitymanager-3.5.2-Final.jar:3.5.2-Final] at org.modeshape.connector.store.jpa.model.simple.SimpleJpaRepository$Workspace.getNode(SimpleJpaRepository.java:461) [modeshape-connector-store-jpa-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.connector.store.jpa.model.simple.SimpleJpaRepository$Workspace.getNode(SimpleJpaRepository.java:265) [modeshape-connector-store-jpa-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.graph.connector.map.MapRequestProcessor.getTargetNode(MapRequestProcessor.java:616) [modeshape-graph-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.graph.connector.map.MapRequestProcessor.process(MapRequestProcessor.java:382) [modeshape-graph-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:315) [modeshape-graph-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:363) [modeshape-graph-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.graph.request.processor.RequestProcessor.process(RequestProcessor.java:235) [modeshape-graph-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.connector.store.jpa.model.simple.SimpleJpaConnection.execute(SimpleJpaConnection.java:133) [modeshape-connector-store-jpa-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.graph.connector.RepositoryConnectionPool$ConnectionWrapper.execute(RepositoryConnectionPool.java:1124) [modeshape-graph-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:222) [modeshape-graph-2.8.1.Final.jar:2.8.1.Final] at org.modeshape.graph.request.CompositeRequestChannel$2.call(CompositeRequestChannel.java:211) [modeshape-graph-2.8.1.Final.jar:2.8.1.Final] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_29] at java.util.concurrent.FutureTask.run(FutureTask.java:138) [rt.jar:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29] ... 1 more Caused by: org.hibernate.exception.SQLGrammarException: could not insert: [org.modeshape.connector.store.jpa.model.simple.NodeEntity] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2438) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2858) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:268) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:260) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:179) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1175) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1251) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:269) [hibernate-entitymanager-3.5.2-Final.jar:3.5.2-Final] ... 16 more Caused by: org.postgresql.util.PSQLException: ERROR: column "data" is of type oid but expression is of type bytea Hint: You will need to rewrite or cast the expression. Position: 213 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:512) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334) at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:115) at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493) at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2418) [hibernate-core-3.5.2-Final.jar:3.5.2-Final] ... 27 more
A few articles I looked at (this and this) suggested that this is a problem with how Hibernate maps byte arrays to PostgreSQL types. After posting this on the forum, Randall posted this issue: HHH-4876.
Workaround
I have managed to temporarily resolved the problem by adding the @Type annotation to the data field of NodeEntity.java within modeshape-connector-store-jpa:
// NodeEntry.java:128 @Lob @Column( name = "DATA", nullable = true, unique = false, length = 1048576 ) @Type( type="org.hibernate.type.PrimitiveByteArrayBlobType" ) // new annotation added. private byte[] data;
This resolved the node saving issue; however I am not aware of any impacts, performance or otherwise, that this fix might have.