1 2 Previous Next 16 Replies Latest reply on Jun 8, 2012 3:18 PM by Randall Hauch

    Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration

    Carsten Luxig Newbie

      Hi,

       

      i didn't get the ModeShape 3.0.0.Alpha4 running within a JBoss 7.1.1.Final environment. I set up the following in the standalone:

       

      <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">
           <cache-container name="modeshape">
                 <local-cache name="Data">
                     <transaction mode="NON_XA"/>
                     <file-store relative-to="jboss.server.data.dir" path="modeshape/store/Data" passivation="false"/>
                </local-cache>
           </cache-container>
      </subsystem>
      <subsystem xmlns="urn:jboss:domain:modeshape:1.0">
           <repository name="Data" cache-name="Data" cache-container="modeshape">
                <workspaces default-workspace="data">
                     <workspace name="data"/>
                 </workspaces>
           </repository>
      </subsystem>
      <subsystem xmlns="urn:jboss:domain:security:1.1">
           <security-domains>
                <security-domain name="modeshape-security" cache-type="default">
                     <authentication>     
                          <login-module code="UsersRoles" flag="required">
                               <module-option name="usersProperties" value="modeshape-users.properties"/>
                               <module-option name="rolesProperties" value="modeshape-roles.properties"/>
                          </login-module>
                     </authentication>     
                </security-domain>
           </security-domains>
      </subsystem>
      

       

      Note: Only the modeshape-relevant parts are left in the above configuration.

       

      At first, i don't be able to get the repository with Collections.singletonMap(JndiRepositoryFactory.URL, "jndi:jcr/local/Data") as properties by using the RepositoryFactory approach.

      The org.modeshape.jcr.api.JndiRepositoryFactory.getRepositoryFromJndi(URL, Map) produces a NamingException "javax.naming.NotContextException: jcr/local" (Line 280). The exception itself is surpressed and null is returned instead of a repository.

       

      The second approach with the following properties for RepositoryFactory:

      Map<String, String> params = new HashMap<String, String>();
      params.put(JndiRepositoryFactory.URL, "jndi:jcr/local");
      params.put(JndiRepositoryFactory.REPOSITORY_NAME, "Data");
      
      

       

      returns me a NOT_RUNNING repository, but this is at least not null. The problem now is, that i can't login to this repository.

       

      If i use repository.login(new javax.jcr.SimpleCredentials("admin", "admin".toCharArray()), "data") the JcrRepository implementation is trying to start the the repository. It ends up in creating the RepositoryCache for a system workspace. In line 131 of RepositoryCache, the ChildReference "systemRef" becomes null, which ends up in a NullPointerException at line 135 (systemKey = systemRef.getKey()). The problem is, that on line 131 systemRoot.getChildReferences returns an instance of ImmutableChildReference.EMPTY_CHILD_REFERENCES, which at the end has no children. So null is returned.

       

      What is my mistake here? Is there a configuration missing? Even if I pre-define a workspace with name "system", it does not work either. Do you have an example for an AS7-integrated ModeShape 3?

       

      Thanks for reply

      Carsten

        • 1. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
          Randall Hauch Master

          Have you tried installing and running against JBoss AS 7.1.2.Final? I also ran into quite a few problems getting it to run under 7.1.1.Final; I don't recall if this was one of them.

          • 2. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
            Carsten Luxig Newbie

            Where to get 7.1.2.Final? The latest release if found is 7.1.1.Final.

             

            If i use the modeshape-rest client, the repository is loaded correctly. But it's the same standalone configuration?! Are there any differences, coming from an EAR (request repo during startup) or via a Servlet? The servlet-way returns a valid non-null ChildReference in RepositoryCache line 131. After that, the repository is in state RUNNING and i can access it via my EAR without getting this NullPointerException. I'm totally confused.

            • 3. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
              Randall Hauch Master

              Ah, you're right. (I hope it's not going to be one of those Mondays.)

               

              I don't see anything in the configuration that stands out as being wrong (it's pretty basic). Do you want to log an issue for the inability to get a Repository (and the surpressed JNDI error)? We were going to release Alpha5, but we'll wait until this issue is resolved.

              • 4. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                Carsten Luxig Newbie

                It seems to be a problem of @Startup annotated beans, where the repository login is performed during the @PostConstruct. If I try the login within a normal (CDI-stateless) bean, it behaves like the REST client and everything is working fine.

                 

                I filed two issues https://issues.jboss.org/browse/MODE-1500 for JNDI lookup and https://issues.jboss.org/browse/MODE-1501 for the @Startup problem.

                • 5. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                  Randall Hauch Master

                  Thanks for logging those. Any chance you can attach some sample EJB code to both to save us some time in replicating the JCR client code?

                  • 6. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                    Carsten Luxig Newbie

                    After some more tests, i found out, that the annotation javax.ejb.Singleton (and not the @Startup) causes the problem. If the class, resolving the Repository, is annotated with @javax.ejb.Singleton, the RepositoryCache behaves errorneous as discribed at https://issues.jboss.org/browse/MODE-1501. The workaround might be to change it into an javax.inject.Singleton, with that it works as expected. Seems to be a transactional problem with Workspace.save()? I'll add a comment in the JIRA issue.

                    • 7. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                      Randall Hauch Master

                      Are your EJBs relying upon container-managed transactions? That feature is still in work (see MODE-1498), and I hope to complete it this week.

                      1 of 1 people found this helpful
                      • 8. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                        Carsten Luxig Newbie

                        Okay! Yes they are. However, I've created 2 simple Java classes to track this problem and attached them to the JIRA issue.

                        • 9. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                          Randall Hauch Master

                          Excellent! Thanks, Carsten. I've marked the issues as blockers for the next release, so we'll get these fixed shortly.

                          • 10. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                            Carsten Luxig Newbie

                            If container-managed transactions are not supported, how can i use the jdbc-store of infinispan?

                            I defined a cache-container like this

                             

                            <cache-container name="modeshape" start="EAGER" default-cache="Data">
                                            <local-cache name="Data">
                                                <transaction mode="NON_XA" />
                                                <eviction max-entries="100000" strategy="LRU" />
                                                <jdbc-store datasource="java:jboss/datasources/JtaDataDS" purge="false" fetch-state="true" passivation="false">
                                                    <entry-table prefix="DOCS_INF">
                                                        <id-column name="ID_COLUMN" type="VARCHAR2(255)" />
                                                        <data-column name="DATA_COLUMN" type="BLOB" />
                                                        <timestamp-column name="TIMESTAMP_COLUMN" type="NUMBER(19,0)" />
                                                    </entry-table>
                                                    <property name="dropTableOnExit">false</property>
                                                    <property name="createTableOnStart">false</property>
                                                </jdbc-store>
                                            </local-cache>
                            </cache-container>
                            

                             

                            But during login i get the following error

                             

                            13:56:43,155 ERROR [TransactionCoordinator] (http--127.0.0.1-8080-1) ISPN000097: Error while processing 1PC PrepareCommand: org.infinispan.CacheException: org.infinispan.loaders.CacheLoaderException: This might be related to https://jira.jboss.org/browse/ISPN-604
                                at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:353) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.transaction.TransactionCoordinator.commit(TransactionCoordinator.java:181) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.transaction.synchronization.SynchronizationAdapter.afterCompletion(SynchronizationAdapter.java:81) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
                                at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:402)
                                at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:103)
                                at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:164)
                                at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165)
                                at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:117)
                                at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
                                at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:344) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                at org.modeshape.jcr.cache.document.WritableSessionCache.save(WritableSessionCache.java:294) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                at org.modeshape.jcr.SystemContent.save(SystemContent.java:107) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                at org.modeshape.jcr.SystemNamespaceRegistry.register(SystemNamespaceRegistry.java:179) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1034) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:901) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:337) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:564) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:523) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:138) [modeshape-jcr-3.0.0.Alpha4.jar:3.0.0.Alpha4]
                                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.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:569) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:564) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.event.EventImpl.fire(EventImpl.java:68) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                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.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:174) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:516) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:174) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:291) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.context.unbound.DependentContextImpl.get(DependentContextImpl.java:61) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:616) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:681) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:118) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:703) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:712) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.manager.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:106) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:102) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectNonContextualInstance(CDIInjectionEnricher.java:145) [arquillian-testenricher-cdi.jar:]
                                at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:125) [arquillian-testenricher-cdi.jar:]
                                at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.enrich(CDIInjectionEnricher.java:78) [arquillian-testenricher-cdi.jar:]
                                at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52) [arquillian-core.jar:]
                                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.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-core.jar:]
                                at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-core.jar:]
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-core.jar:]
                                at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-core.jar:]
                                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.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-core.jar:]
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-core.jar:]
                                at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-core.jar:]
                                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.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-core.jar:]
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-core.jar:]
                                at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-core.jar:]
                                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.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-core.jar:]
                                at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-core.jar:]
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135) [arquillian-core.jar:]
                                at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115) [arquillian-core.jar:]
                                at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:95) [arquillian-core.jar:]
                                at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:222) [arquillian-junit.jar:]
                                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-junit.jar:]
                                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-junit.jar:]
                                at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240) [arquillian-junit.jar:]
                                at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) [arquillian-junit.jar:]
                                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) [arquillian-junit.jar:]
                                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) [arquillian-junit.jar:]
                                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) [arquillian-junit.jar:]
                                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) [arquillian-junit.jar:]
                                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) [arquillian-junit.jar:]
                                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) [arquillian-junit.jar:]
                                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) [arquillian-junit.jar:]
                                at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185) [arquillian-junit.jar:]
                                at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-junit.jar:]
                                at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-junit.jar:]
                                at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199) [arquillian-junit.jar:]
                                at org.junit.runners.ParentRunner.run(ParentRunner.java:300) [arquillian-junit.jar:]
                                at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-junit.jar:]
                                at org.junit.runner.JUnitCore.run(JUnitCore.java:157) [arquillian-junit.jar:]
                                at org.junit.runner.JUnitCore.run(JUnitCore.java:136) [arquillian-junit.jar:]
                                at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-junit.jar:]
                                at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:160) [arquillian-protocol.jar:]
                                at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126) [arquillian-protocol.jar:]
                                at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90) [arquillian-protocol.jar:]
                                at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
                                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.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]
                                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [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.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
                                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: org.infinispan.loaders.CacheLoaderException: This might be related to https://jira.jboss.org/browse/ISPN-604
                                at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:93)
                                at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.readStoredEntry(JdbcStringBasedCacheStore.java:399)
                                at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:223)
                                at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.storeLockSafe(JdbcStringBasedCacheStore.java:87)
                                at org.infinispan.loaders.LockSupportCacheStore.store(LockSupportCacheStore.java:193) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.loaders.AbstractCacheStore.applyModifications(AbstractCacheStore.java:121) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.loaders.AbstractCacheStore.commit(AbstractCacheStore.java:154) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.CacheStoreInterceptor.visitCommitCommand(CacheStoreInterceptor.java:137) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:121) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.EntryWrappingInterceptor.visitCommitCommand(EntryWrappingInterceptor.java:90) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:121) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.visitCommitCommand(AbstractTxLockingInterceptor.java:104) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.NotificationInterceptor.visitCommitCommand(NotificationInterceptor.java:65) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.TxInterceptor.visitCommitCommand(TxInterceptor.java:120) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:121) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:130) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:89) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.AbstractVisitor.visitCommitCommand(AbstractVisitor.java:121) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.commands.tx.CommitCommand.acceptVisitor(CommitCommand.java:66) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:345) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]
                                ... 137 more
                            Caused by: java.sql.SQLException: javax.resource.ResourceException: IJ000460: Error checking for a transaction
                                at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:137)
                                at org.infinispan.loaders.jdbc.connectionfactory.ManagedConnectionFactory.getConnection(ManagedConnectionFactory.java:90)
                                ... 173 more
                            Caused by: javax.resource.ResourceException: IJ000460: Error checking for a transaction
                                at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:362)
                                at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
                                at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:129)
                                ... 174 more
                            Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffffc0010131:-4ca5b621:4fcdf3d9:1f status: ActionStatus.COMMITTED >
                                at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:352)
                                ... 176 more
                            

                             

                            Should i use a non-JTA datasource with another infinispan transaction mode?

                            • 11. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                              Randall Hauch Master

                              If container-managed transactions are not supported, how can i use the jdbc-store of infinispan?

                              Unfortunately, I'm pretty sure ModeShape 3 Alpha4 doesn't work with container-managed transactions, and Infinispan's cache store doesn't play a role.

                               

                              The problem is that ModeShape 3's Session.save() method attempts to create a transaction around it's updating the content in Infinispan. With a container-managed EJB, there would already be an existing transaction when the EJB call Session.save(), so ModeShape starting an existing transaction is not the right thing to do and will likely cause an error -- I just don't know for sure what that error will look like, but the ModeShape method that creates the transaction, namely "org.modeshape.jcr.cache.document.WritableSessionCache.save()", does appear in the stack trace above.

                              Should i use a non-JTA datasource with another infinispan transaction mode?

                               

                              ModeShape needs Infinispan to use NON_XA or XA transactions.

                               

                              The good news is that I've completed my initial go at supporting JTA (local and distributed, container-managed and user-managed) transactions (MODE-1498). I've done some minimal local-transaction-only testing with it and will merge my changes into the 'master' branch within the hour, but haven't yet had time to test with EJBs or distributed transactions. So there are three options:

                               

                              1. You could grab the latest code and build ModeShape 3.0-SNAPSHOT, then use this locally.
                              2. We could quickly release ModeShape 3.0.0.Alpha5 (which we want to do soon anyway), but you'd have to wait till that happens to give it a whirl.
                              3. Both #1 and #2

                               

                              My preference would be option #3, since that'd give us time to fix MODE-1500 and MODE-1501 before releasing Alpha5 (which I'll start on today) while letting you try the container-managed transaction code and giving us feedback. Plus, any issues you identify could probably be fixed quickly before the Alpha5 release.

                               

                              WDYT?

                              • 12. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                                Carsten Luxig Newbie

                                During testing, i also noticed, that it had nothing to do with infinispan. Even Session.save is not persistent in any cache-store, coming from an EJB call but using a non-EJB call, it is. The problem is, that my time is running up for that theme . We are going to decide in the next 2 days, if we are able to use ModeShape 3 or another data store. I'm likely to use ModeShape, but it's not my own decision. I'll try to grab an include the latest SNAPSHOT. Hopefully it's easy enough to include it as JBoss module.

                                 

                                If container-managed transaction are supported, MODE-1501 might be obsolete. MODE-1500 is a minor bug imo, since the described workaround is working.

                                 

                                Edited: I'm going to build 3.0-b518687. Is this the latest one? I've taken it directly from https://github.com/ModeShape/modeshape

                                • 13. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                                  Randall Hauch Master

                                  I've merged the JTA support (MODE-1498) into the 'master' branch, so it's ready for you to give it a try.

                                  Edited: I'm going to build 3.0-b518687. Is this the latest one? I've taken it directly from https://github.com/ModeShape/modeshape

                                  No, you need to get the latest again. This is the last commit that includes the JTA support: https://github.com/ModeShape/modeshape/commit/db63e2dac5077df40044d55346d84d53958d7cc2

                                  1 of 1 people found this helpful
                                  • 14. Re: Problems with ModeShape 3.0.0.Alpha4 and AS 7 integration
                                    Carsten Luxig Newbie

                                    I had a quick test on it and it seems to be working. But i still get (another) NullPointerException if i invoke the Repository.login, coming from a ejb.Singleton (MODE-1501). But for ejb.Stateless entry points it seems to be correct.

                                    I don't have the time for further tests until next week, because i'll be out of office for the next 3 days.

                                     

                                    Thanks for your fast work so far.

                                     

                                    Carsten

                                    1 2 Previous Next