Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-16829

java.lang.NoSuchMethodError: 'long org.hibernate.engine.spi.SharedSessionContractImplementor.getTransactionStartTimestamp()'

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 14.0.32.Final
    • Hibernate Cache
    • None
    • Hide

      Above configuration and call method like this:

       
      try

      { List<TrackingNoClob> trackingList = session.createQuery("select b from TrackingNoClob b", TrackingNoClob.class).list();  <-- EXCEPTION thrown here }

      catch (Throwable t)

      { throw new RuntimeException("cannot query database\n" + t); }

       

      Show
      Above configuration and call method like this:   try { List<TrackingNoClob> trackingList = session.createQuery("select b from TrackingNoClob b", TrackingNoClob.class).list();  <-- EXCEPTION thrown here } catch (Throwable t) { throw new RuntimeException("cannot query database\n" + t); }  

      java.lang.NoSuchMethodError: 'long org.hibernate.engine.spi.SharedSessionContractImplementor.getTransactionStartTimestamp()'

       

      When using infinispan with hibernate as the 2nd level cache, attempted to perform a query and obtaining this error calling from 
      ReadOnlyEntityDataAccess method
       
      public boolean putFromLoad(SharedSessionContractImplementor session, Object key, Object value, Object version, boolean minimalPutOverride)

      { return this.delegate.putFromLoad(session, key, value, session.getTransactionStartTimestamp(), version, minimalPutOverride); }

       
      Relevant Dependencies:
       
      [INFO] +- org.infinispan:infinispan-hibernate-cache-v60:jar:14.0.32.Final:compile
      [INFO] | +- org.infinispan:infinispan-hibernate-cache-commons:jar:14.0.32.Final:compile
      [INFO] | +- org.infinispan:infinispan-hibernate-cache-spi:jar:14.0.32.Final:compile
      [INFO] | +- org.infinispan:infinispan-commons-jakarta:jar:14.0.32.Final:compile
      [INFO] | | +- org.infinispan.protostream:protostream:jar:4.6.5.Final:compile
      [INFO] | | | +- com.squareup:protoparser:jar:4.0.3:compile
      [INFO] | | | - org.javassist:javassist:jar:3.29.1-GA:compile
      [INFO] | | +- org.infinispan.protostream:protostream-types:jar:4.6.5.Final:compile
      [INFO] | | +- com.github.ben-manes.caffeine:caffeine:jar:3.1.8:compile
      [INFO] | | - io.reactivex.rxjava3:rxjava:jar:3.1.9:compile
      [INFO] | | - org.reactivestreams:reactive-streams:jar:1.0.4:compile
      [INFO] | +- org.infinispan:infinispan-core-jakarta:jar:14.0.32.Final:compile
      [INFO] | | +- org.jgroups:jgroups:jar:5.2.28.Final:compile
      [INFO] | | - org.jboss.threads:jboss-threads:jar:2.3.6.Final:compile
      [INFO] | | - org.wildfly.common:wildfly-common:jar:1.3.0.Final:compile
      [INFO] | - org.infinispan:infinispan-jboss-marshalling:jar:14.0.32.Final:compile
      [INFO] | - org.jboss.marshalling:jboss-marshalling-river:jar:2.1.5.Final:compile
      [INFO] | - org.jboss.marshalling:jboss-marshalling:jar:2.1.5.Final:compile
      [INFO] +- jakarta.persistence:jakarta.persistence-api:jar:3.2.0:compile
      [INFO] +- jakarta.el:jakarta.el-api:jar:4.0.0:compile
      [INFO] +- jakarta.platform:jakarta.jakartaee-api:jar:9.1.0:compile
       
      [INFO] +- org.hibernate.orm:hibernate-core:jar:6.6.1.Final:compile
      [INFO] | +- jakarta.transaction:jakarta.transaction-api:jar:2.0.1:compile
      [INFO] | +- org.jboss.logging:jboss-logging:jar:3.5.0.Final:compile
      [INFO] | +- org.hibernate.common:hibernate-commons-annotations:jar:7.0.1.Final:runtime
      [INFO] | +- io.smallrye:jandex:jar:3.2.0:runtime
      [INFO] | +- com.fasterxml:classmate:jar:1.5.1:compile
      [INFO] | +- net.bytebuddy:byte-buddy:jar:1.14.18:runtime
      [INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:4.0.0:runtime
      [INFO] | | - jakarta.activation:jakarta.activation-api:jar:2.1.0:runtime
      [INFO] | +- jakarta.inject:jakarta.inject-api:jar:2.0.1:runtime
      [INFO] | - org.antlr:antlr4-runtime:jar:4.13.0:runtime
       
      [INFO] +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
      [INFO] | - javax.activation:javax.activation-api:jar:1.2.0:compile
      [INFO] +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.1:compile
      [INFO] | +- org.glassfish.jaxb:txw2:jar:2.3.1:compile
      [INFO] | +- com.sun.istack:istack-commons-runtime:jar:3.0.7:compile
      [INFO] | +- org.jvnet.staxex:stax-ex:jar:1.8:compile
      [INFO] | - com.sun.xml.fastinfoset:FastInfoset:jar:1.2.15:compile
      [INFO] +- com.sun.xml.bind:jaxb-impl:jar:4.0.4:runtime
      [INFO] | - com.sun.xml.bind:jaxb-core:jar:4.0.4:runtime
      [INFO] | - org.eclipse.angus:angus-activation:jar:2.0.1:runtime
       
      persistence.xml
       
      <?xml version="1.0" encoding="UTF-8"?>
      <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
      http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
      version="2.1">

      <persistence-unit name="persistence" transaction-type="RESOURCE_LOCAL">

      <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>

      <class>redacted.hibernate.dataobjects.TrackingNoClob</class>

      <shared-cache-mode>ENABLE_SELECTIVE</shared-cache-mode>

      <properties>
      <!-- Database connection provider -->
      <property name="hibernate.hbm2ddl.auto" value="validate"/>
      <property name="hibernate.connection.provider_class" value="redacted.custom.HikariCPHibernate"/>
      <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
      <property name="hibernate.show_sql" value="true"/>
      <property name="hibernate.use_outer_join" value="true"/>
      <property name="hibernate.jdbc.fetch_size" value="100"/>
      <property name="hibernate.custom.pool_alias" value="redacted"/>

      <!-- Second-level cache settings -->
      <property name="hibernate.cache.use_second_level_cache" value="true"/>
      <property name="hibernate.cache.use_query_cache" value="true"/>
      <property name="hibernate.cache.region.factory_class" value="infinispan"/>
      <!--
      <property name="hibernate.cache.infinispan.cfg" value="infinispan.xml"/>
      -->
      <property name="hibernate.cache.infinispan.cfg"
      value="org/infinispan/hibernate/cache/commons/builder/infinispan-configs-local.xml"/>

      <!-- Statistics generation -->
      <property name="hibernate.generate_statistics" value="true"/>

      <!-- Additional formatting options -->
      <property name="hibernate.format_sql" value="true"/>

      <property name="hibernate.show_sql" value="true"/>
      <property name="hibernate.format_sql" value="true"/>

      <!-- -->
      <!-- -->
      <!-- IMPORTANT all mapping files change to mapping classes -->
      <!-- -->
      <!-- -->

      </properties>

      </persistence-unit>
      </persistence>
       
       

       

              ttarrant@redhat.com Tristan Tarrant
              k.john.tal John Tal
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: