0 Replies Latest reply on Jan 21, 2015 6:10 PM by Ben Leov

    Infinispan 4.3.7.Final, Hibernate 4.3.7 and Tomcat 6.0.14

    Ben Leov Newbie

      Hi All,

       

      I was wondering if anybody has successfully set up a configuration using Infinispan 4.3.7 Final as an L2 cache with Hibernate 4.3.7 running on Tomcat 6.0.14.

       

      I am coming up against many issues to do with dependencies and seem unable to resolve them.

       

      My hibernate.cfg reads:

       

      <!DOCTYPE hibernate-configuration PUBLIC

              "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

              "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">


      <hibernate-configuration>

        <session-factory>

              <property name="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</property>

              <property name="javax.persistence.validation.mode">NONE</property>

              <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>

       

              <property name="hibernate.bytecode.use_reflection_optimizer">false</property>

              <property name="hibernate.query.plan_cache_max_soft_references">2048</property>

              <property name="hibernate.cache.use_query_cache">true</property>

              <property name="hibernate.order_inserts">true</property>

              <property name="hibernate.order_updates">true</property>

              <property name="hibernate.prepare_sql">true</property>

              <property name="hibernate.connection.provider_class">org.hibernate.c3p0.internal.C3P0ConnectionProvider</property>

             <property name="hibernate.cache.infinispan.cachemanager">java:CacheManager/entity</property>

             <property name="hibernate.cache.region.factory_class">org.hibernate.cache.infinispan.InfinispanRegionFactory</property>

             <property name="hibernate.cache.infinispan.cfg">cacheprovider-configs.xml</property>

        </session-factory>

       

      </hibernate-configuration>

       

      The latest error I'm getting is this:

       

      Caused by: java.lang.NoSuchMethodException: java.lang.Object.injectDependencies(org.infinispan.eviction.EvictionManager, org.infinispan.context.InvocationContextFactory, org.infinispan.context.InvocationContextContainer, org.infinispan.commands.CommandsFactory, org.infinispan.interceptors.InterceptorChain, org.infinispan.configuration.cache.Configuration, org.infinispan.notifications.cachelistener.CacheNotifier, org.infinispan.factories.ComponentRegistry, javax.transaction.TransactionManager, org.infinispan.batch.BatchContainer, org.infinispan.remoting.rpc.RpcManager, org.infinispan.container.DataContainer, org.infinispan.commons.marshall.StreamingMarshaller, org.infinispan.distribution.DistributionManager, org.infinispan.manager.EmbeddedCacheManager, java.util.concurrent.ExecutorService, org.infinispan.transaction.impl.TransactionTable, org.infinispan.transaction.xa.recovery.RecoveryManager, org.infinispan.transaction.impl.TransactionCoordinator, org.infinispan.util.concurrent.locks.LockManager, org.infinispan.security.AuthorizationManager, org.infinispan.configuration.global.GlobalConfiguration, org.infinispan.iteration.impl.EntryRetriever, org.infinispan.partitionhandling.impl.PartitionHandlingManager, org.infinispan.topology.LocalTopologyManager)

        at java.lang.Class.getDeclaredMethod(Class.java:2004) ~[?:1.7.0_60]

        at org.infinispan.commons.util.ReflectionUtil.findMethod(ReflectionUtil.java:98) ~[infinispan-commons-7.0.3.Final.jar:7.0.3.Final]

        at org.infinispan.commons.util.ReflectionUtil.findMethod(ReflectionUtil.java:103) ~[infinispan-commons-7.0.3.Final.jar:7.0.3.Final]

        at org.infinispan.factories.AbstractComponentRegistry$Component.buildInjectionMethodsList(AbstractComponentRegistry.java:825) ~[infinispan-core-7.0.3.Final.jar:7.0.3.Final]

        at org.infinispan.factories.AbstractComponentRegistry.registerComponentInternal(AbstractComponentRegistry.java:195) ~[infinispan-core-7.0.3.Final.jar:7.0.3.Final]

        at org.infinispan.factories.ComponentRegistry.registerComponentInternal(ComponentRegistry.java:187) ~[infinispan-core-7.0.3.Final.jar:7.0.3.Final]

       

      Using these libraries:

       

      asm-3.2.jar

      hibernate-commons-annotations-4.0.5.Final.jar

      hibernate-core-4.3.7.Final.jar

      hibernate-infinispan-4.3.7.Final.jar

      hibernate-jpa-2.1-api-1.0.0.Final.jar

      hibernate-validator-4.3.1.Final.jar

      infinispan-commons-7.0.3.Final.jar

      infinispan-core-7.0.3.Final.jar

      javassist-3.18.0-GA.jar

      jboss-logging-3.1.0.GA.jar

      jboss-logmanager-1.2.2.GA.jar

      jboss-marshalling-osgi-1.4.4.Final.jar

      jboss-transaction-api_1.1_spec-1.0.1.Final.jar

      jgroups-3.6.1.Final.jar

      rhq-pluginAnnotations-3.0.4.jar

      woodstox-core-asl-4.4.1.jar

       

      which I'm unable to resolve. I've tried every combination of infinispan-core, embedded, embeded-query and all the dependencies, tracing through the maven dependencies and looking through the pom.xml in git-hub. I've tried following the example here: infinispan-2lc-examples/iBook-hibernate-tomcat7 at master · andyuk1986/infinispan-2lc-examples, and I've tried different (including blank) cache configurations, but nothing is working.

       

      Is there any complete list of dependencies somewhere for Infinispan that I can use in order to get this working?