8 Replies Latest reply on Sep 12, 2014 11:47 AM by laocui

    Issue with Infinispan 6 and Modeshape 3.8?

    deepak_a

      Hi,

       

      We are upgrading from Modeshape 2.7 to Modeshape 3.8. Final.

      We also use infinispan 6.0.0.Final.

       

      I am getting an exception as highlighted in: https://issues.jboss.org/browse/ISPN-604

      This occurs when I do a Modeshape session.save().

       

      The above defect seems to be rejected and it also points to an unresolved defect

      https://issues.jboss.org/browse/WFLY-866

       

       

      To understand the problem/root-cause I read the details under https://community.jboss.org/message/833401#833401

      I don't understand this bit stated by Randaal

       

      However, there is still one caveat: while the repository's Infinispan cache is enlisted in the transaction, the cache stores are technically not enlisted. Infinispan will instead write to the cache store upon transaction commit. I'm not sure what Infinispan does to the transaction should that write fail during the commit. The ISPN community would be a better place to get details on this behavior. I do know that the Infinispan team is actively working on addressing this in ISPN 6.x; see their mailing list archive for details.

       

      Can some clarify what repository's Infinispan cache means here? and also the cache stores are technically not enlisted ?

      Does that mean repository during session.save() - commits data to it's infinispan cache - and repository does not care what infinispan does further with that committed data?

       

       

       

      Also another team is using the below combination of  modeshape and infinispan -

              <modeshape.version>3.7.1.Final</modeshape.version>

              <infinispan.version>5.2.7.Final</infinispan.version>

      and it seems to work fine (i.e. no exception when they do a session.save()).

      Is there some recommendationcfrom Modeshape team to use specific version of   modeshape+infinispan combination?


      regards,

      Deepak.


        • 1. Re: Issue with Infinispan 6 and Modeshape 3.8?
          hchiorean

          You cannot use ModeShape 3.x with Infinispan 6.x. 3.x works only with Infinispan 5.x and ModeShape 4.x (we're planning on releasing Beta 1 soon) works with Infinispan 6.x.

          The reason is that Infinispan 6.x is not backwards compatible with 5.x and there are major API differences.

          • 2. Re: Issue with Infinispan 6 and Modeshape 3.8?
            rhauch

            Horia is correct, ModeShape 3.x works only with Infinispan 5.x, and this is because ModeShape 3.x is written to use the API from Infinispan 5.x. The Infinispan project changed this API when moving to 6.x (it was a major release, so API changes are to be expected), which means ModeShape 3.x cannot use it.

             

            BTW, the latest stable version of ModeShape is 3.8.0.Final, so I would strongly urge you to use that over any prior version.


            If you really need Infinispan 6.x, then consider looking at our 4.0 version. Just be aware that 4.0 is currently in Alpha and thus not suitable for production. We hope to release 4.0.0.Beta1 within the next week or two, followed by a few more betas as we fix bugs, and eventually a Final release as the code stabilizes.

            • 3. Re: Issue with Infinispan 6 and Modeshape 3.8?
              deepak_a

              Hi,


              Thanks for the reply.


              I think its better we upgrade to ModeShape is 3.8.0.Final as you suggested.


              We currently use Jboss EAP 6.1.0, I suppose we "must" upgrade to JBoss EAP 6.3.0.GA.

              Is there any other compelling reason to use Modeshape 3.8.0? (since that involves a Jboss upgrade as well for us)


              I am trying to understand if the problem explained in the below thread (marshaller/unmarshaller) would also get resolved if we upgrade Modeshape & Jboss?

              https://community.jboss.org/thread/248225


              regards

              Deepak.

              • 4. Re: Issue with Infinispan 6 and Modeshape 3.8?
                laocui

                Hi All,

                 

                I'm experincing the same issue, couldn't get connection from ManagedConnectionFactory, because the transacation is abort and not enlisted.

                (I'm using Modeshape3.8.final and infinispan 5.3.)

                Is there a workroud for this issue  except for upgrading to modeshape4.x and infinispan6.x ?

                 

                BTW, Is it possible to deploy modeshape4.0.Beta to Jboss EAP 6.X  or What points I need to modify to successfully deploy to Jboss 7/EAP 6?

                 

                Thanks

                Lowry

                • 5. Re: Issue with Infinispan 6 and Modeshape 3.8?
                  hchiorean

                  What is your environment ? What is your configuration ? What is the full exception stack ? What are you trying to do ? ....

                   

                  This issue is about ModeShape 3 not working with Infinispan 6, but you seem to be using Infinispan 5.3 with ModeShape 3.x

                  ModeShape 3.x (and EAP as well) use Infinispan 5.2.x, so I'm curios how you're using Infinispan 5.3

                  • 6. Re: Re: Issue with Infinispan 6 and Modeshape 3.8?
                    laocui

                    Thaks for your reply.

                    Sorry for posting wrong place.

                     

                    The attachments are my configuration.

                    ENV: modshape3.7.1, infinispan 5.2.6, EAP6, Oracle xa datasource (also used by EAR)

                     

                    The exception is throwed while trying to login repository.

                    Restricted business, I couldn't upgrade to WildFly8.  I want to find out whether there is a workround.  e.g. deploy Modeshape 4 to Jboss eap 6.1/6.3

                     

                    Regards

                    Lowry

                    • 7. Re: Re: Issue with Infinispan 6 and Modeshape 3.8?
                      hchiorean

                      Before going into the technical details, a question first: do you need really need XA datasources ? - from your configuration of ModeShape & Infinispan you don't seem to be clustering anything, so I don't really understand why you'd need XA datasources.

                      Even if XA datasources would be working, you need to be aware that Infinispan does not support (neither in 5.x nor in 6.x) XA transactions at a cache-store level (see https://www.mail-archive.com/infinispan-dev@lists.jboss.org/msg06425.html).

                       

                      The exception itself comes from the container (EAP 6.?) not being able to open/obtain a ManagedConnection from the XA-datasource. I can think of multiple reasons why this can happen:

                      • misconfigured XA-datasource in EAP
                      • Oracle driver issues
                      • bugs in the EAP XA datasource/transaction combination
                      • Infinispan bug in the String-based JDBC cache store as far as obtaining connections from an XA datasource.

                       

                      If you search the WWW you'll find numerous issues that manifest themselves with the same / very similar exception and fall in one of the above categories. Regardless of the cause, IMO this has nothing to do with ModeShape so all I can recommend is that you post the exception stack & description in the Infinispan and/or AS forums.

                       

                      If you want to try other container/Infinispan/ModeShape combinations then your choices are:

                      • EAP 6.3/Infinispan 5.2.x/ModeShape 3.8
                      • Wildfly 8.x/Infinispan 6/ ModeShape 4.0.Beta1

                       

                      EDIT: you cannot use ModeShape 4 with EAP. You can only use ModeShape 3.x with EAP because a) the EAP/WF API mismatch and more importantly b) Infinispan version (only Modeshape 3 works only with Infinispan 3.x while ModeShape 4 works only with Infinispan 6). But IMO this exception is not really related to the ModeShape version as much as the container / Infinispan version.

                      • 8. Re: Re: Re: Issue with Infinispan 6 and Modeshape 3.8?
                        laocui

                        I have tryed EAP 6.3/Infinispan 5.2.x/ModeShape 3.8 combination. the exception still existed.


                        I'm just testing it on xa datasource. Actually, we have more than two nodes in PRD.

                         

                        I think the last two options are possible.

                        I debug into modeshape & infinispan when RepositoryCache is initializing,  noticed that modeshape can read cache entry from database by key "reposiroty:info" , but will be blocked while initializing 'system' workspace.

                        The TransactionReaper found the TX is  timeout, then mark it as arbort, (roll_back), but still try to get connection on same datasource.

                         

                        Another basis is from the following log:

                        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:96)

                         

                         

                        Thanks @Horia Chiorean, I will investigate what/which operation caused TX's timeout.