Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-24118

[GSS](7.4.z) HSEARCH-4107 - Session cast fails when creating a FullTextSession with Spring 2.4.0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.4.9.CR1, 7.4.9.GA
    • 7.4.7.GA
    • Hibernate
    • None
    • False
    • None
    • False
    • ?
    • Hide

      Clone the reproducer for HSEARCH-4107:

      git clone https://github.com/knoobie/spring-2-4-entitymanager.git
      

      Change the versions of the spring-boot-starter-parent to the needed one (springboot 2.5.9 - spring framework 5.3.15 in this case). And the hibernate.search.version for the one used by EAP 5.10.7.Final-redhat-00001.

      diff --git a/pom.xml b/pom.xml
      index 091ad45..be73f63 100644
      --- a/pom.xml
      +++ b/pom.xml
      @@ -5,7 +5,7 @@
              <parent>
                      <groupId>org.springframework.boot</groupId>
                      <artifactId>spring-boot-starter-parent</artifactId>
      -               <version>2.4.0</version>
      +               <version>2.5.9</version>
                      <relativePath/> <!-- lookup parent from repository -->
              </parent>
              <groupId>com.example</groupId>
      @@ -16,7 +16,7 @@
       
              <properties>
                      <java.version>1.8</java.version>
      -               <hibernate.search.version>5.11.5.Final</hibernate.search.version>
      +               <hibernate.search.version>5.10.7.Final-redhat-00001</hibernate.search.version>
              </properties>
       
              <dependencies>
      

      And test it:

      mvn clean test
      ...
      [INFO] 
      [INFO] Results:
      [INFO] 
      [ERROR] Errors: 
      [ERROR]   DemoApplicationTests.contextLoads:20 » ClassCast class com.sun.proxy.$Proxy99 ...
      [INFO] 
      [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
      
      Show
      Clone the reproducer for HSEARCH-4107: git clone https: //github.com/knoobie/spring-2-4-entitymanager.git Change the versions of the spring-boot-starter-parent to the needed one (springboot 2.5.9 - spring framework 5.3.15 in this case). And the hibernate.search.version for the one used by EAP 5.10.7.Final-redhat-00001 . diff --git a/pom.xml b/pom.xml index 091ad45..be73f63 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ <parent> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-starter-parent </artifactId> - <version> 2.4.0 </version> + <version> 2.5.9 </version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId> com.example </groupId> @@ -16,7 +16,7 @@ <properties> <java.version> 1.8 </java.version> - <hibernate.search.version> 5.11.5.Final </hibernate.search.version> + <hibernate.search.version> 5.10.7.Final-redhat-00001 </hibernate.search.version> </properties> <dependencies> And test it: mvn clean test ... [INFO] [INFO] Results: [INFO] [ERROR] Errors: [ERROR] DemoApplicationTests.contextLoads:20 » ClassCast class com.sun.proxy.$Proxy99 ... [INFO] [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

      See https://github.com/spring-projects/spring-framework/issues/26090

      Backport of HSEARCH-4107 into hibernate 5.10.

              rhn-support-rmartinc Ricardo Martin Camarero
              rhn-support-rmartinc Ricardo Martin Camarero
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: