SQLGrammaException using Modeshape 2.8.0.Final with PostgreSQL 9.0.3
lmika May 14, 2012 9:59 PMHi,
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:
{noformat}
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
{noformat}
I have logged into Postgres from the console (using the same user JDBC is configured to use) and I have observerd that Modeshape was able to create the tables so it looks like it could connect
to the database (and modify the schema).
Has anyone else experienced this? Is there are way I can turn off batch updates?
Any assistance will be greatly appreciated.
h4. Application Configuration
| *Container* | JBoss AS 7.1.1. Final (standalone) |
| *JDBC Driver* | postgresql-9.1-902.jdbc4.jar (included as a module) |
| *Database Version* | PostgreSQL 9.0.3 on x86_64-unknown-linux-gnu, compiled by GCC gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585], 64-bit |
| *Java* | java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode) |
| *OS* | openSUSE 11.4 "Celadon" - Linux linux-l00m.site 2.6.37.6-0.11-desktop #1 SMP PREEMPT 2011-12-19 23:39:38 +0100 x86_64 x86_64 x86_64 GNU/Linux |
*Modeshape Configuration:*
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns:mode="http://www.modeshape.org/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
<!--
Define the JCR repositories
-->
<mode:repositories>
<!--
Define a JCR repository that accesses the 'Cars' source directly.
This of course is optional, since we could access the same content through 'vehicles'.
-->
<mode:repository jcr:name="testRepository" mode:source="testSource">
<mode:descriptors>
<!--
This adds a JCR Repository descriptor named "myDescriptor" with a value of "foo".
So this code:
Repository repo = ...;
System.out.println(repo.getDescriptor("myDescriptor");
Will now print out "foo".
-->
<myDescriptor mode:value="foo" />
</mode:descriptors>
<!--
Import the custom node types defined in the named files. The values
can be an absolute path to a classpath resource, an absolute file system
path, a relative path on the file system (relative to where the process was
started from), or a resolvable URL. If more than one node type definition
file is needed, the files can be listed as a single comma-delimited string
in the 'mode:resource' attribute of the 'jcr:nodeTypes' element, or listed
individually using multiple mode:resource child elements (as shown below).
-->
<jcr:nodeTypes>
<mode:resource>/jcr/schema.cnd</mode:resource>
</jcr:nodeTypes>
</mode:repository>
</mode:repositories>
<!--
Define the sources for the content. These sources are directly accessible using the
ModeShape-specific Graph API.
-->
<mode:sources jcr:primaryType="nt:unstructured">
<!--
In-memory source:
<mode:source jcr:name="testSource"
mode:classname="org.modeshape.graph.connector.inmemory.InMemoryRepositorySource"
mode:defaultWorkspaceName="default"
mode:autoGenerateSchema="validate"/>
-->
<mode:source
jcr:name="testSource"
mode:dialect="org.hibernate.dialect.PostgreSQLDialect"
mode:classname="org.modeshape.connector.store.jpa.JpaSource"
mode:description="Database store"
mode:showSql="true"
mode:dataSourceJndiName="java:jboss/datasources/JcrDataDS"
mode:defaultWorkspaceName="default"
mode:autoGenerateSchema="create"/>
</mode:sources>
<!--
Define the sequencers. This is an optional section. For this example, we're not using any sequencers.
-->
<mode:sequencers>
<!--mode:sequencer jcr:name="Image Sequencer">
<mode:classname>
org.modeshape.sequencer.image.ImageMetadataSequencer
</mode:classname>
<mode:description>Image metadata sequencer</mode:description>
<mode:pathExpression>/foo/source => /foo/target</mode:pathExpression>
<mode:pathExpression>/bar/source => /bar/target</mode:pathExpression>
</mode:sequencer-->
</mode:sequencers>
<!--
<mode:mimeTypeDetectors>
<mode:mimeTypeDetector jcr:name="Detector"
mode:description="Standard extension-based MIME type detector"/>
</mode:mimeTypeDetectors>
-->
</configuration>
{code}
*Data Store Configuration:*
{code:xml}
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jndi-name="java:jboss/datasources/JcrDataDS" pool-name="JcrDataDS" enabled="true">
<connection-url>jdbc:postgresql:jcr_data</connection-url>
<driver>org.postgresql</driver>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<pool>
<min-pool-size>10</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
</pool>
<security>
<user-name>jcr</user-name>
<!-- No password used -->
</security>
<statement>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<share-prepared-statements>true</share-prepared-statements>
</statement>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="com.mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.Driver</xa-datasource-class>
</driver>
<driver name="org.postgresql" module="org.postgresql">
<xa-datasource-class>org.postgresql.Driver</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
{code}