Szia,<br><br>Köszönöm a választ. Azzal is próbálkoztam, de az hibernate3-hoz van. Ebben a pillanatban lett jó, a megoldás pusztán annyi volt, hogy nem szabad összekeverni a sessionfactory-t az entitymanager-el :)<br><br>A módosult konfig:<br>

<br>&lt;bean id=&quot;entityManagerFactory&quot;<br>        class=&quot;org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean&quot;&gt;<br>        &lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot; /&gt;<br>

        &lt;property name=&quot;packagesToScan&quot; value=&quot;my.spring.model&quot; /&gt;<br>        &lt;property name=&quot;jpaVendorAdapter&quot;&gt;<br>            &lt;bean class=&quot;org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter&quot;&gt;<br>

                &lt;property name=&quot;showSql&quot; value=&quot;$persistence{hibernate.show_sql}&quot; /&gt;<br>            &lt;/bean&gt;<br>        &lt;/property&gt;<br>        &lt;property name=&quot;jpaProperties&quot;&gt;<br>

            &lt;props&gt;<br>                &lt;prop key=&quot;hibernate.current_session_context_class&quot;&gt;org.hibernate.context.ThreadLocalSessionContext&lt;/prop&gt;<br>                &lt;prop key=&quot;hibernate.cache.region.factory_class&quot;&gt;org.hibernate.cache.ehcache.EhCacheRegionFactory&lt;/prop&gt;<br>

                &lt;prop key=&quot;hibernate.cache.use_query_cache&quot;&gt;true&lt;/prop&gt;<br>                &lt;prop key=&quot;hibernate.cache.use_second_level_cache&quot;&gt;true&lt;/prop&gt;<br>                &lt;prop key=&quot;hibernate.cache.provider_configuration_file_resource_path&quot;&gt;classpath:ehcache.xml&lt;/prop&gt;<br>

                &lt;prop key=&quot;hibernate.generate_statistics&quot;&gt;true&lt;/prop&gt;<br>                &lt;prop key=&quot;hibernate.cache.use_structured_entries&quot;&gt;true&lt;/prop&gt;<br>            &lt;/props&gt;<br>

        &lt;/property&gt;<br>        &lt;property name=&quot;persistenceUnitName&quot; value=&quot;s2aUnit&quot; /&gt;<br>    &lt;/bean&gt;<br><br>A sessionFactory bean meg kuka, és így jó :)<br clear="all"><div><br>Köszi mégegyszer,<br>

Bartuszek Viktor</div>
<br><br><div class="gmail_quote">On Thu, Feb 7, 2013 at 9:06 AM, cx.chico <span dir="ltr">&lt;<a href="mailto:cx.chico@gmail.com" target="_blank">cx.chico@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Szia!<br>
<br>
Személyes tapasztalatom nincs a témában, de egy helyen ezt láttam:<br>
<br>
&lt;property name=&quot;hibernate.cache.region.factory_class&quot;&gt;Net.sf.ehcache.hibernate.EhCacheRegionFactory&lt;<br>
/property&gt;<br>
<br>
Ehhez lehet, hogy kell a nem-hibernate-s ehcache is a pom.xml-be.<br>
<br>
Üdv,<br>
Chico<br>
<br>
<br>
2013/2/6 Bartuszek Viktor &lt;<a href="mailto:viktor.bartuszek@rhodeus.hu">viktor.bartuszek@rhodeus.hu</a>&gt;:<br>
<div><div class="h5">&gt; Sziasztok!<br>
&gt;<br>
&gt; Meggyűlt a bajom a ${subject} kombóval, és már sajnos a 30+ konfig után már<br>
&gt; nem tudom merre menjek tovább. Erre a felállásra nem találtam sajno howto.<br>
&gt;<br>
&gt; Jelen pillanatban a releváns spring konfigok így néznek ki:<br>
&gt;<br>
&gt; &lt;jpa:repositories base-package=&quot;my.spring.repository&quot;<br>
&gt;         entity-manager-factory-ref=&quot;entityManagerFactory&quot;<br>
&gt; transaction-manager-ref=&quot;transactionManager&quot; /&gt;<br>
&gt;<br>
&gt; &lt;bean id=&quot;transactionManager&quot;<br>
&gt; class=&quot;org.springframework.orm.hibernate4.HibernateTransactionManager&quot;&gt;<br>
&gt;         &lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot; /&gt;<br>
&gt;         &lt;property name=&quot;sessionFactory&quot; ref=&quot;sessionFactory&quot; /&gt;<br>
&gt;     &lt;/bean&gt;<br>
&gt;<br>
&gt;     &lt;bean id=&quot;sessionFactory&quot;<br>
&gt; class=&quot;org.springframework.orm.hibernate4.LocalSessionFactoryBean&quot;&gt;<br>
&gt;         &lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot;/&gt;<br>
&gt;         &lt;property name=&quot;hibernateProperties&quot;&gt;<br>
&gt;             &lt;props&gt;<br>
&gt;                 &lt;prop<br>
&gt; key=&quot;hibernate.current_session_context_class&quot;&gt;org.hibernate.context.ThreadLocalSessionContext&lt;/prop&gt;<br>
&gt;                 &lt;prop<br>
&gt; key=&quot;hibernate.cache.region.factory_class&quot;&gt;org.hibernate.cache.ehcache.EhCacheRegionFactory&lt;/prop&gt;<br>
&gt;                 &lt;prop key=&quot;hibernate.cache.use_query_cache&quot;&gt;true&lt;/prop&gt;<br>
&gt;                 &lt;prop<br>
&gt; key=&quot;hibernate.cache.use_second_level_cache&quot;&gt;true&lt;/prop&gt;<br>
&gt;                 &lt;prop<br>
&gt; key=&quot;hibernate.cache.provider_configuration_file_resource_path&quot;&gt;classpath:ehcache.xml&lt;/prop&gt;<br>
&gt;                 &lt;prop key=&quot;hibernate.generate_statistics&quot;&gt;true&lt;/prop&gt;<br>
&gt;                 &lt;prop<br>
&gt; key=&quot;hibernate.cache.use_structured_entries&quot;&gt;true&lt;/prop&gt;<br>
&gt;             &lt;/props&gt;<br>
&gt;         &lt;/property&gt;<br>
&gt;         &lt;property name=&quot;packagesToScan&quot; value=&quot;my.spring.model&quot; /&gt;<br>
&gt;     &lt;/bean&gt;<br>
&gt;<br>
&gt;     &lt;bean id=&quot;entityManagerFactory&quot;<br>
&gt;<br>
&gt; class=&quot;org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean&quot;&gt;<br>
&gt;         &lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot; /&gt;<br>
&gt;         &lt;property name=&quot;packagesToScan&quot; value=&quot;my.spring.model&quot; /&gt;<br>
&gt;         &lt;property name=&quot;jpaVendorAdapter&quot;&gt;<br>
&gt;             &lt;bean<br>
&gt; class=&quot;org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter&quot;&gt;<br>
&gt;                 &lt;property name=&quot;showSql&quot;<br>
&gt; value=&quot;$persistence{hibernate.show_sql}&quot; /&gt;<br>
&gt;             &lt;/bean&gt;<br>
&gt;         &lt;/property&gt;<br>
&gt;         &lt;property name=&quot;persistenceUnitName&quot; value=&quot;myUnit&quot; /&gt;<br>
&gt;     &lt;/bean&gt;<br>
&gt;<br>
&gt; A logban a lényegi bejegyzések:<br>
&gt; 2013-02-06 16:34:11,031 DEBUG [][] n.s.e.config.ConfigurationFactory -<br>
&gt; Configuring ehcache from ehcache.xml found in the classpath:<br>
&gt; file:/home/bartuszekv/.../target/classes/ehcache.xml<br>
&gt; 2013-02-06 16:34:11,031 DEBUG [][] n.s.e.config.ConfigurationFactory -<br>
&gt; Configuring ehcache from URL:<br>
&gt; file:/home/bartuszekv/.../target/classes/ehcache.xml<br>
&gt; 2013-02-06 16:34:11,031 DEBUG [][] n.s.e.config.ConfigurationFactory -<br>
&gt; Configuring ehcache from InputStream<br>
&gt; 2013-02-06 16:34:11,040 DEBUG [][] net.sf.ehcache.config.BeanHandler -<br>
&gt; Ignoring ehcache attribute xmlns:xsi<br>
&gt; 2013-02-06 16:34:11,040 DEBUG [][] net.sf.ehcache.config.BeanHandler -<br>
&gt; Ignoring ehcache attribute xsi:noNamespaceSchemaLocation<br>
&gt; 2013-02-06 16:34:11,040 DEBUG [][] n.s.e.config.DiskStoreConfiguration -<br>
&gt; Disk Store Path: /tmp/EhCacheSpringStore<br>
&gt; 2013-02-06 16:34:11,084 DEBUG [][] net.sf.ehcache.util.PropertyUtil -<br>
&gt; propertiesString is null.<br>
&gt; 2013-02-06 16:34:11,088 DEBUG [][] n.s.e.config.ConfigurationHelper - No<br>
&gt; CacheManagerEventListenerFactory class specified. Skipping...<br>
&gt; 2013-02-06 16:34:11,125 DEBUG [][] net.sf.ehcache.Cache - No<br>
&gt; BootstrapCacheLoaderFactory class specified. Skipping...<br>
&gt; 2013-02-06 16:34:11,125 DEBUG [][] net.sf.ehcache.Cache - CacheWriter<br>
&gt; factory not configured. Skipping...<br>
&gt; 2013-02-06 16:34:11,126 DEBUG [][] n.s.e.config.ConfigurationHelper - No<br>
&gt; CacheExceptionHandlerFactory class specified. Skipping...<br>
&gt; 2013-02-06 16:34:11,128 DEBUG [][] net.sf.ehcache.Cache - No<br>
&gt; BootstrapCacheLoaderFactory class specified. Skipping...<br>
&gt; 2013-02-06 16:34:11,129 DEBUG [][] net.sf.ehcache.Cache - CacheWriter<br>
&gt; factory not configured. Skipping...<br>
&gt; 2013-02-06 16:34:11,129 DEBUG [][] n.s.e.config.ConfigurationHelper - No<br>
&gt; CacheExceptionHandlerFactory class specified. Skipping...<br>
&gt; 2013-02-06 16:34:11,129 DEBUG [][] net.sf.ehcache.Cache - No<br>
&gt; BootstrapCacheLoaderFactory class specified. Skipping...<br>
&gt; 2013-02-06 16:34:11,129 DEBUG [][] net.sf.ehcache.Cache - CacheWriter<br>
&gt; factory not configured. Skipping...<br>
&gt; 2013-02-06 16:34:11,129 DEBUG [][] n.s.e.config.ConfigurationHelper - No<br>
&gt; CacheExceptionHandlerFactory class specified. Skipping...<br>
&gt; 2013-02-06 16:34:11,129 WARN  [][] net.sf.ehcache.Cache - Cache:<br>
&gt; org.hibernate.cache.UpdateTimestampsCache has a maxElementsInMemory of 0.<br>
&gt; In Ehcache 2.0 this has been changed to mean a store with no capacity limit.<br>
&gt; Set it to 1 if you want no elements cached in memory<br>
&gt; 2013-02-06 16:34:11,146 DEBUG [][] net.sf.ehcache.Cache - Initialised cache:<br>
&gt; org.hibernate.cache.UpdateTimestampsCache<br>
&gt; 2013-02-06 16:34:11,146 DEBUG [][] n.s.e.config.ConfigurationHelper -<br>
&gt; CacheDecoratorFactory not configured. Skipping for<br>
&gt; &#39;org.hibernate.cache.UpdateTimestampsCache&#39;.<br>
&gt; 2013-02-06 16:34:11,146 DEBUG [][] n.s.e.config.ConfigurationHelper -<br>
&gt; CacheDecoratorFactory not configured for defaultCache. Skipping for<br>
&gt; &#39;org.hibernate.cache.UpdateTimestampsCache&#39;.<br>
&gt; 2013-02-06 16:34:11,153 DEBUG [][] n.s.e.s.c.f.DiskOverflowStorageFactory -<br>
&gt; Deleting data file org.hibernate.cache.StandardQueryCache.data<br>
&gt; 2013-02-06 16:34:11,164 DEBUG [][] net.sf.ehcache.Cache - Initialised cache:<br>
&gt; org.hibernate.cache.StandardQueryCache<br>
&gt; 2013-02-06 16:34:11,164 DEBUG [][] n.s.e.config.ConfigurationHelper -<br>
&gt; CacheDecoratorFactory not configured. Skipping for<br>
&gt; &#39;org.hibernate.cache.StandardQueryCache&#39;.<br>
&gt; 2013-02-06 16:34:11,164 DEBUG [][] n.s.e.config.ConfigurationHelper -<br>
&gt; CacheDecoratorFactory not configured for defaultCache. Skipping for<br>
&gt; &#39;org.hibernate.cache.StandardQueryCache&#39;.<br>
&gt; 2013-02-06 16:34:11,193 INFO  [][] org.hibernate.validator.util.Version -<br>
&gt; Hibernate Validator 4.2.0.Final<br>
&gt; 2013-02-06 16:34:11,499 DEBUG [][] net.sf.ehcache.Cache - Initialised cache:<br>
&gt; my.spring.model.Entity1<br>
&gt; 2013-02-06 16:34:11,500 DEBUG [][] n.s.e.config.ConfigurationHelper -<br>
&gt; CacheDecoratorFactory not configured for defaultCache. Skipping for<br>
&gt; &#39;my.spring.model.Entity1&#39;.<br>
&gt; 2013-02-06 16:34:11,514 DEBUG [][] net.sf.ehcache.Cache - Initialised cache:<br>
&gt; my.spring.model.Entity2<br>
&gt; 2013-02-06 16:34:11,515 DEBUG [][] n.s.e.config.ConfigurationHelper -<br>
&gt; CacheDecoratorFactory not configured for defaultCache. Skipping for<br>
&gt; &#39;my.spring.model.Entity2&#39;.<br>
&gt; ...<br>
&gt;<br>
&gt; Majd mikor nekifekszik az entitásoknak:<br>
&gt;<br>
&gt; 2013-02-06 16:34:13.151:WARN::Nested in<br>
&gt; org.springframework.beans.factory.BeanCreationException: Error creating bean<br>
&gt; with name<br>
&gt; &#39;org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0&#39;:<br>
&gt; Initialization of bean failed; nested exception is<br>
&gt; org.springframework.beans.factory.BeanCreationException: Error creating bean<br>
&gt; with name &#39;entityManagerFactory&#39; defined in class path resource<br>
&gt; [persistence-context.xml]: Invocation of init method failed; nested<br>
&gt; exception is javax.persistence.PersistenceException: [PersistenceUnit:<br>
&gt; myUnit] Unable to build EntityManagerFactory:<br>
&gt; org.hibernate.cache.NoCacheRegionFactoryAvailableException: Second-level<br>
&gt; cache is used in the application, but property<br>
&gt; hibernate.cache.region.factory_classis not gaven, please either disable<br>
&gt; second level cache or set correct region factory class name to property<br>
&gt; hibernate.cache.region.factory_class (and make sure the second level cache<br>
&gt; provider, hibernate-infinispan, for example, available in the classpath).<br>
&gt;     at<br>
&gt; org.hibernate.cache.internal.NoCachingRegionFactory.buildEntityRegion(NoCachingRegionFactory.java:69)<br>
&gt;     at<br>
&gt; org.hibernate.internal.SessionFactoryImpl.&lt;init&gt;(SessionFactoryImpl.java:347)<br>
&gt;     at<br>
&gt; org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1740)<br>
&gt;     at<br>
&gt; org.hibernate.ejb.EntityManagerFactoryImpl.&lt;init&gt;(EntityManagerFactoryImpl.java:94)<br>
&gt;     at<br>
&gt; org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)<br>
&gt;     at<br>
&gt; org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889)<br>
&gt;     at<br>
&gt; org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)<br>
&gt;<br>
&gt; pom.xml erre vonatkozó bejegyzése:<br>
&gt;<br>
&gt; &lt;dependency&gt;<br>
&gt;             &lt;groupId&gt;org.hibernate&lt;/groupId&gt;<br>
&gt;             &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;<br>
&gt;             &lt;version&gt;${hibernate.version}&lt;/version&gt;<br>
&gt;         &lt;/dependency&gt;<br>
&gt;         &lt;dependency&gt;<br>
&gt;             &lt;groupId&gt;org.hibernate&lt;/groupId&gt;<br>
&gt;             &lt;artifactId&gt;hibernate-validator&lt;/artifactId&gt;<br>
&gt;             &lt;version&gt;${hibernate.validator.version}&lt;/version&gt;<br>
&gt;         &lt;/dependency&gt;<br>
&gt;         &lt;dependency&gt;<br>
&gt;             &lt;groupId&gt;org.hibernate&lt;/groupId&gt;<br>
&gt;             &lt;artifactId&gt;hibernate-ehcache&lt;/artifactId&gt;<br>
&gt;             &lt;version&gt;${hibernate.version}&lt;/version&gt;<br>
&gt;         &lt;/dependency&gt;<br>
&gt;<br>
&gt; Aholis a hibernate verzió 4.1.1.Final<br>
&gt;<br>
&gt; Megbírkózott már esetleg valaki ezzel? Az is nagy segítség lenne, ha valami<br>
&gt; erre vonatkozó dokumentációt tudna linkelni valaki.<br>
&gt;<br>
&gt; A válaszokat előre is köszönöm,<br>
&gt; Bartuszek Viktor<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Javalist mailing list<br>
&gt; <a href="mailto:Javalist@lists.javaforum.hu">Javalist@lists.javaforum.hu</a><br>
&gt; <a href="http://lists.javaforum.hu/mailman/listinfo/javalist" target="_blank">http://lists.javaforum.hu/mailman/listinfo/javalist</a><br>
&gt;<br>
_______________________________________________<br>
Javalist mailing list<br>
<a href="mailto:Javalist@lists.javaforum.hu">Javalist@lists.javaforum.hu</a><br>
<a href="http://lists.javaforum.hu/mailman/listinfo/javalist" target="_blank">http://lists.javaforum.hu/mailman/listinfo/javalist</a><br>
</blockquote></div><br>