Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Configuration of Hibernate 5.1.4 with wildfly 10
PostPosted: Thu Sep 07, 2017 6:22 am 
Newbie

Joined: Wed Aug 09, 2017 4:20 am
Posts: 2
i am trying to configure hibernate 5.1.4 with wildfly 10 as i am using hibenrate ogm 5.1.0 and it needs updated version of hibernate which is not included in wildfly 10 but i am getting this exception.Can anyone help?

"Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.search.hcore.impl.HibernateSearchIntegrator not a subtype"


Top
 Profile  
 
 Post subject: Re: Configuration of Hibernate 5.1.4 with wildfly 10
PostPosted: Thu Sep 07, 2017 8:19 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1590
Location: Romania
I moved the topic to Hibernate OGM forum. You might want to ask it on the Wildfly forum since it's probably more related to Wildfly than Hibernate.

_________________
If you liked my answer, you are going to love my High-Performance Java Persistence book and my blog as well.


Top
 Profile  
 
 Post subject: Re: Configuration of Hibernate 5.1.4 with wildfly 10
PostPosted: Mon Sep 11, 2017 6:08 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,

this is the OGM documentation section explaining how to bundle it for WildFly 10:
https://docs.jboss.org/hibernate/stable ... wildfly_10

We also have a page about running a newer version of Hibernate ORM in WildFly:
http://docs.jboss.org/hibernate/orm/cur ... ldfly.html

(It's only mentioning the latest version of ORM but it should work the same for ORM versions 5.1.x)

I know it's still a bit complex; there's an example project being made doing this. It's not ready yet but you could have a look at the pull request:
https://github.com/hibernate/hibernate-demos/pull/25

Especially the way modules are integrated on WildFly:
- https://github.com/fax4ever/hibernate-d ... #L195-L256

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: Configuration of Hibernate 5.1.4 with wildfly 10
PostPosted: Tue Oct 31, 2017 10:23 am 
Newbie

Joined: Mon Mar 20, 2017 7:40 am
Posts: 6
For me the configuration in the OGM documentation did not work.

If I remember correctly the main difference was the MANIFEST.MF

I use:
Code:
Dependencies: org.hibernate.ogm:main services, org.hibernate.ogm.mongodb:main services


I think in the documentation there are version numbers instead of "main". I think the right slot for hibernate search is also "main".

I in persistence.xml I use the following:

Code:
<properties>
            <!--<property name="wildfly.jpa.hibernate.search.module" value="org.hibernate.search.orm:5.6.1.Final-orm51"/>-->
            <property name="jboss.as.jpa.providerModule" value="org.hibernate:5.1"/>
            <property name="hibernate.ogm.datastore.provider" value="<your dbms>"/>
            <property name="hibernate.ogm.datastore.database" value="<your db>"/>
</properties>


(I don't use hibernate search anymore (too many missing features) but this would be the right property - I think in the documentation there is also a different value that did not work for me)

In my project I have a quite complex pom hierarchy and I hope I extracted the right bits to get a correctly patched wildfly 10 configuration

Parent:

Code:
<properties>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>

        <version.javaee>7.0</version.javaee>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <jboss.home>${env.JBOSS_HOME}</jboss.home>

        <version.wildfly>10.1.0.Final</version.wildfly>
        <version.wildfly.bom>${version.wildfly}</version.wildfly.bom>
        <version.wildfly.hibernate.orm>5.1.4.Final</version.wildfly.hibernate.orm>
        <version.wildfly.hibernate.ogm>5.1.0.Final</version.wildfly.hibernate.ogm>
        <version.wildfly.hibernate.search>5.6.1.Final</version.wildfly.hibernate.search>
        <version.wildfly.arquillian>8.2.1.Final</version.wildfly.arquillian>

        <version.jboss.shrinkwarp.resolver>2.2.6</version.jboss.shrinkwarp.resolver>

        <version.maven.clean.plugin>3.0.0</version.maven.clean.plugin>
        <version.maven.compiler.plugin>3.1</version.maven.compiler.plugin>
        <version.maven.dependency.plugin>3.0.0</version.maven.dependency.plugin>
        <version.maven.resources.plugin>3.0.0</version.maven.resources.plugin>
        <version.maven.war.plugin>3.0.0</version.maven.war.plugin>
        <version.maven.surefire.plugin>2.19.1</version.maven.surefire.plugin>
        <version.wildfly.maven.plugin>1.1.0.Final</version.wildfly.maven.plugin>
        <version.versions.maven.plugin>2.4</version.versions.maven.plugin>

        <version.junit>4.12</version.junit>
    </properties>


child for getting a clean installation:

Code:
<properties>
        <classifier.wildfly.dist>wildfly-10-dist</classifier.wildfly.dist>
         [...]
    </properties>

    <profiles>
        <!--
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        // WILDFLY-BARE
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        -->
        <profile>
            <id>wildfly-bare</id>
            <build>
                <plugins>
                    <!-- Delete previous installation -->
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <version>${version.maven.clean.plugin}</version>
                        <configuration>
                            <filesets>
                                <fileset>
                                    <directory>${jboss.home}</directory>
                                    <followSymlinks>false</followSymlinks>
                                </fileset>
                            </filesets>
                        </configuration>
                    </plugin>
                    <!-- Download/unpack wildfly and custom modules -->
                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>${version.maven.dependency.plugin}</version>
                        <executions>
                            <execution>
                                <id>unpack</id>
                                <phase>clean</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.wildfly</groupId>
                                            <artifactId>wildfly-dist</artifactId>
                                            <version>${version.wildfly}</version>
                                            <type>zip</type>
                                            <overWrite>true</overWrite>
                                            <outputDirectory>${jboss.home}/..</outputDirectory>
                                        </artifactItem>
                                        <artifactItem>
                                            <groupId>org.hibernate</groupId>
                                            <artifactId>hibernate-orm-modules</artifactId>
                                            <version>${version.wildfly.hibernate.orm}</version>
                                            <classifier>${classifier.wildfly.dist}</classifier>
                                            <type>zip</type>
                                            <overWrite>true</overWrite>
                                            <outputDirectory>${jboss.home}/modules</outputDirectory>
                                        </artifactItem>
                                        <artifactItem>
                                            <groupId>org.hibernate.ogm</groupId>
                                            <artifactId>hibernate-ogm-modules</artifactId>
                                            <classifier>${classifier.wildfly.dist}</classifier>
                                            <version>${version.wildfly.hibernate.ogm}</version>
                                            <type>zip</type>
                                            <overWrite>true</overWrite>
                                            <outputDirectory>${jboss.home}/modules</outputDirectory>
                                        </artifactItem>
                                        <artifactItem>
                                            <groupId>org.hibernate</groupId>
                                            <artifactId>hibernate-search-modules</artifactId>
                                            <version>${version.wildfly.hibernate.search}</version>
                                            <classifier>${classifier.wildfly.dist}</classifier>
                                            <type>zip</type>
                                            <overWrite>true</overWrite>
                                            <outputDirectory>${jboss.home}/modules</outputDirectory>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
     </profile>
     [...]
</profiles>


I hope this helps...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.