3 Replies Latest reply on Aug 15, 2011 6:56 PM by Jonathan Fields

    Error with JPA source, no error with JPA source federated

    Jonathan Fields Novice

      Modeshape 2.6.0 Beta2, JBoss AS Kit, JBoss AS 5.1, JBoss Seam 2.2.0 GA web app.

       

      Configuration 1.

      • JPA source, configured to use JBoss datasource java:DefaultDS (HSQL)
      • File system source
      • Federated source, federating the above
      • Repository is the federated source.
      • External to Modeshape, a JPA persistence unit also configured to use java:DefaultDS

       

      Session.login() is called from a Seam POJO component. Works fine.

       

      Configuration 2.

      • JPA source, configured to use JBoss datasource java:DefaultDS (HSQL)
      • Repository is the JPA source.
      • External to Modeshape, a JPA persistence unit also configured to use java:DefaultDS

       

      Session.login() is called from the same Seam POJO component. The exception below is thrown. Both modeshape-config.xml files are also below.

       

      Am I doing something wrong in Configuration 2, is this a bug, or is it an issue with using transactional Seam components which are starting their own JTA transaction. If the latter, why does it not show up with the federated configuration?

       

      Please let me know if I should submit a JIRA.

       

      Thanks.

       

      Exception:

       

      14:11:55,943 INFO  [JcrRepository] Loading ModeShape JCR repository in JNDI at: jndi:jcr/local?repositoryName=repository

      14:11:55,966 INFO  [JcrSession] Logging into JCR Repository as admin

      14:11:56,018 ERROR [JDBCTransaction] JDBC commit failed

      java.sql.SQLException: You cannot commit during a managed transaction!

          at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:659)

          at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:486)

          at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:170)

          at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:146)

          at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:54)

          at org.modeshape.connector.store.jpa.model.simple.SimpleJpaTransaction.commit(SimpleJpaTransaction.java:53)

          at org.modeshape.connector.store.jpa.model.simple.SimpleJpaConnection.execute(SimpleJpaConnection.java:145)

          at org.modeshape.graph.connector.RepositoryConnectionPool$ConnectionWrapper.execute(RepositoryConnectionPool.java:1129)

          at org.modeshape.graph.Graph.execute(Graph.java:288)

          at org.modeshape.graph.Graph$5.process(Graph.java:231)

          at org.modeshape.graph.request.RequestBuilder.getWorkspaces(RequestBuilder.java:64)

          at org.modeshape.graph.Graph.getWorkspaces(Graph.java:369)

          at org.modeshape.jcr.JcrRepository.sessionForContext(JcrRepository.java:1480)

          at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:1447)

          at com.montanesolutions.mcr.component.JcrSession.create(JcrSession.java:61)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

          at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)

          at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

          at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

          at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

          at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

          at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

          at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)

          at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)

          at com.montanesolutions.mcr.component.JcrSession_$$_javassist_seam_4.create(JcrSession_$$_javassist_seam_4.java)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)

          at org.jboss.seam.Component.callComponentMethod(Component.java:2249)

          at org.jboss.seam.Component.callCreateMethod(Component.java:2172)

          at org.jboss.seam.Component.newInstance(Component.java:2132)

          at org.jboss.seam.Component.getInstance(Component.java:2021)

          at org.jboss.seam.Component.getInstance(Component.java:1983)

          at org.jboss.seam.Component.getInstance(Component.java:1977)

          at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)

          at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)

          at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:148)

          at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:51)

          at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)

          at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)

          at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)

          at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)

          at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)

          at javax.faces.component.UIOutput.getValue(UIOutput.java:184)

          at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)

          at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)

          at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)

          at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)

          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)

          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)

          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)

          at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)

          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)

          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

          at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)

          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

          at java.lang.Thread.run(Thread.java:662)

      14:11:56,036 SEVERE [viewhandler] Error Rendering View[/test.xhtml]

      org.jboss.seam.InstantiationException: Could not instantiate Seam component: jcrSession

          at org.jboss.seam.Component.newInstance(Component.java:2144)

          at org.jboss.seam.Component.getInstance(Component.java:2021)

          at org.jboss.seam.Component.getInstance(Component.java:1983)

          at org.jboss.seam.Component.getInstance(Component.java:1977)

          at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)

          at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)

          at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:148)

          at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:51)

          at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)

          at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)

          at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)

          at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)

          at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)

          at javax.faces.component.UIOutput.getValue(UIOutput.java:184)

          at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)

          at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)

          at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)

          at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)

          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)

          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)

          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)

          at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)

          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)

          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)

          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)

          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

          at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)

          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

          at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)

          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

          at java.lang.Thread.run(Thread.java:662)

      Caused by: java.lang.IllegalStateException: Request is frozen and may not be changed: request workspaces

          at org.modeshape.graph.request.Request.checkNotFrozen(Request.java:176)

          at org.modeshape.graph.request.Request.setError(Request.java:61)

          at org.modeshape.connector.store.jpa.model.simple.SimpleJpaConnection.execute(SimpleJpaConnection.java:153)

          at org.modeshape.graph.connector.RepositoryConnectionPool$ConnectionWrapper.execute(RepositoryConnectionPool.java:1129)

          at org.modeshape.graph.Graph.execute(Graph.java:288)

          at org.modeshape.graph.Graph$5.process(Graph.java:231)

          at org.modeshape.graph.request.RequestBuilder.getWorkspaces(RequestBuilder.java:64)

          at org.modeshape.graph.Graph.getWorkspaces(Graph.java:369)

          at org.modeshape.jcr.JcrRepository.sessionForContext(JcrRepository.java:1480)

          at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:1447)

          at com.montanesolutions.mcr.component.JcrSession.create(JcrSession.java:61)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

          at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)

          at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

          at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

          at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

          at org.jboss.seam.core.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:32)

          at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

          at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

          at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)

          at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)

          at com.montanesolutions.mcr.component.JcrSession_$$_javassist_seam_4.create(JcrSession_$$_javassist_seam_4.java)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)

          at org.jboss.seam.Component.callComponentMethod(Component.java:2249)

          at org.jboss.seam.Component.callCreateMethod(Component.java:2172)

          at org.jboss.seam.Component.newInstance(Component.java:2132)

          ... 69 more

      14:11:56,051 INFO  [JcrSession] Logging into JCR Repository as admin

      14:11:56,063 WARN  [JDBCExceptionReporter] SQL Error: 0, SQLState: null

      14:11:56,064 ERROR [JDBCExceptionReporter] Transaction is not active: tx=TransactionImple < ac, BasicAction: 4b947989:d589:4e443745:63 status: ActionStatus.ABORT_ONLY >; - nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: 4b947989:d589:4e443745:63 status: ActionStatus.ABORT_ONLY >)

       

       

      Federated configuration (no exception thrown):

      <?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">

          <mode:repositories>

              <mode:repository jcr:name="repository" >

                  <mode:source>federated</mode:source>

                  <mode:options jcr:primaryType="options">

                      <mode:option jcr:name="projectNodeTypes" mode:value="true"/>

                      <mode:option jcr:name="jaasLoginConfigName" mode:value="modeshape"/>

                      <mode:option jcr:name="queryIndexDirectory" mode:value="${jboss.server.data.dir}/modeshape/repositories/store/indexes"/>               

                      <mode:option jcr:name="queryIndexesUpdatedSynchronously" mode:value="true"/>

                      <mode:option jcr:name="queryIndexesRebuiltSynchronously" mode:value="true"/>

                      <mode:option jcr:name="rebuildQueryIndexOnStartup" mode:value="always"/>

                  </mode:options>

              </mode:repository>

          </mode:repositories>

       

          <mode:sources jcr:primaryType="nt:unstructured">

              <mode:source jcr:name="database"

                  mode:classname="org.modeshape.connector.store.jpa.JpaSource"

                  mode:dataSourceJndiName="java:DefaultDS"

                  mode:model="Simple"

                  mode:dialect="org.hibernate.dialect.HSQLDialect"

                  mode:referentialIntegrityEnforced="true"

                  mode:largeValueSizeInBytes="10000"

                  mode:retryLimit="3"

                  mode:compressData="false"

                  mode:predefinedWorkspaceNames="default,system"

                  mode:showSql="false"

                  mode:autoGenerateSchema="update"

                  mode:creatingWorkspacesAllowed="true"

                  mode:defaultWorkspaceName="default" />   

              <mode:source jcr:name="filesystem"

                  mode:classname="org.modeshape.connector.filesystem.FileSystemSource"

                  mode:description="File System Source"

                  mode:workspaceRootPath="/home/mcr/content"

                  mode:defaultWorkspaceName="default"

                  mode:creatingWorkspacesAllowed="false"

                  mode:rootNodeUuid="a9bb5d79-f6c7-4bbc-a016-9453035b1b87"

                  mode:updatesAllowed="true"

                  mode:exclusionPattern="^.*\.modeshape$"

                  mode:extraPropertiesBehavior="store"/>

              <mode:source jcr:name="federated">

                  <mode:classname>org.modeshape.graph.connector.federation.FederatedRepositorySource</mode:classname>

                  <mode:workspaces>

                      <mode:workspace jcr:name="default">

                          <mode:projections>

                          <mode:projection jcr:name="database projection" mode:source="database" mode:workspaceName="default">

                              <mode:projectionRules>/database => /</mode:projectionRules>

                          </mode:projection>

                          <mode:projection jcr:name="filesystem projection" mode:source="filesystem" mode:workspaceName="default">

                              <mode:projectionRules>/filesystem => /</mode:projectionRules>

                          </mode:projection>

                          </mode:projections>

                      </mode:workspace>

                  </mode:workspaces>

              </mode:source>

          </mode:sources>

      </configuration>

       

      Direct JPA Source configuration (exception thrown):

      <?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">

          <mode:repositories>

              <mode:repository jcr:name="repository" >

                  <mode:source>database</mode:source>

                  <mode:options jcr:primaryType="options">

                      <mode:option jcr:name="projectNodeTypes" mode:value="true"/>

                      <mode:option jcr:name="jaasLoginConfigName" mode:value="modeshape"/>

                      <mode:option jcr:name="queryIndexDirectory" mode:value="${jboss.server.data.dir}/modeshape/repositories/store/indexes"/>               

                      <mode:option jcr:name="queryIndexesUpdatedSynchronously" mode:value="true"/>

                      <mode:option jcr:name="queryIndexesRebuiltSynchronously" mode:value="true"/>

                      <mode:option jcr:name="rebuildQueryIndexOnStartup" mode:value="always"/>

                  </mode:options>

              </mode:repository>

          </mode:repositories>

       

          <mode:sources jcr:primaryType="nt:unstructured">

              <mode:source jcr:name="database"

                  mode:classname="org.modeshape.connector.store.jpa.JpaSource"

                  mode:dataSourceJndiName="java:DefaultDS"

                  mode:model="Simple"

                  mode:dialect="org.hibernate.dialect.HSQLDialect"

                  mode:referentialIntegrityEnforced="true"

                  mode:largeValueSizeInBytes="10000"

                  mode:retryLimit="3"

                  mode:compressData="false"

                  mode:predefinedWorkspaceNames="default,system"

                  mode:showSql="false"

                  mode:autoGenerateSchema="update"

                  mode:creatingWorkspacesAllowed="true"

                  mode:defaultWorkspaceName="default" />   

          </mode:sources>

      </configuration>