<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    風人園

    弱水三千,只取一瓢,便能解渴;佛法無邊,奉行一法,便能得益。
    隨筆 - 99, 文章 - 181, 評論 - 56, 引用 - 0
    數據加載中……

    JBPM Hibernate cache

    JBPM Hibernatecache

    Applies to: JBPM 3.1.2, JBoss 4.0.5-GA

    Everything starts with a beautiful concept but has to pass past those nasty errors. The same applies to this JBPM project, everything was nice, I have seen it running and then I was supposed to take the sources, clean, organize and enhance. Everything ok until now. The only problem is that when deploying the JBPM (sar) service there was this error:

    16:09:17,402 ERROR [CommandExecutorThread] org.hibernate.HibernateException: Could not instantiatecacheimplementation

    The first idea was to enable DEBUG logging but the result was not much cleared:

    org.hibernate.HibernateException: Could not instantiatecacheimplementation
    at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:64)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:214)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
    at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
    at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
    at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
    at org.jbpm.persistence.db.DbPersistenceService.getMessagingSession(DbPersistenceService.java:235)
    at org.jbpm.JbpmContext.getMessagingSession(JbpmContext.java:521)
    at org.jbpm.msg.db.DbMessageService.<init>(DbMessageService.java:49)
    at org.jbpm.msg.db.DbMessageServiceFactory.openService(DbMessageServiceFactory.java:32)
    at org.jbpm.svc.Services.getService(Services.java:136)
    at org.jbpm.svc.Services.getMessageService(Services.java:172)
    at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:112)
    at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)
    Caused by: org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
    at org.hibernate.cache.NoCacheProvider.buildCache(NoCacheProvider.java:21)
    at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:61)
    ... 13 more
    16:09:17,402 DEBUG [JbpmContext] closing JbpmContext
    16:09:17,402 DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@71dfd7
    16:09:17,402 ERROR [CommandExecutorThread] org.hibernate.HibernateException: Could not instantiatecacheimplementation

    Apparently the cacheimplementationcould not been found or it was expecting some configuration properties which where not set. I checked in my deploy/lib directory and the ehcache.jar was there. I started to modify the hibernate.hbm.xml which was basically the one from the jbpm examples and which was not working.

    First successful try:
    <property name="hibernate.cache.use_second_level_cache">false</property>
    <property name="hibernate.cache.use_query_cache">false</property>
    This seems to work, however it disables all the cache which is not exactly what I want.

    Second successful try:

    <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
    <!--
    <property name="hibernate.cache.use_second_level_cache">false</property>
    <property name="hibernate.cache.use_query_cache">false</property>
    -->

    In the mean time I also tried:

    <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
    <!--
    <property name="hibernate.cache.use_second_level_cache">false</property>
    <property name="hibernate.cache.use_query_cache">false</property>
    -->

    which also worked.
    Apparently all was related to this in hibernate documentation, as it seems EhCache is no longer a default implementation and this was what JPBM was complaing about:

    "You have the option to tell Hibernate which caching implementation to use by specifying the name of a class that implements org.hibernate.cache.CacheProvider? using the property hibernate.cache.provider_class. ... Note that versions prior to 3.2 defaulted to use EhCache as the default cache provider; that is no longer the case as of 3.2."

    Warning: just undeploying/deploying the sar gave me very unreplicable results. The only way I could verify the configuration correctly each way was to restart the container :((

    Links with helped me with this:

    posted on 2007-01-16 08:58 風人園 閱讀(1899) 評論(0)  編輯  收藏 所屬分類: JBoss

    主站蜘蛛池模板: 日本最新免费网站| 最新久久免费视频| 成人毛片18女人毛片免费| 亚洲精品免费在线| 毛片免费在线观看网址| 亚洲国产精品久久久久秋霞小| 免费毛片a在线观看67194| 国产成人精品日本亚洲网址| 国产精品免费观看久久| 亚洲av日韩av永久在线观看| 免费一级黄色毛片| 一级做a爰片久久毛片免费看| 91麻豆国产自产在线观看亚洲| 国产福利在线观看永久免费| 亚洲国产精品SSS在线观看AV| 久久国产乱子免费精品| 亚洲人成电影在线观看网| 四虎影视www四虎免费| 国产亚洲男人的天堂在线观看| 精品亚洲一区二区三区在线播放| 大妹子影视剧在线观看全集免费| 久久久久亚洲精品影视| 亚州免费一级毛片| 激情无码亚洲一区二区三区 | 亚洲精品成a人在线观看| 久久久WWW成人免费精品| 久久亚洲精品成人777大小说| 成人免费AA片在线观看| 黄页网址在线免费观看| 亚洲国产精华液网站w| 免费视频专区一国产盗摄| 免费精品国产自产拍在线观看| 午夜亚洲国产理论秋霞| 午夜免费不卡毛片完整版| 久久久免费观成人影院| 亚洲国产成人久久| 亚洲精品一级无码中文字幕| 51在线视频免费观看视频| 狠狠热精品免费观看| 亚洲首页在线观看| 亚洲乱码日产精品a级毛片久久|