1 Reply Latest reply on Jan 9, 2018 3:56 PM by Peter Plumber

    Wildfly-Modul-Configuration for hibernate-spatial

    Peter Plumber Newbie

      I am using hibernate spatial with hibenrate10.and modified the org.hibernate-module by adding some dependencies as suggested in

      Using Hibernate Spatial with Wildfly 9/10 - aVolpe Blog

       

      the module.xml then looks like

       

      <module xmlns="urn:jboss:module:1.3" name="org.hibernate">

          <resources>

              <resource-root path="hibernate-core-5.0.10.Final.jar"/>

              <resource-root path="hibernate-envers-5.0.10.Final.jar"/>

              <resource-root path="hibernate-entitymanager-5.0.10.Final.jar"/>

              <resource-root path="hibernate-java8-5.0.10.Final.jar"/>

              <resource-root path="hibernate-spatial-5.0.12.Final.jar"/>

              <resource-root path="geolatte-geom-1.2.0.jar"/>

              <resource-root path="jts-1.13.jar"/>

          </resources>

       

          <dependencies>

              <module name="asm.asm"/>

      ...

              <module name="org.slf4j"/>

              <module name="com.oracle.jdbc"/>

          </dependencies>

      </module>

       

      this configuration work.

      But now I recieved a new challange.

      A user of my software now tells me

      "modifying the default org.hibernate module will make me loose the redhat support for this installation "

       

      I tried to create a new module "org.hibernate.spatial" including the above jars including a dependency to org.hibernate

      I even tried to include all jars to my application archieve.

      but I could not make i work correctly und got some more or less entertaining exceptions including

      org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [org.geolatte.geom.codec.db.oracle.DefaultConnectionFinder] as strategy [org.geolatte.geom.codec.db.oracle.ConnectionFinder]

      java.lang.RuntimeException: Tried retrieving OracleConnection from oracle.jdbc.driver.T4CConnection using method _getPC, but received null.

       

      so this is my question:

       

      What is the suggested way to configure wildfly for usage of hibernate-spatial?

        • 1. Re: Wildfly-Modul-Configuration for hibernate-spatial
          Peter Plumber Newbie

          I still do not completely understand Wildfly module dependency.

          but I found way to deploy my application without modifying existing modules.

           

          I added to the ear

           

          sdoapi.jar

          hibernate-spatial-5.0.12.Final.jar

          geolatte-geom-1.2.0.jar

          jts-1.13.jar

           

          and following jboss-deployment-structure.xml to META-INF

           

          <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1">

            <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

            <deployment>

              <dependencies>

                <module name="com.oracle.jdbc" export="true"/>

              </dependencies>

            </deployment>

          </jboss-deployment-structure>