5 Replies Latest reply on May 17, 2018 7:13 AM by wieberinsma

    ISPN000453: Attempt to define configuration for cache X which already exists

    wieberinsma

      Hi all!

       

      I am running into this most obscure error for Infinispan 9.2. I am using a default WildFly12 setup for Intellij IDEA. The first time after loading my project, I start the server and all is good and artifacts are deployed normally and everything works. After the first time however, I run into the above error. It seems some part of the cache configuration may not be cleaned up properly on redeploying. In Eclipse, the error does not occur on successive redeploys.

       

      I have not found duplicate jars or configuration files in my artifacts. I am also sure I am not trying to deploy twice; a system reboot does not fix it. Doing a full Maven clear to get rid of all target/ folders also does not help.

       

      Is there anyone that could point me in a direction from where this error could originate? The only other mention of this error I have found so far is here: [ISPN-8836] Custom region definition causes ISPN000453 - JBoss Issue Tracker

       

      Kind regards,

      Wiebe

        • 1. Re: ISPN000453: Attempt to define configuration for cache X which already exists
          nadirx

          Maybe something related to [ISPN-9136] RegionFactory.stop does not undefine pending-puts cache - JBoss Issue Tracker

          rvansa do you know if this could be the case ?

          • 2. Re: ISPN000453: Attempt to define configuration for cache X which already exists
            rvansa

            nadirx I doubt so; since wiebe replaced the cache name with X I suppose this was an entity (or collection...) cache, not a pending puts cache. Also the cache is undefined from elsewhere IIRC (as the Hibernate's SessionFactory.close() is called), but not in the stop() which is a bit weird.

             

            I've recently debugged into similar issue where a silently swallowed exception from WF's interceptor stack caused the session factory to not be closed, though it was more of a test problem. So this might be similar, but without a reproducer we can't tell.

             

            smarlow Does this ring any bells?

            • 3. Re: ISPN000453: Attempt to define configuration for cache X which already exists
              wieberinsma

              Hi Tristan,

               

              I will not be able yet to verify if an upgrade to 9.2.3 fixes the issue (we do not own that top-level dependency management in my project). But I have found a fix for my issue for now.

               

              When adding artifacts to my deployment for Wildfly 12 Intellij automatically adds a build step for building the artifacts. However, in a maven multi-module project this did not work correctly. The target/ folders delivered for doing a full project build vs. individual modules has differences, causing my issues. Beginner's mistake it seems. I have to find time to analyse these exact differences, but for now I simply do not build single artifacts anymore. What I do now already know is that I probably ended up with a jar being included that was not included with a full project build.

               

              Thanks for the help!

               

              @rvansa: I did not actually replace a cache with name 'X', that was a placefolder as to not disclose sensitive information. The issue did only occur with different pending-puts caches. I'll have to see in a later upgrade for Infinispan whether that has any impact.

              • 4. Re: ISPN000453: Attempt to define configuration for cache X which already exists
                smarlow

                One related issue that we are seeing is with deployments that have multiple persistence units with the [1] WildFly branch, when using Hibernate ORM 5.3.0.Final.  Gail thinks that there may be a collision between the two persistence units, on timestamps cache, because it seemed like the entity region prefix was not being used and both persistence units had the same entity class in it.

                 

                Of course, we shouldn't ever have the same entity class mapped to more than one persistence unit, because that could lead to unexpected behaviour.  Also, we think the timestamp issue could be a Hibernate ORM 5.3.0.Final bug that Gail is looking into. 

                 

                My question is whether this application deployment getting the "Attempt to define configuration for cache X which already exists", has more than one persistence unit defined?

                 

                Scott

                 

                [1] https://github.com/scottmarlow/wildfly/tree/orm53_two

                • 5. Re: ISPN000453: Attempt to define configuration for cache X which already exists
                  wieberinsma

                  Hi Scott,

                   

                  We do not share entities between persistence units; we only have a single one defined in the entire project.