<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

    主站蜘蛛池模板: 日本一区二区三区免费高清| 黄页免费视频播放在线播放| 免费看无码特级毛片| 亚洲 自拍 另类小说综合图区| 亚洲欧美成人一区二区三区| 欧美好看的免费电影在线观看| 国产美女视频免费观看的网站| 亚洲欧洲国产精品香蕉网| 国产午夜不卡AV免费| 边摸边吃奶边做爽免费视频网站| 亚洲av无码片在线观看| 毛片免费全部播放一级| 老司机午夜在线视频免费观| 亚洲人成片在线观看| 美腿丝袜亚洲综合| 久久精品国产免费| 国产精品亚洲午夜一区二区三区| 国产成人免费ā片在线观看| 边摸边吃奶边做爽免费视频网站| 天堂亚洲国产中文在线| 亚洲成a人片在线观看无码专区| 最近免费mv在线电影| 亚洲成a∧人片在线观看无码| 亚洲AV无码一区东京热久久| 欧洲精品成人免费视频在线观看| 91在线手机精品免费观看| 久操视频免费观看| 亚洲AV无码专区在线电影成人| 国产精品亚洲mnbav网站 | 精品久久久久亚洲| 亚洲avav天堂av在线不卡| 欧美在线看片A免费观看| 日韩国产免费一区二区三区| 一区二区视频免费观看| 亚洲精品美女视频| 免费高清在线影片一区| 免费h视频在线观看| 免费国产成人18在线观看| 免费观看男人吊女人视频| 久久久精品午夜免费不卡| 日韩免费观看一区|