How to disable Wildfly 10 Hibernate Search module without persistence.xml file is autoconfigured Spring Boot...












0















Hi everyone!




I am developing Spring Boot 1.5 app with Hibernate Search 5.5. As standalone app it is running as I expected, but I have a problem with deploying it on Wildfly 10. During deployment it is throwing an exception: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not a subtype




I want to disable Wildfly Hibernate Search implementation and provide my own prepackaged with my app.
I have found that I have to provide wildfly.jpa.hibernate.search.module = none property in in persistence.xml file. My question is how to do this without rewriting whole Spring Boot datasource autoconfiguration?










share|improve this question



























    0















    Hi everyone!




    I am developing Spring Boot 1.5 app with Hibernate Search 5.5. As standalone app it is running as I expected, but I have a problem with deploying it on Wildfly 10. During deployment it is throwing an exception: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not a subtype




    I want to disable Wildfly Hibernate Search implementation and provide my own prepackaged with my app.
    I have found that I have to provide wildfly.jpa.hibernate.search.module = none property in in persistence.xml file. My question is how to do this without rewriting whole Spring Boot datasource autoconfiguration?










    share|improve this question

























      0












      0








      0








      Hi everyone!




      I am developing Spring Boot 1.5 app with Hibernate Search 5.5. As standalone app it is running as I expected, but I have a problem with deploying it on Wildfly 10. During deployment it is throwing an exception: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not a subtype




      I want to disable Wildfly Hibernate Search implementation and provide my own prepackaged with my app.
      I have found that I have to provide wildfly.jpa.hibernate.search.module = none property in in persistence.xml file. My question is how to do this without rewriting whole Spring Boot datasource autoconfiguration?










      share|improve this question














      Hi everyone!




      I am developing Spring Boot 1.5 app with Hibernate Search 5.5. As standalone app it is running as I expected, but I have a problem with deploying it on Wildfly 10. During deployment it is throwing an exception: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not a subtype




      I want to disable Wildfly Hibernate Search implementation and provide my own prepackaged with my app.
      I have found that I have to provide wildfly.jpa.hibernate.search.module = none property in in persistence.xml file. My question is how to do this without rewriting whole Spring Boot datasource autoconfiguration?







      java spring spring-boot hibernate-search wildfly-10






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 9:48









      pyskppyskp

      287




      287
























          2 Answers
          2






          active

          oldest

          votes


















          1














          Finally I have found solution to force Wildfly not to load provided Hibernate Search module. I have read in Wildfly 10 documentation in chapter Class Loading in Wildfly, about providing jboss-deployment-structure.xml file. During building WAR file with my app I am adding this file in META-INF directory with following content:



          <?xml version="1.0"?>
          <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
          <deployment>
          <exclusions>
          <module name="org.hibernate.search.orm"/>
          </exclusions>
          </deployment>
          </jboss-deployment-structure>


          This configuration solved my problem and Wildfly is loading Hibernate Search packaged with my app.






          share|improve this answer































            0














            Try adding this to your application.yaml:



            spring.jpa.properties:
            wildfly.jpa.hibernate.search.module: none


            See an example of a Spring Boot application with Hibernate Search here.
            It does not use WildFly, though.






            share|improve this answer
























            • I have added property spring.jpa.properties.wildfly.jpa.hibernate.search.module=none in application.properties, but nothing changed. Seems it isn't passed to Wildfly.

              – pyskp
              Nov 21 '18 at 13:47











            • Ok, well then I don't really know... I could suggest to add an almost empty persistence.xml with wildfly.jpa.hibernate.search.module set to none, and see if it works, but I suppose you tried.

              – yrodiere
              Nov 21 '18 at 14:30











            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409259%2fhow-to-disable-wildfly-10-hibernate-search-module-without-persistence-xml-file-i%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Finally I have found solution to force Wildfly not to load provided Hibernate Search module. I have read in Wildfly 10 documentation in chapter Class Loading in Wildfly, about providing jboss-deployment-structure.xml file. During building WAR file with my app I am adding this file in META-INF directory with following content:



            <?xml version="1.0"?>
            <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
            <deployment>
            <exclusions>
            <module name="org.hibernate.search.orm"/>
            </exclusions>
            </deployment>
            </jboss-deployment-structure>


            This configuration solved my problem and Wildfly is loading Hibernate Search packaged with my app.






            share|improve this answer




























              1














              Finally I have found solution to force Wildfly not to load provided Hibernate Search module. I have read in Wildfly 10 documentation in chapter Class Loading in Wildfly, about providing jboss-deployment-structure.xml file. During building WAR file with my app I am adding this file in META-INF directory with following content:



              <?xml version="1.0"?>
              <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
              <deployment>
              <exclusions>
              <module name="org.hibernate.search.orm"/>
              </exclusions>
              </deployment>
              </jboss-deployment-structure>


              This configuration solved my problem and Wildfly is loading Hibernate Search packaged with my app.






              share|improve this answer


























                1












                1








                1







                Finally I have found solution to force Wildfly not to load provided Hibernate Search module. I have read in Wildfly 10 documentation in chapter Class Loading in Wildfly, about providing jboss-deployment-structure.xml file. During building WAR file with my app I am adding this file in META-INF directory with following content:



                <?xml version="1.0"?>
                <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
                <deployment>
                <exclusions>
                <module name="org.hibernate.search.orm"/>
                </exclusions>
                </deployment>
                </jboss-deployment-structure>


                This configuration solved my problem and Wildfly is loading Hibernate Search packaged with my app.






                share|improve this answer













                Finally I have found solution to force Wildfly not to load provided Hibernate Search module. I have read in Wildfly 10 documentation in chapter Class Loading in Wildfly, about providing jboss-deployment-structure.xml file. During building WAR file with my app I am adding this file in META-INF directory with following content:



                <?xml version="1.0"?>
                <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
                <deployment>
                <exclusions>
                <module name="org.hibernate.search.orm"/>
                </exclusions>
                </deployment>
                </jboss-deployment-structure>


                This configuration solved my problem and Wildfly is loading Hibernate Search packaged with my app.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 25 '18 at 12:59









                pyskppyskp

                287




                287

























                    0














                    Try adding this to your application.yaml:



                    spring.jpa.properties:
                    wildfly.jpa.hibernate.search.module: none


                    See an example of a Spring Boot application with Hibernate Search here.
                    It does not use WildFly, though.






                    share|improve this answer
























                    • I have added property spring.jpa.properties.wildfly.jpa.hibernate.search.module=none in application.properties, but nothing changed. Seems it isn't passed to Wildfly.

                      – pyskp
                      Nov 21 '18 at 13:47











                    • Ok, well then I don't really know... I could suggest to add an almost empty persistence.xml with wildfly.jpa.hibernate.search.module set to none, and see if it works, but I suppose you tried.

                      – yrodiere
                      Nov 21 '18 at 14:30
















                    0














                    Try adding this to your application.yaml:



                    spring.jpa.properties:
                    wildfly.jpa.hibernate.search.module: none


                    See an example of a Spring Boot application with Hibernate Search here.
                    It does not use WildFly, though.






                    share|improve this answer
























                    • I have added property spring.jpa.properties.wildfly.jpa.hibernate.search.module=none in application.properties, but nothing changed. Seems it isn't passed to Wildfly.

                      – pyskp
                      Nov 21 '18 at 13:47











                    • Ok, well then I don't really know... I could suggest to add an almost empty persistence.xml with wildfly.jpa.hibernate.search.module set to none, and see if it works, but I suppose you tried.

                      – yrodiere
                      Nov 21 '18 at 14:30














                    0












                    0








                    0







                    Try adding this to your application.yaml:



                    spring.jpa.properties:
                    wildfly.jpa.hibernate.search.module: none


                    See an example of a Spring Boot application with Hibernate Search here.
                    It does not use WildFly, though.






                    share|improve this answer













                    Try adding this to your application.yaml:



                    spring.jpa.properties:
                    wildfly.jpa.hibernate.search.module: none


                    See an example of a Spring Boot application with Hibernate Search here.
                    It does not use WildFly, though.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 21 '18 at 11:11









                    yrodiereyrodiere

                    2,6861315




                    2,6861315













                    • I have added property spring.jpa.properties.wildfly.jpa.hibernate.search.module=none in application.properties, but nothing changed. Seems it isn't passed to Wildfly.

                      – pyskp
                      Nov 21 '18 at 13:47











                    • Ok, well then I don't really know... I could suggest to add an almost empty persistence.xml with wildfly.jpa.hibernate.search.module set to none, and see if it works, but I suppose you tried.

                      – yrodiere
                      Nov 21 '18 at 14:30



















                    • I have added property spring.jpa.properties.wildfly.jpa.hibernate.search.module=none in application.properties, but nothing changed. Seems it isn't passed to Wildfly.

                      – pyskp
                      Nov 21 '18 at 13:47











                    • Ok, well then I don't really know... I could suggest to add an almost empty persistence.xml with wildfly.jpa.hibernate.search.module set to none, and see if it works, but I suppose you tried.

                      – yrodiere
                      Nov 21 '18 at 14:30

















                    I have added property spring.jpa.properties.wildfly.jpa.hibernate.search.module=none in application.properties, but nothing changed. Seems it isn't passed to Wildfly.

                    – pyskp
                    Nov 21 '18 at 13:47





                    I have added property spring.jpa.properties.wildfly.jpa.hibernate.search.module=none in application.properties, but nothing changed. Seems it isn't passed to Wildfly.

                    – pyskp
                    Nov 21 '18 at 13:47













                    Ok, well then I don't really know... I could suggest to add an almost empty persistence.xml with wildfly.jpa.hibernate.search.module set to none, and see if it works, but I suppose you tried.

                    – yrodiere
                    Nov 21 '18 at 14:30





                    Ok, well then I don't really know... I could suggest to add an almost empty persistence.xml with wildfly.jpa.hibernate.search.module set to none, and see if it works, but I suppose you tried.

                    – yrodiere
                    Nov 21 '18 at 14:30


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409259%2fhow-to-disable-wildfly-10-hibernate-search-module-without-persistence-xml-file-i%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    'app-layout' is not a known element: how to share Component with different Modules

                    android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

                    SQL update select statement